2015-05-19 21:54:34 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1997, 2005 - 3D Realms Entertainment
|
|
|
|
|
|
|
|
This file is part of Shadow Warrior version 1.2
|
|
|
|
|
|
|
|
Shadow Warrior 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
Original Source: 1997 - Frank Maddin and Jim Norwood
|
|
|
|
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
#ifndef SECTOR_H
|
|
|
|
|
|
|
|
#define SECTOR_H
|
|
|
|
|
2019-10-09 16:09:05 +00:00
|
|
|
BEGIN_SW_NS
|
2015-05-19 21:54:34 +00:00
|
|
|
|
2015-05-19 21:58:29 +00:00
|
|
|
void SectorSetup(void);
|
2015-05-19 21:54:34 +00:00
|
|
|
DOOR_AUTO_CLOSEp SetDoorAutoClose(short SectorNum, short Type);
|
2015-05-19 21:58:29 +00:00
|
|
|
void DoDragging(void);
|
2015-05-19 21:54:34 +00:00
|
|
|
int MoveDoorVert(short door_sector, short dir, short door_speed);
|
|
|
|
int MoveDoorUp(short door_sector, short auto_close, short door_speed);
|
|
|
|
int MoveDoorDown(short door_sector, short dir, short door_speed);
|
|
|
|
int MoveDoorHoriz(short door_sector, short dir, short door_speed);
|
2015-05-19 21:58:29 +00:00
|
|
|
void DoDoorsClose(void);
|
2015-05-19 21:54:34 +00:00
|
|
|
short Switch(short SwitchSector);
|
2015-05-19 21:58:29 +00:00
|
|
|
void PlayerOperateEnv(PLAYERp pp);
|
2015-05-19 21:54:34 +00:00
|
|
|
int TeleportToSector(PLAYERp pp, int newsector);
|
2021-11-25 17:16:56 +00:00
|
|
|
int OperateSector(sectortype* sect,short player_is_operating);
|
2021-11-02 20:35:24 +00:00
|
|
|
int OperateSprite(DSWActor*, short player_is_operating);
|
2015-05-19 21:54:34 +00:00
|
|
|
void OperateTripTrigger(PLAYERp pp);
|
|
|
|
|
|
|
|
enum SO_SCALE_TYPE
|
|
|
|
{
|
|
|
|
SO_SCALE_NONE,
|
|
|
|
SO_SCALE_HOLD,
|
|
|
|
SO_SCALE_DEST,
|
|
|
|
SO_SCALE_RANDOM,
|
|
|
|
SO_SCALE_CYCLE,
|
|
|
|
SO_SCALE_RANDOM_POINT
|
|
|
|
};
|
|
|
|
|
2021-09-20 06:59:54 +00:00
|
|
|
#define SCALE_POINT_SPEED (4 + RandomRange(8))
|
2015-05-19 21:54:34 +00:00
|
|
|
|
2021-12-31 12:37:57 +00:00
|
|
|
struct NEAR_TAG_INFO
|
2015-05-19 21:54:34 +00:00
|
|
|
{
|
|
|
|
int dist;
|
2021-11-25 18:25:05 +00:00
|
|
|
sectortype* sectp;
|
|
|
|
walltype* wallp;
|
2021-11-06 11:40:32 +00:00
|
|
|
DSWActor* actor;
|
2021-12-31 12:37:57 +00:00
|
|
|
};
|
2015-05-19 21:54:34 +00:00
|
|
|
extern short nti_cnt;
|
|
|
|
|
2015-05-19 21:58:29 +00:00
|
|
|
void DoSpawnSpotsForKill(short match);
|
|
|
|
void DoSpawnSpotsForDamage(short match);
|
|
|
|
void DoMatchEverything(PLAYERp pp, short match, short state);
|
2020-09-09 18:32:24 +00:00
|
|
|
bool ComboSwitchTest(short combo_type,short match);
|
2015-05-19 21:54:34 +00:00
|
|
|
void DoSoundSpotStopSound(short match);
|
|
|
|
void DoSector(void);
|
2021-12-24 16:50:15 +00:00
|
|
|
int AnimateSwitch(DSWActor* actor, int tgt_value);
|
2021-11-02 20:35:24 +00:00
|
|
|
void ShootableSwitch(DSWActor*);
|
2020-09-09 18:32:24 +00:00
|
|
|
bool TestKillSectorObject(SECTOR_OBJECTp sop);
|
2021-11-02 19:58:26 +00:00
|
|
|
void WeaponExplodeSectorInRange(DSWActor*);
|
2015-05-19 21:54:34 +00:00
|
|
|
|
|
|
|
|
2019-10-09 16:09:05 +00:00
|
|
|
END_SW_NS
|
|
|
|
|
2015-05-19 21:54:34 +00:00
|
|
|
#endif
|