mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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)
|
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)
|
if (roomx >= 102 && roomx <= 104 && roomy >= 110 && roomy <= 111)
|
||||||
{
|
{
|
||||||
return loc::gettext_roomname_special("The Ship");
|
return "The Ship";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (area(roomx, roomy))
|
switch (area(roomx, roomy))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
return "Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
return "Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return loc::gettext_roomname_special("Laboratory");
|
return "Laboratory";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return loc::gettext_roomname_special("The Tower");
|
return "The Tower";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return loc::gettext_roomname_special("Warp Zone");
|
return "Warp Zone";
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
return loc::gettext_roomname_special("Space Station");
|
return "Space Station";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
return "Outside Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
return "Outside Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
return "Outside Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
return "Outside Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
return "Outside Dimension VVVVVV";
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
return loc::gettext_roomname_special("The Tower");
|
return "The Tower";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return loc::gettext_roomname_special("???");
|
return "???";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copy_short_to_int(int* dest, const short* src, const size_t size)
|
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_2X | PR_CEN, -1, 20, title, tr, tg, tb);
|
||||||
font::print(
|
font::print(
|
||||||
PR_CEN, -1, 80-20,
|
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)
|
25, 255 - (help.glow / 2), 255 - (help.glow / 2)
|
||||||
);
|
);
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
|
@ -2991,7 +2991,7 @@ void maprender(void)
|
||||||
buffer, sizeof(buffer),
|
buffer, sizeof(buffer),
|
||||||
loc::gettext("{area}, {time}"),
|
loc::gettext("{area}, {time}"),
|
||||||
"area:str, time:str",
|
"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()
|
game.giventimestring(last->hours, last->minutes, last->seconds).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3014,7 +3014,7 @@ void maprender(void)
|
||||||
size_t i;
|
size_t i;
|
||||||
font::print(
|
font::print(
|
||||||
PR_CEN, -1, FLIP(80, 8),
|
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
|
25, 255 - help.glow/2, 255 - help.glow/2
|
||||||
);
|
);
|
||||||
for (i = 0; i < SDL_arraysize(game.crewstats); ++i)
|
for (i = 0; i < SDL_arraysize(game.crewstats); ++i)
|
||||||
|
|
Loading…
Reference in a new issue