Skip to content

Commit

Permalink
remove redundant sounds.dat opening, path is now only hard coded with…
Browse files Browse the repository at this point in the history
…in AliveInitAudio()
  • Loading branch information
MrSapps committed Jul 20, 2015
1 parent c158905 commit ef97c95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions include/oddlib/audio/vab.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,5 @@ class Vab

std::vector< AoVag* > iAoVags;

std::ifstream iSoundsDat;

// What about AO? Seems the same as sounds.dat but in each VB file
};
10 changes: 3 additions & 7 deletions src/oddlib/audio/vab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@

Vab::Vab()
{
iSoundsDat.open("C:\\Users\\paul\\Desktop\\alive\\alive\\data\\sounds.dat", std::ios::binary);
if (!iSoundsDat.is_open())
{
abort();
}

}

Vab::Vab( std::string aVhFile, std::string aVbFile )
Expand All @@ -38,10 +34,10 @@ void Vab::ReadVb( std::istream& aStream )

// aStream.setByteOrder( QDataStream::LittleEndian );
aStream.seekg(0, aStream.end);
int streamSize = aStream.tellg();
auto streamSize = aStream.tellg();
aStream.seekg(0, aStream.beg);

if (streamSize > 5120) // No exoddus vb is greater than 5kb
if (streamSize > 5120) // HACK: No exoddus vb is greater than 5kb
{
for (auto i = 0; i < iHeader->iNumVags; ++i)
{
Expand Down

0 comments on commit ef97c95

Please sign in to comment.