diff options
author | Simon Howard | 2010-04-18 16:13:59 +0000 |
---|---|---|
committer | Simon Howard | 2010-04-18 16:13:59 +0000 |
commit | 0c0d4ed517a8a9559f96e92ef105e52eb01be1ee (patch) | |
tree | 22828f0c9ef7f07e4af3dc4605abd693f096e3f8 /src/heretic | |
parent | b365656cdb07dcf5b381073c65f74629e7761f8e (diff) | |
download | chocolate-doom-0c0d4ed517a8a9559f96e92ef105e52eb01be1ee.tar.gz chocolate-doom-0c0d4ed517a8a9559f96e92ef105e52eb01be1ee.tar.bz2 chocolate-doom-0c0d4ed517a8a9559f96e92ef105e52eb01be1ee.zip |
Use DEH_String() around TXT_ definitions from dstrings.h.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1901
Diffstat (limited to 'src/heretic')
-rw-r--r-- | src/heretic/g_game.c | 2 | ||||
-rw-r--r-- | src/heretic/p_doors.c | 7 | ||||
-rw-r--r-- | src/heretic/p_inter.c | 73 | ||||
-rw-r--r-- | src/heretic/sb_bar.c | 50 |
4 files changed, 67 insertions, 65 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index 4d1e63c3..211d0b67 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -1715,7 +1715,7 @@ void G_DoSaveGame(void) gameaction = ga_nothing; savedescription[0] = 0; - P_SetMessage(&players[consoleplayer], TXT_GAMESAVED, true); + P_SetMessage(&players[consoleplayer], DEH_String(TXT_GAMESAVED), true); } //========================================================================== diff --git a/src/heretic/p_doors.c b/src/heretic/p_doors.c index e0e82fbe..56e37119 100644 --- a/src/heretic/p_doors.c +++ b/src/heretic/p_doors.c @@ -25,6 +25,7 @@ // P_doors.c #include "doomdef.h" +#include "deh_str.h" #include "p_local.h" #include "s_sound.h" #include "v_video.h" @@ -232,7 +233,7 @@ void EV_VerticalDoor(line_t * line, mobj_t * thing) } if (!player->keys[key_blue]) { - P_SetMessage(player, TXT_NEEDBLUEKEY, false); + P_SetMessage(player, DEH_String(TXT_NEEDBLUEKEY), false); S_StartSound(NULL, sfx_plroof); return; } @@ -245,7 +246,7 @@ void EV_VerticalDoor(line_t * line, mobj_t * thing) } if (!player->keys[key_yellow]) { - P_SetMessage(player, TXT_NEEDYELLOWKEY, false); + P_SetMessage(player, DEH_String(TXT_NEEDYELLOWKEY), false); S_StartSound(NULL, sfx_plroof); return; } @@ -258,7 +259,7 @@ void EV_VerticalDoor(line_t * line, mobj_t * thing) } if (!player->keys[key_green]) { - P_SetMessage(player, TXT_NEEDGREENKEY, false); + P_SetMessage(player, DEH_String(TXT_NEEDGREENKEY), false); S_StartSound(NULL, sfx_plroof); return; } diff --git a/src/heretic/p_inter.c b/src/heretic/p_inter.c index 3587a95d..afdb37f2 100644 --- a/src/heretic/p_inter.c +++ b/src/heretic/p_inter.c @@ -25,6 +25,7 @@ // P_inter.c #include "doomdef.h" +#include "deh_str.h" #include "i_system.h" #include "i_timer.h" #include "m_random.h" @@ -580,21 +581,21 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_ITEMHEALTH, false); + P_SetMessage(player, DEH_String(TXT_ITEMHEALTH), false); break; case SPR_SHLD: // Item_Shield1 if (!P_GiveArmor(player, 1)) { return; } - P_SetMessage(player, TXT_ITEMSHIELD1, false); + P_SetMessage(player, DEH_String(TXT_ITEMSHIELD1), false); break; case SPR_SHD2: // Item_Shield2 if (!P_GiveArmor(player, 2)) { return; } - P_SetMessage(player, TXT_ITEMSHIELD2, false); + P_SetMessage(player, DEH_String(TXT_ITEMSHIELD2), false); break; case SPR_BAGH: // Item_BagOfHolding if (!player->backpack) @@ -610,21 +611,21 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) P_GiveAmmo(player, am_crossbow, AMMO_CBOW_WIMPY); P_GiveAmmo(player, am_skullrod, AMMO_SKRD_WIMPY); P_GiveAmmo(player, am_phoenixrod, AMMO_PHRD_WIMPY); - P_SetMessage(player, TXT_ITEMBAGOFHOLDING, false); + P_SetMessage(player, DEH_String(TXT_ITEMBAGOFHOLDING), false); break; case SPR_SPMP: // Item_SuperMap if (!P_GivePower(player, pw_allmap)) { return; } - P_SetMessage(player, TXT_ITEMSUPERMAP, false); + P_SetMessage(player, DEH_String(TXT_ITEMSUPERMAP), false); break; // Keys case SPR_BKYY: // Key_Blue if (!player->keys[key_blue]) { - P_SetMessage(player, TXT_GOTBLUEKEY, false); + P_SetMessage(player, DEH_String(TXT_GOTBLUEKEY), false); } P_GiveKey(player, key_blue); sound = sfx_keyup; @@ -636,7 +637,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) case SPR_CKYY: // Key_Yellow if (!player->keys[key_yellow]) { - P_SetMessage(player, TXT_GOTYELLOWKEY, false); + P_SetMessage(player, DEH_String(TXT_GOTYELLOWKEY), false); } sound = sfx_keyup; P_GiveKey(player, key_yellow); @@ -648,7 +649,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) case SPR_AKYY: // Key_Green if (!player->keys[key_green]) { - P_SetMessage(player, TXT_GOTGREENKEY, false); + P_SetMessage(player, DEH_String(TXT_GOTGREENKEY), false); } sound = sfx_keyup; P_GiveKey(player, key_green); @@ -662,70 +663,70 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) case SPR_PTN2: // Arti_HealingPotion if (P_GiveArtifact(player, arti_health, special)) { - P_SetMessage(player, TXT_ARTIHEALTH, false); + P_SetMessage(player, DEH_String(TXT_ARTIHEALTH), false); P_SetDormantArtifact(special); } return; case SPR_SOAR: // Arti_Fly if (P_GiveArtifact(player, arti_fly, special)) { - P_SetMessage(player, TXT_ARTIFLY, false); + P_SetMessage(player, DEH_String(TXT_ARTIFLY), false); P_SetDormantArtifact(special); } return; case SPR_INVU: // Arti_Invulnerability if (P_GiveArtifact(player, arti_invulnerability, special)) { - P_SetMessage(player, TXT_ARTIINVULNERABILITY, false); + P_SetMessage(player, DEH_String(TXT_ARTIINVULNERABILITY), false); P_SetDormantArtifact(special); } return; case SPR_PWBK: // Arti_TomeOfPower if (P_GiveArtifact(player, arti_tomeofpower, special)) { - P_SetMessage(player, TXT_ARTITOMEOFPOWER, false); + P_SetMessage(player, DEH_String(TXT_ARTITOMEOFPOWER), false); P_SetDormantArtifact(special); } return; case SPR_INVS: // Arti_Invisibility if (P_GiveArtifact(player, arti_invisibility, special)) { - P_SetMessage(player, TXT_ARTIINVISIBILITY, false); + P_SetMessage(player, DEH_String(TXT_ARTIINVISIBILITY), false); P_SetDormantArtifact(special); } return; case SPR_EGGC: // Arti_Egg if (P_GiveArtifact(player, arti_egg, special)) { - P_SetMessage(player, TXT_ARTIEGG, false); + P_SetMessage(player, DEH_String(TXT_ARTIEGG), false); P_SetDormantArtifact(special); } return; case SPR_SPHL: // Arti_SuperHealth if (P_GiveArtifact(player, arti_superhealth, special)) { - P_SetMessage(player, TXT_ARTISUPERHEALTH, false); + P_SetMessage(player, DEH_String(TXT_ARTISUPERHEALTH), false); P_SetDormantArtifact(special); } return; case SPR_TRCH: // Arti_Torch if (P_GiveArtifact(player, arti_torch, special)) { - P_SetMessage(player, TXT_ARTITORCH, false); + P_SetMessage(player, DEH_String(TXT_ARTITORCH), false); P_SetDormantArtifact(special); } return; case SPR_FBMB: // Arti_FireBomb if (P_GiveArtifact(player, arti_firebomb, special)) { - P_SetMessage(player, TXT_ARTIFIREBOMB, false); + P_SetMessage(player, DEH_String(TXT_ARTIFIREBOMB), false); P_SetDormantArtifact(special); } return; case SPR_ATLP: // Arti_Teleport if (P_GiveArtifact(player, arti_teleport, special)) { - P_SetMessage(player, TXT_ARTITELEPORT, false); + P_SetMessage(player, DEH_String(TXT_ARTITELEPORT), false); P_SetDormantArtifact(special); } return; @@ -736,84 +737,84 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_AMMOGOLDWAND1, false); + P_SetMessage(player, DEH_String(TXT_AMMOGOLDWAND1), false); break; case SPR_AMG2: // Ammo_GoldWandHefty if (!P_GiveAmmo(player, am_goldwand, special->health)) { return; } - P_SetMessage(player, TXT_AMMOGOLDWAND2, false); + P_SetMessage(player, DEH_String(TXT_AMMOGOLDWAND2), false); break; case SPR_AMM1: // Ammo_MaceWimpy if (!P_GiveAmmo(player, am_mace, special->health)) { return; } - P_SetMessage(player, TXT_AMMOMACE1, false); + P_SetMessage(player, DEH_String(TXT_AMMOMACE1), false); break; case SPR_AMM2: // Ammo_MaceHefty if (!P_GiveAmmo(player, am_mace, special->health)) { return; } - P_SetMessage(player, TXT_AMMOMACE2, false); + P_SetMessage(player, DEH_String(TXT_AMMOMACE2), false); break; case SPR_AMC1: // Ammo_CrossbowWimpy if (!P_GiveAmmo(player, am_crossbow, special->health)) { return; } - P_SetMessage(player, TXT_AMMOCROSSBOW1, false); + P_SetMessage(player, DEH_String(TXT_AMMOCROSSBOW1), false); break; case SPR_AMC2: // Ammo_CrossbowHefty if (!P_GiveAmmo(player, am_crossbow, special->health)) { return; } - P_SetMessage(player, TXT_AMMOCROSSBOW2, false); + P_SetMessage(player, DEH_String(TXT_AMMOCROSSBOW2), false); break; case SPR_AMB1: // Ammo_BlasterWimpy if (!P_GiveAmmo(player, am_blaster, special->health)) { return; } - P_SetMessage(player, TXT_AMMOBLASTER1, false); + P_SetMessage(player, DEH_String(TXT_AMMOBLASTER1), false); break; case SPR_AMB2: // Ammo_BlasterHefty if (!P_GiveAmmo(player, am_blaster, special->health)) { return; } - P_SetMessage(player, TXT_AMMOBLASTER2, false); + P_SetMessage(player, DEH_String(TXT_AMMOBLASTER2), false); break; case SPR_AMS1: // Ammo_SkullRodWimpy if (!P_GiveAmmo(player, am_skullrod, special->health)) { return; } - P_SetMessage(player, TXT_AMMOSKULLROD1, false); + P_SetMessage(player, DEH_String(TXT_AMMOSKULLROD1), false); break; case SPR_AMS2: // Ammo_SkullRodHefty if (!P_GiveAmmo(player, am_skullrod, special->health)) { return; } - P_SetMessage(player, TXT_AMMOSKULLROD2, false); + P_SetMessage(player, DEH_String(TXT_AMMOSKULLROD2), false); break; case SPR_AMP1: // Ammo_PhoenixRodWimpy if (!P_GiveAmmo(player, am_phoenixrod, special->health)) { return; } - P_SetMessage(player, TXT_AMMOPHOENIXROD1, false); + P_SetMessage(player, DEH_String(TXT_AMMOPHOENIXROD1), false); break; case SPR_AMP2: // Ammo_PhoenixRodHefty if (!P_GiveAmmo(player, am_phoenixrod, special->health)) { return; } - P_SetMessage(player, TXT_AMMOPHOENIXROD2, false); + P_SetMessage(player, DEH_String(TXT_AMMOPHOENIXROD2), false); break; // Weapons @@ -822,7 +823,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNMACE, false); + P_SetMessage(player, DEH_String(TXT_WPNMACE), false); sound = sfx_wpnup; break; case SPR_WBOW: // Weapon_Crossbow @@ -830,7 +831,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNCROSSBOW, false); + P_SetMessage(player, DEH_String(TXT_WPNCROSSBOW), false); sound = sfx_wpnup; break; case SPR_WBLS: // Weapon_Blaster @@ -838,7 +839,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNBLASTER, false); + P_SetMessage(player, DEH_String(TXT_WPNBLASTER), false); sound = sfx_wpnup; break; case SPR_WSKL: // Weapon_SkullRod @@ -846,7 +847,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNSKULLROD, false); + P_SetMessage(player, DEH_String(TXT_WPNSKULLROD), false); sound = sfx_wpnup; break; case SPR_WPHX: // Weapon_PhoenixRod @@ -854,7 +855,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNPHOENIXROD, false); + P_SetMessage(player, DEH_String(TXT_WPNPHOENIXROD), false); sound = sfx_wpnup; break; case SPR_WGNT: // Weapon_Gauntlets @@ -862,7 +863,7 @@ void P_TouchSpecialThing(mobj_t * special, mobj_t * toucher) { return; } - P_SetMessage(player, TXT_WPNGAUNTLETS, false); + P_SetMessage(player, DEH_String(TXT_WPNGAUNTLETS), false); sound = sfx_wpnup; break; default: diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 3a90c000..51bd3b9c 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -1055,11 +1055,11 @@ static void CheatGodFunc(player_t * player, Cheat_t * cheat) player->cheats ^= CF_GODMODE; if (player->cheats & CF_GODMODE) { - P_SetMessage(player, TXT_CHEATGODON, false); + P_SetMessage(player, DEH_String(TXT_CHEATGODON), false); } else { - P_SetMessage(player, TXT_CHEATGODOFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATGODOFF), false); } SB_state = -1; } @@ -1069,11 +1069,11 @@ static void CheatNoClipFunc(player_t * player, Cheat_t * cheat) player->cheats ^= CF_NOCLIP; if (player->cheats & CF_NOCLIP) { - P_SetMessage(player, TXT_CHEATNOCLIPON, false); + P_SetMessage(player, DEH_String(TXT_CHEATNOCLIPON), false); } else { - P_SetMessage(player, TXT_CHEATNOCLIPOFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATNOCLIPOFF), false); } } @@ -1106,7 +1106,7 @@ static void CheatWeaponsFunc(player_t * player, Cheat_t * cheat) { player->ammo[i] = player->maxammo[i]; } - P_SetMessage(player, TXT_CHEATWEAPONS, false); + P_SetMessage(player, DEH_String(TXT_CHEATWEAPONS), false); } static void CheatPowerFunc(player_t * player, Cheat_t * cheat) @@ -1114,12 +1114,12 @@ static void CheatPowerFunc(player_t * player, Cheat_t * cheat) if (player->powers[pw_weaponlevel2]) { player->powers[pw_weaponlevel2] = 0; - P_SetMessage(player, TXT_CHEATPOWEROFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATPOWEROFF), false); } else { P_UseArtifact(player, arti_tomeofpower); - P_SetMessage(player, TXT_CHEATPOWERON, false); + P_SetMessage(player, DEH_String(TXT_CHEATPOWERON), false); } } @@ -1133,7 +1133,7 @@ static void CheatHealthFunc(player_t * player, Cheat_t * cheat) { player->health = player->mo->health = MAXHEALTH; } - P_SetMessage(player, TXT_CHEATHEALTH, false); + P_SetMessage(player, DEH_String(TXT_CHEATHEALTH), false); } static void CheatKeysFunc(player_t * player, Cheat_t * cheat) @@ -1144,7 +1144,7 @@ static void CheatKeysFunc(player_t * player, Cheat_t * cheat) player->keys[key_green] = true; player->keys[key_blue] = true; playerkeys = 7; // Key refresh flags - P_SetMessage(player, TXT_CHEATKEYS, false); + P_SetMessage(player, DEH_String(TXT_CHEATKEYS), false); } static void CheatSoundFunc(player_t * player, Cheat_t * cheat) @@ -1152,11 +1152,11 @@ static void CheatSoundFunc(player_t * player, Cheat_t * cheat) DebugSound = !DebugSound; if (DebugSound) { - P_SetMessage(player, TXT_CHEATSOUNDON, false); + P_SetMessage(player, DEH_String(TXT_CHEATSOUNDON), false); } else { - P_SetMessage(player, TXT_CHEATSOUNDOFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATSOUNDOFF), false); } } @@ -1165,11 +1165,11 @@ static void CheatTickerFunc(player_t * player, Cheat_t * cheat) DisplayTicker = !DisplayTicker; if (DisplayTicker) { - P_SetMessage(player, TXT_CHEATTICKERON, false); + P_SetMessage(player, DEH_String(TXT_CHEATTICKERON), false); } else { - P_SetMessage(player, TXT_CHEATTICKEROFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATTICKEROFF), false); } I_DisplayFPSDots(DisplayTicker); @@ -1177,12 +1177,12 @@ static void CheatTickerFunc(player_t * player, Cheat_t * cheat) static void CheatArtifact1Func(player_t * player, Cheat_t * cheat) { - P_SetMessage(player, TXT_CHEATARTIFACTS1, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTS1), false); } static void CheatArtifact2Func(player_t * player, Cheat_t * cheat) { - P_SetMessage(player, TXT_CHEATARTIFACTS2, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTS2), false); } static void CheatArtifact3Func(player_t * player, Cheat_t * cheat) @@ -1210,7 +1210,7 @@ static void CheatArtifact3Func(player_t * player, Cheat_t * cheat) P_GiveArtifact(player, i, NULL); } } - P_SetMessage(player, TXT_CHEATARTIFACTS3, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTS3), false); } else if (type > arti_none && type < NUMARTIFACTS && count > 0 && count < 10) @@ -1218,18 +1218,18 @@ static void CheatArtifact3Func(player_t * player, Cheat_t * cheat) if (gamemode == shareware && (type == arti_superhealth || type == arti_teleport)) { - P_SetMessage(player, TXT_CHEATARTIFACTSFAIL, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTSFAIL), false); return; } for (i = 0; i < count; i++) { P_GiveArtifact(player, type, NULL); } - P_SetMessage(player, TXT_CHEATARTIFACTS3, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTS3), false); } else { // Bad input - P_SetMessage(player, TXT_CHEATARTIFACTSFAIL, false); + P_SetMessage(player, DEH_String(TXT_CHEATARTIFACTSFAIL), false); } } @@ -1246,7 +1246,7 @@ static void CheatWarpFunc(player_t * player, Cheat_t * cheat) if (D_ValidEpisodeMap(gamemission, gamemode, episode, map)) { G_DeferedInitNew(gameskill, episode, map); - P_SetMessage(player, TXT_CHEATWARP, false); + P_SetMessage(player, DEH_String(TXT_CHEATWARP), false); } } @@ -1258,19 +1258,19 @@ static void CheatChickenFunc(player_t * player, Cheat_t * cheat) { if (P_UndoPlayerChicken(player)) { - P_SetMessage(player, TXT_CHEATCHICKENOFF, false); + P_SetMessage(player, DEH_String(TXT_CHEATCHICKENOFF), false); } } else if (P_ChickenMorphPlayer(player)) { - P_SetMessage(player, TXT_CHEATCHICKENON, false); + P_SetMessage(player, DEH_String(TXT_CHEATCHICKENON), false); } } static void CheatMassacreFunc(player_t * player, Cheat_t * cheat) { P_Massacre(); - P_SetMessage(player, TXT_CHEATMASSACRE, false); + P_SetMessage(player, DEH_String(TXT_CHEATMASSACRE), false); } static void CheatIDKFAFunc(player_t * player, Cheat_t * cheat) @@ -1285,11 +1285,11 @@ static void CheatIDKFAFunc(player_t * player, Cheat_t * cheat) player->weaponowned[i] = false; } player->pendingweapon = wp_staff; - P_SetMessage(player, TXT_CHEATIDKFA, true); + P_SetMessage(player, DEH_String(TXT_CHEATIDKFA), true); } static void CheatIDDQDFunc(player_t * player, Cheat_t * cheat) { P_DamageMobj(player->mo, NULL, player->mo, 10000); - P_SetMessage(player, TXT_CHEATIDDQD, true); + P_SetMessage(player, DEH_String(TXT_CHEATIDDQD), true); } |