commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
39
include/engine/core/object_nml.cpp
Normal file
39
include/engine/core/object_nml.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "core/object.h"
|
||||
#include "reflection/c_refl.h"
|
||||
#include "metafile/nml_object.h"
|
||||
|
||||
using GS::Core::Object;
|
||||
using GS::Reflection::Property;
|
||||
using namespace GS::NML;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Property serializable[] =
|
||||
{
|
||||
{ Property::StringProp, "Geometry", offsetof(Object, geometry), 0 },
|
||||
{ Property::BoolProp, "CacheGeometry", offsetof(Object, cache_geometry), 0 },
|
||||
{ Property::InvalidProp, 0, 0, 0 }
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Object::FromMetaTag(Tag &t)
|
||||
{
|
||||
if ((t.name != "Object") || !GenericObjectFromMetaTag(t, this, serializable))
|
||||
return false;
|
||||
if (Tag *c = t.GetTag("Item")) Item::FromMetaTag(*c);
|
||||
return true;
|
||||
}
|
||||
Tag *Object::AsMetaTag() const
|
||||
{
|
||||
Tag *t = new Tag("Object");
|
||||
t->AddChild(Item::AsMetaTag());
|
||||
return GenericObjectToMetaTag(t, this, serializable);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user