mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 14:34:34 +00:00
Major include refactor; changes to pretty much everything
This untangles some of the gigantic kitchen sink headers in an attempt to split things into smaller files. Also don't include gl.h, glext.h, windows.h, and other such nonsense *everywhere*. Lots of cleanups on the way too. More dead/unused code removal. Remove incrFlag(), decrFlag() Lua functions.
This commit is contained in:
parent
d1778a97b8
commit
8472718fb7
141 changed files with 2993 additions and 3708 deletions
25
BBGE/ReadXML.cpp
Normal file
25
BBGE/ReadXML.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "ReadXML.h"
|
||||
#include "Base.h"
|
||||
|
||||
tinyxml2::XMLError readXML(const std::string& fn, tinyxml2::XMLDocument& doc)
|
||||
{
|
||||
unsigned long sz = 0;
|
||||
char *buf = readFile(fn, &sz);
|
||||
tinyxml2::XMLError err = doc.Parse(buf, sz);
|
||||
delete [] buf;
|
||||
return err;
|
||||
}
|
||||
|
||||
tinyxml2::XMLDocument *readXML(const std::string& fn, tinyxml2::XMLError *perr /* = 0 */, bool keepEmpty /* = false */)
|
||||
{
|
||||
tinyxml2::XMLDocument *doc = new tinyxml2::XMLDocument();
|
||||
tinyxml2::XMLError err = readXML(fn, *doc);
|
||||
if(perr)
|
||||
*perr = err;
|
||||
if(err != tinyxml2::XML_SUCCESS && !keepEmpty)
|
||||
{
|
||||
delete doc;
|
||||
doc = NULL;
|
||||
}
|
||||
return doc;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue