1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

Reverted r2382; add zvs to the game data (linux); simplified BitmapHandler::loadBitmap().

This commit is contained in:
Frank Zago 2011-09-14 05:27:49 +00:00
parent 479a714dbf
commit 0cfb2deeaf
3 changed files with 13 additions and 14 deletions

View File

@ -19,7 +19,7 @@
# data1.cab and data1.hdr from the original 1st CDROM
# Heroes3.snd from the original 2nd CDROM
# the WoG release v3.58f: allinone_358f.zip
# the VCMI distribution: vcmi_085b.rar
# the VCMI distribution: vcmi_086.rar
# Usage: put this script and the 4 data files into the same directory
# and run the script.
@ -85,6 +85,9 @@ unrar x -o+ ../main4.wog
#unrar x -o+ ../main8_optional.wog
#unrar x -o+ ../main9_optional.wog
mkdir -p $DESTDIR/Data/zvs/
mv data/zvs/Lib1.res $DESTDIR/Data/zvs/
rm -rf picsall Documentation Data data update
rm -f action.txt h3bitmap.txt H3sprite.txt InstMult.txt
rm -f ACTION.TXT H3BITMAP.TXT H3SPRITE.TXT INSTMULT.TXT
@ -109,8 +112,7 @@ rm -rf temp
mkdir temp
cd temp
#unzip ../vcmi_085.zip
unrar ../vcmi_085b.rar
unzip ../vcmi_086.zip
find . -name "*.dll" | xargs rm -f
find . -name "*.DLL" | xargs rm -f

View File

@ -203,15 +203,12 @@ SDL_Surface * BitmapHandler::loadBitmapFromLod(CLodHandler *lod, std::string fna
SDL_Surface * BitmapHandler::loadBitmap(std::string fname, bool setKey)
{
if (bitmaph->haveFile(fname, FILE_GRAPHICS))
return loadBitmapFromLod(bitmaph, fname, setKey);
SDL_Surface *bitmap;
if (bitmaph_ab->haveFile(fname, FILE_GRAPHICS))
return loadBitmapFromLod(bitmaph_ab, fname, setKey);
if (!(bitmap = loadBitmapFromLod(bitmaph, fname, setKey)) &&
!(bitmap = loadBitmapFromLod(bitmaph_ab, fname, setKey)) &&
!(bitmap = loadBitmapFromLod(spriteh, fname, setKey)))
tlog1<<"Failed to find file "<<fname<<"\n";
if (spriteh->haveFile(fname, FILE_GRAPHICS))
return loadBitmapFromLod(spriteh, fname, setKey);
tlog1<<"Failed to find file "<<fname<<"\n";
return NULL;
}
return bitmap;
}

View File

@ -856,7 +856,7 @@ std::string CStackInstance::bonusToGraphics(Bonus *bonus) const
fileName = "E_UNIC.bmp"; break;
}
if(!fileName.empty())
fileName = "Data/zvs/Lib1.res/" + fileName;
fileName = "zvs/Lib1.res/" + fileName;
return fileName;
}