Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 09:48

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 14.09.2010, 08:09 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Hi all,

I thought it might be a good time to move the GameEngine to use the rapidXML lib instead because Horde3D now uses it and I'm worried about conflicts and I like consistency. So far I'm doing this process, but I am stuck trying to find a replacement for this guy:
Code:
XMLSTR createXMLString(int nFormat=1, int *pnSize=NULL) const;

It is used to extract single GameEntity nodes from scene files. I think I need to read up more on how templates work looking at rapidxml.h & rapidxml_print.h. The other parts have been an easy enough transition using utXML.h it's just that one which I'm stuck on. I'm guessing some function implementation in the XMLNode class needs to be made?

Thanks!

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
PostPosted: 15.09.2010, 13:02 
Offline

Joined: 26.11.2008, 09:48
Posts: 2
Hi MistaED,

don't know if i understood your question right.
I can explain the function:
Code:
XMLSTR createXMLString(int nFormat=1, int *pnSize=NULL) const;
It simply creates a string which contains the xml structure of the current node and all of its children.

The only place where it is currently used is in GameEngineCore\GameEngine.cpp(147). where the children of the Extra node of the *.scn file is converted to a string to call createGameEntity(const char* xmlString).
But as this function at first parses the string to an xml node again, it would be cleaner to implement an overloaded function createGameEntity(const XMLNode&) where you can pass the node directly.
By that you won't actually need to reimplement the createXMLString() function, but I also think such a function could be useful anyway. Doesn't rapid xml provide something like that?


Top
 Profile  
Reply with quote  
PostPosted: 15.09.2010, 13:26 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Hi Felix,

Yeah I found something in rapidxml_print.h and noticed Horde3D does what I'm looking for so I hope it solves that. I'm very close now to having the game engine run on linux/my phone... :)

Thanks for the reply

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group