mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- function separators in 3 files.
This commit is contained in:
parent
735d82e8d3
commit
2be5ea9f15
3 changed files with 475 additions and 4 deletions
|
@ -58,6 +58,12 @@ SAVE save;
|
|||
|
||||
bool FAF_DebugView = false;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DSWActor* insertActor(sectortype* sect, int statnum)
|
||||
{
|
||||
auto pActor = static_cast<DSWActor*>(::InsertActor(RUNTIME_CLASS(DSWActor), sect, statnum));
|
||||
|
@ -66,6 +72,12 @@ DSWActor* insertActor(sectortype* sect, int statnum)
|
|||
return pActor;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool FAF_Sector(sectortype* sect)
|
||||
{
|
||||
SWSectIterator it(sect);
|
||||
|
@ -81,6 +93,12 @@ bool FAF_Sector(sectortype* sect)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SetWallWarpHitscan(sectortype* sect)
|
||||
{
|
||||
DSWActor* sp_warp;
|
||||
|
@ -104,6 +122,12 @@ void SetWallWarpHitscan(sectortype* sect)
|
|||
while (wall_num != start_wall);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ResetWallWarpHitscan(sectortype* sect)
|
||||
{
|
||||
auto start_wall = sect->firstWall();
|
||||
|
@ -118,6 +142,12 @@ void ResetWallWarpHitscan(sectortype* sect)
|
|||
while (wall_num != start_wall);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
||||
int32_t xvect, int32_t yvect, int32_t zvect,
|
||||
|
@ -222,6 +252,12 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool FAFcansee_(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
||||
int32_t xe, int32_t ye, int32_t ze, sectortype* secte)
|
||||
{
|
||||
|
@ -302,6 +338,12 @@ bool FAFcansee_(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int GetZadjustment(sectortype* sect, short hitag)
|
||||
{
|
||||
if (sect == nullptr || !(sect->extra & SECTFX_Z_ADJUST))
|
||||
|
@ -319,6 +361,12 @@ int GetZadjustment(sectortype* sect, short hitag)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool SectorZadjust(const Collision& ceilhit, int32_t* hiz, const Collision& florhit, int32_t* loz)
|
||||
{
|
||||
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
|
||||
|
@ -433,6 +481,12 @@ bool SectorZadjust(const Collision& ceilhit, int32_t* hiz, const Collision& flor
|
|||
return SkipFAFcheck;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void WaterAdjust(const Collision& florhit, int32_t* loz)
|
||||
{
|
||||
if (florhit.type == kHitSector)
|
||||
|
@ -445,6 +499,12 @@ void WaterAdjust(const Collision& florhit, int32_t* loz)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void FAFgetzrange(vec3_t pos, sectortype* sect, int32_t* hiz, Collision* ceilhit, int32_t* loz, Collision* florhit, int32_t clipdist, int32_t clipmask)
|
||||
{
|
||||
int foo1;
|
||||
|
@ -505,6 +565,12 @@ void FAFgetzrange(vec3_t pos, sectortype* sect, int32_t* hiz, Collision* ceilhit
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, sectortype* const sect,
|
||||
int32_t* hiz, Collision* ceilhit,
|
||||
int32_t* loz, Collision* florhit)
|
||||
|
@ -562,6 +628,12 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, sectortype* const sect,
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SetupMirrorTiles(void)
|
||||
{
|
||||
SWStatIterator it(STAT_FAF);
|
||||
|
@ -587,6 +659,12 @@ void SetupMirrorTiles(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void GetUpperLowerSector(short match, int x, int y, sectortype** upper, sectortype** lower)
|
||||
{
|
||||
int i;
|
||||
|
@ -655,6 +733,12 @@ void GetUpperLowerSector(short match, int x, int y, sectortype** upper, sectorty
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool FindCeilingView(int match, int* x, int* y, int z, sectortype** sect)
|
||||
{
|
||||
int xoff = 0;
|
||||
|
@ -712,6 +796,12 @@ bool FindCeilingView(int match, int* x, int* y, int z, sectortype** sect)
|
|||
return true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool FindFloorView(int match, int* x, int* y, int z, sectortype** sect)
|
||||
{
|
||||
int xoff = 0;
|
||||
|
@ -769,6 +859,12 @@ bool FindFloorView(int match, int* x, int* y, int z, sectortype** sect)
|
|||
return true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short FindViewSectorInScene(sectortype* cursect, short level)
|
||||
{
|
||||
short match;
|
||||
|
@ -797,6 +893,12 @@ short FindViewSectorInScene(sectortype* cursect, short level)
|
|||
return -1;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
struct PortalGroup
|
||||
{
|
||||
TArray<int> sectors;
|
||||
|
|
|
@ -44,6 +44,12 @@ void DoMatchEverything(PLAYER* pp, short match, short state);
|
|||
void DoRotatorSetInterp(DSWActor*);
|
||||
void DoRotatorStopInterp(DSWActor*);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ReverseRotator(DSWActor* actor)
|
||||
{
|
||||
ROTATOR* r;
|
||||
|
@ -71,6 +77,12 @@ void ReverseRotator(DSWActor* actor)
|
|||
r->vel = -r->vel;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool RotatorSwitch(short match, short setting)
|
||||
{
|
||||
bool found = false;
|
||||
|
@ -88,6 +100,12 @@ bool RotatorSwitch(short match, short setting)
|
|||
return found;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SetRotatorActive(DSWActor* actor)
|
||||
{
|
||||
ROTATOR* r;
|
||||
|
@ -109,6 +127,12 @@ void SetRotatorActive(DSWActor* actor)
|
|||
VatorSwitch(SP_TAG2(actor), true);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SetRotatorInactive(DSWActor* actor)
|
||||
{
|
||||
DoRotatorStopInterp(actor);
|
||||
|
@ -119,7 +143,12 @@ void SetRotatorInactive(DSWActor* actor)
|
|||
actor->user.Flags &= ~(SPR_ACTIVE);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// called for operation from the space bar
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoRotatorOperate(PLAYER* pp, sectortype* sect)
|
||||
{
|
||||
short match = sect->hitag;
|
||||
|
@ -131,8 +160,13 @@ void DoRotatorOperate(PLAYER* pp, sectortype* sect)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// called from switches and triggers
|
||||
// returns first vator found
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoRotatorMatch(PLAYER* pp, short match, bool manual)
|
||||
{
|
||||
DSWActor* firstVator = nullptr;
|
||||
|
@ -186,6 +220,11 @@ void DoRotatorMatch(PLAYER* pp, short match, bool manual)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool TestRotatorMatchActive(short match)
|
||||
{
|
||||
|
@ -206,6 +245,11 @@ bool TestRotatorMatchActive(short match)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoRotatorSetInterp(DSWActor* actor)
|
||||
{
|
||||
|
@ -223,6 +267,12 @@ void DoRotatorSetInterp(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoRotatorStopInterp(DSWActor* actor)
|
||||
{
|
||||
for (auto& wal : wallsofsector(actor->sector()))
|
||||
|
@ -239,6 +289,12 @@ void DoRotatorStopInterp(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoRotator(DSWActor* actor)
|
||||
{
|
||||
ROTATOR* r;
|
||||
|
@ -358,6 +414,11 @@ int DoRotator(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "saveable.h"
|
||||
|
||||
|
|
|
@ -88,6 +88,12 @@ SINE_WAVE_FLOOR SineWaveFloor[MAX_SINE_WAVE][21];
|
|||
SINE_WALL SineWall[MAX_SINE_WALL][MAX_SINE_WALL_POINTS];
|
||||
SPRING_BOARD SpringBoard[20];
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SetSectorWallBits(sectortype* sect, int bit_mask, bool set_sectwall, bool set_nextwall)
|
||||
{
|
||||
auto start_wall = sect->firstWall();
|
||||
|
@ -110,6 +116,12 @@ void SetSectorWallBits(sectortype* sect, int bit_mask, bool set_sectwall, bool s
|
|||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void WallSetupDontMove(void)
|
||||
{
|
||||
walltype* wallp;
|
||||
|
@ -134,6 +146,12 @@ void WallSetupDontMove(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void WallSetupLoop(walltype* wp, int16_t lotag, int16_t extra)
|
||||
{
|
||||
// set first wall
|
||||
|
@ -155,6 +173,12 @@ static void WallSetupLoop(walltype* wp, int16_t lotag, int16_t extra)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void WallSetup(void)
|
||||
{
|
||||
short NextSineWall = 0;
|
||||
|
@ -318,6 +342,11 @@ void WallSetup(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SectorLiquidSet(sectortype* sectp)
|
||||
{
|
||||
|
@ -356,6 +385,12 @@ void SectorLiquidSet(sectortype* sectp)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SectorSetup(void)
|
||||
{
|
||||
int tag;
|
||||
|
@ -592,6 +627,12 @@ void SectorSetup(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SectorMidPoint(sectortype* sectp, int *xmid, int *ymid, int *zmid)
|
||||
{
|
||||
int xsum = 0, ysum = 0;
|
||||
|
@ -608,6 +649,12 @@ void SectorMidPoint(sectortype* sectp, int *xmid, int *ymid, int *zmid)
|
|||
*zmid = (sectp->int_floorz() + sectp->int_ceilingz()) >> 1;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DVector3 SectorMidPoint(sectortype* sectp)
|
||||
{
|
||||
DVector3 sum(0,0,0);
|
||||
|
@ -621,6 +668,12 @@ DVector3 SectorMidPoint(sectortype* sectp)
|
|||
return sum;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSpringBoard(PLAYER* pp)
|
||||
{
|
||||
|
||||
|
@ -629,6 +682,11 @@ void DoSpringBoard(PLAYER* pp)
|
|||
return;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSpringBoardDown(void)
|
||||
{
|
||||
|
@ -658,6 +716,12 @@ void DoSpringBoardDown(void)
|
|||
return;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
sectortype* FindNextSectorByTag(sectortype* sect, int tag)
|
||||
{
|
||||
for(auto& wal : wallsofsector(sect))
|
||||
|
@ -675,6 +739,11 @@ sectortype* FindNextSectorByTag(sectortype* sect, int tag)
|
|||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short DoSpawnActorTrigger(short match)
|
||||
{
|
||||
|
@ -697,6 +766,12 @@ short DoSpawnActorTrigger(short match)
|
|||
return spawn_count;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int OperateSector(sectortype* sect, short player_is_operating)
|
||||
{
|
||||
PLAYER* pp = GlobPlayerP;
|
||||
|
@ -767,6 +842,12 @@ enum
|
|||
SWITCH_SKULL = 553,
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int AnimateSwitch(DSWActor* actor, int tgt_value)
|
||||
{
|
||||
// if the value is not ON or OFF
|
||||
|
@ -842,6 +923,12 @@ int AnimateSwitch(DSWActor* actor, int tgt_value)
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SectorExp(DSWActor* actor, sectortype* sectp, double zh)
|
||||
{
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
|
@ -864,6 +951,12 @@ void SectorExp(DSWActor* actor, sectortype* sectp, double zh)
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoExplodeSector(short match)
|
||||
{
|
||||
sectortype* sectp;
|
||||
|
@ -901,6 +994,11 @@ void DoExplodeSector(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoSpawnSpot(DSWActor* actor)
|
||||
{
|
||||
|
@ -919,7 +1017,12 @@ int DoSpawnSpot(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// spawns shrap when killing an object
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSpawnSpotsForKill(short match)
|
||||
{
|
||||
if (match < 0)
|
||||
|
@ -941,7 +1044,12 @@ void DoSpawnSpotsForKill(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// spawns shrap when damaging an object
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSpawnSpotsForDamage(short match)
|
||||
{
|
||||
if (match < 0)
|
||||
|
@ -962,6 +1070,12 @@ void DoSpawnSpotsForDamage(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSoundSpotMatch(short match, short sound_num, short sound_type)
|
||||
{
|
||||
int flags;
|
||||
|
@ -1038,6 +1152,12 @@ void DoSoundSpotMatch(short match, short sound_num, short sound_type)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSoundSpotStopSound(short match)
|
||||
{
|
||||
|
||||
|
@ -1052,6 +1172,12 @@ void DoSoundSpotStopSound(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoStopSoundSpotMatch(short match)
|
||||
{
|
||||
SWStatIterator it(STAT_STOP_SOUND_SPOT);
|
||||
|
@ -1064,6 +1190,11 @@ void DoStopSoundSpotMatch(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool TestKillSectorObject(SECTOR_OBJECT* sop)
|
||||
{
|
||||
|
@ -1080,6 +1211,12 @@ bool TestKillSectorObject(SECTOR_OBJECT* sop)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short DoSectorObjectKillMatch(short match)
|
||||
{
|
||||
SECTOR_OBJECT* sop;
|
||||
|
@ -1096,6 +1233,11 @@ short DoSectorObjectKillMatch(short match)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool SearchExplodeSectorMatch(short match)
|
||||
{
|
||||
|
@ -1114,6 +1256,12 @@ bool SearchExplodeSectorMatch(short match)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void KillMatchingCrackSprites(short match)
|
||||
{
|
||||
SWStatIterator it(STAT_SPRITE_HIT_MATCH);
|
||||
|
@ -1129,6 +1277,12 @@ void KillMatchingCrackSprites(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void WeaponExplodeSectorInRange(DSWActor* wActor)
|
||||
{
|
||||
int dist;
|
||||
|
@ -1157,6 +1311,11 @@ void WeaponExplodeSectorInRange(DSWActor* wActor)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ShootableSwitch(DSWActor* actor)
|
||||
{
|
||||
|
@ -1176,6 +1335,12 @@ void ShootableSwitch(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoDeleteSpriteMatch(short match)
|
||||
{
|
||||
static short StatList[] =
|
||||
|
@ -1242,6 +1407,12 @@ void DoDeleteSpriteMatch(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoChangorMatch(short match)
|
||||
{
|
||||
SWStatIterator it(STAT_CHANGOR);
|
||||
|
@ -1291,6 +1462,12 @@ void DoChangorMatch(short match)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoMatchEverything(PLAYER* pp, short match, short state)
|
||||
{
|
||||
PLAYER* bak;
|
||||
|
@ -1341,6 +1518,12 @@ void DoMatchEverything(PLAYER* pp, short match, short state)
|
|||
DoDeleteSpriteMatch(match);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool ComboSwitchTest(short combo_type, short match)
|
||||
{
|
||||
int state;
|
||||
|
@ -1364,7 +1547,12 @@ bool ComboSwitchTest(short combo_type, short match)
|
|||
return true;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// NOTE: switches are always wall sprites
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int OperateSprite(DSWActor* actor, short player_is_operating)
|
||||
{
|
||||
PLAYER* pp = nullptr;
|
||||
|
@ -1680,6 +1868,12 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoTrapReset(short match)
|
||||
{
|
||||
SWStatIterator it(STAT_TRAP);
|
||||
|
@ -1703,6 +1897,12 @@ int DoTrapReset(short match)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoTrapMatch(short match)
|
||||
{
|
||||
// may need to be reset to fire immediately
|
||||
|
@ -1752,6 +1952,12 @@ int DoTrapMatch(short match)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void TriggerSecret(sectortype* sectp, PLAYER* pp)
|
||||
{
|
||||
if (pp == Player + myconnectindex)
|
||||
|
@ -1765,6 +1971,12 @@ void TriggerSecret(sectortype* sectp, PLAYER* pp)
|
|||
sectp->lotag = 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void OperateTripTrigger(PLAYER* pp)
|
||||
{
|
||||
if (Prediction)
|
||||
|
@ -1885,6 +2097,12 @@ void OperateTripTrigger(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void OperateContinuousTrigger(PLAYER* pp)
|
||||
{
|
||||
if (Prediction)
|
||||
|
@ -1904,6 +2122,11 @@ void OperateContinuousTrigger(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short PlayerTakeSectorDamage(PLAYER* pp)
|
||||
{
|
||||
|
@ -1921,8 +2144,13 @@ short PlayerTakeSectorDamage(PLAYER* pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Needed in order to see if Player should grunt if he can't find a wall to operate on
|
||||
// If player is too far away, don't grunt
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
enum { PLAYER_SOUNDEVENT_TAG = 900 };
|
||||
bool NearThings(PLAYER* pp)
|
||||
{
|
||||
|
@ -1936,7 +2164,7 @@ bool NearThings(PLAYER* pp)
|
|||
return false;
|
||||
}
|
||||
|
||||
neartag(pp->int_ppos(), pp->cursector, pp->angle.ang.Buildang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
neartag(pp->pos, pp->cursector, pp->angle.ang, near, 1024, NTAG_SEARCH_LO_HI);
|
||||
|
||||
|
||||
// hit a sprite? Check to see if it has sound info in it!
|
||||
|
@ -2008,6 +2236,12 @@ bool NearThings(PLAYER* pp)
|
|||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short nti_cnt;
|
||||
|
||||
void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int count)
|
||||
|
@ -2112,6 +2346,12 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYER* pp, double z, int dist, int type, int count)
|
||||
{
|
||||
memset(ntip, -1, size);
|
||||
|
@ -2119,6 +2359,11 @@ void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYER* pp, double z, int d
|
|||
NearTagList(ntip, pp, int(z * zworldtoint), dist, type, count);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int DoPlayerGrabStar(PLAYER* pp)
|
||||
{
|
||||
|
@ -2154,7 +2399,11 @@ int DoPlayerGrabStar(PLAYER* pp)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PlayerOperateEnv(PLAYER* pp)
|
||||
{
|
||||
|
@ -2331,7 +2580,11 @@ void PlayerOperateEnv(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSineWaveFloor(void)
|
||||
{
|
||||
|
@ -2396,6 +2649,11 @@ void DoSineWaveFloor(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSineWaveWall(void)
|
||||
{
|
||||
|
@ -2425,6 +2683,12 @@ void DoSineWaveWall(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoAnim(int numtics)
|
||||
{
|
||||
int i;
|
||||
|
@ -2484,6 +2748,12 @@ void DoAnim(int numtics)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void AnimClear(void)
|
||||
{
|
||||
AnimCnt = 0;
|
||||
|
@ -2506,6 +2776,12 @@ short AnimGetGoal(int animtype, int animindex, DSWActor* animactor)
|
|||
return j;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void AnimDelete(int animtype, int animindex, DSWActor* animactor)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -2530,6 +2806,11 @@ void AnimDelete(int animtype, int animindex, DSWActor* animactor)
|
|||
Anim[j] = Anim[AnimCnt];
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int AnimSet(int animtype, int animindex, DSWActor* animactor, double thegoal, int thevel)
|
||||
{
|
||||
|
@ -2564,6 +2845,12 @@ int AnimSet(int animtype, int animindex, DSWActor* animactor, double thegoal, in
|
|||
return j;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short AnimSetCallback(short anim_ndx, ANIM_CALLBACKp call, SECTOR_OBJECT* data)
|
||||
{
|
||||
ASSERT(anim_ndx < AnimCnt);
|
||||
|
@ -2577,6 +2864,12 @@ short AnimSetCallback(short anim_ndx, ANIM_CALLBACKp call, SECTOR_OBJECT* data)
|
|||
return anim_ndx;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
short AnimSetVelAdj(short anim_ndx, double vel_adj)
|
||||
{
|
||||
ASSERT(anim_ndx < AnimCnt);
|
||||
|
@ -2589,7 +2882,11 @@ short AnimSetVelAdj(short anim_ndx, double vel_adj)
|
|||
return anim_ndx;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoPanning(void)
|
||||
{
|
||||
|
@ -2635,6 +2932,11 @@ void DoPanning(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void DoSector(void)
|
||||
{
|
||||
|
@ -2723,6 +3025,12 @@ void DoSector(void)
|
|||
DoSpringBoardDown();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#include "saveable.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue