From 79ad7b9d9e745bb157611ca15c997995bb02f519 Mon Sep 17 00:00:00 2001 From: Adam Newgas Date: Sun, 14 Jul 2019 09:44:43 +0100 Subject: [PATCH] Add some comments to some tricky to understand functions. --- Source/drlg_l2.cpp | 2 ++ Source/drlg_l3.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index f290d601c..819147456 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -1153,6 +1153,8 @@ BOOL CreateDungeon() return TRUE; } +// Draws a random room rectangle, and then subdivides the rest of the passed in rectangle +// into 4 pieces and recurses. void CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, BOOL ForceHW, int nH, int nW) { int nAw, nAh, nRw, nRh, nRx1, nRy1, nRx2, nRy2, nHw, nHh, nHx1, nHy1, nHx2, nHy2, nRid; diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index 8ab1436a6..8766d5e19 100644 --- a/Source/drlg_l3.cpp +++ b/Source/drlg_l3.cpp @@ -1020,6 +1020,9 @@ void DRLG_L3River() } } +// Flood fills dirt and wall tiles looking for +// an area of at most 40 tiles and disconnected from the map edge. +// If it finds one, converts it to lava tiles and sets lavapool to TRUE. void DRLG_L3Pool() { int i, j, dunx, duny, totarea, poolchance;