mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 11:06: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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user