Keep it working on the map editor, maps can now be saved, i'll implement the loading next.

Changed a little bit how to load from memory packs.
Fixed some minor bugs on the UI.
And many things that i can't remember, i forgot to make a commit yesterday.
This commit is contained in:
spartanj
2011-06-09 03:37:26 -03:00
parent 05ef7cc0b8
commit a514d37b1d
46 changed files with 1287 additions and 199 deletions

View File

@@ -180,7 +180,7 @@ bool cZip::ExtractFileToMemory( const std::string& path, std::vector<Uint8>& dat
return Ret;
}
bool cZip::ExtractFileToMemory( const std::string& path, Uint8** data, Uint32* dataSize ) {
bool cZip::ExtractFileToMemory( const std::string& path, PointerData& data ) {
Lock();
bool Ret = false;
@@ -196,10 +196,10 @@ bool cZip::ExtractFileToMemory( const std::string& path, Uint8** data, Uint32* d
struct zip_file * zf = zip_fopen_index( mZip, zs.index, 0 );
if ( NULL != zf ) {
*dataSize = (Uint32)zs.size;
*data = eeNew( Uint8, (*dataSize) );
data.DataSize = (Uint32)zs.size;
data.Data = eeNewArray( Uint8, ( data.DataSize ) );
Result = (Int32)zip_fread( zf, reinterpret_cast<void*> (&data[0]), (*dataSize) );
Result = (Int32)zip_fread( zf, (void*)data.Data, data.DataSize );
zip_fclose(zf);