Refactor explored rooms to use setters and getters

This makes it easier to add bounds checks to all accesses of
map.explored. Also, all manually-written existing bounds checks have
been removed, because they're going to go into the new getters and
setters.

The getter is mapclass::isexplored() and the setter is
mapclass::setexplored().
This commit is contained in:
Misa
2021-03-24 12:12:39 -07:00
committed by Ethan Lee
parent b340a6ccc4
commit c5e999c1d5
5 changed files with 66 additions and 61 deletions

View File

@@ -92,6 +92,9 @@ public:
bool explored[20 * 20];
int vmult[30];
bool isexplored(const int rx, const int ry);
void setexplored(const int rx, const int ry, const bool status);
int background;
int rcol;
int tileset;