ref: 0c0d4ed517a8a9559f96e92ef105e52eb01be1ee
parent: b365656cdb07dcf5b381073c65f74629e7761f8e
author: Simon Howard <[email protected]>
date: Sun Apr 18 12:13:59 EDT 2010
Use DEH_String() around TXT_ definitions from dstrings.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1901
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -1715,7 +1715,7 @@
gameaction = ga_nothing;
savedescription[0] = 0;
- P_SetMessage(&players[consoleplayer], TXT_GAMESAVED, true);
+ P_SetMessage(&players[consoleplayer], DEH_String(TXT_GAMESAVED), true);
}
//==========================================================================
--- 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 @@
}
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 @@
}
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 @@
}
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;
}
--- 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,7 +581,7 @@
{
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))
@@ -587,7 +588,7 @@
{
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))
@@ -594,7 +595,7 @@
{
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,7 +611,7 @@
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))
@@ -617,7 +618,7 @@
{
return;
}
- P_SetMessage(player, TXT_ITEMSUPERMAP, false);
+ P_SetMessage(player, DEH_String(TXT_ITEMSUPERMAP), false);
break;
// Keys
@@ -624,7 +625,7 @@
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 @@
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 @@
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,7 +663,7 @@
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;
@@ -669,7 +670,7 @@
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;
@@ -676,7 +677,7 @@
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;
@@ -683,7 +684,7 @@
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;
@@ -690,7 +691,7 @@
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;
@@ -697,7 +698,7 @@
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;
@@ -704,7 +705,7 @@
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;
@@ -711,7 +712,7 @@
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;
@@ -718,7 +719,7 @@
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;
@@ -725,7 +726,7 @@
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,7 +737,7 @@
{
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))
@@ -743,7 +744,7 @@
{
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))
@@ -750,7 +751,7 @@
{
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))
@@ -757,7 +758,7 @@
{
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))
@@ -764,7 +765,7 @@
{
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))
@@ -771,7 +772,7 @@
{
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))
@@ -778,7 +779,7 @@
{
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))
@@ -785,7 +786,7 @@
{
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))
@@ -792,7 +793,7 @@
{
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))
@@ -799,7 +800,7 @@
{
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))
@@ -806,7 +807,7 @@
{
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))
@@ -813,7 +814,7 @@
{
return;
}
- P_SetMessage(player, TXT_AMMOPHOENIXROD2, false);
+ P_SetMessage(player, DEH_String(TXT_AMMOPHOENIXROD2), false);
break;
// Weapons
@@ -822,7 +823,7 @@
{
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 @@
{
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 @@
{
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 @@
{
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 @@
{
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 @@
{
return;
}
- P_SetMessage(player, TXT_WPNGAUNTLETS, false);
+ P_SetMessage(player, DEH_String(TXT_WPNGAUNTLETS), false);
sound = sfx_wpnup;
break;
default:
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -1055,11 +1055,11 @@
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 @@
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 @@
{
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 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 @@
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,7 +1218,7 @@
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++)
@@ -1225,11 +1225,11 @@
{
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 @@
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,12 +1258,12 @@
{
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);
}
}
@@ -1270,7 +1270,7 @@
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 @@
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);
}