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);
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
{
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)
{
if (adult_lockout && gGameOptions.nGameType <= 0)
if (adult_lockout && gGameOptions.nGameType == kGameTypeSinglePlayer)
switch (pGThing->type) {
case kThingBloodBits:
case kThingZombieHead:

View file

@ -468,22 +468,23 @@ void powerupClear(DBloodPlayer* pPlayer)
int packItemToPowerup(int nPack)
{
int nPowerUp = -1;
switch (nPack) {
case 0:
break;
case 1:
nPowerUp = kPwUpDivingSuit;
break;
case 2:
nPowerUp = kPwUpCrystalBall;
break;
case 3:
nPowerUp = kPwUpBeastVision;
break;
case 4:
nPowerUp = kPwUpJumpBoots;
break;
default:
switch (nPack)
{
case kPackMedKit:
break;
case kPackDivingSuit:
nPowerUp = kPwUpDivingSuit;
break;
case kPackCrystalBall:
nPowerUp = kPwUpCrystalBall;
break;
case kPackBeastVision:
nPowerUp = kPwUpBeastVision;
break;
case kPackJumpBoots:
nPowerUp = kPwUpJumpBoots;
break;
default:
I_Error("Unhandled pack item %d", nPack);
break;
}
@ -498,15 +499,16 @@ int packItemToPowerup(int nPack)
int powerupToPackItem(int nPowerUp)
{
switch (nPowerUp) {
case kPwUpDivingSuit:
return 1;
case kPwUpCrystalBall:
return 2;
case kPwUpBeastVision:
return 3;
case kPwUpJumpBoots:
return 4;
switch (nPowerUp)
{
case kPwUpDivingSuit:
return kPackDivingSuit;
case kPwUpCrystalBall:
return kPackCrystalBall;
case kPwUpBeastVision:
return kPackBeastVision;
case kPwUpJumpBoots:
return kPackJumpBoots;
}
return -1;
}
@ -1600,7 +1602,7 @@ void ProcessInput(DBloodPlayer* pPlayer)
default:
if (!pPlayer->cantJump && (pInput->actions & SB_JUMP) && actor->xspr.height == 0) {
#ifdef NOONE_EXTENSIONS
if ((packItemActive(pPlayer, 4) && pPosture->pwupJumpZ != 0) || pPosture->normalJumpZ != 0)
if ((packItemActive(pPlayer, kPackJumpBoots) && pPosture->pwupJumpZ != 0) || pPosture->normalJumpZ != 0)
#endif
sfxPlay3DSound(actor, 700, 0, 0);
@ -2195,7 +2197,7 @@ int playerDamageSprite(DBloodActor* source, DBloodPlayer* pPlayer, DAMAGE_TYPE n
#ifdef NOONE_EXTENSIONS
// 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;
if (pPlayer->GetActor()->xspr.dropMsg && (pItem = actDropItem(pActor, pPlayer->GetActor()->xspr.dropMsg)) != NULL)

View file

@ -52,6 +52,18 @@ enum
kPostureMax = 3,
};
// inventory pack
enum
{
kPackBase = 0,
kPackMedKit = kPackBase,
kPackDivingSuit = 1,
kPackCrystalBall = 2,
kPackBeastVision = 3,
kPackJumpBoots = 4,
kPackMax = 5,
};
struct PACKINFO
{
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 kStatPathMarker:
#ifdef NOONE_EXTENSIONS
if (!gModernMap || !(actor->spr.flags & 0x1)) continue;
if (!gModernMap || !(actor->spr.flags & kPhysMove)) continue;
#else
continue;
#endif