mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-03 03:56:30 +03:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user