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

@@ -59,12 +59,15 @@ bool cSoundBuffer::LoadFromFile(const std::string& Filename) {
}
bool cSoundBuffer::LoadFromPack( cPack* Pack, const std::string& FilePackPath ) {
std::vector<Uint8> TmpData;
bool Ret = false;
cPack::PointerData PData;
if ( Pack->IsOpen() && Pack->ExtractFileToMemory( FilePackPath, TmpData ) )
return LoadFromMemory( reinterpret_cast<const char*> ( &TmpData[0] ), TmpData.size() );
if ( Pack->IsOpen() && Pack->ExtractFileToMemory( FilePackPath, PData ) )
Ret = LoadFromMemory( reinterpret_cast<const char*> ( PData.Data ), PData.DataSize );
return false;
eeSAFE_DELETE( PData.Data );
return Ret;
}
bool cSoundBuffer::LoadFromMemory( const char* Data, std::size_t SizeInBytes ) {