forked from len0rd/rockbox
Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11738 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
314f3b58f1
commit
7e6f74e429
17 changed files with 260 additions and 427 deletions
|
|
@ -36,9 +36,10 @@
|
|||
#include "r_main.h"
|
||||
#include "s_sound.h"
|
||||
#include "sounds.h"
|
||||
//#include "d_deh.h" // Ty 03/22/98 - externalized strings
|
||||
#include "d_deh.h" // Ty 03/22/98 - externalized strings
|
||||
#include "p_tick.h"
|
||||
#include "i_system.h"
|
||||
|
||||
#include "p_inter.h"
|
||||
#include "p_enemy.h"
|
||||
|
||||
|
|
@ -315,13 +316,13 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
case SPR_ARM1:
|
||||
if (!P_GiveArmor (player, green_armor_class))
|
||||
return;
|
||||
player->message = GOTARMOR; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTARMOR; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_ARM2:
|
||||
if (!P_GiveArmor (player, blue_armor_class))
|
||||
return;
|
||||
player->message = GOTMEGA; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTMEGA; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
// bonus items
|
||||
|
|
@ -330,7 +331,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
if (player->health > (maxhealth * 2))
|
||||
player->health = (maxhealth * 2);
|
||||
player->mo->health = player->health;
|
||||
player->message = GOTHTHBONUS; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTHTHBONUS; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_BON2:
|
||||
|
|
@ -339,7 +340,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
player->armorpoints = max_armor;
|
||||
if (!player->armortype)
|
||||
player->armortype = green_armor_class;
|
||||
player->message = GOTARMBONUS; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTARMBONUS; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_SOUL:
|
||||
|
|
@ -347,7 +348,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
if (player->health > max_soul)
|
||||
player->health = max_soul;
|
||||
player->mo->health = player->health;
|
||||
player->message = GOTSUPER; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSUPER; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
|
|
@ -357,7 +358,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
player->health = mega_health;
|
||||
player->mo->health = player->health;
|
||||
P_GiveArmor (player,blue_armor_class);
|
||||
player->message = GOTMSPHERE; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTMSPHERE; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
|
|
@ -365,7 +366,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
// leave cards for everyone
|
||||
case SPR_BKEY:
|
||||
if (!player->cards[it_bluecard])
|
||||
player->message = GOTBLUECARD; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTBLUECARD; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_bluecard);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -373,7 +374,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
|
||||
case SPR_YKEY:
|
||||
if (!player->cards[it_yellowcard])
|
||||
player->message = GOTYELWCARD; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTYELWCARD; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_yellowcard);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -381,7 +382,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
|
||||
case SPR_RKEY:
|
||||
if (!player->cards[it_redcard])
|
||||
player->message = GOTREDCARD; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTREDCARD; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_redcard);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -389,7 +390,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
|
||||
case SPR_BSKU:
|
||||
if (!player->cards[it_blueskull])
|
||||
player->message = GOTBLUESKUL; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTBLUESKUL; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_blueskull);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -397,7 +398,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
|
||||
case SPR_YSKU:
|
||||
if (!player->cards[it_yellowskull])
|
||||
player->message = GOTYELWSKUL; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTYELWSKUL; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_yellowskull);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -405,7 +406,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
|
||||
case SPR_RSKU:
|
||||
if (!player->cards[it_redskull])
|
||||
player->message = GOTREDSKULL; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTREDSKULL; // Ty 03/22/98 - externalized
|
||||
P_GiveCard (player, it_redskull);
|
||||
if (!netgame)
|
||||
break;
|
||||
|
|
@ -415,7 +416,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
case SPR_STIM:
|
||||
if (!P_GiveBody (player, 10))
|
||||
return;
|
||||
player->message = GOTSTIM; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSTIM; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_MEDI:
|
||||
|
|
@ -423,9 +424,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
return;
|
||||
|
||||
if (player->health < 50) // cph - 25 + the 25 just added, thanks to Quasar for reporting this bug
|
||||
player->message = GOTMEDINEED; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTMEDINEED; // Ty 03/22/98 - externalized
|
||||
else
|
||||
player->message = GOTMEDIKIT; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTMEDIKIT; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
|
||||
|
|
@ -433,14 +434,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
case SPR_PINV:
|
||||
if (!P_GivePower (player, pw_invulnerability))
|
||||
return;
|
||||
player->message = GOTINVUL; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTINVUL; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
case SPR_PSTR:
|
||||
if (!P_GivePower (player, pw_strength))
|
||||
return;
|
||||
player->message = GOTBERSERK; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTBERSERK; // Ty 03/22/98 - externalized
|
||||
if (player->readyweapon != wp_fist)
|
||||
player->pendingweapon = wp_fist;
|
||||
sound = sfx_getpow;
|
||||
|
|
@ -449,28 +450,28 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
case SPR_PINS:
|
||||
if (!P_GivePower (player, pw_invisibility))
|
||||
return;
|
||||
player->message = GOTINVIS; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTINVIS; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
case SPR_SUIT:
|
||||
if (!P_GivePower (player, pw_ironfeet))
|
||||
return;
|
||||
player->message = GOTSUIT; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSUIT; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
case SPR_PMAP:
|
||||
if (!P_GivePower (player, pw_allmap))
|
||||
return;
|
||||
player->message = GOTMAP; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTMAP; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
case SPR_PVIS:
|
||||
if (!P_GivePower (player, pw_infrared))
|
||||
return;
|
||||
player->message = GOTVISOR; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTVISOR; // Ty 03/22/98 - externalized
|
||||
sound = sfx_getpow;
|
||||
break;
|
||||
|
||||
|
|
@ -486,49 +487,49 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
if (!P_GiveAmmo (player,am_clip,1))
|
||||
return;
|
||||
}
|
||||
player->message = GOTCLIP; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCLIP; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_AMMO:
|
||||
if (!P_GiveAmmo (player, am_clip,5))
|
||||
return;
|
||||
player->message = GOTCLIPBOX; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCLIPBOX; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_ROCK:
|
||||
if (!P_GiveAmmo (player, am_misl,1))
|
||||
return;
|
||||
player->message = GOTROCKET; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTROCKET; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_BROK:
|
||||
if (!P_GiveAmmo (player, am_misl,5))
|
||||
return;
|
||||
player->message = GOTROCKBOX; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTROCKBOX; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_CELL:
|
||||
if (!P_GiveAmmo (player, am_cell,1))
|
||||
return;
|
||||
player->message = GOTCELL; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCELL; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_CELP:
|
||||
if (!P_GiveAmmo (player, am_cell,5))
|
||||
return;
|
||||
player->message = GOTCELLBOX; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCELLBOX; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_SHEL:
|
||||
if (!P_GiveAmmo (player, am_shell,1))
|
||||
return;
|
||||
player->message = GOTSHELLS; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSHELLS; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_SBOX:
|
||||
if (!P_GiveAmmo (player, am_shell,5))
|
||||
return;
|
||||
player->message = GOTSHELLBOX; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSHELLBOX; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
case SPR_BPAK:
|
||||
|
|
@ -540,56 +541,56 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
|
|||
}
|
||||
for (i=0 ; i<NUMAMMO ; i++)
|
||||
P_GiveAmmo (player, i, 1);
|
||||
player->message = GOTBACKPACK; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTBACKPACK; // Ty 03/22/98 - externalized
|
||||
break;
|
||||
|
||||
// weapons
|
||||
case SPR_BFUG:
|
||||
if (!P_GiveWeapon (player, wp_bfg, false) )
|
||||
return;
|
||||
player->message = GOTBFG9000; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTBFG9000; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_MGUN:
|
||||
if (!P_GiveWeapon (player, wp_chaingun, (special->flags&MF_DROPPED)!=0) )
|
||||
return;
|
||||
player->message = GOTCHAINGUN; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCHAINGUN; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_CSAW:
|
||||
if (!P_GiveWeapon (player, wp_chainsaw, false) )
|
||||
return;
|
||||
player->message = GOTCHAINSAW; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTCHAINSAW; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_LAUN:
|
||||
if (!P_GiveWeapon (player, wp_missile, false) )
|
||||
return;
|
||||
player->message = GOTLAUNCHER; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTLAUNCHER; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_PLAS:
|
||||
if (!P_GiveWeapon (player, wp_plasma, false) )
|
||||
return;
|
||||
player->message = GOTPLASMA; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTPLASMA; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_SHOT:
|
||||
if (!P_GiveWeapon (player, wp_shotgun, (special->flags&MF_DROPPED)!=0 ) )
|
||||
return;
|
||||
player->message = GOTSHOTGUN; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSHOTGUN; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
case SPR_SGN2:
|
||||
if (!P_GiveWeapon(player, wp_supershotgun, (special->flags&MF_DROPPED)!=0))
|
||||
return;
|
||||
player->message = GOTSHOTGUN2; // Ty 03/22/98 - externalized
|
||||
player->message = s_GOTSHOTGUN2; // Ty 03/22/98 - externalized
|
||||
sound = sfx_wpnup;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue