mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Simplify mapclass::currentarea()
It used to take a single int: the area number returned by mapclass::area(roomx, roomy). All uses of currentarea() were called with an extra area() call as its argument. Additionally, there's a good reason why currentarea() should have the room coordinates: in one of the cases that it's called, there's a special case for the ship's coordinates. This results in the SAVE screen in the map menu being able to show "The Ship", while the continue screen shows "Dimension VVVVVV" instead. Therefore, why not put that exception inside currentarea() instead, and remove a few callsite map.area() wrappers by making currentarea() take the room x and y coordinates?
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
73911a7ada
commit
89a165722e
@@ -1240,9 +1240,14 @@ void mapclass::spawncompanion(void)
|
||||
}
|
||||
}
|
||||
|
||||
const char* mapclass::currentarea(int t)
|
||||
const char* mapclass::currentarea(const int roomx, const int roomy)
|
||||
{
|
||||
switch(t)
|
||||
if (roomx >= 102 && roomx <= 104 && roomy >= 110 && roomy <= 111)
|
||||
{
|
||||
return loc::gettext_roomname_special("The Ship");
|
||||
}
|
||||
|
||||
switch (area(roomx, roomy))
|
||||
{
|
||||
case 0:
|
||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
||||
|
||||
Reference in New Issue
Block a user