From 8fd5f96d831e7a293bd34dbbd25092443b94a42f Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 5 Jan 2016 12:59:40 +0100 Subject: [PATCH] Changed: Minor changes --- .../r2_islands_textures/screenshot_islands.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index 2e664ef43..617605399 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -2155,19 +2155,19 @@ void CProximityMapBuffer::generateZoneProximityMap(const CProximityZone& zone,TB zoneBuffer[val]=dist; // decompose into x and y in order to manage identification of neighbour cells correctly - uint32 x= val% zoneWidth; - uint32 y= val/ zoneWidth; + uint32 x= val % zoneWidth; + uint32 y= val / zoneWidth; #define TEST_MOVE(xoffs,yoffs,newDist)\ {\ - if (((uint32)(x+(xoffs)) BigValue) || (zoneBuffer[newVal]==ValueBorder && newDist > BigValue));\ - if (zoneBuffer[newVal]>(newDist) && !isInterior)\ + uint32 newVal= val+xoffs+(yoffs*zoneWidth);\ + bool isInterior = ((zoneBuffer[newVal] == InteriorValue && newDist > BigValue) || (zoneBuffer[newVal] == ValueBorder && newDist > BigValue));\ + if (zoneBuffer[newVal] > newDist && !isInterior)\ {\ - zoneBuffer[newVal]=(newDist);\ - vects[(newDist)&15].push_back(newVal);\ + zoneBuffer[newVal] = newDist;\ + vects[newDist & 15].push_back(newVal);\ ++entriesToTreat;\ }\ }\