1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-24 13:45:47 +00:00

Fix particle & shot loading on linux (fix file name case)

This commit is contained in:
fgenesis 2012-03-12 03:13:34 +01:00
parent 4891fcc339
commit bd9648aa60
3 changed files with 8 additions and 5 deletions

View file

@ -64,7 +64,7 @@ ShotData::ShotData()
ignoreShield = false;
}
void readEquals2(std::ifstream &in)
template <typename T> void readEquals2(T &in)
{
std::string temp;
in >> temp;
@ -93,7 +93,10 @@ void ShotData::bankLoad(const std::string &file, const std::string &path)
}
debugLog(usef);
std::ifstream inf(usef.c_str());
char *data = readFile(core->adjustFilenameCase(usef).c_str());
if (!data)
return;
SimpleIStringStream inf(data, SimpleIStringStream::TAKE_OVER);
std::string token;
while (inf >> token)
{
@ -241,7 +244,6 @@ void ShotData::bankLoad(const std::string &file, const std::string &path)
}
inf.close();
}
void Shot::fire(bool playSfx)

View file

@ -555,8 +555,8 @@ void forEachFile(std::string path, std::string type, void callback(const std::st
{
if (path.empty()) return;
stringToLowerUserData(path);
stringToLower(type);
path = core->adjustFilenameCase(path);
stringToLower(type);
//HACK: MAC:
debugLog("forEachFile - path: " + path + " type: " + type);

View file

@ -96,6 +96,7 @@ void ParticleEffect::bankLoad(const std::string &file, const std::string &path)
clearEmitters();
usef = core->adjustFilenameCase(usef);
debugLog(usef);
char *buffer = readFile(usef);
if (!buffer)