mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Change saved <summary> tag back to English
This ensures loading a 2.4 save in the English-only 2.3 or earlier doesn't result in missing characters because a translated area name appears in the save file. We are not reading from <summary> anymore in 2.4. The way this is done is by not translating the area names inside mapclass::currentarea(), but at the callsites other than the one which saves the <summary>.
This commit is contained in:
parent
ac7fe4475c
commit
187fd85e14
2 changed files with 20 additions and 17 deletions
|
@ -1242,51 +1242,54 @@ void mapclass::spawncompanion(void)
|
|||
|
||||
const char* mapclass::currentarea(const int roomx, const int roomy)
|
||||
{
|
||||
/* For translation, the returned value is passed to loc::gettext_roomname_special().
|
||||
* Returned strings must therefore be found in roomnames_special.xml! */
|
||||
|
||||
if (roomx >= 102 && roomx <= 104 && roomy >= 110 && roomy <= 111)
|
||||
{
|
||||
return loc::gettext_roomname_special("The Ship");
|
||||
return "The Ship";
|
||||
}
|
||||
|
||||
switch (area(roomx, roomy))
|
||||
{
|
||||
case 0:
|
||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
||||
return "Dimension VVVVVV";
|
||||
break;
|
||||
case 1:
|
||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
||||
return "Dimension VVVVVV";
|
||||
break;
|
||||
case 2:
|
||||
return loc::gettext_roomname_special("Laboratory");
|
||||
return "Laboratory";
|
||||
break;
|
||||
case 3:
|
||||
return loc::gettext_roomname_special("The Tower");
|
||||
return "The Tower";
|
||||
break;
|
||||
case 4:
|
||||
return loc::gettext_roomname_special("Warp Zone");
|
||||
return "Warp Zone";
|
||||
break;
|
||||
case 5:
|
||||
return loc::gettext_roomname_special("Space Station");
|
||||
return "Space Station";
|
||||
break;
|
||||
case 6:
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
return "Outside Dimension VVVVVV";
|
||||
break;
|
||||
case 7:
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
return "Outside Dimension VVVVVV";
|
||||
break;
|
||||
case 8:
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
return "Outside Dimension VVVVVV";
|
||||
break;
|
||||
case 9:
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
return "Outside Dimension VVVVVV";
|
||||
break;
|
||||
case 10:
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
return "Outside Dimension VVVVVV";
|
||||
break;
|
||||
case 11:
|
||||
return loc::gettext_roomname_special("The Tower");
|
||||
return "The Tower";
|
||||
break;
|
||||
}
|
||||
return loc::gettext_roomname_special("???");
|
||||
return "???";
|
||||
}
|
||||
|
||||
static void copy_short_to_int(int* dest, const short* src, const size_t size)
|
||||
|
|
|
@ -1282,7 +1282,7 @@ static void menurender(void)
|
|||
font::print(PR_2X | PR_CEN, -1, 20, title, tr, tg, tb);
|
||||
font::print(
|
||||
PR_CEN, -1, 80-20,
|
||||
map.currentarea(summary->saverx, summary->savery),
|
||||
loc::gettext_roomname_special(map.currentarea(summary->saverx, summary->savery)),
|
||||
25, 255 - (help.glow / 2), 255 - (help.glow / 2)
|
||||
);
|
||||
for (int i = 0; i < 6; i++)
|
||||
|
@ -2991,7 +2991,7 @@ void maprender(void)
|
|||
buffer, sizeof(buffer),
|
||||
loc::gettext("{area}, {time}"),
|
||||
"area:str, time:str",
|
||||
map.currentarea(last->saverx, last->savery),
|
||||
loc::gettext_roomname_special(map.currentarea(last->saverx, last->savery)),
|
||||
game.giventimestring(last->hours, last->minutes, last->seconds).c_str()
|
||||
);
|
||||
|
||||
|
@ -3014,7 +3014,7 @@ void maprender(void)
|
|||
size_t i;
|
||||
font::print(
|
||||
PR_CEN, -1, FLIP(80, 8),
|
||||
map.currentarea(game.last_quicksave.saverx, game.last_quicksave.savery),
|
||||
loc::gettext_roomname_special(map.currentarea(game.last_quicksave.saverx, game.last_quicksave.savery)),
|
||||
25, 255 - help.glow/2, 255 - help.glow/2
|
||||
);
|
||||
for (i = 0; i < SDL_arraysize(game.crewstats); ++i)
|
||||
|
|
Loading…
Reference in a new issue