2020-05-20 20:18:03 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
|
|
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
2020-06-28 07:03:31 +00:00
|
|
|
Copyright (C) 2020 - Christoph Oelckers
|
2020-05-20 20:18:03 +00:00
|
|
|
|
|
|
|
This file is part of Enhanced Duke Nukem 3D version 1.5 - Atomic Edition
|
|
|
|
|
|
|
|
Duke Nukem 3D is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
Original Source: 1996 - Todd Replogle
|
|
|
|
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
|
|
|
|
|
|
|
EDuke enhancements integrated: 04/13/2003 - Matt Saettler
|
|
|
|
|
|
|
|
Note: EDuke source was in transition. Changes are in-progress in the
|
|
|
|
source as it is released.
|
|
|
|
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "ns.h"
|
|
|
|
#include "global.h"
|
|
|
|
#include "build.h"
|
2020-07-03 21:56:14 +00:00
|
|
|
#include "names_d.h"
|
2020-10-21 17:14:41 +00:00
|
|
|
#include "dukeactor.h"
|
2021-04-11 07:59:55 +00:00
|
|
|
#include "precache.h"
|
2020-05-20 20:18:03 +00:00
|
|
|
|
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
|
|
|
inline void tloadtile(int tilenum, int palnum = 0)
|
|
|
|
{
|
2020-07-20 21:21:27 +00:00
|
|
|
assert(tilenum < MAXTILES);
|
2020-05-20 20:18:03 +00:00
|
|
|
markTileForPrecache(tilenum, palnum);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2021-12-21 19:59:15 +00:00
|
|
|
static void cachespritenum(DDukeActor* actor)
|
2020-05-20 20:18:03 +00:00
|
|
|
{
|
2020-07-20 21:21:27 +00:00
|
|
|
int maxc;
|
|
|
|
int j;
|
2021-12-21 19:59:15 +00:00
|
|
|
int pal = actor->spr.pal;
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2021-12-21 19:59:15 +00:00
|
|
|
if(ud.monsters_off && badguy(actor)) return;
|
2020-07-20 21:21:27 +00:00
|
|
|
|
|
|
|
maxc = 1;
|
|
|
|
|
2021-12-21 19:59:15 +00:00
|
|
|
switch(actor->spr.picnum)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
|
|
|
case HYDRENT:
|
|
|
|
tloadtile(BROKEFIREHYDRENT);
|
|
|
|
for(j = TOILETWATER; j < (TOILETWATER+4); j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
break;
|
|
|
|
case TOILET:
|
|
|
|
tloadtile(TOILETBROKE);
|
|
|
|
for(j = TOILETWATER; j < (TOILETWATER+4); j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
break;
|
|
|
|
case STALL:
|
|
|
|
tloadtile(STALLBROKE);
|
|
|
|
for(j = TOILETWATER; j < (TOILETWATER+4); j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
break;
|
|
|
|
case RUBBERCAN:
|
|
|
|
maxc = 2;
|
|
|
|
break;
|
|
|
|
case TOILETWATER:
|
|
|
|
maxc = 4;
|
|
|
|
break;
|
|
|
|
case FEMPIC1:
|
|
|
|
maxc = 44;
|
|
|
|
break;
|
|
|
|
case LIZTROOP:
|
|
|
|
case LIZTROOPRUNNING:
|
|
|
|
case LIZTROOPSHOOT:
|
|
|
|
case LIZTROOPJETPACK:
|
|
|
|
case LIZTROOPONTOILET:
|
|
|
|
case LIZTROOPDUCKING:
|
|
|
|
for(j = LIZTROOP; j < (LIZTROOP+72); j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
for(j=HEADJIB1;j<LEGJIB1+3;j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
maxc = 0;
|
|
|
|
break;
|
|
|
|
case WOODENHORSE:
|
|
|
|
maxc = 5;
|
|
|
|
for(j = HORSEONSIDE; j < (HORSEONSIDE+4); j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
break;
|
|
|
|
case NEWBEAST:
|
|
|
|
case NEWBEASTSTAYPUT:
|
|
|
|
maxc = 90;
|
|
|
|
break;
|
|
|
|
case BOSS1:
|
|
|
|
case BOSS2:
|
|
|
|
case BOSS3:
|
|
|
|
maxc = 30;
|
|
|
|
break;
|
|
|
|
case OCTABRAIN:
|
|
|
|
case OCTABRAINSTAYPUT:
|
|
|
|
case COMMANDER:
|
|
|
|
case COMMANDERSTAYPUT:
|
|
|
|
maxc = 38;
|
|
|
|
break;
|
|
|
|
case RECON:
|
|
|
|
maxc = 13;
|
|
|
|
break;
|
|
|
|
case PIGCOP:
|
|
|
|
case PIGCOPDIVE:
|
|
|
|
maxc = 61;
|
|
|
|
break;
|
|
|
|
case SHARK:
|
|
|
|
maxc = 30;
|
|
|
|
break;
|
|
|
|
case LIZMAN:
|
|
|
|
case LIZMANSPITTING:
|
|
|
|
case LIZMANFEEDING:
|
|
|
|
case LIZMANJUMP:
|
|
|
|
for(j=LIZMANHEAD1;j<LIZMANLEG1+3;j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
maxc = 80;
|
|
|
|
break;
|
|
|
|
case APLAYER:
|
|
|
|
maxc = 0;
|
|
|
|
if(ud.multimode > 1)
|
|
|
|
{
|
|
|
|
maxc = 5;
|
|
|
|
for(j = 1420;j < 1420+106; j++)
|
|
|
|
tloadtile(j, pal);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ATOMICHEALTH:
|
|
|
|
maxc = 14;
|
|
|
|
break;
|
|
|
|
case DRONE:
|
|
|
|
maxc = 10;
|
|
|
|
break;
|
|
|
|
case EXPLODINGBARREL:
|
|
|
|
case SEENINE:
|
|
|
|
case OOZFILTER:
|
|
|
|
maxc = 3;
|
|
|
|
break;
|
|
|
|
case NUKEBARREL:
|
|
|
|
case CAMERA1:
|
|
|
|
maxc = 5;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2021-12-21 19:59:15 +00:00
|
|
|
for(j = actor->spr.picnum; j < (actor->spr.picnum+maxc); j++)
|
2020-07-20 21:21:27 +00:00
|
|
|
tloadtile(j, pal);
|
2020-05-20 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
static void cachegoodsprites(void)
|
|
|
|
{
|
2020-07-20 21:21:27 +00:00
|
|
|
int i;
|
2021-12-30 09:30:21 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
tloadtile(BOTTOMSTATUSBAR);
|
|
|
|
if (ud.multimode > 1)
|
|
|
|
{
|
|
|
|
tloadtile(FRAGBAR);
|
|
|
|
for (i = MINIFONT; i < MINIFONT + 63; i++)
|
|
|
|
tloadtile(i);
|
|
|
|
}
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for(i=FOOTPRINTS;i<FOOTPRINTS+3;i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = BURNING; i < BURNING+14; i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = BURNING2; i < BURNING2+14; i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = CRACKKNUCKLES; i < CRACKKNUCKLES+4; i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = FIRSTGUN; i < FIRSTGUN+3 ; i++ )
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = EXPLOSION2; i < EXPLOSION2+21 ; i++ )
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
tloadtile(BULLETHOLE);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = FIRSTGUNRELOAD; i < FIRSTGUNRELOAD+8 ; i++ )
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
tloadtile(FOOTPRINTS);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = JIBS1; i < (JIBS5+5); i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = SCRAP1; i < (SCRAP1+19); i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2020-07-20 21:21:27 +00:00
|
|
|
for( i = SMALLSMOKE; i < (SMALLSMOKE+4); i++)
|
|
|
|
tloadtile(i);
|
2020-05-20 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2020-05-20 20:48:54 +00:00
|
|
|
void cacheit_d(void)
|
2020-05-20 20:18:03 +00:00
|
|
|
{
|
2021-04-28 20:56:01 +00:00
|
|
|
if (!r_precache) return;
|
2020-07-20 21:21:27 +00:00
|
|
|
|
|
|
|
cachegoodsprites();
|
|
|
|
|
2021-12-21 08:23:39 +00:00
|
|
|
for (auto& wal : wall)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-11-15 21:44:16 +00:00
|
|
|
tloadtile(wal.picnum, wal.pal);
|
|
|
|
if (wal.overpicnum >= 0)
|
|
|
|
tloadtile(wal.overpicnum, wal.pal);
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 08:23:39 +00:00
|
|
|
for (auto& sect: sector)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-11-15 21:44:16 +00:00
|
|
|
tloadtile(sect.floorpicnum, sect.floorpal);
|
|
|
|
tloadtile(sect.ceilingpicnum, sect.ceilingpal);
|
2020-07-20 21:21:27 +00:00
|
|
|
|
2021-11-15 21:44:16 +00:00
|
|
|
DukeSectIterator it(§);
|
2021-12-21 19:59:15 +00:00
|
|
|
while (auto act = it.Next())
|
2020-10-28 05:20:29 +00:00
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
if (act->spr.xrepeat != 0 && act->spr.yrepeat != 0 && (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) == 0)
|
|
|
|
cachespritenum(act);
|
2020-10-28 05:20:29 +00:00
|
|
|
}
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
precacheMarkedTiles();
|
2020-05-20 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
2021-12-04 12:02:38 +00:00
|
|
|
void spriteinit_d(DDukeActor* actor, TArray<DDukeActor*>& actors)
|
2021-11-19 09:41:50 +00:00
|
|
|
{
|
2022-01-19 08:41:48 +00:00
|
|
|
bool res = initspriteforspawn(actor);
|
2021-12-04 12:02:38 +00:00
|
|
|
if (res) spawninit_d(nullptr, actor, &actors);
|
2021-11-19 09:41:50 +00:00
|
|
|
}
|
2020-05-20 20:18:03 +00:00
|
|
|
|
2021-12-04 12:02:38 +00:00
|
|
|
void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
2020-05-20 20:18:03 +00:00
|
|
|
{
|
2021-11-17 21:48:05 +00:00
|
|
|
int i, j, lotaglist;
|
2020-07-20 21:21:27 +00:00
|
|
|
short lotags[65];
|
|
|
|
|
|
|
|
prelevel_common(g);
|
|
|
|
|
2020-11-02 18:13:58 +00:00
|
|
|
DukeStatIterator it(STAT_DEFAULT);
|
|
|
|
while (auto ac = it.Next())
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2020-10-23 18:27:05 +00:00
|
|
|
LoadActor(ac, -1, -1);
|
2020-07-20 21:21:27 +00:00
|
|
|
|
2021-12-21 19:59:15 +00:00
|
|
|
if (ac->spr.lotag == -1 && (ac->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2022-01-31 18:21:49 +00:00
|
|
|
ps[0].exit.X = ac->int_pos().X;
|
|
|
|
ps[0].exit.Y = ac->int_pos().Y;
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
2022-07-25 22:12:57 +00:00
|
|
|
else
|
|
|
|
premapcontroller(ac);
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
|
2020-10-28 05:25:08 +00:00
|
|
|
|
2021-12-04 12:02:38 +00:00
|
|
|
for (auto actor : actors)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-04 12:02:38 +00:00
|
|
|
if (actor->exists())
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
if (actor->spr.picnum == SECTOREFFECTOR && actor->spr.lotag == SE_14_SUBWAY_CAR)
|
2020-07-20 21:21:27 +00:00
|
|
|
continue;
|
2021-12-04 12:02:38 +00:00
|
|
|
spriteinit_d(actor, actors);
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-04 12:02:38 +00:00
|
|
|
for (auto actor : actors)
|
2020-10-28 05:25:08 +00:00
|
|
|
{
|
2021-12-04 12:02:38 +00:00
|
|
|
if (actor->exists())
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
if (actor->spr.picnum == SECTOREFFECTOR && actor->spr.lotag == SE_14_SUBWAY_CAR)
|
2021-12-04 12:02:38 +00:00
|
|
|
spriteinit_d(actor, actors);
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
2020-10-28 05:25:08 +00:00
|
|
|
}
|
2020-07-20 21:21:27 +00:00
|
|
|
lotaglist = 0;
|
|
|
|
|
2020-10-14 20:18:10 +00:00
|
|
|
it.Reset(STAT_DEFAULT);
|
2021-12-04 12:02:38 +00:00
|
|
|
while (auto actor = it.Next())
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
switch (actor->spr.picnum)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
|
|
|
case DIPSWITCH + 1:
|
|
|
|
case DIPSWITCH2 + 1:
|
|
|
|
case PULLSWITCH + 1:
|
|
|
|
case HANDSWITCH + 1:
|
|
|
|
case SLOTDOOR + 1:
|
|
|
|
case LIGHTSWITCH + 1:
|
|
|
|
case SPACELIGHTSWITCH + 1:
|
|
|
|
case SPACEDOORSWITCH + 1:
|
|
|
|
case FRANKENSTINESWITCH + 1:
|
|
|
|
case LIGHTSWITCH2 + 1:
|
|
|
|
case POWERSWITCH1 + 1:
|
|
|
|
case LOCKSWITCH1 + 1:
|
|
|
|
case POWERSWITCH2 + 1:
|
|
|
|
for (j = 0; j < lotaglist; j++)
|
2021-12-21 19:59:15 +00:00
|
|
|
if (actor->spr.lotag == lotags[j])
|
2020-07-20 21:21:27 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
if (j == lotaglist)
|
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
lotags[lotaglist] = actor->spr.lotag;
|
2020-07-20 21:21:27 +00:00
|
|
|
lotaglist++;
|
|
|
|
if (lotaglist > 64)
|
|
|
|
I_Error("Too many switches (64 max).");
|
|
|
|
|
2020-11-02 18:13:58 +00:00
|
|
|
DukeStatIterator it1(STAT_EFFECTOR);
|
|
|
|
while (auto ac = it1.Next())
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-21 19:59:15 +00:00
|
|
|
if (ac->spr.lotag == 12 && ac->spr.hitag == actor->spr.lotag)
|
2020-11-02 18:13:58 +00:00
|
|
|
ac->temp_data[0] = 1;
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mirrorcnt = 0;
|
|
|
|
|
2021-12-21 08:23:39 +00:00
|
|
|
for (auto& wal : wall)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-12-18 14:11:21 +00:00
|
|
|
if (wal.overpicnum == MIRROR && (wal.cstat & CSTAT_WALL_1WAY) != 0)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-11-17 21:48:05 +00:00
|
|
|
auto sectp = wal.nextSector();
|
2020-07-20 21:21:27 +00:00
|
|
|
|
|
|
|
if (mirrorcnt > 63)
|
|
|
|
I_Error("Too many mirrors (64 max.)");
|
2021-12-03 06:45:11 +00:00
|
|
|
if (sectp && sectp->ceilingpicnum != MIRROR)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-11-06 23:15:26 +00:00
|
|
|
sectp->ceilingpicnum = MIRROR;
|
|
|
|
sectp->floorpicnum = MIRROR;
|
2021-11-17 23:24:17 +00:00
|
|
|
mirrorwall[mirrorcnt] = &wal;
|
2021-11-17 23:27:03 +00:00
|
|
|
mirrorsector[mirrorcnt] = sectp;
|
2020-07-20 21:21:27 +00:00
|
|
|
mirrorcnt++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (numanimwalls >= MAXANIMWALLS)
|
|
|
|
I_Error("Too many 'anim' walls (max 512.)");
|
|
|
|
|
|
|
|
animwall[numanimwalls].tag = 0;
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = nullptr;
|
2020-07-20 21:21:27 +00:00
|
|
|
|
2021-11-17 21:48:05 +00:00
|
|
|
switch (wal.overpicnum)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
|
|
|
case FANSHADOW:
|
|
|
|
case FANSPRITE:
|
2022-02-17 23:19:21 +00:00
|
|
|
//wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN; Original code assigned this to 'wall', i.e. wall[0]
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2020-07-20 21:21:27 +00:00
|
|
|
numanimwalls++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case W_FORCEFIELD:
|
2021-12-24 09:53:27 +00:00
|
|
|
for (int jj = 0; jj < 3; jj++)
|
|
|
|
tloadtile(W_FORCEFIELD + jj);
|
2021-11-14 11:25:25 +00:00
|
|
|
[[fallthrough]];
|
2020-07-20 21:21:27 +00:00
|
|
|
case W_FORCEFIELD + 1:
|
|
|
|
case W_FORCEFIELD + 2:
|
2021-11-17 21:48:05 +00:00
|
|
|
if (wal.shade > 31)
|
|
|
|
wal.cstat = 0;
|
2021-12-18 14:16:31 +00:00
|
|
|
else wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN | CSTAT_WALL_YFLIP;
|
2020-07-20 21:21:27 +00:00
|
|
|
|
2021-11-21 07:42:36 +00:00
|
|
|
if (wal.lotag && wal.twoSided())
|
2021-11-17 21:48:05 +00:00
|
|
|
wal.nextWall()->lotag = wal.lotag;
|
2021-11-14 11:25:25 +00:00
|
|
|
[[fallthrough]];
|
2020-07-20 21:21:27 +00:00
|
|
|
|
|
|
|
case BIGFORCE:
|
|
|
|
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2020-07-20 21:21:27 +00:00
|
|
|
numanimwalls++;
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2021-11-17 21:48:05 +00:00
|
|
|
wal.extra = -1;
|
2020-07-20 21:21:27 +00:00
|
|
|
|
2021-11-17 21:48:05 +00:00
|
|
|
switch (wal.picnum)
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
|
|
|
case W_TECHWALL1:
|
|
|
|
case W_TECHWALL2:
|
|
|
|
case W_TECHWALL3:
|
|
|
|
case W_TECHWALL4:
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2020-07-20 21:21:27 +00:00
|
|
|
// animwall[numanimwalls].tag = -1;
|
|
|
|
numanimwalls++;
|
|
|
|
break;
|
|
|
|
case SCREENBREAK6:
|
|
|
|
case SCREENBREAK7:
|
|
|
|
case SCREENBREAK8:
|
2021-12-24 09:53:27 +00:00
|
|
|
for (int jj = SCREENBREAK6; jj < SCREENBREAK9; jj++)
|
|
|
|
tloadtile(jj);
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2020-07-20 21:21:27 +00:00
|
|
|
animwall[numanimwalls].tag = -1;
|
|
|
|
numanimwalls++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FEMPIC1:
|
|
|
|
case FEMPIC2:
|
|
|
|
case FEMPIC3:
|
|
|
|
|
2021-11-17 21:48:05 +00:00
|
|
|
wal.extra = wal.picnum;
|
2020-07-20 21:21:27 +00:00
|
|
|
animwall[numanimwalls].tag = -1;
|
|
|
|
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2021-11-17 21:48:05 +00:00
|
|
|
animwall[numanimwalls].tag = wal.picnum;
|
2020-07-20 21:21:27 +00:00
|
|
|
numanimwalls++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SCREENBREAK1:
|
|
|
|
case SCREENBREAK2:
|
|
|
|
case SCREENBREAK3:
|
|
|
|
case SCREENBREAK4:
|
|
|
|
case SCREENBREAK5:
|
|
|
|
|
|
|
|
case SCREENBREAK9:
|
|
|
|
case SCREENBREAK10:
|
|
|
|
case SCREENBREAK11:
|
|
|
|
case SCREENBREAK12:
|
|
|
|
case SCREENBREAK13:
|
|
|
|
case SCREENBREAK14:
|
|
|
|
case SCREENBREAK15:
|
|
|
|
case SCREENBREAK16:
|
|
|
|
case SCREENBREAK17:
|
|
|
|
case SCREENBREAK18:
|
|
|
|
case SCREENBREAK19:
|
|
|
|
|
2021-11-17 23:30:37 +00:00
|
|
|
animwall[numanimwalls].wall = &wal;
|
2021-11-17 21:48:05 +00:00
|
|
|
animwall[numanimwalls].tag = wal.picnum;
|
2020-07-20 21:21:27 +00:00
|
|
|
numanimwalls++;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//Invalidate textures in sector behind mirror
|
|
|
|
for (i = 0; i < mirrorcnt; i++)
|
|
|
|
{
|
2021-11-17 21:48:05 +00:00
|
|
|
for (auto& wal : wallsofsector(mirrorsector[i]))
|
2020-07-20 21:21:27 +00:00
|
|
|
{
|
2021-11-17 21:48:05 +00:00
|
|
|
wal.picnum = MIRROR;
|
|
|
|
wal.overpicnum = MIRROR;
|
2020-07-20 21:21:27 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-20 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
2021-11-15 21:44:16 +00:00
|
|
|
END_DUKE_NS
|