mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Strip out old special roomname system
This commit replaces the old system with the new one, making it much easier to edit the transforming and glitchy roomnames. Additionally, this syncs flag 72 to finalstretch. Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
dd108a035f
commit
5beaf973ce
@@ -3044,6 +3044,7 @@ void Game::updatestate(void)
|
||||
map.final_mapcol = 0;
|
||||
map.final_colorframe = 0;
|
||||
map.finalstretch = false;
|
||||
obj.flags[72] = false;
|
||||
|
||||
graphics.setbars(320);
|
||||
|
||||
@@ -4181,34 +4182,15 @@ void Game::gethardestroom(void)
|
||||
if (currentroomdeaths > hardestroomdeaths)
|
||||
{
|
||||
hardestroomdeaths = currentroomdeaths;
|
||||
hardestroom = loc::gettext_roomname(map.custommode, roomx, roomy, map.roomname, map.roomname_special);
|
||||
if (SDL_strcmp(map.roomname, "glitch") == 0)
|
||||
{
|
||||
if (roomx == 42 && roomy == 51)
|
||||
{
|
||||
hardestroom = loc::gettext_roomname_special("Rear Vindow");
|
||||
}
|
||||
else if (roomx == 48 && roomy == 51)
|
||||
{
|
||||
hardestroom = loc::gettext_roomname_special("On the Vaterfront");
|
||||
}
|
||||
else if (roomx == 49 && roomy == 51)
|
||||
{
|
||||
hardestroom = loc::gettext_roomname_special("The Untouchavles");
|
||||
}
|
||||
}
|
||||
else if (SDL_strcmp(map.roomname, "change") == 0)
|
||||
{
|
||||
if (roomx == 45 && roomy == 51) hardestroom = loc::gettext_roomname_special(map.specialnames[3]);
|
||||
if (roomx == 46 && roomy == 51) hardestroom = loc::gettext_roomname_special(map.specialnames[4]);
|
||||
if (roomx == 47 && roomy == 51) hardestroom = loc::gettext_roomname_special(map.specialnames[5]);
|
||||
if (roomx == 50 && roomy == 53) hardestroom = loc::gettext_roomname_special(map.specialnames[6]);
|
||||
if (roomx == 50 && roomy == 54) hardestroom = loc::gettext_roomname_special(map.specialnames[7]);
|
||||
}
|
||||
else if (map.roomname[0] == '\0')
|
||||
|
||||
if (map.roomname[0] == '\0')
|
||||
{
|
||||
hardestroom = loc::gettext_roomname_special(map.hiddenname);
|
||||
}
|
||||
else
|
||||
{
|
||||
hardestroom = map.roomname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5981,6 +5963,15 @@ bool Game::customsavequick(const std::string& savfile)
|
||||
{
|
||||
xml::update_tag(msgs, "roomname", map.roomname);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If there's roomname tags, remove them. There will probably only always be one, but just in case...
|
||||
tinyxml2::XMLElement* element;
|
||||
while ((element = msgs->FirstChildElement("roomname")) != NULL)
|
||||
{
|
||||
doc.DeleteNode(element);
|
||||
}
|
||||
}
|
||||
|
||||
std::string summary = savearea + ", " + timestring();
|
||||
xml::update_tag(msgs, "summary", summary.c_str());
|
||||
|
||||
Reference in New Issue
Block a user