This is just a little bit of work on making Ion Maiden run properly with regular EDuke32 binaries

git-svn-id: https://svn.eduke32.com/eduke32@7455 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-03-30 19:35:46 +00:00 committed by Christoph Oelckers
parent 5e0d63a100
commit eac78ec995

View file

@ -114,7 +114,7 @@ void P_QuickKill(DukePlayer_t * const pPlayer)
sprite[pPlayer->i].cstat |= 32768; sprite[pPlayer->i].cstat |= 32768;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (ud.god == 0) if (!IONMAIDEN && ud.god == 0)
A_DoGuts(pPlayer->i,JIBS6,8); A_DoGuts(pPlayer->i,JIBS6,8);
#endif #endif
} }
@ -222,19 +222,22 @@ static int A_FindTargetSprite(const spritetype *pSprite, int projAng, int projec
return -1; return -1;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
switch (DYNAMICTILEMAP(projecTile)) if (!IONMAIDEN)
{ {
case TONGUE__STATIC: switch (DYNAMICTILEMAP(projecTile))
case FREEZEBLAST__STATIC: {
case SHRINKSPARK__STATIC: case TONGUE__STATIC:
case SHRINKER__STATIC: case FREEZEBLAST__STATIC:
case RPG__STATIC: case SHRINKSPARK__STATIC:
case FIRELASER__STATIC: case SHRINKER__STATIC:
case SPIT__STATIC: case RPG__STATIC:
case COOLEXPLOSION1__STATIC: case FIRELASER__STATIC:
return -1; case SPIT__STATIC:
default: case COOLEXPLOSION1__STATIC:
break; return -1;
default:
break;
}
} }
#endif #endif
} }
@ -273,7 +276,7 @@ static int A_FindTargetSprite(const spritetype *pSprite, int projAng, int projec
continue; continue;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if ((isShrinker && sprite[spriteNum].xrepeat < 30 if (!IONMAIDEN && (isShrinker && sprite[spriteNum].xrepeat < 30
&& (PN(spriteNum) == SHARK || !(PN(spriteNum) >= GREENSLIME && PN(spriteNum) <= GREENSLIME + 7))) && (PN(spriteNum) == SHARK || !(PN(spriteNum) >= GREENSLIME && PN(spriteNum) <= GREENSLIME + 7)))
|| (isFreezer && sprite[spriteNum].pal == 1)) || (isFreezer && sprite[spriteNum].pal == 1))
continue; continue;
@ -297,7 +300,7 @@ static int A_FindTargetSprite(const spritetype *pSprite, int projAng, int projec
} }
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
int const zOffset = (PN(spriteNum) == ORGANTIC || PN(spriteNum) == ROTATEGUN) ? 0 : ZOFFSET5; int const zOffset = IONMAIDEN ? 0 : (PN(spriteNum) == ORGANTIC || PN(spriteNum) == ROTATEGUN) ? 0 : ZOFFSET5;
#else #else
int const zOffset = 0; int const zOffset = 0;
#endif #endif
@ -328,6 +331,9 @@ static void A_SetHitData(int spriteNum, const hitdata_t *hitData)
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
static int CheckShootSwitchTile(int tileNum) static int CheckShootSwitchTile(int tileNum)
{ {
if (IONMAIDEN)
return 0;
return tileNum == DIPSWITCH || tileNum == DIPSWITCH + 1 || tileNum == DIPSWITCH2 || tileNum == DIPSWITCH2 + 1 || return tileNum == DIPSWITCH || tileNum == DIPSWITCH + 1 || tileNum == DIPSWITCH2 || tileNum == DIPSWITCH2 + 1 ||
tileNum == DIPSWITCH3 || tileNum == DIPSWITCH3 + 1 || tileNum == HANDSWITCH || tileNum == HANDSWITCH + 1; tileNum == DIPSWITCH3 || tileNum == DIPSWITCH3 + 1 || tileNum == HANDSWITCH || tileNum == HANDSWITCH + 1;
} }
@ -371,7 +377,7 @@ static int GetAutoAimAng(int spriteNum, int playerNum, int projecTile, int zAdju
int zCenter = 2 * (pSprite->yrepeat * tilesiz[pSprite->picnum].y) + zAdjust; int zCenter = 2 * (pSprite->yrepeat * tilesiz[pSprite->picnum].y) + zAdjust;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (aimFlags && if (!IONMAIDEN && aimFlags &&
((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN || pSprite->cstat & CSTAT_SPRITE_YCENTER)) ((pSprite->picnum >= GREENSLIME && pSprite->picnum <= GREENSLIME + 7) || pSprite->picnum == ROTATEGUN || pSprite->cstat & CSTAT_SPRITE_YCENTER))
#else #else
if (aimFlags && pSprite->cstat & CSTAT_SPRITE_YCENTER) if (aimFlags && pSprite->cstat & CSTAT_SPRITE_YCENTER)
@ -650,7 +656,7 @@ static int P_PostFireHitscan(int playerNum, int const spriteNum, hitdata_t *cons
{ {
A_DamageObject(hitData->sprite, spriteNum); A_DamageObject(hitData->sprite, spriteNum);
if (sprite[hitData->sprite].picnum == APLAYER && if (!IONMAIDEN && sprite[hitData->sprite].picnum == APLAYER &&
(ud.ffire == 1 || (!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY) && GTFLAGS(GAMETYPE_TDM) && (ud.ffire == 1 || (!GTFLAGS(GAMETYPE_PLAYERSFRIENDLY) && GTFLAGS(GAMETYPE_TDM) &&
g_player[P_Get(hitData->sprite)].ps->team != g_player[P_Get(spriteOwner)].ps->team))) g_player[P_Get(hitData->sprite)].ps->team != g_player[P_Get(spriteOwner)].ps->team)))
{ {
@ -669,7 +675,7 @@ static int P_PostFireHitscan(int playerNum, int const spriteNum, hitdata_t *cons
Proj_MaybeSpawn(spriteNum, spawnTile, hitData); Proj_MaybeSpawn(spriteNum, spawnTile, hitData);
} }
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (playerNum >= 0 && CheckShootSwitchTile(sprite[hitData->sprite].picnum)) if (!IONMAIDEN && playerNum >= 0 && CheckShootSwitchTile(sprite[hitData->sprite].picnum))
{ {
P_ActivateSwitch(playerNum, hitData->sprite, 1); P_ActivateSwitch(playerNum, hitData->sprite, 1);
return -1; return -1;
@ -686,7 +692,7 @@ static int P_PostFireHitscan(int playerNum, int const spriteNum, hitdata_t *cons
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (playerNum >= 0 && CheckShootSwitchTile(hitWall->picnum)) if (!IONMAIDEN && playerNum >= 0 && CheckShootSwitchTile(hitWall->picnum))
{ {
P_ActivateSwitch(playerNum, hitData->wall, 0); P_ActivateSwitch(playerNum, hitData->wall, 0);
return -1; return -1;
@ -1631,7 +1637,7 @@ int A_ShootWithZvel(int const spriteNum, int const projecTile, int const forceZv
#else #else
return A_CheckSpriteTileFlags(projecTile, SFLAG_PROJECTILE) return A_CheckSpriteTileFlags(projecTile, SFLAG_PROJECTILE)
? A_ShootCustom(spriteNum, projecTile, shootAng, &startPos) ? A_ShootCustom(spriteNum, projecTile, shootAng, &startPos)
: A_ShootHardcoded(spriteNum, projecTile, shootAng, startPos, pSprite, playerNum, pPlayer); : !IONMAIDEN ? A_ShootHardcoded(spriteNum, projecTile, shootAng, startPos, pSprite, playerNum, pPlayer) : -1;
#endif #endif
} }
@ -2172,7 +2178,7 @@ void P_DisplayWeapon(void)
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
int const quickKickFrame = 14 - pPlayer->quick_kick; int const quickKickFrame = 14 - pPlayer->quick_kick;
if ((quickKickFrame != 14 || pPlayer->last_quick_kick) && ud.drawweapon == 1) if (!IONMAIDEN && (quickKickFrame != 14 || pPlayer->last_quick_kick) && ud.drawweapon == 1)
{ {
int const weaponPal = P_GetKneePal(pPlayer); int const weaponPal = P_GetKneePal(pPlayer);
@ -2187,7 +2193,7 @@ void P_DisplayWeapon(void)
guniqhudid = 0; guniqhudid = 0;
} }
if (sprite[pPlayer->i].xrepeat < 40) if (!IONMAIDEN && sprite[pPlayer->i].xrepeat < 40)
{ {
static int32_t fistPos; static int32_t fistPos;
@ -2216,7 +2222,7 @@ void P_DisplayWeapon(void)
case 1: break; case 1: break;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
case 2: case 2:
if ((unsigned)hudweap.cur < MAX_WEAPONS && hudweap.cur != KNEE_WEAPON) if (!IONMAIDEN && (unsigned)hudweap.cur < MAX_WEAPONS && hudweap.cur != KNEE_WEAPON)
rotatesprite_win(160 << 16, (180 + (pPlayer->weapon_pos * pPlayer->weapon_pos)) << 16, divscale16(ud.statusbarscale, 100), 0, rotatesprite_win(160 << 16, (180 + (pPlayer->weapon_pos * pPlayer->weapon_pos)) << 16, divscale16(ud.statusbarscale, 100), 0,
hudweap.cur == GROW_WEAPON ? GROWSPRITEICON : WeaponPickupSprites[hudweap.cur], 0, hudweap.cur == GROW_WEAPON ? GROWSPRITEICON : WeaponPickupSprites[hudweap.cur], 0,
0, 2); 0, 2);
@ -2233,6 +2239,7 @@ void P_DisplayWeapon(void)
int const weaponPal = P_GetHudPal(pPlayer); int const weaponPal = P_GetHudPal(pPlayer);
if (!IONMAIDEN)
switch (currentWeapon) switch (currentWeapon)
{ {
case KNEE_WEAPON: case KNEE_WEAPON:
@ -3119,6 +3126,9 @@ static int32_t P_DoCounters(int playerNum)
DukePlayer_t *const pPlayer = g_player[playerNum].ps; DukePlayer_t *const pPlayer = g_player[playerNum].ps;
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (IONMAIDEN)
goto access_incs; // I'm sorry
if (pPlayer->invdisptime > 0) if (pPlayer->invdisptime > 0)
pPlayer->invdisptime--; pPlayer->invdisptime--;
@ -3206,6 +3216,8 @@ static int32_t P_DoCounters(int playerNum)
} }
else if (pPlayer->last_quick_kick > 0) else if (pPlayer->last_quick_kick > 0)
--pPlayer->last_quick_kick; --pPlayer->last_quick_kick;
access_incs:
#endif #endif
if (pPlayer->access_incs && sprite[pPlayer->i].pal != 1) if (pPlayer->access_incs && sprite[pPlayer->i].pal != 1)
@ -3279,7 +3291,7 @@ static int32_t P_DoCounters(int playerNum)
} }
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (pPlayer->knuckle_incs) if (!IONMAIDEN && pPlayer->knuckle_incs)
{ {
if (++pPlayer->knuckle_incs == 10) if (++pPlayer->knuckle_incs == 10)
{ {
@ -3322,7 +3334,7 @@ void P_DropWeapon(int const playerNum)
if (krand() & 1) if (krand() & 1)
A_Spawn(pPlayer->i, WeaponPickupSprites[currentWeapon]); A_Spawn(pPlayer->i, WeaponPickupSprites[currentWeapon]);
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
else else if (!IONMAIDEN)
switch (PWEAPON(playerNum, currentWeapon, WorksLike)) switch (PWEAPON(playerNum, currentWeapon, WorksLike))
{ {
case RPG_WEAPON: case RPG_WEAPON:
@ -3348,7 +3360,7 @@ static void P_AddWeaponNoSwitch(DukePlayer_t * const p, int const weaponNum)
p->gotweapon |= (1<<weaponNum); p->gotweapon |= (1<<weaponNum);
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (weaponNum == SHRINKER_WEAPON) if (!IONMAIDEN && weaponNum == SHRINKER_WEAPON)
p->gotweapon |= (1<<GROW_WEAPON); p->gotweapon |= (1<<GROW_WEAPON);
#endif #endif
} }
@ -3523,7 +3535,7 @@ static void P_CheckTouchDamage(DukePlayer_t *pPlayer, int touchObject)
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
int const touchSprite = touchObject & (MAXSPRITES - 1); int const touchSprite = touchObject & (MAXSPRITES - 1);
if (sprite[touchSprite].picnum == CACTUS) if (!IONMAIDEN && sprite[touchSprite].picnum == CACTUS)
{ {
if (pPlayer->hurt_delay < 8) if (pPlayer->hurt_delay < 8)
{ {
@ -3561,7 +3573,8 @@ static void P_CheckTouchDamage(DukePlayer_t *pPlayer, int touchObject)
pPlayer->vel.y = -(sintable[(fix16_to_int(pPlayer->q16ang))&2047]<<8); pPlayer->vel.y = -(sintable[(fix16_to_int(pPlayer->q16ang))&2047]<<8);
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
A_PlaySound(DUKE_LONGTERM_PAIN,pPlayer->i); if (!IONMAIDEN)
A_PlaySound(DUKE_LONGTERM_PAIN,pPlayer->i);
#endif #endif
DoWallTouchDamage(pPlayer, touchWall); DoWallTouchDamage(pPlayer, touchWall);
break; break;
@ -3591,11 +3604,14 @@ static int P_CheckFloorDamage(DukePlayer_t *pPlayer, int floorTexture)
else else
{ {
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (!A_CheckSoundPlaying(pPlayer->i, DUKE_LONGTERM_PAIN)) if (!IONMAIDEN)
A_PlaySound(DUKE_LONGTERM_PAIN, pPlayer->i); {
if (!A_CheckSoundPlaying(pPlayer->i, DUKE_LONGTERM_PAIN))
A_PlaySound(DUKE_LONGTERM_PAIN, pPlayer->i);
if (!A_CheckSoundPlaying(pPlayer->i, SHORT_CIRCUIT)) if (!A_CheckSoundPlaying(pPlayer->i, SHORT_CIRCUIT))
A_PlaySound(SHORT_CIRCUIT, pPlayer->i); A_PlaySound(SHORT_CIRCUIT, pPlayer->i);
}
#endif #endif
P_PalFrom(pPlayer, 32, 64, 64, 64); P_PalFrom(pPlayer, 32, 64, 64, 64);
@ -3614,7 +3630,7 @@ static int P_CheckFloorDamage(DukePlayer_t *pPlayer, int floorTexture)
else else
{ {
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (!A_CheckSoundPlaying(pPlayer->i, DUKE_LONGTERM_PAIN)) if (!IONMAIDEN && !A_CheckSoundPlaying(pPlayer->i, DUKE_LONGTERM_PAIN))
A_PlaySound(DUKE_LONGTERM_PAIN, pPlayer->i); A_PlaySound(DUKE_LONGTERM_PAIN, pPlayer->i);
#endif #endif
@ -3628,7 +3644,7 @@ static int P_CheckFloorDamage(DukePlayer_t *pPlayer, int floorTexture)
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
case FLOORPLASMA__STATIC: case FLOORPLASMA__STATIC:
if (rnd(32)) if (!IONMAIDEN && rnd(32))
{ {
if (pPlayer->inv_amount[GET_BOOTS] > 0) if (pPlayer->inv_amount[GET_BOOTS] > 0)
return 1; return 1;
@ -3714,16 +3730,19 @@ void P_FragPlayer(int playerNum)
} }
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
pPlayer->jetpack_on = 0; if (!IONMAIDEN)
pPlayer->holoduke_on = -1;
S_StopEnvSound(DUKE_JETPACK_IDLE, pPlayer->i);
if (pPlayer->scream_voice > FX_Ok)
{ {
FX_StopSound(pPlayer->scream_voice); pPlayer->jetpack_on = 0;
S_Cleanup(); pPlayer->holoduke_on = -1;
pPlayer->scream_voice = -1;
S_StopEnvSound(DUKE_JETPACK_IDLE, pPlayer->i);
if (pPlayer->scream_voice > FX_Ok)
{
FX_StopSound(pPlayer->scream_voice);
S_Cleanup();
pPlayer->scream_voice = -1;
}
} }
#endif #endif
@ -4337,6 +4356,9 @@ static int P_DoFist(DukePlayer_t *pPlayer)
// the fist punching NUKEBUTTON // the fist punching NUKEBUTTON
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
if (IONMAIDEN)
return 0;
if (++(pPlayer->fist_incs) == 28) if (++(pPlayer->fist_incs) == 28)
{ {
if (ud.recstat == 1) if (ud.recstat == 1)
@ -4367,6 +4389,8 @@ static int P_DoFist(DukePlayer_t *pPlayer)
return 1; return 1;
} }
#else
UNREFERENCED_PARAMETER(pPlayer);
#endif #endif
return 0; return 0;