mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
* VCMI no longer needs h3bitmap and h3sprite folders - delete them. Now everything is readed directly from lod files
* names of lods changed - rename your lod files to h3sprite.lod and h3bitmap.lod and place them in \Data subfolder (as in H3). * added several clickable buttons to adv. map interface * underground/surface switch button is functional * reading more text from ZELP.txt, added CPreGameTextHandler to CGameInfo * a lot of minor improvements/fixes(/bugs)
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
bool isItIn(const SDL_Rect * rect, int x, int y)
|
||||
{
|
||||
if ((x>rect->x && x<rect->x+rect->w) && (y>rect->y && y<rect->y+rect->h))
|
||||
@ -598,4 +599,21 @@ void CSDL_Ext::setPlayerColor(SDL_Surface * sur, int player)
|
||||
else
|
||||
*(sur->format->palette->colors+5) = CGameInfo::mainObj->neutralColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
int readNormalNr (std::istream &in, int bytCon)
|
||||
{
|
||||
int ret=0;
|
||||
int amp=1;
|
||||
unsigned char byte;
|
||||
if (in.good())
|
||||
{
|
||||
for (int i=0; i<bytCon; i++)
|
||||
{
|
||||
in.read((char*)&byte,1);
|
||||
ret+=byte*amp;
|
||||
amp*=256;
|
||||
}
|
||||
}
|
||||
else return -1;
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user