mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Turn map.explored, map.roomdeaths(final) into plain arrays
They're always fixed-size anyways, there's no need for them to be vectors. Also used the new INBOUNDS_ARR() macro for the map.explored bounds checks in Script.cpp, and made map.explored a proper bool array instead of an int array.
This commit is contained in:
@@ -64,9 +64,9 @@ mapclass::mapclass()
|
||||
//We create a blank map
|
||||
contents.resize(40 * 30);
|
||||
|
||||
roomdeaths.resize(20 * 20);
|
||||
roomdeathsfinal.resize(20 * 20);
|
||||
explored.resize(20 * 20);
|
||||
SDL_memset(roomdeaths, 0, sizeof(roomdeaths));
|
||||
SDL_memset(roomdeathsfinal, 0, sizeof(roomdeathsfinal));
|
||||
resetmap();
|
||||
|
||||
tileset = 0;
|
||||
initmapdata();
|
||||
@@ -133,8 +133,7 @@ void mapclass::settrinket(int x, int y)
|
||||
void mapclass::resetmap()
|
||||
{
|
||||
//clear the explored area of the map
|
||||
explored.clear();
|
||||
explored.resize(20 * 20);
|
||||
SDL_memset(explored, 0, sizeof(explored));
|
||||
}
|
||||
|
||||
void mapclass::resetnames()
|
||||
@@ -1167,7 +1166,7 @@ void mapclass::loadlevel(int rx, int ry)
|
||||
int t;
|
||||
if (!finalmode)
|
||||
{
|
||||
explored[rx - 100 + ((ry - 100) * 20)] = 1;
|
||||
explored[rx - 100 + ((ry - 100) * 20)] = true;
|
||||
if (rx == 109 && !custommode)
|
||||
{
|
||||
exploretower();
|
||||
|
||||
Reference in New Issue
Block a user