Add mapexplored(), mapreveal() commands

This commit is contained in:
mothbeanie
2023-08-23 13:03:23 -07:00
committed by Misa Elizabeth Kai
parent c04c6bc552
commit 8a00ea7aab
4 changed files with 50 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ mapclass::mapclass(void)
custommmxoff=0; custommmyoff=0; custommmxsize=0; custommmysize=0;
customzoom=0;
customshowmm=true;
revealmap = true;
rcol = 0;
@@ -198,6 +199,12 @@ void mapclass::resetmap(void)
SDL_memset(explored, 0, sizeof(explored));
}
void mapclass::fullmap(void)
{
//mark the whole map as explored
SDL_memset(explored, 1, sizeof(explored));
}
void mapclass::updateroomnames(void)
{
if (roomnameset)
@@ -1304,12 +1311,15 @@ static void copy_short_to_int(int* dest, const short* src, const size_t size)
void mapclass::loadlevel(int rx, int ry)
{
int t;
if (!finalmode)
if (revealmap)
{
setexplored(rx - 100, ry - 100, true);
if (rx == 109 && !custommode)
if (!finalmode)
{
exploretower();
setexplored(rx - 100, ry - 100, true);
if (rx == 109 && !custommode)
{
exploretower();
}
}
}