commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
46
include/engine/core/renderer_nml.cpp
Normal file
46
include/engine/core/renderer_nml.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "core/renderer.h"
|
||||
|
||||
using namespace GS::Render;
|
||||
using GS::NML::Tag;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Renderer::FromMetaTag(Tag &tag)
|
||||
{
|
||||
if (tag.name != GetName())
|
||||
return false; // Incorrect tag.
|
||||
|
||||
registry.Clear();
|
||||
|
||||
NMLTagForeach(pt, tag)
|
||||
{
|
||||
if (pt->name == "Version")
|
||||
;
|
||||
|
||||
else if (pt->name == "Registry")
|
||||
{
|
||||
NMLTagForeach(child, *pt)
|
||||
registry.AddRoot(child->Clone());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Tag *Renderer::AsMetaTag()
|
||||
{
|
||||
Tag *root = new Tag(GetName());
|
||||
|
||||
root->AddChild("Version", GetVersion());
|
||||
|
||||
Tag *tag_registry = root->AddChild("Registry");
|
||||
NMLFileForeach(child, registry)
|
||||
tag_registry->AddChild(child->Clone());
|
||||
|
||||
return root;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user