mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Make some hardcoded room names (and some special ones) translatable
This involves loc::gettext_roomname and loc::gettext_roomname_special. This commit is part of rewritten history of the localization branch. The original (unsquashed) commit history can be found here: https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
parent
b548783df2
commit
df76145314
4 changed files with 26 additions and 25 deletions
|
@ -4100,33 +4100,33 @@ void Game::gethardestroom(void)
|
|||
if (currentroomdeaths > hardestroomdeaths)
|
||||
{
|
||||
hardestroomdeaths = currentroomdeaths;
|
||||
hardestroom = map.roomname;
|
||||
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 = "Rear Vindow";
|
||||
hardestroom = loc::gettext_roomname_special("Rear Vindow");
|
||||
}
|
||||
else if (roomx == 48 && roomy == 51)
|
||||
{
|
||||
hardestroom = "On the Vaterfront";
|
||||
hardestroom = loc::gettext_roomname_special("On the Vaterfront");
|
||||
}
|
||||
else if (roomx == 49 && roomy == 51)
|
||||
{
|
||||
hardestroom = "The Untouchavles";
|
||||
hardestroom = loc::gettext_roomname_special("The Untouchavles");
|
||||
}
|
||||
}
|
||||
else if (SDL_strcmp(map.roomname, "change") == 0)
|
||||
{
|
||||
if (roomx == 45 && roomy == 51) hardestroom =map.specialnames[3];
|
||||
if (roomx == 46 && roomy == 51) hardestroom =map.specialnames[4];
|
||||
if (roomx == 47 && roomy == 51) hardestroom =map.specialnames[5];
|
||||
if (roomx == 50 && roomy == 53) hardestroom =map.specialnames[6];
|
||||
if (roomx == 50 && roomy == 54) hardestroom = map.specialnames[7];
|
||||
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')
|
||||
{
|
||||
hardestroom = map.hiddenname;
|
||||
hardestroom = loc::gettext_roomname_special(map.hiddenname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2926,7 +2926,7 @@ static void mapmenuactionpress(const bool version2_2)
|
|||
game.savearea = map.currentarea(map.area(game.roomx, game.roomy));
|
||||
game.savetrinkets = game.trinkets();
|
||||
|
||||
if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = "The Ship";
|
||||
if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = loc::gettext_roomname_special("The Ship");
|
||||
|
||||
bool success;
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "Game.h"
|
||||
#include "GlitchrunnerMode.h"
|
||||
#include "Graphics.h"
|
||||
#include "Localization.h"
|
||||
#include "MakeAndPlay.h"
|
||||
#include "Music.h"
|
||||
#include "Script.h"
|
||||
|
@ -1348,43 +1349,43 @@ const char* mapclass::currentarea(int t)
|
|||
switch(t)
|
||||
{
|
||||
case 0:
|
||||
return "Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
||||
break;
|
||||
case 1:
|
||||
return "Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Dimension VVVVVV");
|
||||
break;
|
||||
case 2:
|
||||
return "Laboratory";
|
||||
return loc::gettext_roomname_special("Laboratory");
|
||||
break;
|
||||
case 3:
|
||||
return "The Tower";
|
||||
return loc::gettext_roomname_special("The Tower");
|
||||
break;
|
||||
case 4:
|
||||
return "Warp Zone";
|
||||
return loc::gettext_roomname_special("Warp Zone");
|
||||
break;
|
||||
case 5:
|
||||
return "Space Station";
|
||||
return loc::gettext_roomname_special("Space Station");
|
||||
break;
|
||||
case 6:
|
||||
return "Outside Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
break;
|
||||
case 7:
|
||||
return "Outside Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
break;
|
||||
case 8:
|
||||
return "Outside Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
break;
|
||||
case 9:
|
||||
return "Outside Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
break;
|
||||
case 10:
|
||||
return "Outside Dimension VVVVVV";
|
||||
return loc::gettext_roomname_special("Outside Dimension VVVVVV");
|
||||
break;
|
||||
case 11:
|
||||
return "The Tower";
|
||||
return loc::gettext_roomname_special("The Tower");
|
||||
break;
|
||||
}
|
||||
return "???";
|
||||
return loc::gettext_roomname_special("???");
|
||||
}
|
||||
|
||||
static void copy_short_to_int(int* dest, const short* src, const size_t size)
|
||||
|
|
|
@ -3046,7 +3046,7 @@ void scriptclass::hardreset(void)
|
|||
game.timetrialcheater = false;
|
||||
|
||||
game.totalflips = 0;
|
||||
game.hardestroom = "Welcome Aboard";
|
||||
game.hardestroom = loc::gettext_roomname(false, 13, 5, "Welcome Aboard", false);
|
||||
game.hardestroomdeaths = 0;
|
||||
game.currentroomdeaths=0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue