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 SPRITE_H
|
|
|
|
|
|
|
|
#define SPRITE_H
|
|
|
|
|
2019-10-09 16:09:05 +00:00
|
|
|
BEGIN_SW_NS
|
|
|
|
|
2015-05-19 21:58:29 +00:00
|
|
|
void KillSprite(int16_t SpriteNum);
|
2021-10-30 20:53:24 +00:00
|
|
|
void KillActor(DSWActor* actor);
|
2015-05-19 21:58:29 +00:00
|
|
|
int16_t SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel);
|
2021-10-30 14:12:19 +00:00
|
|
|
DSWActor* SpawnActor(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel);
|
2015-05-19 21:58:29 +00:00
|
|
|
void SpriteSetup(void);
|
2021-10-30 21:03:26 +00:00
|
|
|
int move_actor(DSWActor* actor, int xchange, int ychange, int zchange);
|
2015-05-19 21:54:34 +00:00
|
|
|
short GetSpriteDir(short sn);
|
|
|
|
short GetDirToPlayer(short sn);
|
|
|
|
short PlayerInVision(short sn, short view_deg);
|
|
|
|
short PlayerVisible(short sn);
|
|
|
|
short SpriteLookSector(short SpriteNum, short range);
|
|
|
|
short SpriteCanGoForward(short SpriteNum, short range);
|
|
|
|
void SpriteFindNewDirection(short SpriteNum, short range);
|
|
|
|
int DoWalk(short SpriteNum);
|
|
|
|
int DoBody(short SpriteNum);
|
2020-09-09 18:32:24 +00:00
|
|
|
bool CanMoveHere(int16_t spritenum);
|
|
|
|
bool SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b);
|
2021-10-29 20:00:27 +00:00
|
|
|
int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath);
|
2015-05-19 21:58:29 +00:00
|
|
|
void SpriteControl(void);
|
2021-11-03 16:47:13 +00:00
|
|
|
void DoActorZrange(DSWActor*);
|
2015-05-19 21:54:34 +00:00
|
|
|
void PreMapCombineFloors(void);
|
|
|
|
void SpriteSetupPost(void);
|
|
|
|
int ActorCoughItem(short SpriteNum);
|
2021-11-03 18:52:51 +00:00
|
|
|
bool ActorSpawn(DSWActor*);
|
2015-05-19 21:54:34 +00:00
|
|
|
int SpawnItemsMatch(short match);
|
|
|
|
void PicAnimOff(short picnum);
|
|
|
|
int MissileWaterAdjust(short SpriteNum);
|
2020-09-09 18:32:24 +00:00
|
|
|
bool SpriteOverlapZ(int16_t spritenum_a,int16_t spritenum_b,int z_overlap);
|
2015-05-19 21:54:34 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
InvDecl_Armor, // ie. +50 armour
|
|
|
|
InvDecl_Kevlar, // ie. +100 armour
|
|
|
|
InvDecl_SmMedkit,
|
|
|
|
InvDecl_Booster, // ie. fortune cookie
|
|
|
|
InvDecl_Medkit,
|
|
|
|
InvDecl_ChemBomb, // ie. gas bomb
|
|
|
|
InvDecl_FlashBomb,
|
|
|
|
InvDecl_Caltrops,
|
|
|
|
InvDecl_NightVision,
|
|
|
|
InvDecl_RepairKit,
|
|
|
|
InvDecl_Cloak,
|
|
|
|
InvDecl_TOTAL
|
|
|
|
};
|
|
|
|
|
|
|
|
struct InventoryDecl_t
|
|
|
|
{
|
|
|
|
int amount;
|
|
|
|
};
|
|
|
|
extern struct InventoryDecl_t InventoryDecls[InvDecl_TOTAL];
|
|
|
|
|
2019-10-09 16:09:05 +00:00
|
|
|
END_SW_NS
|
|
|
|
|
2015-05-19 21:54:34 +00:00
|
|
|
#endif
|
|
|
|
|