added some more symbolic constants.

This commit is contained in:
Christoph Oelckers 2023-10-13 21:15:07 +02:00
parent e8dd2d5b89
commit 272f44786c
5 changed files with 59 additions and 29 deletions

View file

@ -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,

View file

@ -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:

View file

@ -468,19 +468,20 @@ void powerupClear(DBloodPlayer* pPlayer)
int packItemToPowerup(int nPack) int packItemToPowerup(int nPack)
{ {
int nPowerUp = -1; int nPowerUp = -1;
switch (nPack) { switch (nPack)
case 0: {
case kPackMedKit:
break; break;
case 1: case kPackDivingSuit:
nPowerUp = kPwUpDivingSuit; nPowerUp = kPwUpDivingSuit;
break; break;
case 2: case kPackCrystalBall:
nPowerUp = kPwUpCrystalBall; nPowerUp = kPwUpCrystalBall;
break; break;
case 3: case kPackBeastVision:
nPowerUp = kPwUpBeastVision; nPowerUp = kPwUpBeastVision;
break; break;
case 4: case kPackJumpBoots:
nPowerUp = kPwUpJumpBoots; nPowerUp = kPwUpJumpBoots;
break; break;
default: default:
@ -498,15 +499,16 @@ int packItemToPowerup(int nPack)
int powerupToPackItem(int nPowerUp) int powerupToPackItem(int nPowerUp)
{ {
switch (nPowerUp) { switch (nPowerUp)
{
case kPwUpDivingSuit: case kPwUpDivingSuit:
return 1; return kPackDivingSuit;
case kPwUpCrystalBall: case kPwUpCrystalBall:
return 2; return kPackCrystalBall;
case kPwUpBeastVision: case kPwUpBeastVision:
return 3; return kPackBeastVision;
case kPwUpJumpBoots: case kPwUpJumpBoots:
return 4; 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)

View file

@ -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)

View file

@ -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