mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 21:31:03 +00:00
- cleanup
This commit is contained in:
parent
56834dee6b
commit
17a548fc00
8 changed files with 73 additions and 166 deletions
|
@ -215,6 +215,23 @@ void initactorflags_d()
|
|||
|
||||
actorinfo[ORGANTIC].aimoffset = 32 << 8;
|
||||
actorinfo[ROTATEGUN].aimoffset = 32 << 8;
|
||||
|
||||
weaponsandammosprites[0] = RPGSPRITE;
|
||||
weaponsandammosprites[1] = CHAINGUNSPRITE;
|
||||
weaponsandammosprites[2] = DEVISTATORAMMO;
|
||||
weaponsandammosprites[3] = RPGAMMO;
|
||||
weaponsandammosprites[4] = RPGAMMO;
|
||||
weaponsandammosprites[5] = JETPACK;
|
||||
weaponsandammosprites[6] = SHIELD;
|
||||
weaponsandammosprites[7] = FIRSTAID;
|
||||
weaponsandammosprites[8] = STEROIDS;
|
||||
weaponsandammosprites[9] = RPGAMMO;
|
||||
weaponsandammosprites[10] = RPGAMMO;
|
||||
weaponsandammosprites[11] = RPGSPRITE;
|
||||
weaponsandammosprites[12] = RPGAMMO;
|
||||
weaponsandammosprites[13] = FREEZESPRITE;
|
||||
weaponsandammosprites[14] = FREEZEAMMO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -185,6 +185,23 @@ void initactorflags_r()
|
|||
TOUGHGAL });
|
||||
|
||||
actorinfo[RPG2].flags |= SFLAG_FORCEAUTOAIM;
|
||||
|
||||
weaponsandammosprites[0] = RPGSPRITE;
|
||||
weaponsandammosprites[1] = CHAINGUNSPRITE;
|
||||
weaponsandammosprites[2] = DEVISTATORAMMO;
|
||||
weaponsandammosprites[3] = RPGAMMO;
|
||||
weaponsandammosprites[4] = RPGAMMO;
|
||||
weaponsandammosprites[5] = JETPACK;
|
||||
weaponsandammosprites[6] = SHIELD;
|
||||
weaponsandammosprites[7] = FIRSTAID;
|
||||
weaponsandammosprites[8] = STEROIDS;
|
||||
weaponsandammosprites[9] = RPGAMMO;
|
||||
weaponsandammosprites[10] = RPGAMMO;
|
||||
weaponsandammosprites[11] = RPGSPRITE;
|
||||
weaponsandammosprites[12] = RPGAMMO;
|
||||
weaponsandammosprites[13] = FREEZESPRITE;
|
||||
weaponsandammosprites[14] = FREEZEAMMO;
|
||||
|
||||
}
|
||||
|
||||
END_DUKE_NS
|
|
@ -188,7 +188,7 @@ int S_DefineSound(unsigned index, const char *filename, int minpitch, int maxpit
|
|||
|
||||
inline bool S_IsAmbientSFX(int spriteNum)
|
||||
{
|
||||
return (sprite[spriteNum].picnum == TILE_MUSICANDSFX && sprite[spriteNum].lotag < 999);
|
||||
return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -220,7 +220,7 @@ static int GetPositionInfo(int spriteNum, int soundNum, int sectNum,
|
|||
sndist += dist_adjust;
|
||||
if (sndist < 0) sndist = 0;
|
||||
|
||||
if (sectNum > -1 && sndist && sp->picnum != TILE_MUSICANDSFX && !cansee(cam->x, cam->y, cam->z - (24 << 8), sectNum, sp->x, sp->y, sp->z - (24 << 8), sp->sectnum))
|
||||
if (sectNum > -1 && sndist && sp->picnum != MUSICANDSFX && !cansee(cam->x, cam->y, cam->z - (24 << 8), sectNum, sp->x, sp->y, sp->z - (24 << 8), sp->sectnum))
|
||||
sndist += sndist >> (isRR() ? 2 : 5);
|
||||
|
||||
// Here the sound distance was clamped to a minimum of 144*4.
|
||||
|
@ -434,7 +434,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
|
|||
}
|
||||
else
|
||||
{
|
||||
if (sndist > 32767 && sp->picnum != TILE_MUSICANDSFX && (userflags & (SF_LOOP | SF_MSFX)) == 0)
|
||||
if (sndist > 32767 && sp->picnum != MUSICANDSFX && (userflags & (SF_LOOP | SF_MSFX)) == 0)
|
||||
return -1;
|
||||
|
||||
if (underwater && (userflags & SF_TALK) == 0)
|
||||
|
@ -442,7 +442,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
|
|||
}
|
||||
|
||||
bool is_playing = soundEngine->GetSoundPlayingInfo(SOURCE_Any, nullptr, sndnum+1);
|
||||
if (is_playing && sp->picnum != TILE_MUSICANDSFX)
|
||||
if (is_playing && sp->picnum != MUSICANDSFX)
|
||||
S_StopEnvSound(sndnum, spriteNum);
|
||||
|
||||
int const repeatp = (userflags & SF_LOOP);
|
||||
|
|
|
@ -59,7 +59,7 @@ void A_DeleteSprite(int spriteNum)
|
|||
#endif
|
||||
|
||||
// AMBIENT_SFX_PLAYING
|
||||
if (sprite[spriteNum].picnum == TILE_MUSICANDSFX && actor[spriteNum].t_data[0] == 1)
|
||||
if (sprite[spriteNum].picnum == MUSICANDSFX && actor[spriteNum].t_data[0] == 1)
|
||||
S_StopEnvSound(sprite[spriteNum].lotag, spriteNum);
|
||||
|
||||
deletesprite(spriteNum);
|
||||
|
|
|
@ -1385,79 +1385,6 @@ static int getofs_viewtype_mirrored(uint16_t & cstat, int angDiff)
|
|||
return viewtype_mirror<mirrored_rotations*2-2>(cstat, getofs_viewtype<mirrored_rotations*2-2>(angDiff));
|
||||
}
|
||||
|
||||
// XXX: this fucking sucks and needs to be replaced with a SFLAG
|
||||
static int G_CheckAdultTile(int tileNum)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(tileNum);
|
||||
switch (tileNum)
|
||||
{
|
||||
case FEM1__STATIC:
|
||||
case FEM2__STATIC:
|
||||
case FEM3__STATIC:
|
||||
case FEM4__STATIC:
|
||||
case FEM5__STATIC:
|
||||
case FEM6__STATIC:
|
||||
case FEM7__STATIC:
|
||||
case FEM8__STATIC:
|
||||
case FEM9__STATIC:
|
||||
case MAN__STATIC:
|
||||
case MAN2__STATIC:
|
||||
case WOMAN__STATIC:
|
||||
case PODFEM1__STATIC:
|
||||
case FEMPIC1__STATIC:
|
||||
case FEMPIC2__STATIC:
|
||||
case FEMPIC3__STATIC:
|
||||
case FEMPIC4__STATIC:
|
||||
case FEMPIC5__STATIC:
|
||||
case FEMPIC6__STATIC:
|
||||
case FEMPIC7__STATIC:
|
||||
case BLOODYPOLE__STATIC:
|
||||
case FEM6PAD__STATIC:
|
||||
case OOZ2__STATIC:
|
||||
case WALLBLOOD7__STATIC:
|
||||
case WALLBLOOD8__STATIC:
|
||||
case FETUS__STATIC:
|
||||
case FETUSJIB__STATIC:
|
||||
case FETUSBROKE__STATIC:
|
||||
case HOTMEAT__STATIC:
|
||||
case FOODOBJECT16__STATIC:
|
||||
case TAMPON__STATIC:
|
||||
case XXXSTACY__STATIC:
|
||||
case 4946:
|
||||
case 4947:
|
||||
case 693:
|
||||
case 2254:
|
||||
case 4560:
|
||||
case 4561:
|
||||
case 4562:
|
||||
case 4498:
|
||||
case 4957:
|
||||
if (RR) return 0;
|
||||
return 1;
|
||||
case FEM10__STATIC:
|
||||
case NAKED1__STATIC:
|
||||
case FEMMAG1__STATIC:
|
||||
case FEMMAG2__STATIC:
|
||||
case STATUE__STATIC:
|
||||
case STATUEFLASH__STATIC:
|
||||
case OOZ__STATIC:
|
||||
case WALLBLOOD1__STATIC:
|
||||
case WALLBLOOD2__STATIC:
|
||||
case WALLBLOOD3__STATIC:
|
||||
case WALLBLOOD4__STATIC:
|
||||
case WALLBLOOD5__STATIC:
|
||||
case SUSHIPLATE1__STATIC:
|
||||
case SUSHIPLATE2__STATIC:
|
||||
case SUSHIPLATE3__STATIC:
|
||||
case SUSHIPLATE4__STATIC:
|
||||
case DOLPHIN1__STATIC:
|
||||
case DOLPHIN2__STATIC:
|
||||
case TOUGHGAL__STATIC:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothratio)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ourz);
|
||||
|
@ -1628,7 +1555,7 @@ default_case1:
|
|||
EDUKE32_STATIC_ASSERT(sizeof(uspritetype) == sizeof(tspritetype)); // see TSPRITE_SIZE
|
||||
uspritetype *const pSprite = (i < 0) ? (uspritetype *)&tsprite[j] : (uspritetype *)&sprite[i];
|
||||
|
||||
if (adult_lockout && G_CheckAdultTile(DYNAMICTILEMAP(pSprite->picnum)))
|
||||
if (adult_lockout && (tileinfo->flags & SFLAG_ADULT))
|
||||
{
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
continue;
|
||||
|
@ -1966,6 +1893,7 @@ default_case1:
|
|||
|
||||
}
|
||||
|
||||
#if 0 // nopooint fixing this now - will be handled when original code is used here.
|
||||
if ((g_netServer || ud.multimode > 1) && (display_mirror || screenpeek != playerNum || pSprite->owner == -1))
|
||||
{
|
||||
if (ud.showweapons && sprite[g_player[playerNum].ps->i].extra > 0 && g_player[playerNum].ps->curr_weapon > 0
|
||||
|
@ -1984,21 +1912,39 @@ default_case1:
|
|||
newTspr->picnum = 0;
|
||||
switch(DYNAMICWEAPONMAP(g_player[playerNum].ps->curr_weapon))
|
||||
{
|
||||
case PISTOL_WEAPON__STATIC: newTspr->picnum = TILE_FIRSTGUNSPRITE; break;
|
||||
case SHOTGUN_WEAPON__STATIC: newTspr->picnum = TILE_SHOTGUNSPRITE; break;
|
||||
case CHAINGUN_WEAPON__STATIC: newTspr->picnum = TILE_CHAINGUNSPRITE; break;
|
||||
case RPG_WEAPON__STATIC: newTspr->picnum = TILE_RPGSPRITE; break;
|
||||
case CHICKEN_WEAPON__STATIC: newTspr->picnum = TILE_RPGSPRITE; break;
|
||||
case PISTOL_WEAPON__STATIC: newTspr->picnum = FIRSTGUNSPRITE; break;
|
||||
case SHOTGUN_WEAPON__STATIC: newTspr->picnum = SHOTGUNSPRITE; break;
|
||||
case CHAINGUN_WEAPON__STATIC: newTspr->picnum = CHAINGUNSPRITE; break;
|
||||
case RPG_WEAPON__STATIC: newTspr->picnum = RPGSPRITE; break;
|
||||
case CHICKEN_WEAPON__STATIC: newTspr->picnum = RPGSPRITE; break;
|
||||
case HANDREMOTE_WEAPON__STATIC:
|
||||
case HANDBOMB_WEAPON__STATIC: newTspr->picnum = TILE_HEAVYHBOMB; break;
|
||||
case TRIPBOMB_WEAPON__STATIC: newTspr->picnum = TILE_TRIPBOMBSPRITE; break;
|
||||
case BOWLINGBALL_WEAPON__STATIC: newTspr->picnum = TILE_BOWLINGBALLSPRITE; break;
|
||||
case SHRINKER_WEAPON__STATIC: newTspr->picnum = TILE_SHRINKSPARK; break;
|
||||
case GROW_WEAPON__STATIC: newTspr->picnum = TILE_SHRINKSPARK; break;
|
||||
case FREEZE_WEAPON__STATIC: newTspr->picnum = TILE_DEVISTATORSPRITE; break;
|
||||
case DEVISTATOR_WEAPON__STATIC: newTspr->picnum = TILE_FREEZESPRITE; break;
|
||||
case HANDBOMB_WEAPON__STATIC: newTspr->picnum = HEAVYHBOMB; break;
|
||||
case TRIPBOMB_WEAPON__STATIC: newTspr->picnum = TRIPBOMBSPRITE; break;
|
||||
case BOWLINGBALL_WEAPON__STATIC: newTspr->picnum = BOWLINGBALLSPRITE; break;
|
||||
case SHRINKER_WEAPON__STATIC: newTspr->picnum = SHRINKSPARK; break;
|
||||
case GROW_WEAPON__STATIC: newTspr->picnum = SHRINKSPARK; break;
|
||||
case FREEZE_WEAPON__STATIC: newTspr->picnum = DEVISTATORSPRITE; break;
|
||||
case DEVISTATOR_WEAPON__STATIC: newTspr->picnum = FREEZESPRITE; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ps[p].curr_weapon)
|
||||
{
|
||||
case PISTOL_WEAPON: tsprite[spritesortcnt].picnum = FIRSTGUNSPRITE; break;
|
||||
case SHOTGUN_WEAPON: tsprite[spritesortcnt].picnum = SHOTGUNSPRITE; break;
|
||||
case CHAINGUN_WEAPON: tsprite[spritesortcnt].picnum = CHAINGUNSPRITE; break;
|
||||
case RPG_WEAPON: tsprite[spritesortcnt].picnum = RPGSPRITE; break;
|
||||
case HANDREMOTE_WEAPON:
|
||||
case HANDBOMB_WEAPON: tsprite[spritesortcnt].picnum = HEAVYHBOMB; break;
|
||||
case TRIPBOMB_WEAPON: tsprite[spritesortcnt].picnum = TRIPBOMBSPRITE; break;
|
||||
case GROW_WEAPON: tsprite[spritesortcnt].picnum = GROWSPRITEICON; break;
|
||||
case SHRINKER_WEAPON: tsprite[spritesortcnt].picnum = SHRINKERSPRITE; break;
|
||||
case FREEZE_WEAPON: tsprite[spritesortcnt].picnum = FREEZESPRITE; break;
|
||||
case DEVISTATOR_WEAPON: tsprite[spritesortcnt].picnum = DEVISTATORSPRITE; break;
|
||||
}
|
||||
|
||||
}
|
||||
newTspr->z = (pSprite->owner >= 0) ? g_player[playerNum].ps->pos.z - ZOFFSET4 : pSprite->z - (51 << 8);
|
||||
newTspr->xrepeat = (newTspr->picnum == TILE_HEAVYHBOMB) ? 10 : 16;
|
||||
if (RRRA && (g_player[playerNum].ps->OnMotorcycle || g_player[playerNum].ps->OnBoat))
|
||||
|
@ -2023,6 +1969,7 @@ default_case1:
|
|||
spritesortcnt++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pSprite->owner == -1)
|
||||
{
|
||||
|
|
|
@ -99,24 +99,7 @@ int32_t g_spriteGravity = 176;
|
|||
int32_t g_timerTicsPerSecond = TICRATE;
|
||||
int32_t g_tripbombRadius = 3880;
|
||||
|
||||
int16_t weaponsandammosprites[15] =
|
||||
{
|
||||
RPGSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC,
|
||||
DEVISTATORAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
JETPACK__STATIC,
|
||||
SHIELD__STATIC,
|
||||
FIRSTAID__STATIC,
|
||||
STEROIDS__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
RPGSPRITE__STATIC,
|
||||
RPGAMMO__STATIC,
|
||||
FREEZESPRITE__STATIC,
|
||||
FREEZEAMMO__STATIC
|
||||
};
|
||||
int16_t weaponsandammosprites[15];
|
||||
|
||||
char CheatKeys[2] = { sc_D, sc_N };
|
||||
|
||||
|
|
|
@ -2913,57 +2913,5 @@ void G_InitDynamicTiles(void)
|
|||
}
|
||||
|
||||
DynamicTileMap[0] = 0;
|
||||
|
||||
weaponsandammosprites[0] = TILE_RPGSPRITE;
|
||||
weaponsandammosprites[1] = TILE_CHAINGUNSPRITE;
|
||||
weaponsandammosprites[2] = TILE_DEVISTATORAMMO;
|
||||
weaponsandammosprites[3] = TILE_RPGAMMO;
|
||||
weaponsandammosprites[4] = TILE_RPGAMMO;
|
||||
weaponsandammosprites[5] = TILE_JETPACK;
|
||||
weaponsandammosprites[6] = TILE_SHIELD;
|
||||
weaponsandammosprites[7] = TILE_FIRSTAID;
|
||||
weaponsandammosprites[8] = TILE_STEROIDS;
|
||||
weaponsandammosprites[9] = TILE_RPGAMMO;
|
||||
weaponsandammosprites[10] = TILE_RPGAMMO;
|
||||
weaponsandammosprites[11] = TILE_RPGSPRITE;
|
||||
weaponsandammosprites[12] = TILE_RPGAMMO;
|
||||
weaponsandammosprites[13] = TILE_FREEZESPRITE;
|
||||
weaponsandammosprites[14] = TILE_FREEZEAMMO;
|
||||
|
||||
if (RR)
|
||||
{
|
||||
WeaponPickupSprites[0] = TILE_KNEE;
|
||||
WeaponPickupSprites[1] = TILE_FIRSTGUNSPRITE;
|
||||
WeaponPickupSprites[2] = TILE_SHOTGUNSPRITE;
|
||||
WeaponPickupSprites[3] = TILE_CHAINGUNSPRITE;
|
||||
WeaponPickupSprites[4] = TILE_RPGSPRITE;
|
||||
WeaponPickupSprites[5] = TILE_HEAVYHBOMB;
|
||||
WeaponPickupSprites[6] = TILE_SHRINKERSPRITE;
|
||||
WeaponPickupSprites[7] = TILE_DEVISTATORSPRITE;
|
||||
WeaponPickupSprites[8] = TILE_TRIPBOMBSPRITE;
|
||||
WeaponPickupSprites[9] = TILE_BOWLINGBALLSPRITE;
|
||||
WeaponPickupSprites[10] = TILE_FREEZEBLAST;
|
||||
WeaponPickupSprites[11] = TILE_HEAVYHBOMB;
|
||||
}
|
||||
else
|
||||
{
|
||||
WeaponPickupSprites[0] = TILE_KNEE;
|
||||
WeaponPickupSprites[1] = TILE_FIRSTGUNSPRITE;
|
||||
WeaponPickupSprites[2] = TILE_SHOTGUNSPRITE;
|
||||
WeaponPickupSprites[3] = TILE_CHAINGUNSPRITE;
|
||||
WeaponPickupSprites[4] = TILE_RPGSPRITE;
|
||||
WeaponPickupSprites[5] = TILE_HEAVYHBOMB;
|
||||
WeaponPickupSprites[6] = TILE_SHRINKERSPRITE;
|
||||
WeaponPickupSprites[7] = TILE_DEVISTATORSPRITE;
|
||||
WeaponPickupSprites[8] = TILE_TRIPBOMBSPRITE;
|
||||
WeaponPickupSprites[9] = TILE_FREEZESPRITE;
|
||||
WeaponPickupSprites[10] = TILE_HEAVYHBOMB;
|
||||
WeaponPickupSprites[11] = TILE_SHRINKERSPRITE;
|
||||
}
|
||||
|
||||
// ouch... the big background image takes up a fuckload of memory and takes a second to load!
|
||||
#ifdef EDUKE32_GLES
|
||||
TILE_MENUSCREEN = TILE_LOADSCREEN = TILE_BETASCREEN;
|
||||
#endif
|
||||
}
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -900,11 +900,6 @@ void madenoise(int playerNum)
|
|||
pPlayer->noise_y = pPlayer->pos.y;
|
||||
}
|
||||
|
||||
int16_t WeaponPickupSprites[MAX_WEAPONS] = { KNEE__STATIC, FIRSTGUNSPRITE__STATIC, SHOTGUNSPRITE__STATIC,
|
||||
CHAINGUNSPRITE__STATIC, RPGSPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC, DEVISTATORSPRITE__STATIC,
|
||||
TRIPBOMBSPRITE__STATIC, FREEZESPRITE__STATIC, HEAVYHBOMB__STATIC, SHRINKERSPRITE__STATIC
|
||||
};
|
||||
|
||||
void P_AddAmmo(DukePlayer_t * const pPlayer, int const weaponNum, int const addAmount)
|
||||
{
|
||||
pPlayer->ammo_amount[weaponNum] += addAmount;
|
||||
|
|
Loading…
Reference in a new issue