commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
41
include/engine/scene3d/mterrain_nml.cpp
Normal file
41
include/engine/scene3d/mterrain_nml.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "scene3d/mterrain.h"
|
||||
#include "log/log.h"
|
||||
|
||||
using namespace GS::S3D;
|
||||
using namespace GS::NML;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool MTerrain::FromMetaTag(Tag &tag)
|
||||
{
|
||||
if (tag.name != "MTerrain")
|
||||
__ERR__(__LOG_E__ << "could not parse managed terrain, incorrect root tag (" << tag.name << ").\n", false)
|
||||
|
||||
NMLTagForeach(pt, tag)
|
||||
{
|
||||
if (pt->name == "MItem")
|
||||
MItem::FromMetaTag(*pt);
|
||||
else if (pt->name == "Terrain")
|
||||
Terrain::FromMetaTag(*pt);
|
||||
else
|
||||
__LOG_W__ << "Unknown tag '" << pt->name << "' in <MEmitter>.\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Tag *MTerrain::AsMetaTag()
|
||||
{
|
||||
Tag *root = new Tag("MTerrain");
|
||||
if (!root)
|
||||
__ERR__(__LOG_E__ << "Could not create root tag to serialize.\n", NULL)
|
||||
|
||||
root->AddChild(MItem::AsMetaTag());
|
||||
root->AddChild(Terrain::AsMetaTag());
|
||||
return root;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user