diff --git a/CAmbarCendamo.cpp b/CAmbarCendamo.cpp index 6e18d2af0..7390d05df 100644 --- a/CAmbarCendamo.cpp +++ b/CAmbarCendamo.cpp @@ -1922,3 +1922,8 @@ CCreatureSet CAmbarCendamo::readCreatureSet(int pos, int number) } return ret; } + +void CAmbarCendamo::processMap() +{ + //for(int j=0;) +} diff --git a/CAmbarCendamo.h b/CAmbarCendamo.h index 45ae81e64..05eeea45f 100644 --- a/CAmbarCendamo.h +++ b/CAmbarCendamo.h @@ -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 void teceDef (); // create files with info about defs void deh3m(); // decode file, results are stored in map + void processMap(); //choose castles, creatures, resources, artifacts... void loadDefs(); 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) diff --git a/SDL_Extensions.cpp b/SDL_Extensions.cpp index c122e2bad..36d0b6a7b 100644 --- a/SDL_Extensions.cpp +++ b/SDL_Extensions.cpp @@ -348,7 +348,8 @@ SDL_Surface * CSDL_Ext::alphaTransform(SDL_Surface *src) for(int yy=0; yyformat->palette->ncolors; ++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; 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); } - 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; transp.b = transp.g = transp.r = 0;