From 13c7dcecf6539314e9c43ffd13c374ea161a416f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Dec 2019 14:53:13 +0100 Subject: [PATCH] - exported all game relevant texts from Duke Nukem and Redneck Rampage. --- source/duke3d/src/cheats.cpp | 6 +- source/duke3d/src/demo.cpp | 2 +- source/duke3d/src/game.cpp | 4 +- source/duke3d/src/gamedef.cpp | 2 + source/duke3d/src/network.cpp | 28 +++++----- source/duke3d/src/premap.cpp | 14 +++-- source/duke3d/src/sbar.cpp | 12 ++-- source/duke3d/src/screens.cpp | 62 ++++++++++----------- source/rr/src/cheats.cpp | 4 +- source/rr/src/demo.cpp | 2 +- source/rr/src/game.cpp | 4 +- source/rr/src/premap.cpp | 15 ++--- source/rr/src/sbar.cpp | 12 ++-- source/rr/src/screens.cpp | 100 +++++++++++++++++----------------- 14 files changed, 136 insertions(+), 131 deletions(-) diff --git a/source/duke3d/src/cheats.cpp b/source/duke3d/src/cheats.cpp index 4f9e9e7ba..5320822de 100644 --- a/source/duke3d/src/cheats.cpp +++ b/source/duke3d/src/cheats.cpp @@ -493,7 +493,7 @@ void G_DoCheats(void) } else { - quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Come Get Some!"); + quoteMgr.InitializeQuote(QUOTE_RESERVED4, "$COMEGETSOME"); S_PlaySound(DUKE_GETWEAPON2); P_DoQuote(QUOTE_RESERVED4, pPlayer); @@ -679,12 +679,12 @@ void G_DoCheats(void) case CHEAT_MONSTERS: { - const char *s [] = { "On", "Off", "On (2)" }; + const char *s [] = { "OPTVAL_ON", "OPTVAL_OFF", "$TXT_ON2" }; if (++g_noEnemies == 3) g_noEnemies = 0; - quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Monsters: %s", s[g_noEnemies]); + quoteMgr.FormatQuote(QUOTE_RESERVED4, "%s: %s", GStrings("NETMNU_MONSTERS"), s[g_noEnemies]); P_DoQuote(QUOTE_RESERVED4, pPlayer); end_cheat(pPlayer); diff --git a/source/duke3d/src/demo.cpp b/source/duke3d/src/demo.cpp index 0a2b00ddf..9410c395f 100644 --- a/source/duke3d/src/demo.cpp +++ b/source/duke3d/src/demo.cpp @@ -846,7 +846,7 @@ nextdemo_nomenu: Net_GetPackets(); if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex) - gametext_center(60, "Press F1 to Accept, F2 to Decline"); + gametext_center(60, GStrings("TXT_PRESSF1_F2")); } if ((g_player[myconnectindex].ps->gm&MODE_MENU) && (g_player[myconnectindex].ps->gm&MODE_EOL)) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 800b3a152..3a09f1e02 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -4475,7 +4475,7 @@ void G_HandleLocalKeys(void) { if (inputState.UnboundKeyPressed(sc_F1) || inputState.UnboundKeyPressed(sc_F2) || cl_autovote) { - G_AddUserQuote("Vote Cast"); + G_AddUserQuote(GStrings("VoteCast")); Net_SendMapVote(inputState.UnboundKeyPressed(sc_F1) || cl_autovote ? cl_autovote-1 : 0); inputState.ClearKeyStatus(sc_F1); inputState.ClearKeyStatus(sc_F2); @@ -5931,7 +5931,7 @@ int GameInterface::app_main() for (int i=1, j=numplayers; jteam = g_player[j].pteam = i; g_player[j].ps->weaponswitch = 3; g_player[j].ps->auto_aim = 0; diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index a60d046af..9e1e7283d 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -2172,6 +2172,7 @@ int32_t C_AllocQuote(int32_t qnum) void C_InitQuotes(void) { +#if 0 auto openkeys = Bindings.GetKeysForCommand("+open"); if (openkeys.Size()) { @@ -2180,6 +2181,7 @@ void C_InitQuotes(void) quoteMgr.Substitute(QUOTE_DEAD, "OPEN", OpenGameFunc); quoteMgr.Substitute(QUOTE_DEAD, "USE", OpenGameFunc); } +#endif g_numObituaries = 48; for (bssize_t i = g_numObituaries - 1; i >= 0; i--) diff --git a/source/duke3d/src/network.cpp b/source/duke3d/src/network.cpp index 5fa854d4e..8f78e2c56 100644 --- a/source/duke3d/src/network.cpp +++ b/source/duke3d/src/network.cpp @@ -1692,28 +1692,28 @@ static void Net_ReceiveDisconnect(ENetEvent *event) switch (event->data) { case DISC_BAD_PASSWORD: - initprintf("Bad password.\n"); + initprintf("%s\n", GStrings("Bad password.")); return; case DISC_VERSION_MISMATCH: - initprintf("Version mismatch.\n"); + initprintf("%s\n", GStrings("Version mismatch.")); return; case DISC_INVALID: - initprintf("Invalid data detected.\n"); + initprintf("%s\n", GStrings("Invalid data detected.")); return; case DISC_SERVER_QUIT: - initprintf("The server is quitting.\n"); + initprintf("%s\n", GStrings("The server is quitting.")); return; case DISC_SERVER_FULL: - initprintf("The server is full.\n"); + initprintf("%s\n", GStrings("The server is full.\n")); return; case DISC_KICKED: - initprintf("You have been kicked from the server.\n"); + initprintf("%s\n", GStrings("You have been kicked from the server.\n")); return; case DISC_BANNED: - initprintf("You are banned from this server.\n"); + initprintf("%s\n", GStrings("You are banned from this server.\n")); return; default: - initprintf("Disconnected.\n"); + initprintf("%s\n", GStrings("Disconnected.\n")); return; } } @@ -1929,11 +1929,11 @@ static void Net_ReceiveMapVoteCancel(uint8_t *pbuf) if (voting == myconnectindex || voting != pbuf[1]) { - Bsprintf(tempbuf, "Vote Failed"); + Bsprintf(tempbuf, "%s", GStrings("Vote Failed")); } else if (voting == pbuf[1]) { - Bsprintf(tempbuf, "%s^00 has canceled the vote", g_player[voting].user_name); + Bsprintf(tempbuf, GStrings("canceledthevote"), g_player[voting].user_name); } G_AddUserQuote(tempbuf); @@ -2036,11 +2036,11 @@ static void Net_ReceiveMapVoteInitiate(uint8_t *pbuf) vote_episode = pendingnewgame.volume_number; vote_map = pendingnewgame.level_number; - Bsprintf(tempbuf, "%s^00 has called a vote to change map to %s (E%dL%d)", g_player[voting].user_name, + Bsprintf(tempbuf, GStrings("votemap"), g_player[voting].user_name, g_mapInfo[(uint8_t)(vote_episode * MAXLEVELS + vote_map)].name, vote_episode + 1, vote_map + 1); G_AddUserQuote(tempbuf); - Bsprintf(tempbuf, "Press F1 to Accept, F2 to Decline"); + strcpy(tempbuf, GStrings("TXT_PRESSF1_F2")); G_AddUserQuote(tempbuf); for (playerIndex = MAXPLAYERS - 1; playerIndex >= 0; playerIndex--) @@ -2325,7 +2325,7 @@ static void Net_ReceiveNewGame(ENetEvent *event) ClientPlayerReady = 0; if ((vote_map + vote_episode + voting) != -3) - G_AddUserQuote("Vote Succeeded"); + G_AddUserQuote(GStrings("Vote Succeeded")); Bmemcpy(&pendingnewgame, event->packet->data, sizeof(newgame_t)); Net_StartNewGame(); @@ -5051,7 +5051,7 @@ void Net_SendMessage(void) else if (g_chatPlayer == -1) { j = 50; - gametext_center(j, "Send message to..."); + gametext_center(j, GStrings("Send message to")); j += 8; for (TRAVERSE_CONNECT(i)) { diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 324bcd1eb..7a4c10dd6 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -329,7 +329,8 @@ static void G_DemoLoadScreen(const char *statustext, int const loadScreenTile, i return; } - menutext_center(105, "Loading..."); + FStringf msg("%s...", GStrings("TXT_LOADING")); + menutext_center(105, msg); if (statustext) gametext_center_number(180, statustext); @@ -372,12 +373,12 @@ static void G_DoLoadScreen(const char *statustext, int percent) if (boardfilename[0] != 0 && ud.level_number == 7 && ud.volume_number == 0) { - menutext_center(90, "Loading User Map"); + menutext_center(90, GStrings("TXT_LOADUM")); gametext_center_shade_pal(90+10, boardfilename, 14, 2); } else { - menutext_center(90, "Loading"); + menutext_center(90, GStrings("TXT_LOADING")); if (g_mapInfo[(ud.volume_number*MAXLEVELS) + ud.level_number].name != NULL) menutext_center(90+16+8, g_mapInfo[(ud.volume_number*MAXLEVELS) + ud.level_number].name); @@ -1832,7 +1833,8 @@ int G_EnterLevel(int gameMode) int const ssize = ud.screen_size; ud.screen_size = 0; - G_DoLoadScreen("Loading map . . .", -1); + FStringf msg("%s . . .", GStrings("TXT_LOADMAP")); + G_DoLoadScreen(msg, -1); G_UpdateScreenArea(); ud.screen_size = ssize; @@ -1957,9 +1959,9 @@ int G_EnterLevel(int gameMode) } if (G_HaveUserMap()) - OSD_Printf(OSDTEXT_YELLOW "User Map: %s\n", boardfilename); + OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename); else if (FURY) - OSD_Printf(OSDTEXT_YELLOW "Entering: %s\n", m.name); + OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_ENTERING"), m.name); else OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n", ud.volume_number + 1, ud.level_number + 1, m.name); diff --git a/source/duke3d/src/sbar.cpp b/source/duke3d/src/sbar.cpp index 9c5043a49..4fec52794 100644 --- a/source/duke3d/src/sbar.cpp +++ b/source/duke3d/src/sbar.cpp @@ -770,13 +770,13 @@ void G_DrawStatusBar(int32_t snum) if (!WW2GI) { if (j > 0) - minitext(288-30-o, 180, "On", 0, orient); + minitext(288-30-o, 180, GStrings("OPTVAL_ON"), 0, orient); else if ((uint32_t) j != 0x80000000) - minitext(284-30-o, 180, "Off", 2, orient); + minitext(284-30-o, 180, GStrings("OPTVAL_OFF"), 2, orient); } if (p->inven_icon >= ICON_SCUBA) - minitext(284-35-o, 180, "Auto", 2, orient); + minitext(284-35-o, 180, GStrings("OPTVAL_AUTO"), 2, orient); minitext_yofs = 0; } @@ -1000,15 +1000,15 @@ void G_DrawStatusBar(int32_t snum) // XXX: i < 0? rotatesprite_fs(sbarx(231-o), sbary(SBY+13), sb16, 0, i, 0, 0, 10+16+permbit); minitext(292-30-o, SBY+24, "%", 6, 10+16+permbit + ROTATESPRITE_MAX); - if (p->inven_icon >= ICON_SCUBA) minitext(284-35-o, SBY+14, "Auto", 2, 10+16+permbit + ROTATESPRITE_MAX); + if (p->inven_icon >= ICON_SCUBA) minitext(284-35-o, SBY+14, GStrings("OPTVAL_AUTO"), 2, 10+16+permbit + ROTATESPRITE_MAX); } if (u&(2048+4096) && !WW2GI) { j = G_GetInvOn(p); - if (j > 0) minitext(288-30-o, SBY+14, "On", 0, 10+16+permbit + ROTATESPRITE_MAX); - else if ((uint32_t) j != 0x80000000) minitext(284-30-o, SBY+14, "Off", 2, 10+16+permbit + ROTATESPRITE_MAX); + if (j > 0) minitext(288-30-o, SBY+14, GStrings("OPTVAL_ON"), 0, 10+16+permbit + ROTATESPRITE_MAX); + else if ((uint32_t) j != 0x80000000) minitext(284-30-o, SBY+14, GStrings("OPTVAL_OFF"), 2, 10+16+permbit + ROTATESPRITE_MAX); } if (u&8192) diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 844e91cdd..74270f54e 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -182,14 +182,14 @@ static void G_ShowScores(void) if (g_mostConcurrentPlayers > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { - gametext_center(SCORESHEETOFFSET+58+2, "Multiplayer Totals"); + gametext_center(SCORESHEETOFFSET+58+2, GStrings("Multiplayer Totals")); gametext_center(SCORESHEETOFFSET+58+10, g_mapInfo[G_LastMapInfoIndex()].name); t = 0; - minitext(70, SCORESHEETOFFSET+80, "Name", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(170, SCORESHEETOFFSET+80, "Frags", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(200, SCORESHEETOFFSET+80, "Deaths", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(235, SCORESHEETOFFSET+80, "Ping", 8, 2+8+16+ROTATESPRITE_MAX); + minitext(70, SCORESHEETOFFSET+80, GStrings("Name"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(170, SCORESHEETOFFSET+80, GStrings("Frags"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(200, SCORESHEETOFFSET+80, GStrings("Deaths"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(235, SCORESHEETOFFSET+80, GStrings("Ping"), 8, 2+8+16+ROTATESPRITE_MAX); for (i=g_mostConcurrentPlayers-1; i>=0; i--) { @@ -1043,7 +1043,7 @@ void G_DisplayRest(int32_t smoothratio) } if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0) - menutext_center(100, "Game Paused"); + menutext_center(100, GStrings("Game Paused")); if (cl_showcoords) G_PrintCoords(screenpeek); @@ -1756,11 +1756,11 @@ static void G_BonusCutscenes(void) P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308 // G_FadePalette(0,0,0,252); videoClearScreen(0L); - menutext_center(60, "Thanks to all our"); - menutext_center(60+16, "fans for giving"); - menutext_center(60+16+16, "us big heads."); - menutext_center(70+16+16+16, "Look for a Duke Nukem 3D"); - menutext_center(70+16+16+16+16, "sequel soon."); + menutext_center(60, GStrings("Thanks to all our")); + menutext_center(60+16, GStrings("fans for giving")); + menutext_center(60+16+16, GStrings("us big heads.")); + menutext_center(70+16+16+16, GStrings("Look for a Duke Nukem 3D")); + menutext_center(70+16+16+16+16, GStrings("sequel soon.")); videoNextPage(); fadepal(0, 0, 0, 252, 0, -12); @@ -1882,13 +1882,13 @@ static void G_DisplayMPResultsScreen(void) rotatesprite_fs(160<<16, 34<<16, 65536L, 0, INGAMEDUKETHREEDEE, 0, 0, 10); if (PLUTOPAK) // JBF 20030804 rotatesprite_fs((260)<<16, 36<<16, 65536L, 0, PLUTOPAKSPRITE+2, 0, 0, 2+8); - gametext_center(58+2, "Multiplayer Totals"); + gametext_center(58+2, GStrings("Multiplayer Totals")); gametext_center(58+10, g_mapInfo[G_LastMapInfoIndex()].name); - gametext_center_shade(165, "Press any key or button to continue", quotepulseshade); + gametext_center_shade(165, GStrings("Presskey"), quotepulseshade); - minitext(38, 80, "Name", 8, 2+8+16+128); - minitext(269, 80, "Kills", 8, 2+8+16+128); + minitext(38, 80, GStrings("Name"), 8, 2+8+16+128); + minitext(269, 80, GStrings("Kills"), 8, 2+8+16+128); for (i=0; i (60*3)) { yy = zz = 59; - gametext(10, yy+9, "Your Time:"); + gametext(10, yy+9, GStrings("TXT_YourTime")); yy+=10; if (!(ud.volume_number == 0 && ud.last_level-1 == 7 && boardfilename[0])) { if (g_mapInfo[G_LastMapInfoIndex()].partime) { - gametext(10, yy+9, "Par Time:"); + gametext(10, yy+9, GStrings("TXT_ParTime")); yy+=10; } if (!NAM_WW2GI && !DUKEBETA && g_mapInfo[G_LastMapInfoIndex()].designertime) { // EDuke 2.0 / NAM source suggests "Green Beret's Time:" - gametext(10, yy+9, "3D Realms' Time:"); + gametext(10, yy+9, GStrings("TXT_3DRTIME")); yy+=10; } } if (ud.playerbest > 0) { - gametext(10, yy+9, (g_player[myconnectindex].ps->player_par > 0 && g_player[myconnectindex].ps->player_par < ud.playerbest) ? "Prev Best Time:" : "Your Best Time:"); + gametext(10, yy+9, (g_player[myconnectindex].ps->player_par > 0 && g_player[myconnectindex].ps->player_par < ud.playerbest) ? GStrings("TXT_PREVBEST") : GStrings("TXT_YourBest")); yy += 10; } @@ -2219,10 +2219,10 @@ void G_BonusScreen(int32_t bonusonly) G_PrintYourTime(); gametext_number((320>>2)+71, yy+9, tempbuf); if (g_player[myconnectindex].ps->player_par < ud.playerbest) - gametext((320>>2)+89+(clockpad*24), yy+9, "New record!"); + gametext((320>>2)+89+(clockpad*24), yy+9, GStrings("TXT_NEWRECORD")); } else - gametext_pal((320>>2)+71, yy+9, "Cheated!", 2); + gametext_pal((320>>2)+71, yy+9, GStrings("TXT_Cheated"), 2); yy+=10; if (!(ud.volume_number == 0 && ud.last_level-1 == 7 && boardfilename[0])) @@ -2253,9 +2253,9 @@ void G_BonusScreen(int32_t bonusonly) zz = yy += 5; if (totalclock > (60*6)) { - gametext(10, yy+9, "Enemies Killed:"); + gametext(10, yy+9, GStrings("TXT_EnemiesKilled")); yy += 10; - gametext(10, yy+9, "Enemies Left:"); + gametext(10, yy+9, GStrings("TXT_EnemiesLeft")); yy += 10; if (bonuscnt == 2) @@ -2278,7 +2278,7 @@ void G_BonusScreen(int32_t bonusonly) yy += 10; if (ud.player_skill > 3) { - gametext((320>>2)+70, yy+9, "N/A"); + gametext((320>>2)+70, yy+9, GStrings("TXT_N_A")); yy += 10; } else @@ -2295,9 +2295,9 @@ void G_BonusScreen(int32_t bonusonly) zz = yy += 5; if (totalclock > (60*9)) { - gametext(10, yy+9, "Secrets Found:"); + gametext(10, yy+9, GStrings("TXT_SECFND")); yy += 10; - gametext(10, yy+9, "Secrets Missed:"); + gametext(10, yy+9, GStrings("TXT_SECMISS")); yy += 10; if (bonuscnt == 4) bonuscnt++; diff --git a/source/rr/src/cheats.cpp b/source/rr/src/cheats.cpp index f684a5186..bfdda7e15 100644 --- a/source/rr/src/cheats.cpp +++ b/source/rr/src/cheats.cpp @@ -690,12 +690,12 @@ void G_DoCheats(void) case CHEAT_MONSTERS: { - const char *s [] = { "On", "Off", "On (2)" }; + const char *s [] = { "OPTVAL_ON", "OPTVAL_OFF", "$TXT_ON2" }; if (++g_noEnemies == 3) g_noEnemies = 0; - quoteMgr.FormatQuote(QUOTE_RESERVED4, "Monsters: %s", s[g_noEnemies]); + quoteMgr.FormatQuote(QUOTE_RESERVED4, "%s: %s", GStrings("NETMNU_MONSTERS"), s[g_noEnemies]); P_DoQuote(QUOTE_RESERVED4, pPlayer); end_cheat(pPlayer); diff --git a/source/rr/src/demo.cpp b/source/rr/src/demo.cpp index dd3917168..bc005061c 100644 --- a/source/rr/src/demo.cpp +++ b/source/rr/src/demo.cpp @@ -851,7 +851,7 @@ nextdemo_nomenu: Net_GetPackets(); if (g_player[myconnectindex].gotvote == 0 && voting != -1 && voting != myconnectindex) - gametext_center(60, "Press F1 to Accept, F2 to Decline"); + gametext_center(60, GStrings("TXT_PRESSF1_F2")); } if ((g_player[myconnectindex].ps->gm&MODE_MENU) && (g_player[myconnectindex].ps->gm&MODE_EOL)) diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index bae9eabae..0dff6a3d7 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -6020,7 +6020,7 @@ void G_HandleLocalKeys(void) { if (inputState.UnboundKeyPressed(sc_F1) || inputState.UnboundKeyPressed(sc_F2) || cl_autovote) { - G_AddUserQuote("Vote Cast"); + G_AddUserQuote(GStrings("VoteCast")); Net_SendMapVote(inputState.UnboundKeyPressed(sc_F1) || cl_autovote ? cl_autovote-1 : 0); inputState.ClearKeyStatus(sc_F1); inputState.ClearKeyStatus(sc_F2); @@ -7380,7 +7380,7 @@ int GameInterface::app_main() for (int i=1, j=numplayers; jteam = g_player[j].pteam = i; g_player[j].ps->weaponswitch = 3; g_player[j].ps->auto_aim = 0; diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index 0498c7a39..d1117295c 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -496,7 +496,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) if (boardfilename[0] != 0 && ud.level_number == 7 && ud.volume_number == 0) { - menutext_center(textY, RR ? "ENTERIN' USER MAP" : "Loading User Map"); + menutext_center(textY, RR ? GStrings("TXT_ENTRUM") : GStrings("TXT_LOADUM")); if (RR) menutext_center(textY+20, boardfilename); else @@ -504,12 +504,12 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) } else if (RR && g_lastLevel) { - menutext_center(textY,"ENTERIN'"); - menutext_center(textY+16+8,"CLOSE ENCOUNTERS"); + menutext_center(textY,GStrings("ENTERIN")); + menutext_center(textY+16+8,GStrings("TXT_CLOSEENCOUNTERS")); } else { - menutext_center(textY, RR ? "ENTERIN'" : "Loading"); + menutext_center(textY, RR ? GStrings("TXT_ENTERIN") : GStrings("TXT_LOADING")); if (g_mapInfo[(ud.volume_number*MAXLEVELS) + ud.level_number].name != NULL) menutext_center(textY+16+8,g_mapInfo[(ud.volume_number*MAXLEVELS) + ud.level_number].name); } @@ -548,7 +548,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) rotatesprite_fs(320<<15,200<<15,65536L, 0,LOADSCREEN,0,0,2+8+64+BGSTRETCH); - menutext_center(RRRA?155:105,RR?"LOADIN'":"Loading..."); + menutext_center(RRRA?155:105,RR? GStrings("TXT_LOADIN") : GStrings("TXT_Loading...")); if (statustext) gametext_center_number(180, statustext); videoNextPage(); } @@ -2370,7 +2370,8 @@ int G_EnterLevel(int gameMode) i = ud.screen_size; ud.screen_size = 0; - G_DoLoadScreen("Loading map . . .", -1); + FStringf msg("%s . . .", GStrings("TXT_LOADMAP")); + G_DoLoadScreen(msg, -1); G_UpdateScreenArea(); ud.screen_size = i; @@ -2540,7 +2541,7 @@ int G_EnterLevel(int gameMode) if (G_HaveUserMap()) { - OSD_Printf(OSDTEXT_YELLOW "User Map: %s\n", boardfilename); + OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename); } else { diff --git a/source/rr/src/sbar.cpp b/source/rr/src/sbar.cpp index 3361575f5..a3c31c67e 100644 --- a/source/rr/src/sbar.cpp +++ b/source/rr/src/sbar.cpp @@ -982,12 +982,12 @@ void G_DrawStatusBar(int32_t snum) G_DrawInvNum(284-30-o, yofssh, 200-6, (uint8_t) i, 0, orient&~16); if (j > 0) - minitext(288-30-o, 180, "On", 0, orient); + minitext(288-30-o, 180, GStrings("OPTVAL_ON"), 0, orient); else if ((uint32_t) j != 0x80000000) - minitext(284-30-o, 180, "Off", 2, orient); + minitext(284-30-o, 180, GStrings("OPTVAL_OFF"), 2, orient); if (p->inven_icon >= ICON_SCUBA) - minitext(284-35-o, 180, "Auto", 2, orient); + minitext(284-35-o, 180, GStrings("OPTVAL_AUTO"), 2, orient); minitext_yofs = 0; } @@ -1276,7 +1276,7 @@ void G_DrawStatusBar(int32_t snum) { rotatesprite_fs(sbarx(231-o), sbary(SBY+13), sb16, 0, i, 0, 0, 10+16+permbit); minitext(292-30-o, SBY+24, "%", 6, 10+16+permbit + ROTATESPRITE_MAX); - if (p->inven_icon >= ICON_SCUBA) minitext(284-35-o, SBY+14, "Auto", 2, 10+16+permbit + ROTATESPRITE_MAX); + if (p->inven_icon >= ICON_SCUBA) minitext(284-35-o, SBY+14, GStrings("OPTVAL_AUTO"), 2, 10+16+permbit + ROTATESPRITE_MAX); } } @@ -1286,8 +1286,8 @@ void G_DrawStatusBar(int32_t snum) if (!RR) { - if (j > 0) minitext(288-30-o, SBY+14, "On", 0, 10+16+permbit + ROTATESPRITE_MAX); - else if ((uint32_t) j != 0x80000000) minitext(284-30-o, SBY+14, "Off", 2, 10+16+permbit + ROTATESPRITE_MAX); + if (j > 0) minitext(288-30-o, SBY+14, GStrings("OPTVAL_ON"), 0, 10+16+permbit + ROTATESPRITE_MAX); + else if ((uint32_t) j != 0x80000000) minitext(284-30-o, SBY+14, GStrings("OPTVAL_OFF"), 2, 10+16+permbit + ROTATESPRITE_MAX); } } diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index 626aa1c0b..9e0b7d48e 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -174,14 +174,14 @@ static void G_ShowScores(void) if (g_mostConcurrentPlayers > 1 && (g_gametypeFlags[ud.coop]&GAMETYPE_SCORESHEET)) { - gametext_center(SCORESHEETOFFSET+58+2, "Multiplayer Totals"); + gametext_center(SCORESHEETOFFSET+58+2, GStrings("Multiplayer Totals")); gametext_center(SCORESHEETOFFSET+58+10, g_mapInfo[G_LastMapInfoIndex()].name); t = 0; - minitext(70, SCORESHEETOFFSET+80, "Name", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(170, SCORESHEETOFFSET+80, "Frags", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(200, SCORESHEETOFFSET+80, "Deaths", 8, 2+8+16+ROTATESPRITE_MAX); - minitext(235, SCORESHEETOFFSET+80, "Ping", 8, 2+8+16+ROTATESPRITE_MAX); + minitext(70, SCORESHEETOFFSET+80, GStrings("Name"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(170, SCORESHEETOFFSET+80, GStrings("Frags"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(200, SCORESHEETOFFSET+80, GStrings("Deaths"), 8, 2+8+16+ROTATESPRITE_MAX); + minitext(235, SCORESHEETOFFSET+80, GStrings("Ping"), 8, 2+8+16+ROTATESPRITE_MAX); for (i=g_mostConcurrentPlayers-1; i>=0; i--) { @@ -1053,7 +1053,7 @@ void G_DisplayRest(int32_t smoothratio) if (ud.pause_on==1 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0) - menutext_center(100, "Game Paused"); + menutext_center(100, GStrings("Game Paused")); if (cl_showcoords) G_PrintCoords(screenpeek); @@ -1796,11 +1796,11 @@ static void G_BonusCutscenes(void) P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308 // G_FadePalette(0,0,0,252); videoClearScreen(0L); - menutext_center(60, "Thanks to all our"); - menutext_center(60+16, "fans for giving"); - menutext_center(60+16+16, "us big heads."); - menutext_center(70+16+16+16, "Look for a Duke Nukem 3D"); - menutext_center(70+16+16+16+16, "sequel soon."); + menutext_center(60, GStrings("Thanks to all our")); + menutext_center(60+16, GStrings("fans for giving")); + menutext_center(60+16+16, GStrings("us big heads.")); + menutext_center(70+16+16+16, GStrings("Look for a Duke Nukem 3D")); + menutext_center(70+16+16+16+16, GStrings("sequel soon.")); videoNextPage(); fadepal(0, 0, 0, 252, 0, -12); @@ -1910,13 +1910,13 @@ static void G_DisplayMPResultsScreen(void) rotatesprite_fs(160<<16, 34<<16, RR ? 23592L : 65536L, 0, INGAMEDUKETHREEDEE, 0, 0, 10); if (!RR && PLUTOPAK) // JBF 20030804 rotatesprite_fs((260)<<16, 36<<16, 65536L, 0, PLUTOPAKSPRITE+2, 0, 0, 2+8); - gametext_center(58+(RR ? 0 : 2), "Multiplayer Totals"); + gametext_center(58+(RR ? 0 : 2), GStrings("Multiplayer Totals")); gametext_center(58+10, g_mapInfo[G_LastMapInfoIndex()].name); - gametext_center_shade(RR ? 175 : 165, "Press any key or button to continue", quotepulseshade); + gametext_center_shade(RR ? 175 : 165, GStrings("Presskey"), quotepulseshade); - minitext(38, 80, "Name", 8, 2+8+16+128); - minitext(269, 80, "Kills", 8, 2+8+16+128); + minitext(38, 80, GStrings("Name"), 8, 2+8+16+128); + minitext(269, 80, GStrings("Kills"), 8, 2+8+16+128); for (i=0; i>2)+71, yy+9, tempbuf); if (g_player[myconnectindex].ps->player_par < ud.playerbest) - gametext((320>>2)+89+(clockpad*24), yy+9, "New record!"); + gametext((320>>2)+89+(clockpad*24), yy+9, GStrings("TXT_NEWRECORD")); } else { @@ -2313,9 +2313,9 @@ void G_BonusScreen(int32_t bonusonly) } } else if (!RR) - gametext_pal((320>>2)+71, yy+9, "Cheated!", 2); + gametext_pal((320>>2)+71, yy+9, GStrings("TXT_Cheated"), 2); else - menutext(191, yy, "Cheated!"); + menutext(191, yy, GStrings("TXT_Cheated")); yy+=yystep; if (!(ud.volume_number == 0 && ud.last_level-1 == 7 && boardfilename[0])) @@ -2356,14 +2356,14 @@ void G_BonusScreen(int32_t bonusonly) if (totalclock > (60*6)) { if (!RR) - gametext(10, yy+9, "Enemies Killed:"); + gametext(10, yy+9, GStrings("TXT_EnemiesKilled")); else - menutext(30, yy, "Varmints Killed:"); + menutext(30, yy, GStrings("TXT_VarmintsKilled")); yy += yystep; if (!RR) - gametext(10, yy+9, "Enemies Left:"); + gametext(10, yy+9, GStrings("TXT_EnemiesLeft")); else - menutext(30, yy, "Varmints Left:"); + menutext(30, yy, GStrings("TXT_VarmintsLeft")); yy += yystep; if (bonuscnt == 2) @@ -2391,9 +2391,9 @@ void G_BonusScreen(int32_t bonusonly) if (ud.player_skill > 3 && !RR) { if (!RR) - gametext((320>>2)+70, yy+9, "N/A"); + gametext((320>>2)+70, yy+9, GStrings("TXT_N_A")); else - menutext(231,yy, "N/A"); + menutext(231,yy, GStrings("TXT_N_A")); yy += yystep; } else @@ -2414,14 +2414,14 @@ void G_BonusScreen(int32_t bonusonly) if (totalclock > (60*9)) { if (!RR) - gametext(10, yy+9, "Secrets Found:"); + gametext(10, yy+9, GStrings("TXT_SECFND")); else - menutext(30, yy, "Secrets Found:"); + menutext(30, yy, GStrings("TXT_SECFND")); yy += yystep; if (!RR) - gametext(10, yy+9, "Secrets Missed:"); + gametext(10, yy+9, GStrings("TXT_SECMISS")); else - menutext(30, yy, "Secrets Missed:"); + menutext(30, yy, GStrings("TXT_SECMISS")); yy += yystep; if (bonuscnt == 4) bonuscnt++; @@ -2629,9 +2629,9 @@ void G_BonusScreenRRRA(int32_t bonusonly) } if ((g_lastLevel && ud.volume_number == 2) || g_vixenLevel) - lastmapname = "CLOSE ENCOUNTERS"; + lastmapname = GStrings("TXT_CLOSEENCOUNTERS"); else if (g_turdLevel) - lastmapname = "SMELTIN' PLANT"; + lastmapname = GStrings("SMELTIN' PLANT"); fadepal(0, 0, 0, 0, 252, 4); @@ -2814,7 +2814,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if (lastmapname) menutext(80, 16, lastmapname); - menutext(15, 192, "Press any key to continue"); + menutext(15, 192, GStrings("TXT_PRESSKEY")); const int yystep = 16; if (totalclock > (60*3)) @@ -2828,12 +2828,12 @@ void G_BonusScreenRRRA(int32_t bonusonly) { if (g_mapInfo[G_LastMapInfoIndex()].partime) { - menutext(30, yy, "Par Time:"); + menutext(30, yy, GStrings("TXT_PARTIME")); yy+=yystep; } if (g_mapInfo[G_LastMapInfoIndex()].designertime) { - menutext(30, yy, "Xatrix Time:"); + menutext(30, yy, GStrings("TXT_XTRTIME")); yy+=yystep; } @@ -2895,9 +2895,9 @@ void G_BonusScreenRRRA(int32_t bonusonly) zz = yy += 16; if (totalclock > (60*6)) { - menutext(30, yy, "Varmints Killed:"); + menutext(30, yy, GStrings("TXT_VARMINTSKILLED")); yy += yystep; - menutext(30, yy, "Varmints Left:"); + menutext(30, yy, GStrings("TXT_VARMINTSLEFT")); yy += yystep; if (bonuscnt == 2) @@ -2934,9 +2934,9 @@ void G_BonusScreenRRRA(int32_t bonusonly) zz = yy += 0; if (totalclock > (60*9)) { - menutext(30, yy, "Secrets Found:"); + menutext(30, yy, GStrings("TXT_SECFND")); yy += yystep; - menutext(30, yy, "Secrets Missed:"); + menutext(30, yy, GStrings("TXT_SECMISS")); yy += yystep; if (bonuscnt == 4) bonuscnt++;