aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-08-18 12:40:13 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-18 21:00:21 +0100
commita995e5fda47c5c8302cb6784b9e5f289fde5695f (patch)
tree69295794697b81cfdac9dc0138ad12b4ba9f2fab /src
parent6989141e71cd035e029ad4866530d53a0337872f (diff)
Tools/Misc: Document strange array access indexing
Closes #23723 (cherry picked from commit aa0d468e04311ace1e6e5117b4a339c50b636367)
Diffstat (limited to 'src')
-rw-r--r--src/tools/map_extractor/System.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index c419d0bf806..b36a207d610 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -502,6 +502,7 @@ bool ConvertADT(ChunkedFile& adt, std::string const& mapName, std::string const&
// Set map height as grid height
for (int y = 0; y <= ADT_CELL_SIZE; y++)
{
+ // edge V9s are overlapping between cells (i * ADT_CELL_SIZE is correct, otherwise we would be missing a row/column of V8s between)
int cy = mcnk->iy * ADT_CELL_SIZE + y;
for (int x = 0; x <= ADT_CELL_SIZE; x++)
{
@@ -527,6 +528,7 @@ bool ConvertADT(ChunkedFile& adt, std::string const& mapName, std::string const&
// get V9 height map
for (int y = 0; y <= ADT_CELL_SIZE; y++)
{
+ // edge V9s are overlapping between cells (i * ADT_CELL_SIZE is correct, otherwise we would be missing a row/column of V8s between)
int cy = mcnk->iy * ADT_CELL_SIZE + y;
for (int x = 0; x <= ADT_CELL_SIZE; x++)
{