Replace roomnames/hiddennames/glitchnames with const char*

Since those are all downstream recipients of either static storage or
memory that doesn't move for the duration of the custom level, it's okay
to make these be `const char*`s without having to redo any of the RAII
memory management.

mapclass::currentarea() is included in this as well. I also cleaned up
Tower.cpp's headers to fix some transitive includes because I was
removing UtilityClass.h includes from all other level files too.

The "Untitled room" names no longer show any coordinates, because doing
so would require complicated memory management that's completely
unneeded. No one will ever see them, and if they do they already know
they have a problem anyway. The only time they might be able to see them
is if they corrupted the areamap, but this was only possible in 2.2 and
previous by dying outside the room deaths array in Outside Dimension
VVVVVV, which has since been patched out. Besides, sometimes the
"Untitled room" gets overwritten by something else anyway (especially in
Finalclass.cpp), so it really, really doesn't matter.
This commit is contained in:
Misa
2021-09-12 12:48:15 -07:00
parent a10342f5e6
commit a50e8ecf48
14 changed files with 69 additions and 80 deletions

View File

@@ -1,13 +1,11 @@
#ifndef WARPCLASS_H
#define WARPCLASS_H
#include <string>
class warpclass
{
public:
const short* loadlevel(int rx, int ry);
std::string roomname;
const char* roomname;
int rcol;
bool warpx, warpy;
};