1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

- fixed several crashes with joining creatures

- support for loading *.tga images
- minor fixes
This commit is contained in:
Ivan Savenko
2011-07-18 15:21:16 +00:00
parent 79f5b29196
commit 0693312a8e
13 changed files with 255 additions and 164 deletions

View File

@@ -577,22 +577,7 @@ SDLImage::SDLImage(SDL_Surface * from, bool extraRef):
SDLImage::SDLImage(std::string filename, bool compressed):
margins(0,0)
{
if (spriteh->haveFile(filename, FILE_GRAPHICS))
{
int size;
unsigned char * pic=NULL;
pic = spriteh->giveFile(filename, FILE_GRAPHICS, &size);
surf = IMG_Load_RW( SDL_RWFromMem((void*)pic, size), 1);
delete [] pic;
}
else if(bitmaph->haveFile(filename, FILE_GRAPHICS))
{
surf = BitmapHandler::loadBitmap(filename);
}
else
{
surf = NULL;
}
surf = BitmapHandler::loadBitmap(filename);
if (surf == NULL)
{