From 478371a6662d54d8a9b47d3e754dccc0b8d3efe7 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 5 Jan 2016 12:59:40 +0100 Subject: [PATCH] Changed: Minor changes --HG-- branch : develop --- .../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;\ }\ }\