1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

small upgrade

This commit is contained in:
mateuszb 2007-07-13 11:27:58 +00:00
parent 429b8dab98
commit 1896733ea6
3 changed files with 9 additions and 2 deletions

View File

@ -1922,3 +1922,8 @@ CCreatureSet CAmbarCendamo::readCreatureSet(int pos, int number)
} }
return ret; return ret;
} }
void CAmbarCendamo::processMap()
{
//for(int j=0;)
}

View File

@ -29,6 +29,7 @@ public:
int readNormalNr (int pos, int bytCon=4, bool cyclic = false); //read number from bytCon bytes starting from pos position in buffer ; if cyclic is true, number is treated as it were signed number with bytCon bytes int readNormalNr (int pos, int bytCon=4, bool cyclic = false); //read number from bytCon bytes starting from pos position in buffer ; if cyclic is true, number is treated as it were signed number with bytCon bytes
void teceDef (); // create files with info about defs void teceDef (); // create files with info about defs
void deh3m(); // decode file, results are stored in map void deh3m(); // decode file, results are stored in map
void processMap(); //choose castles, creatures, resources, artifacts...
void loadDefs(); void loadDefs();
EDefType getDefType(DefInfo& a); //returns type of object in def EDefType getDefType(DefInfo& a); //returns type of object in def
CCreatureSet readCreatureSet(int pos, int number = 7); //reads creature set in most recently encountered format; reades number units (default is 7) CCreatureSet readCreatureSet(int pos, int number = 7); //reads creature set in most recently encountered format; reades number units (default is 7)

View File

@ -348,7 +348,8 @@ SDL_Surface * CSDL_Ext::alphaTransform(SDL_Surface *src)
for(int yy=0; yy<src->format->palette->ncolors; ++yy) for(int yy=0; yy<src->format->palette->ncolors; ++yy)
{ {
SDL_Color cur = *(src->format->palette->colors+yy); SDL_Color cur = *(src->format->palette->colors+yy);
if(cur.r == 255 && cur.b == 255) //if(cur.r == 255 && cur.b == 255)
if(yy==1 || yy==2 || yy==3 || yy==4 || yy==8)
{ {
SDL_Color shadow; SDL_Color shadow;
shadow.b = shadow.g = shadow.r = 0; shadow.b = shadow.g = shadow.r = 0;
@ -375,7 +376,7 @@ SDL_Surface * CSDL_Ext::alphaTransform(SDL_Surface *src)
} }
SDL_SetColors(src, &shadow, yy, 1); SDL_SetColors(src, &shadow, yy, 1);
} }
if((cur.g == 255 && cur.b == 255) || (cur.r == 255 && cur.g == 0 && cur.b == 0)) if(yy==0 || (cur.r == 255 && cur.g == 0 && cur.b == 0))
{ {
SDL_Color transp; SDL_Color transp;
transp.b = transp.g = transp.r = 0; transp.b = transp.g = transp.r = 0;