mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-25 09:10:59 +00:00
added some more symbolic constants.
This commit is contained in:
parent
e8dd2d5b89
commit
272f44786c
5 changed files with 59 additions and 29 deletions
|
@ -35,6 +35,22 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
void QuitGame(void);
|
void QuitGame(void);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kGameTypeSinglePlayer = 0,
|
||||||
|
kGameTypeCoop = 1,
|
||||||
|
kGameTypeBloodBath = 2,
|
||||||
|
kGameTypeTeams = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
// GAMEFLAGS //////////////////////////////////////////////////
|
||||||
|
enum {
|
||||||
|
kGameFlagNone = 0,
|
||||||
|
kGameFlagContinuing = 1 << 0,
|
||||||
|
kGameFlagEnding = 1 << 1,
|
||||||
|
kGameFlagPlayIntro = 1 << 2,
|
||||||
|
kGameFlagPlayOutro = 1 << 3,
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
kMagicOwner = 16383,
|
kMagicOwner = 16383,
|
||||||
|
|
|
@ -341,7 +341,7 @@ void GibFX(DBloodActor* actor, GIBFX* pGFX, DVector3* pPos, DVector3* pVel)
|
||||||
|
|
||||||
void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, DVector3* pVel)
|
void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, DVector3* pVel)
|
||||||
{
|
{
|
||||||
if (adult_lockout && gGameOptions.nGameType <= 0)
|
if (adult_lockout && gGameOptions.nGameType == kGameTypeSinglePlayer)
|
||||||
switch (pGThing->type) {
|
switch (pGThing->type) {
|
||||||
case kThingBloodBits:
|
case kThingBloodBits:
|
||||||
case kThingZombieHead:
|
case kThingZombieHead:
|
||||||
|
|
|
@ -468,22 +468,23 @@ void powerupClear(DBloodPlayer* pPlayer)
|
||||||
int packItemToPowerup(int nPack)
|
int packItemToPowerup(int nPack)
|
||||||
{
|
{
|
||||||
int nPowerUp = -1;
|
int nPowerUp = -1;
|
||||||
switch (nPack) {
|
switch (nPack)
|
||||||
case 0:
|
{
|
||||||
break;
|
case kPackMedKit:
|
||||||
case 1:
|
break;
|
||||||
nPowerUp = kPwUpDivingSuit;
|
case kPackDivingSuit:
|
||||||
break;
|
nPowerUp = kPwUpDivingSuit;
|
||||||
case 2:
|
break;
|
||||||
nPowerUp = kPwUpCrystalBall;
|
case kPackCrystalBall:
|
||||||
break;
|
nPowerUp = kPwUpCrystalBall;
|
||||||
case 3:
|
break;
|
||||||
nPowerUp = kPwUpBeastVision;
|
case kPackBeastVision:
|
||||||
break;
|
nPowerUp = kPwUpBeastVision;
|
||||||
case 4:
|
break;
|
||||||
nPowerUp = kPwUpJumpBoots;
|
case kPackJumpBoots:
|
||||||
break;
|
nPowerUp = kPwUpJumpBoots;
|
||||||
default:
|
break;
|
||||||
|
default:
|
||||||
I_Error("Unhandled pack item %d", nPack);
|
I_Error("Unhandled pack item %d", nPack);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -498,15 +499,16 @@ int packItemToPowerup(int nPack)
|
||||||
|
|
||||||
int powerupToPackItem(int nPowerUp)
|
int powerupToPackItem(int nPowerUp)
|
||||||
{
|
{
|
||||||
switch (nPowerUp) {
|
switch (nPowerUp)
|
||||||
case kPwUpDivingSuit:
|
{
|
||||||
return 1;
|
case kPwUpDivingSuit:
|
||||||
case kPwUpCrystalBall:
|
return kPackDivingSuit;
|
||||||
return 2;
|
case kPwUpCrystalBall:
|
||||||
case kPwUpBeastVision:
|
return kPackCrystalBall;
|
||||||
return 3;
|
case kPwUpBeastVision:
|
||||||
case kPwUpJumpBoots:
|
return kPackBeastVision;
|
||||||
return 4;
|
case kPwUpJumpBoots:
|
||||||
|
return kPackJumpBoots;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1600,7 +1602,7 @@ void ProcessInput(DBloodPlayer* pPlayer)
|
||||||
default:
|
default:
|
||||||
if (!pPlayer->cantJump && (pInput->actions & SB_JUMP) && actor->xspr.height == 0) {
|
if (!pPlayer->cantJump && (pInput->actions & SB_JUMP) && actor->xspr.height == 0) {
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
if ((packItemActive(pPlayer, 4) && pPosture->pwupJumpZ != 0) || pPosture->normalJumpZ != 0)
|
if ((packItemActive(pPlayer, kPackJumpBoots) && pPosture->pwupJumpZ != 0) || pPosture->normalJumpZ != 0)
|
||||||
#endif
|
#endif
|
||||||
sfxPlay3DSound(actor, 700, 0, 0);
|
sfxPlay3DSound(actor, 700, 0, 0);
|
||||||
|
|
||||||
|
@ -2195,7 +2197,7 @@ int playerDamageSprite(DBloodActor* source, DBloodPlayer* pPlayer, DAMAGE_TYPE n
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
// allow drop items and keys in multiplayer
|
// allow drop items and keys in multiplayer
|
||||||
if (gModernMap && gGameOptions.nGameType != 0 && pPlayer->GetActor()->xspr.health <= 0) {
|
if (gModernMap && gGameOptions.nGameType != kGameTypeSinglePlayer && pPlayer->GetActor()->xspr.health <= 0) {
|
||||||
|
|
||||||
DBloodActor* pItem = nullptr;
|
DBloodActor* pItem = nullptr;
|
||||||
if (pPlayer->GetActor()->xspr.dropMsg && (pItem = actDropItem(pActor, pPlayer->GetActor()->xspr.dropMsg)) != NULL)
|
if (pPlayer->GetActor()->xspr.dropMsg && (pItem = actDropItem(pActor, pPlayer->GetActor()->xspr.dropMsg)) != NULL)
|
||||||
|
|
|
@ -52,6 +52,18 @@ enum
|
||||||
kPostureMax = 3,
|
kPostureMax = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// inventory pack
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kPackBase = 0,
|
||||||
|
kPackMedKit = kPackBase,
|
||||||
|
kPackDivingSuit = 1,
|
||||||
|
kPackCrystalBall = 2,
|
||||||
|
kPackBeastVision = 3,
|
||||||
|
kPackJumpBoots = 4,
|
||||||
|
kPackMax = 5,
|
||||||
|
};
|
||||||
|
|
||||||
struct PACKINFO
|
struct PACKINFO
|
||||||
{
|
{
|
||||||
bool isActive; // is active (0/1)
|
bool isActive; // is active (0/1)
|
||||||
|
|
|
@ -897,7 +897,7 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
|
||||||
case kStatMarker:
|
case kStatMarker:
|
||||||
case kStatPathMarker:
|
case kStatPathMarker:
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
if (!gModernMap || !(actor->spr.flags & 0x1)) continue;
|
if (!gModernMap || !(actor->spr.flags & kPhysMove)) continue;
|
||||||
#else
|
#else
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue