mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
Changed: Minor changes
This commit is contained in:
parent
0d0e08948e
commit
8fd5f96d83
1 changed files with 8 additions and 8 deletions
|
@ -2155,19 +2155,19 @@ void CProximityMapBuffer::generateZoneProximityMap(const CProximityZone& zone,TB
|
||||||
zoneBuffer[val]=dist;
|
zoneBuffer[val]=dist;
|
||||||
|
|
||||||
// decompose into x and y in order to manage identification of neighbour cells correctly
|
// decompose into x and y in order to manage identification of neighbour cells correctly
|
||||||
uint32 x= val% zoneWidth;
|
uint32 x= val % zoneWidth;
|
||||||
uint32 y= val/ zoneWidth;
|
uint32 y= val / zoneWidth;
|
||||||
|
|
||||||
#define TEST_MOVE(xoffs,yoffs,newDist)\
|
#define TEST_MOVE(xoffs,yoffs,newDist)\
|
||||||
{\
|
{\
|
||||||
if (((uint32)(x+(xoffs))<zoneWidth) && ((uint32)(y+(yoffs))<zoneHeight))\
|
if (((uint32)(x+xoffs)<zoneWidth) && ((uint32)(y+yoffs)<zoneHeight))\
|
||||||
{\
|
{\
|
||||||
uint32 newVal= val+(xoffs)+((yoffs)*zoneWidth);\
|
uint32 newVal= val+xoffs+(yoffs*zoneWidth);\
|
||||||
bool isInterior= ((zoneBuffer[newVal]==InteriorValue && newDist > BigValue) || (zoneBuffer[newVal]==ValueBorder && newDist > BigValue));\
|
bool isInterior = ((zoneBuffer[newVal] == InteriorValue && newDist > BigValue) || (zoneBuffer[newVal] == ValueBorder && newDist > BigValue));\
|
||||||
if (zoneBuffer[newVal]>(newDist) && !isInterior)\
|
if (zoneBuffer[newVal] > newDist && !isInterior)\
|
||||||
{\
|
{\
|
||||||
zoneBuffer[newVal]=(newDist);\
|
zoneBuffer[newVal] = newDist;\
|
||||||
vects[(newDist)&15].push_back(newVal);\
|
vects[newDist & 15].push_back(newVal);\
|
||||||
++entriesToTreat;\
|
++entriesToTreat;\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
|
|
Loading…
Reference in a new issue