From: Laszlo T. <ave...@us...> - 2005-02-26 17:42:38
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3001/Core Modified Files: Map.cpp Map.h WorldMap.h Log Message: fixed GetExploredMapSize Index: Map.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Map.cpp,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** Map.cpp 23 Feb 2005 18:59:35 -0000 1.135 --- Map.cpp 26 Feb 2005 17:42:28 -0000 1.136 *************** *** 1200,1212 **** if(sX<sY) { //north or west if(Width*Height<sX+sY) { // ! return 0; } ! return 1; } //south or east if(Width*Height<sX+sY) { // ! return 2; } ! return 3; } --- 1200,1212 ---- if(sX<sY) { //north or west if(Width*Height<sX+sY) { // ! return WMP_NORTH; } ! return WMP_WEST; } //south or east if(Width*Height<sX+sY) { // ! return WMP_SOUTH; } ! return WMP_EAST; } *************** *** 1298,1299 **** --- 1298,1311 ---- } + //--------explored bitmap----------- + int Map::GetExploredMapSize() const + { + int x = Width/32; + int y = Width/32; + if (!core->HasFeature(GF_SMALL_FOG) ) { + x++; + y++; + } + return (x*y+7)/8; + } + Index: Map.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Map.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Map.h 25 Feb 2005 16:15:35 -0000 1.58 --- Map.h 26 Feb 2005 17:42:28 -0000 1.59 *************** *** 139,143 **** int GetWidth() const { return Width; } int GetHeight() const { return Height; } ! int GetExploredMapSize() const { return (Width*Height+7)/8; } //PathFinder --- 139,143 ---- int GetWidth() const { return Width; } int GetHeight() const { return Height; } ! int GetExploredMapSize() const; //PathFinder Index: WorldMap.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/WorldMap.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WorldMap.h 25 Feb 2005 15:12:13 -0000 1.11 --- WorldMap.h 26 Feb 2005 17:42:28 -0000 1.12 *************** *** 49,52 **** --- 49,60 ---- #define WMP_ENTRY_PASSABLE (WMP_ENTRY_VISIBLE|WMP_ENTRY_ACCESSIBLE|WMP_ENTRY_VISITED) + //this is the physical order they appear in WMPAreaEntry + typedef enum ieDirectionType { + WMP_NORTH=0, + WMP_WEST=1, + WMP_SOUTH=2, + WMP_EAST=3 + } ieDirectionType; + class GEM_EXPORT WMPAreaEntry { public: |