1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-02 22:14:37 +00:00

Drop use of tempfiles when loading compressed files.

Also simplified .zga texture and .aqs savegame loading.
Dropped support for "crunched" .sav files (those were never used),
and the corresponding crunch functions.

To be done: Temp files are still used when compressing files,
will address this in a later commit.
This commit is contained in:
fgenesis 2012-02-10 00:10:50 +01:00
parent 321a65a9fb
commit 75e7b137d6
11 changed files with 914 additions and 227 deletions

View file

@ -993,6 +993,11 @@ bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
return false;
}
return LoadMem(buf, length, encoding);
}
bool TiXmlDocument::LoadMem( char* buf, long length, TiXmlEncoding encoding )
{
// Process the buffer in place to normalize new lines. (See comment above.)
// Copies from the 'p' to 'q' pointer, where p can advance faster if
// a newline-carriage return is hit.

View file

@ -22,6 +22,9 @@ must not be misrepresented as being the original software.
distribution.
*/
// EDIT:
// - added LoadMem() function
#ifndef TINYXML_INCLUDED
#define TINYXML_INCLUDED
@ -1421,6 +1424,8 @@ public:
/// Save a file using the given FILE*. Returns true if successful.
bool SaveFile( FILE* ) const;
bool LoadMem( char *buf, long length, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
#ifdef TIXML_USE_STL
bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version.
{