From 72e7bde578bdaf996aa658ae9580609ed80eaf64 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 21 May 2020 22:41:48 +0200 Subject: [PATCH] - deleted old version. # Conflicts: # source/games/duke/src/zz_game.cpp --- source/games/duke/src/zz_game.cpp | 1237 ----------------------------- 1 file changed, 1237 deletions(-) diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index 12581360d..4eaadbd02 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -1392,1243 +1392,6 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura { if (!isRR()) animatesprites_d(ourx, oury, oura, smoothratio); else animatesprites_r(ourx, oury, oura, smoothratio); -#if 0 - UNREFERENCED_PARAMETER(ourz); - int32_t j, frameOffset, playerNum; - intptr_t l; - - if (spritesortcnt == 0) - { -#ifdef DEBUGGINGAIDS - g_spriteStat.numonscreen = 0; -#endif - return; - } -#ifdef LEGACY_ROR - ror_sprite = -1; -#endif - for (j=spritesortcnt-1; j>=0; j--) - { - auto const t = &tsprite[j]; - const int32_t i = t->owner; - auto const s = &sprite[i]; - - switch (DYNAMICTILEMAP(s->picnum)) - { - case SECTOREFFECTOR__STATIC: - if (!RR && (s->lotag == 40 || s->lotag == 41)) - { - t->cstat = 32768; -#ifdef LEGACY_ROR - if (ror_sprite == -1) - ror_sprite = i; -#endif - } - - if (t->lotag == SE_27_DEMO_CAM && ud.recstat == 1) - { - t->picnum = 11+(((int) totalclock>>3)&1); - t->cstat |= 128; - } - else - t->xrepeat = t->yrepeat = 0; - break; - } - } - - for (j=spritesortcnt-1; j>=0; j--) - { - auto const t = &tsprite[j]; - const int32_t i = t->owner; - spritetype *const s = &sprite[i]; - - if (t->picnum < TILE_GREENSLIME || t->picnum > TILE_GREENSLIME+7) - switch (DYNAMICTILEMAP(t->picnum)) - { - case PIG__STATICRR: - case DOGRUN__STATICRR: - case VIXEN__STATICRR: - case CHEER__STATICRR: - goto default_case1; - case PUKE__STATIC: - if (RR) goto default_case1; - fallthrough__; - case BLOODPOOL__STATIC: - case FOOTPRINTS__STATIC: - case FOOTPRINTS2__STATIC: - case FOOTPRINTS3__STATIC: - case FOOTPRINTS4__STATIC: - if (t->shade == 127) continue; - break; - case RESPAWNMARKERRED__STATIC: - case RESPAWNMARKERYELLOW__STATIC: - case RESPAWNMARKERGREEN__STATIC: - if (RR) goto default_case1; - if (ud.marker == 0) - t->xrepeat = t->yrepeat = 0; - continue; - case CHAIR3__STATIC: -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, t->ang - oura); - t->picnum = s->picnum+frameOffset; - break; - case BLOODSPLAT1__STATIC: - case BLOODSPLAT2__STATIC: - case BLOODSPLAT3__STATIC: - case BLOODSPLAT4__STATIC: - if (adult_lockout) t->xrepeat = t->yrepeat = 0; - else if (t->pal == 6) - { - t->shade = -127; - continue; - } - fallthrough__; - case BULLETHOLE__STATIC: - case CRACK1__STATIC: - case CRACK2__STATIC: - case CRACK3__STATIC: - case CRACK4__STATIC: - t->shade = 16; - continue; - case NEON1__STATIC: - case NEON2__STATIC: - case NEON3__STATIC: - case NEON4__STATIC: - case NEON5__STATIC: - case NEON6__STATIC: - continue; - case RRTILE1947__STATICRR: - case RRTILE2859__STATICRR: - case RRTILE3774__STATICRR: - case RRTILE5088__STATICRR: - case RRTILE8094__STATICRR: - case RRTILE8096__STATICRR: - if (!RRRA) goto default_case1; - continue; - default: -default_case1: - // NOTE: wall-aligned sprites will never take on ceiling/floor shade... - if ((t->cstat&16) || (A_CheckEnemySprite(t) && - (unsigned)t->owner < MAXSPRITES && sprite[t->owner].extra > 0) || t->statnum == STAT_PLAYER) - { - if (RR && shadedsector[s->sectnum] == 1) - { - s->shade = 16; - t->shade = 16; - } - continue; - } - } - - // ... since this is not reached: - if (t->cstat&CSTAT_SPRITE_NOSHADE) - l = sprite[t->owner].shade; - else - { - if (sector[t->sectnum].ceilingstat&1) - { - if (RR) - l = s->shade; - else - l = sector[t->sectnum].ceilingshade; - } - else - l = sector[t->sectnum].floorshade; - - if (l < -127) - l = -127; - } - - t->shade = l; - } - - for (j=spritesortcnt-1; j>=0; j--) //Between drawrooms() and drawmasks() - { - int32_t switchpic; - int32_t curframe; - int32_t scrofs_action; - //is the perfect time to animate sprites - auto const t = &tsprite[j]; - const int32_t i = t->owner; - // XXX: what's up with the (i < 0) check? - // NOTE: not const spritetype because set at SET_SPRITE_NOT_TSPRITE (see below). - EDUKE32_STATIC_ASSERT(sizeof(uspritetype) == sizeof(tspritetype)); // see TSPRITE_SIZE - uspritetype *const pSprite = (i < 0) ? (uspritetype *)&tsprite[j] : (uspritetype *)&sprite[i]; - - if (adult_lockout && (tileinfo->flags & SFLAG_ADULT)) - { - t->xrepeat = t->yrepeat = 0; - continue; - } - - if (!RR && pSprite->picnum == TILE_NATURALLIGHTNING) - { - t->shade = -127; - t->clipdist |= TSPR_FLAGS_NO_SHADOW; - } - - if (t->statnum == TSPR_TEMP) - continue; - - Bassert(i >= 0); - - const DukePlayer_t *const ps = (pSprite->statnum != STAT_ACTOR && pSprite->picnum == TILE_APLAYER && pSprite->owner >= 0) ? g_player[P_GetP(pSprite)].ps : NULL; - if (ps && ps->newowner == -1) - { - t->x -= mulscale16(65536-smoothratio,ps->pos.x-ps->opos.x); - t->y -= mulscale16(65536-smoothratio,ps->pos.y-ps->opos.y); - t->z = ps->opos.z + mulscale16(smoothratio,ps->pos.z-ps->opos.z) + (40<<8); - - if (RR) - { - pSprite->xrepeat = 24; - pSprite->yrepeat = 17; - } - } - else if ((pSprite->statnum == STAT_DEFAULT && pSprite->picnum != TILE_CRANEPOLE) || pSprite->statnum == STAT_PLAYER || - pSprite->statnum == STAT_STANDABLE || pSprite->statnum == STAT_PROJECTILE || pSprite->statnum == STAT_MISC || pSprite->statnum == STAT_ACTOR) - { - t->x -= mulscale16(65536-smoothratio,pSprite->x-actor[i].bpos.x); - t->y -= mulscale16(65536-smoothratio,pSprite->y-actor[i].bpos.y); - t->z -= mulscale16(65536-smoothratio,pSprite->z-actor[i].bpos.z); - } - - const int32_t sect = pSprite->sectnum; - - curframe = AC_CURFRAME(actor[i].t_data); - scrofs_action = AC_ACTION_ID(actor[i].t_data); - switchpic = pSprite->picnum; - // Some special cases because dynamictostatic system can't handle - // addition to constants. - if ((pSprite->picnum >= TILE_SCRAP6) && (pSprite->picnum<=TILE_SCRAP6+7)) - switchpic = TILE_SCRAP5; - else if ((pSprite->picnum==TILE_MONEY+1) || (pSprite->picnum==TILE_MAIL+1) || (pSprite->picnum==TILE_PAPER+1)) - switchpic--; - - switch (DYNAMICTILEMAP(switchpic)) - { - case RESPAWNMARKERRED__STATICRR: - case RESPAWNMARKERYELLOW__STATICRR: - case RESPAWNMARKERGREEN__STATICRR: - if (!RR) goto default_case2; - t->picnum = 861 + (((int32_t) totalclock >> 4) & 13); - if (pSprite->picnum == TILE_RESPAWNMARKERRED) - t->pal = 0; - else if (pSprite->picnum == TILE_RESPAWNMARKERYELLOW) - t->pal = 1; - else - t->pal = 2; - if (ud.marker == 0) - t->xrepeat = t->yrepeat = 0; - break; - case DUKELYINGDEAD__STATIC: - if (RR) - { - pSprite->x = 24; - pSprite->y = 17; - if (pSprite->extra > 0) - t->z += (6<<8); - } - else - t->z += (24<<8); - break; - case BLOODPOOL__STATIC: - case FOOTPRINTS__STATIC: - case FOOTPRINTS2__STATIC: - case FOOTPRINTS3__STATIC: - case FOOTPRINTS4__STATIC: - if (t->pal == 6) - t->shade = -127; - fallthrough__; - case PUKE__STATIC: - case MONEY__STATIC: - //case TILE_MONEY+1__STATIC: - case MAIL__STATIC: - //case TILE_MAIL+1__STATIC: - case PAPER__STATIC: - //case TILE_PAPER+1__STATIC: - if (RR && (switchpic == TILE_PUKE || switchpic == TILE_MAIL || switchpic == TILE_PAPER)) goto default_case2; - if (adult_lockout && pSprite->pal == 2) - { - t->xrepeat = t->yrepeat = 0; - continue; - } - break; - case TRIPBOMB__STATIC: - if (RR) goto default_case2; - continue; - case TRIPBOMBSPRITE__STATIC: - if (!RR) goto default_case2; - continue; - case FORCESPHERE__STATIC: - if (t->statnum == STAT_MISC) - { - int16_t const sqa = getangle(sprite[pSprite->owner].x - g_player[screenpeek].ps->pos.x, - sprite[pSprite->owner].y - g_player[screenpeek].ps->pos.y); - int16_t const sqb = getangle(sprite[pSprite->owner].x - t->x, sprite[pSprite->owner].y - t->y); - - if (klabs(getincangle(sqa,sqb)) > 512) - if (ldist(&sprite[pSprite->owner],(const spritetype *)t) < ldist(&sprite[g_player[screenpeek].ps->i],&sprite[pSprite->owner])) - t->xrepeat = t->yrepeat = 0; - } - continue; - case BURNING2__STATIC: - if (RR) goto default_case2; - fallthrough__; - case BURNING__STATIC: - if (sprite[pSprite->owner].statnum == STAT_PLAYER) - { - int const playerNum = P_Get(pSprite->owner); - - if (display_mirror == 0 && playerNum == screenpeek && g_player[playerNum].ps->over_shoulder_on == 0) - t->xrepeat = 0; - else - { - t->ang = getangle(ourx - t->x, oury - t->y); - t->x = sprite[pSprite->owner].x + (sintable[(t->ang + 512) & 2047] >> 10); - t->y = sprite[pSprite->owner].y + (sintable[t->ang & 2047] >> 10); - } - } - break; - - case ATOMICHEALTH__STATIC: - t->z -= ZOFFSET6; - break; - case CRYSTALAMMO__STATIC: - t->shade = (sintable[((int32_t) totalclock<<4)&2047]>>10); - if (RR) break; - continue; - case VIEWSCREEN__STATIC: - case VIEWSCREEN2__STATIC: - { - if (RR) goto default_case2; - int const viewscrTile = TILE_VIEWSCR; - - if (g_curViewscreen >= 0 && actor[OW(i)].t_data[0] == 1) - { - t->picnum = TILE_STATIC; - t->cstat |= (rand()&12); - t->xrepeat += 10; - t->yrepeat += 9; - } - else if (g_curViewscreen == i && display_mirror != 3) - { - // this exposes a sprite sorting issue which needs to be debugged further... - - t->picnum = viewscrTile; - } - - break; - } - case SHRINKSPARK__STATIC: - if (RR) - { - if (RRRA && (sprite[pSprite->owner].picnum == TILE_CHEER || sprite[pSprite->owner].picnum == TILE_CHEERSTAYPUT)) - { - t->picnum = TILE_CHEERBLADE + (((int32_t) totalclock >> 4) & 3); - t->shade = -127; - } - else - t->picnum = TILE_SHRINKSPARK + (((int32_t) totalclock >> 4) & 7); - } - else - t->picnum = TILE_SHRINKSPARK+(((int32_t) totalclock>>4)&3); - break; - case CHEERBOMB__STATICRR: - if (!RRRA) goto default_case2; - t->picnum = TILE_CHEERBOMB+( ((int32_t) totalclock>>4)&3 ); - break; - case GROWSPARK__STATIC: - if (RR) goto default_case2; - t->picnum = TILE_GROWSPARK+(((int32_t) totalclock>>4)&3); - break; - case SPIT__STATIC: - if (!RR) goto default_case2; - t->picnum = TILE_SPIT + (((int32_t) totalclock >> 4) & 3); - if (RRRA) - { - if (sprite[pSprite->owner].picnum == TILE_MINION && sprite[pSprite->owner].pal == 8) - t->picnum = TILE_RRTILE3500 + (((int32_t) totalclock >> 4) % 6); - else if (sprite[pSprite->owner].picnum == TILE_MINION && sprite[pSprite->owner].pal == 19) - { - t->picnum = TILE_RRTILE5090 + (((int32_t) totalclock >> 4) & 3); - t->shade = -127; - } - else if (sprite[pSprite->owner].picnum == TILE_MAMA) - { -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum, t->pal) >= 0 && - !(spriteext[i].flags & SPREXT_NOTMD)) - { - int32_t v = getangle(t->xvel, t->zvel >> 4); - - spriteext[i].pitch = (v > 1023 ? v - 2048 : v); - t->cstat &= ~4; - t->picnum = TILE_RRTILE7274; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, pSprite->ang - getangle(pSprite->x-ourx, pSprite->y-oury)); - t->picnum = TILE_RRTILE7274 + frameOffset; - } - } - break; - case EMPTYBIKE__STATICRR: - if (!RRRA) goto default_case2; -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum, t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - getangle(pSprite->x - ourx, pSprite->y - oury)); - t->picnum = TILE_EMPTYBIKE + frameOffset; - break; - case EMPTYBOAT__STATICRR: - if (!RRRA) goto default_case2; -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum, t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - getangle(pSprite->x - ourx, pSprite->y - oury)); - t->picnum = TILE_EMPTYBOAT + frameOffset; - break; - case RPG__STATIC: -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum,t->pal) >= 0 && - !(spriteext[i].flags & SPREXT_NOTMD)) - { - int32_t v = getangle(t->xvel, t->zvel>>4); - - spriteext[i].pitch = (v > 1023 ? v-2048 : v); - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - getangle(pSprite->x-ourx, pSprite->y-oury)); - t->picnum = TILE_RPG+frameOffset; - break; - case RPG2__STATICRR: - if (!RRRA) goto default_case2; -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum,t->pal) >= 0 && - !(spriteext[i].flags & SPREXT_NOTMD)) - { - int32_t v = getangle(t->xvel, t->zvel>>4); - - spriteext[i].pitch = (v > 1023 ? v-2048 : v); - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - getangle(pSprite->x-ourx, pSprite->y-oury)); - t->picnum = TILE_RPG2+frameOffset; - break; - - case RECON__STATIC: -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - getangle(pSprite->x-ourx, pSprite->y-oury)); - - // RECON_T4 - if (klabs(curframe) > 64) - frameOffset += 7; // tilted recon car - - t->picnum = TILE_RECON+frameOffset; - - break; - case APLAYER__STATIC: - playerNum = P_GetP(pSprite); - - if (t->pal == 1) t->z -= (18<<8); - - if (g_player[playerNum].ps->over_shoulder_on > 0 && g_player[playerNum].ps->newowner < 0) - { - t->ang = fix16_to_int( - g_player[playerNum].ps->q16ang - + mulscale16((((g_player[playerNum].ps->q16ang + 1024 - g_player[playerNum].ps->oq16ang) & 2047) - 1024), smoothratio)); -#ifdef USE_OPENGL - if (bpp > 8 && hw_models && md_tilehasmodel(t->picnum, t->pal) >= 0) - { - static int32_t targetang = 0; - - if (g_player[playerNum].input->extbits&(1<<1)) - { - if (g_player[playerNum].input->extbits&(1<<2))targetang += 16; - else if (g_player[playerNum].input->extbits&(1<<3)) targetang -= 16; - else if (targetang > 0) targetang -= targetang>>2; - else if (targetang < 0) targetang += (-targetang)>>2; - } - else - { - if (g_player[playerNum].input->extbits&(1<<2))targetang -= 16; - else if (g_player[playerNum].input->extbits&(1<<3)) targetang += 16; - else if (targetang > 0) targetang -= targetang>>2; - else if (targetang < 0) targetang += (-targetang)>>2; - } - - targetang = clamp(targetang, -128, 128); - t->ang += targetang; - } - else -#endif - t->cstat |= 2; - if (screenpeek == myconnectindex && numplayers >= 2) - { - t->x = omypos.x+mulscale16(mypos.x-omypos.x,smoothratio); - t->y = omypos.y+mulscale16(mypos.y-omypos.y,smoothratio); - t->z = omypos.z+mulscale16(mypos.z-omypos.z,smoothratio)+(40<<8); - t->ang = fix16_to_int(omyang+mulscale16((fix16_to_int(myang+F16(1024)-omyang)&2047)-1024,smoothratio)); - t->sectnum = mycursectnum; - } - - } - -#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 - && spritesortcnt < maxspritesonscreen) - { - tspritetype *const newTspr = &tsprite[spritesortcnt]; - int const currentWeapon = g_player[playerNum].ps->curr_weapon; - - *newTspr = *t; - newTspr->statnum = TSPR_TEMP; - newTspr->cstat = 0; - newTspr->pal = 0; - newTspr->picnum = (currentWeapon == GROW_WEAPON ? TILE_GROWSPRITEICON : WeaponPickupSprites[currentWeapon]); - if (RR) - { - newTspr->picnum = 0; - switch(DYNAMICWEAPONMAP(g_player[playerNum].ps->curr_weapon)) - { - 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 = 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)) - newTspr->xrepeat = 0; - newTspr->yrepeat = newTspr->xrepeat; - - spritesortcnt++; - } - - if (g_player[playerNum].input->extbits & (1 << 7) && !ud.pause_on && spritesortcnt < maxspritesonscreen) - { - tspritetype *const playerTyping = t; - - playerTyping->statnum = TSPR_TEMP; - playerTyping->cstat = 0; - playerTyping->picnum = TILE_RESPAWNMARKERGREEN; - playerTyping->z = (pSprite->owner >= 0) ? (g_player[playerNum].ps->pos.z - (20 << 8)) : (pSprite->z - (96 << 8)); - playerTyping->xrepeat = 32; - playerTyping->yrepeat = 32; - playerTyping->pal = 20; - - spritesortcnt++; - } - } -#endif - - if (pSprite->owner == -1) - { -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - } - else -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, pSprite->ang - oura); - - if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER) frameOffset += 1795-1405; - else if ((actor[i].floorz-pSprite->z) > (64<<8)) frameOffset += 60; - - t->picnum += frameOffset; - t->pal = g_player[playerNum].ps->palookup; - - goto PALONLY; - } - - if (g_player[playerNum].ps->on_crane == -1 && (sector[pSprite->sectnum].lotag&0x7ff) != 1) // ST_1_ABOVE_WATER ? - { - l = pSprite->z-actor[g_player[playerNum].ps->i].floorz+(3<<8); - // SET_SPRITE_NOT_TSPRITE - if (l > 1024 && pSprite->yrepeat > 32 && pSprite->extra > 0) - pSprite->yoffset = (int8_t)tabledivide32_noinline(l, pSprite->yrepeat<<2); - else pSprite->yoffset=0; - } - - if (g_player[playerNum].ps->newowner > -1) - { - // Display TILE_APLAYER sprites with action PSTAND when viewed through - // a camera. - auto aplayer_scr = &ScriptCode[actorinfo[TILE_APLAYER].scriptaddress]; - // [0]=strength, [1]=actionofs, [2]=moveofs - - scrofs_action = aplayer_scr[1]; - curframe = 0; - } - - if (ud.camerasprite == -1 && g_player[playerNum].ps->newowner == -1) - { - if (pSprite->owner >= 0 && display_mirror == 0 && g_player[playerNum].ps->over_shoulder_on == 0) - { - if ((!g_netServer && ud.multimode < 2) || ((g_netServer || ud.multimode > 1) && playerNum == screenpeek)) - { - if (videoGetRenderMode() == REND_POLYMER) - t->clipdist |= TSPR_FLAGS_INVISIBLE_WITH_SHADOW; - else - { - t->owner = -1; - t->xrepeat = t->yrepeat = 0; - continue; - } - -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum, t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - } - else -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, pSprite->ang - oura); - - if (sector[t->sectnum].lotag == ST_2_UNDERWATER) frameOffset += 1795-1405; - else if ((actor[i].floorz-pSprite->z) > (64<<8)) frameOffset += 60; - - t->picnum += frameOffset; - t->pal = g_player[playerNum].ps->palookup; - } - } - } -PALONLY: - G_MaybeTakeOnFloorPal(t, sect); - - if (pSprite->owner == -1) continue; - - if (t->z > actor[i].floorz && t->xrepeat < 32) - t->z = actor[i].floorz; - - if (RRRA) - { - if (g_player[playerNum].ps->OnMotorcycle && playerNum == screenpeek) - { - t->picnum = TILE_RRTILE7219; - t->xrepeat = 18; - t->yrepeat = 18; - scrofs_action = 0; - curframe = 0; - } - else if (g_player[playerNum].ps->OnMotorcycle) - { - t->xrepeat = 18; - t->yrepeat = 18; - scrofs_action = 0; - curframe = 0; -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum, t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - t->picnum = TILE_RRTILE7213; - } - else -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - oura); - - t->picnum = TILE_RRTILE7213 + frameOffset; - } - else if (g_player[playerNum].ps->OnBoat && playerNum == screenpeek) - { - t->picnum = TILE_RRTILE7190; - t->xrepeat = 32; - t->yrepeat = 32; - scrofs_action = 0; - curframe = 0; - } - else if (g_player[playerNum].ps->OnBoat) - { - t->xrepeat = 32; - t->yrepeat = 32; - scrofs_action = 0; - curframe = 0; -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum, t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - t->picnum = TILE_RRTILE7213; - } - else -#endif - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, pSprite->ang - oura); - - t->picnum = TILE_RRTILE7184 + frameOffset; - } - } - - break; - case RRTILE2460__STATICRR: - case RRTILE2465__STATICRR: - case BIKEJIBA__STATICRR: - case BIKEJIBB__STATICRR: - case BIKEJIBC__STATICRR: - case BIKERJIBA__STATICRR: - case BIKERJIBB__STATICRR: - case BIKERJIBC__STATICRR: - case BIKERJIBD__STATICRR: - case CHEERJIBA__STATICRR: - case CHEERJIBB__STATICRR: - case CHEERJIBC__STATICRR: - case CHEERJIBD__STATICRR: - case FBOATJIBA__STATICRR: - case FBOATJIBB__STATICRR: - case RABBITJIBA__STATICRR: - case RABBITJIBB__STATICRR: - case RABBITJIBC__STATICRR: - case MAMAJIBA__STATICRR: - case MAMAJIBB__STATICRR: - if (!RRRA) goto default_case2; - fallthrough__; - case MINJIBA__STATICRR: - case MINJIBB__STATICRR: - case MINJIBC__STATICRR: - case JIBS1__STATIC: - case JIBS2__STATIC: - case JIBS3__STATIC: - case JIBS4__STATIC: - case JIBS5__STATIC: - case JIBS6__STATIC: - case HEADJIB1__STATIC: - case LEGJIB1__STATIC: - case ARMJIB1__STATIC: - case LIZMANHEAD1__STATIC: - case LIZMANARM1__STATIC: - case LIZMANLEG1__STATIC: - case DUKELEG__STATIC: - case DUKEGUN__STATIC: - case DUKETORSO__STATIC: - case BILLYJIBA__STATICRR: - case BILLYJIBB__STATICRR: - case HULKJIBA__STATICRR: - case HULKJIBB__STATICRR: - case HULKJIBC__STATICRR: - case COOTJIBA__STATICRR: - case COOTJIBB__STATICRR: - case COOTJIBC__STATICRR: - if (RR) - { - if (switchpic == TILE_HEADJIB1 || switchpic == TILE_LEGJIB1 || switchpic == TILE_ARMJIB1 - || switchpic == TILE_LIZMANHEAD1 || switchpic == TILE_LIZMANARM1 || switchpic == TILE_LIZMANLEG1) - goto default_case2; - } - if (RRRA && t->pal == 19 && (switchpic == TILE_MINJIBA || switchpic == TILE_MINJIBB || switchpic == TILE_MINJIBC)) - t->shade = -127; - if (adult_lockout) - { - t->xrepeat = t->yrepeat = 0; - continue; - } - if (t->pal == 6) - t->shade = -120; - if (RR && shadedsector[pSprite->sectnum] == 1) - t->shade = 16; - fallthrough__; - case SCRAP1__STATIC: - case SCRAP2__STATIC: - case SCRAP3__STATIC: - case SCRAP4__STATIC: - case SCRAP5__STATIC: - if ((RR || actor[i].picnum == TILE_BLIMP) && t->picnum == TILE_SCRAP1 && pSprite->yvel >= 0) - t->picnum = pSprite->yvel < MAXUSERTILES ? pSprite->yvel : 0; - else t->picnum += T1(i); - if (!RR) - t->shade = -128+6 < t->shade ? t->shade-6 : -128; // effectively max(t->shade-6, -128) while avoiding (signed!) underflow - - G_MaybeTakeOnFloorPal(t, sect); - break; - case WATERBUBBLE__STATIC: - if (sector[t->sectnum].floorpicnum == TILE_FLOORSLIME) - { - t->pal = 7; - break; - } - fallthrough__; - default: -default_case2: - G_MaybeTakeOnFloorPal(t, sect); - break; - } - - if (G_HaveActor(pSprite->picnum) && scrofs_action != 0 && (!RR || (t->cstat & 48) != 48)) - { - if ((unsigned)scrofs_action + ACTION_VIEWTYPE >= (unsigned)g_scriptSize) - goto skip; - - int viewtype = ScriptCode[scrofs_action + ACTION_VIEWTYPE]; - uint16_t const action_flags = ScriptCode[scrofs_action + ACTION_FLAGS]; - - int const invertp = viewtype < 0; - l = klabs(viewtype); - -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - } - else -#endif - { - int const viewAng = ((l > 4 && l != 8) || action_flags & AF_VIEWPOINT) ? getangle(pSprite->x-ourx, pSprite->y-oury) : oura; - int const angDiff = invertp ? viewAng - pSprite->ang : pSprite->ang - viewAng; - - switch (l) - { - case 2: - frameOffset = getofs_viewtype<8>(angDiff) & 1; - break; - - case 3: - case 4: - frameOffset = viewtype_mirror<7>(t->cstat, getofs_viewtype<16>(angDiff) & 7); - break; - - case 5: - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, angDiff); - break; - case 7: - frameOffset = getofs_viewtype_mirrored<7>(t->cstat, angDiff); - break; - case 8: - frameOffset = getofs_viewtype<8>(angDiff); - t->cstat &= ~4; - break; - /*case 9: - frameOffset = getofs_viewtype_mirrored<9>(t->cstat, angDiff); - break; - case 12: - frameOffset = getofs_viewtype<12>(angDiff); - t->cstat &= ~4; - break; - case 16: - frameOffset = getofs_viewtype<16>(angDiff); - t->cstat &= ~4; - break;*/ - default: - if (RR) - { - if (A_CheckEnemySprite(pSprite) && pSprite->statnum == STAT_ZOMBIEACTOR && pSprite->extra > 0) - { - int const angDiff = pSprite->ang-getangle(pSprite->x-ourx, pSprite->y-oury); - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, angDiff); - break; - } - } - frameOffset = 0; - break; - } - } - - t->picnum += frameOffset + ScriptCode[scrofs_action + ACTION_STARTFRAME] + l*curframe; - // XXX: t->picnum can be out-of-bounds by bad user code. - - if (l > 0) - while (tilesiz[t->picnum].x == 0 && t->picnum > 0) - t->picnum -= l; //Hack, for actors - - if (actor[i].dispicnum >= 0) - actor[i].dispicnum = t->picnum; - } -// else if (display_mirror == 1) -// t->cstat |= 4; - /* completemirror() already reverses the drawn frame, so the above isn't necessary. - * Even Polymost's and Polymer's mirror seems to function correctly this way. */ - -skip: - // Night vision goggles tsprite tinting. - // XXX: Currently, for the splitscreen mod, sprites will be pal6-colored iff the first - // player has nightvision on. We should pass stuff like "from which player is this view - // supposed to be" as parameters ("drawing context") instead of relying on globals. - if (!RR && g_player[screenpeek].ps->inv_amount[GET_HEATS] > 0 && g_player[screenpeek].ps->heat_on && - (A_CheckEnemySprite(pSprite) || actorflag(t->owner,SFLAG_NVG) || pSprite->picnum == TILE_APLAYER || pSprite->statnum == STAT_DUMMYPLAYER)) - { - t->pal = 6; - t->shade = 0; - } - - if (RR && !RRRA && pSprite->picnum == TILE_SBMOVE) - t->shade = -127; - - // Fake floor shadow, implemented by inserting a new tsprite. - if (pSprite->statnum == STAT_DUMMYPLAYER || A_CheckEnemySprite(pSprite) || actorflag(t->owner,SFLAG_SHADOW) || (pSprite->picnum == TILE_APLAYER && pSprite->owner >= 0)) - if ((!RR || (pSprite->cstat&48) == 0) && t->statnum != TSPR_TEMP && pSprite->picnum != TILE_EXPLOSION2 && (RR || pSprite->picnum != TILE_HANGLIGHT) && pSprite->picnum != TILE_DOMELITE && (RR || pSprite->picnum != TILE_HOTMEAT) - && (!RR || pSprite->picnum != TILE_TORNADO) && (!RR || pSprite->picnum != TILE_EXPLOSION3) && (!RR || RRRA || pSprite->picnum != TILE_SBMOVE)) - { - if (actor[i].dispicnum < 0) - { -#ifdef DEBUGGINGAIDS - // A negative actor[i].dispicnum used to mean 'no floor shadow please', but - // that was a bad hack since the value could propagate to sprite[].picnum. - Printf(TEXTCOLOR_RED "actor[%d].dispicnum = %d\n", i, actor[i].dispicnum); -#endif - actor[i].dispicnum=0; - continue; - } - - if (actor[i].aflags & SFLAG_NOFLOORSHADOW) - continue; - - if (r_shadows && spritesortcnt < (maxspritesonscreen-2) -#ifdef POLYMER - && !(videoGetRenderMode() == REND_POLYMER && pr_lighting != 0) -#endif - ) - { - if (DEER && klabs(sector[sect].ceilingheinum - sector[sect].floorheinum) > 576) continue; - if (RRRA && sector[sect].lotag == 160) continue; - int const shadowZ = (DEER || (sector[sect].lotag & 0xff) > 2 || pSprite->statnum == STAT_PROJECTILE || - pSprite->statnum == STAT_MISC || pSprite->picnum == TILE_DRONE || (!RR && pSprite->picnum == TILE_COMMANDER)) - ? sector[sect].floorz - : actor[i].floorz; - - if ((pSprite->z-shadowZ) < ZOFFSET3 && g_player[screenpeek].ps->pos.z < shadowZ) - { - tspritetype *const tsprShadow = &tsprite[spritesortcnt]; - - *tsprShadow = *t; - tsprShadow->statnum = TSPR_TEMP; - tsprShadow->yrepeat = (t->yrepeat >> 3); - - if (t->yrepeat < 4) - t->yrepeat = 4; - - tsprShadow->shade = 127; - tsprShadow->cstat |= 2; - tsprShadow->z = shadowZ; - tsprShadow->pal = ud.shadow_pal; - - -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST) - { - if (hw_models && md_tilehasmodel(t->picnum,t->pal) >= 0) - { - tsprShadow->yrepeat = 0; - // 512:trans reverse - //1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues - tsprShadow->clipdist |= TSPR_FLAGS_MDHACK; - tsprShadow->cstat |= 512; - } - else - { - int const ii - = getangle(tsprShadow->x - g_player[screenpeek].ps->pos.x, tsprShadow->y - g_player[screenpeek].ps->pos.y); - - tsprShadow->x += sintable[(ii+2560)&2047]>>9; - tsprShadow->y += sintable[(ii+2048)&2047]>>9; - } - } -#endif - spritesortcnt++; - } - } - } - - switch (DYNAMICTILEMAP(pSprite->picnum)) - { - case LASERLINE__STATIC: - if (RR) break; - if (sector[t->sectnum].lotag == ST_2_UNDERWATER) t->pal = 8; - t->z = sprite[pSprite->owner].z-(3<<8); - if (lasermode == 2 && g_player[screenpeek].ps->heat_on == 0) - t->yrepeat = 0; - fallthrough__; - case EXPLOSION2BOT__STATIC: - case GROWSPARK__STATIC: - case SHRINKEREXPLOSION__STATIC: - case FLOORFLAME__STATIC: - if (RR) break; - fallthrough__; - case FREEZEBLAST__STATIC: - case ATOMICHEALTH__STATIC: - case FIRELASER__STATIC: - case SHRINKSPARK__STATIC: - case CHAINGUN__STATIC: - case RPG__STATIC: - case EXPLOSION2__STATIC: - case EXPLOSION3__STATICRR: - case OWHIP__STATICRR: - case UWHIP__STATICRR: - case RPG2__STATICRR: - case RRTILE1790__STATICRR: -rrcoolexplosion1: - if (RR && !RRRA && (pSprite->picnum == TILE_RPG2 || pSprite->picnum == TILE_RRTILE1790)) break; - if (t->picnum == TILE_EXPLOSION2) - { - g_player[screenpeek].ps->visibility = -127; - //restorepalette = 1; // JBF 20040101: why? - if (RR) - t->pal = 0; - } - else if (RR && t->picnum == TILE_FIRELASER) - t->picnum = TILE_FIRELASER+(((int32_t) totalclock>>2)&5); - t->shade = -127; - t->clipdist |= TSPR_FLAGS_DRAW_LAST | TSPR_FLAGS_NO_SHADOW; - break; - case UFOBEAM__STATICRR: - case RRTILE3586__STATICRR: - case RRTILE3587__STATICRR: - t->cstat |= 32768; - pSprite->cstat |= 32768; - break; - case DESTRUCTO__STATICRR: - t->cstat |= 32768; - break; - case FIRE__STATIC: - case FIRE2__STATIC: - if (RR && pSprite->picnum == TILE_FIRE2) break; - t->cstat |= 128; - fallthrough__; - case BURNING__STATIC: - case BURNING2__STATIC: - if (RR && pSprite->picnum == TILE_BURNING2) break; - if (sprite[pSprite->owner].picnum != TILE_TREE1 && sprite[pSprite->owner].picnum != TILE_TREE2) - t->z = sector[t->sectnum].floorz; - t->shade = -127; - fallthrough__; - case SMALLSMOKE__STATIC: - if (RR) break; - t->clipdist |= TSPR_FLAGS_DRAW_LAST | TSPR_FLAGS_NO_SHADOW; - break; - case COOLEXPLOSION1__STATIC: - if (RR) goto rrcoolexplosion1; - t->shade = -127; - t->clipdist |= TSPR_FLAGS_DRAW_LAST | TSPR_FLAGS_NO_SHADOW; - t->picnum += (pSprite->shade>>1); - break; - case WALLLIGHT3__STATIC: - case WALLLIGHT1__STATIC: - if (!RR) break; - fallthrough__; - case RRTILE3668__STATICRR: - case RRTILE3795__STATICRR: - case RRTILE5035__STATICRR: - case RRTILE7505__STATICRR: - case RRTILE7506__STATICRR: - case RRTILE7533__STATICRR: - case RRTILE8216__STATICRR: - case RRTILE8218__STATICRR: - case RRTILE8220__STATICRR: - if (!RRRA) break; - fallthrough__; - case RRTILE1878__STATICRR: - case RRTILE1952__STATICRR: - case RRTILE1953__STATICRR: - case RRTILE1990__STATICRR: - case RRTILE2050__STATICRR: - case RRTILE2056__STATICRR: - case RRTILE2072__STATICRR: - case RRTILE2075__STATICRR: - case RRTILE2083__STATICRR: - case RRTILE2097__STATICRR: - case RRTILE2156__STATICRR: - case RRTILE2157__STATICRR: - case RRTILE2158__STATICRR: - case RRTILE2159__STATICRR: - case RRTILE2160__STATICRR: - case RRTILE2161__STATICRR: - case RRTILE2175__STATICRR: - case RRTILE2176__STATICRR: - case RRTILE2357__STATICRR: - case RRTILE2564__STATICRR: - case RRTILE2573__STATICRR: - case RRTILE2574__STATICRR: - case RRTILE2583__STATICRR: - case RRTILE2604__STATICRR: - case RRTILE2689__STATICRR: - case RRTILE2893__STATICRR: - case RRTILE2894__STATICRR: - case RRTILE2915__STATICRR: - case RRTILE2945__STATICRR: - case RRTILE2946__STATICRR: - case RRTILE2947__STATICRR: - case RRTILE2948__STATICRR: - case RRTILE2949__STATICRR: - case RRTILE2977__STATICRR: - case RRTILE2978__STATICRR: - case RRTILE3116__STATICRR: - case RRTILE3171__STATICRR: - case RRTILE3216__STATICRR: - case RRTILE3720__STATICRR: - t->shade = -127; - break; - case CHEER__STATICRR: - if (!RRRA) break; - if (t->picnum >= TILE_CHEER + 102 && t->picnum <= TILE_CHEER + 151) - t->shade = -127; - break; - case MINION__STATICRR: - if (!RRRA) break; - if (t->pal == 19) - t->shade = -127; - break; - case BIKER__STATICRR: - if (!RRRA) break; - if (t->picnum >= TILE_BIKER + 54 && t->picnum <= TILE_BIKER + 58) - t->shade = -127; - else if (t->picnum >= TILE_BIKER + 84 && t->picnum <= TILE_BIKER + 88) - t->shade = -127; - break; - case BILLYRAY__STATICRR: - case BILLYRAYSTAYPUT__STATICRR: - if (!RRRA) break; - if (t->picnum >= TILE_BILLYRAY + 5 && t->picnum <= TILE_BILLYRAY + 9) - t->shade = -127; - break; - case RRTILE2034__STATICRR: - t->picnum = TILE_RRTILE2034 + ((int32_t) totalclock & 1); - break; - case RRTILE2944__STATICRR: - t->shade = -127; - t->picnum = TILE_RRTILE2944 + (((int32_t) totalclock >> 2) & 4); - break; - case PLAYERONWATER__STATIC: -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum,pSprite->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - frameOffset = 0; - t->cstat &= ~4; - } - else -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, t->ang - oura); - - t->picnum = pSprite->picnum+frameOffset+((T1(i)<4)*5); - t->shade = sprite[pSprite->owner].shade; - - break; - - case MUD__STATICRR: - t->picnum = TILE_MUD+T2(i); - break; - case WATERSPLASH2__STATIC: - // WATERSPLASH_T2 - t->picnum = TILE_WATERSPLASH2+T2(i); - break; - case SHELL__STATIC: - t->picnum = pSprite->picnum+(T1(i)&1); - fallthrough__; - case SHOTGUNSHELL__STATIC: - t->cstat |= 12; - if (T1(i) > 2) t->cstat &= ~16; - else if (T1(i) > 1) t->cstat &= ~4; - break; - case FRAMEEFFECT1__STATIC: - if (pSprite->owner >= 0 && sprite[pSprite->owner].statnum < MAXSTATUS) - { - if (sprite[pSprite->owner].picnum == TILE_APLAYER) - if (ud.camerasprite == -1) - if (screenpeek == P_Get(pSprite->owner) && display_mirror == 0) - { - t->owner = -1; - break; - } - if ((sprite[pSprite->owner].cstat&32768) == 0) - { - if (!actor[pSprite->owner].dispicnum) - t->picnum = actor[i].t_data[1]; - else t->picnum = actor[pSprite->owner].dispicnum; - - if (RR && sprite[pSprite->owner].picnum == TILE_APLAYER) - t->picnum = TILE_SMALLSMOKE; - - if (!G_MaybeTakeOnFloorPal(t, sect)) - t->pal = sprite[pSprite->owner].pal; - - t->shade = sprite[pSprite->owner].shade; - t->ang = sprite[pSprite->owner].ang; - t->cstat = 2|sprite[pSprite->owner].cstat; - } - } - break; - - case CAMERA1__STATIC: - case RAT__STATIC: -#ifdef USE_OPENGL - if (videoGetRenderMode() >= REND_POLYMOST && hw_models && md_tilehasmodel(pSprite->picnum,pSprite->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) - { - t->cstat &= ~4; - break; - } -#endif - frameOffset = getofs_viewtype_mirrored<5>(t->cstat, t->ang - oura); - t->picnum = pSprite->picnum+frameOffset; - break; - } - - actor[i].dispicnum = t->picnum; -#if 0 - // why? - if (sector[t->sectnum].floorpicnum == TILE_MIRROR) - t->xrepeat = t->yrepeat = 0; -#endif - } - -#ifdef DEBUGGINGAIDS - g_spriteStat.numonscreen = spritesortcnt; -#endif -#endif } void G_InitTimer(int32_t ticspersec)