2020-06-24 19:21:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
#include "screenjob.h"
|
2020-07-06 16:08:31 +00:00
|
|
|
#include "constants.h"
|
2020-08-26 15:12:48 +00:00
|
|
|
#include "packet.h"
|
2020-10-21 17:14:41 +00:00
|
|
|
#include "types.h"
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2020-07-07 20:41:31 +00:00
|
|
|
struct MapRecord;
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2020-10-21 17:14:41 +00:00
|
|
|
|
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
// dumping ground for all external function prototypes to keep them out of the important headers.
|
2020-07-07 07:39:33 +00:00
|
|
|
// This list is not sorted in any way.
|
|
|
|
|
|
|
|
void lava_cleararrays();
|
|
|
|
void addjaildoor(int p1, int p2, int iht, int jlt, int p3, int h);
|
|
|
|
void addminecart(int p1, int p2, int i, int iht, int p3, int childsectnum);
|
2020-10-22 16:55:45 +00:00
|
|
|
void addtorch(spritetype* i);
|
|
|
|
void addlightning(spritetype* i);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2020-06-24 19:21:02 +00:00
|
|
|
void movecyclers(void);
|
|
|
|
void movedummyplayers(void);
|
|
|
|
void resetlanepics(void);
|
|
|
|
void moveplayers();
|
|
|
|
void doanimations();
|
|
|
|
void movefx();
|
2020-08-31 17:22:21 +00:00
|
|
|
void moveclouds(double smoothratio);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 17:14:41 +00:00
|
|
|
void RANDOMSCRAP(DDukeActor* i);
|
2020-10-24 08:04:10 +00:00
|
|
|
void ms(DDukeActor* i);
|
2020-10-24 08:37:20 +00:00
|
|
|
void movecrane(DDukeActor* i, int crane);
|
2020-10-21 19:46:39 +00:00
|
|
|
void movefountain(DDukeActor* i, int fountain);
|
|
|
|
void moveflammable(DDukeActor* i, int tire, int box, int pool);
|
2020-10-21 19:57:18 +00:00
|
|
|
void detonate(DDukeActor* i, int explosion);
|
|
|
|
void movemasterswitch(DDukeActor* i, int spectype1, int spectype2);
|
2020-10-21 20:17:25 +00:00
|
|
|
void movetrash(DDukeActor* i);
|
|
|
|
void movewaterdrip(DDukeActor* i, int drip);
|
|
|
|
void movedoorshock(DDukeActor* i);
|
2020-10-21 20:22:12 +00:00
|
|
|
void movetouchplate(DDukeActor* i, int plate);
|
|
|
|
void movecanwithsomething(DDukeActor* i);
|
2020-10-21 20:29:35 +00:00
|
|
|
void bounce(DDukeActor* i);
|
|
|
|
void movetongue(DDukeActor* i, int tongue, int jaw);
|
|
|
|
void rpgexplode(DDukeActor* i, int j, const vec3_t& pos, int EXPLOSION2, int EXPLOSIONBOT2, int newextra, int playsound);
|
2020-10-21 20:22:12 +00:00
|
|
|
void moveooz(DDukeActor* i, int seenine, int seeninedead, int ooz, int explosion);
|
2020-10-24 07:35:43 +00:00
|
|
|
void lotsofstuff(DDukeActor* s, int n, int spawntype);
|
2020-10-21 20:34:45 +00:00
|
|
|
bool respawnmarker(DDukeActor* i, int yellow, int green);
|
|
|
|
bool rat(DDukeActor* i, bool makesound);
|
|
|
|
bool queball(DDukeActor* i, int pocket, int queball, int stripeball);
|
2020-10-21 20:59:56 +00:00
|
|
|
void forcesphere(DDukeActor* i, int forcesphere);
|
|
|
|
void recon(DDukeActor* i, int explosion, int firelaser, int attacksnd, int painsnd, int roamsnd, int shift, int (*getspawn)(DDukeActor* i));
|
2020-10-21 21:04:14 +00:00
|
|
|
void ooz(DDukeActor* i);
|
|
|
|
void reactor(DDukeActor* i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BURNT, int REACTORSPARK, int REACTOR2SPARK);
|
|
|
|
void camera(DDukeActor* i);
|
2020-10-21 21:11:06 +00:00
|
|
|
void forcesphereexplode(DDukeActor* i);
|
|
|
|
void watersplash2(DDukeActor* i);
|
|
|
|
void frameeffect1(DDukeActor* i);
|
|
|
|
bool money(DDukeActor* i, int BLOODPOOL);
|
2020-10-21 21:18:24 +00:00
|
|
|
bool jibs(DDukeActor* i, int JIBS6, bool timeout, bool callsetsprite, bool floorcheck, bool zcheck1, bool zcheck2);
|
|
|
|
bool bloodpool(DDukeActor* i, bool puke, int TIRE);
|
|
|
|
void shell(DDukeActor* i, bool morecheck);
|
|
|
|
void glasspieces(DDukeActor* i);
|
|
|
|
void scrap(DDukeActor* i, int SCRAP1, int SCRAP6);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 21:39:12 +00:00
|
|
|
void handle_se00(DDukeActor* i, int LASERLINE);
|
|
|
|
void handle_se01(DDukeActor* i);
|
2020-10-21 21:56:46 +00:00
|
|
|
void handle_se14(DDukeActor* i, bool checkstat, int RPG, int JIBS6);
|
2020-10-21 22:00:43 +00:00
|
|
|
void handle_se30(DDukeActor* i, int JIBS6);
|
2020-10-21 22:10:43 +00:00
|
|
|
void handle_se02(DDukeActor* i);
|
|
|
|
void handle_se03(DDukeActor* i);
|
|
|
|
void handle_se04(DDukeActor* i);
|
2020-10-21 22:14:54 +00:00
|
|
|
void handle_se05(DDukeActor* i, int FIRELASER);
|
|
|
|
void handle_se08(DDukeActor* i, bool checkhitag1);
|
|
|
|
void handle_se10(DDukeActor* i, const int *);
|
2020-10-21 22:20:47 +00:00
|
|
|
void handle_se11(DDukeActor* i);
|
|
|
|
void handle_se12(DDukeActor* i, int planeonly = 0);
|
|
|
|
void handle_se13(DDukeActor* i);
|
2020-10-21 22:25:11 +00:00
|
|
|
void handle_se15(DDukeActor* i);
|
|
|
|
void handle_se16(DDukeActor* i, int REACTOR, int REACTOR2);
|
|
|
|
void handle_se17(DDukeActor* i);
|
2020-10-21 22:30:22 +00:00
|
|
|
void handle_se18(DDukeActor* i, bool morecheck);
|
|
|
|
void handle_se19(DDukeActor* i, int BIGFORCE);
|
2020-10-21 22:35:30 +00:00
|
|
|
void handle_se20(DDukeActor* i);
|
|
|
|
void handle_se21(DDukeActor* i);
|
|
|
|
void handle_se22(DDukeActor* i);
|
2020-10-21 22:50:01 +00:00
|
|
|
void handle_se24(DDukeActor* actor, int16_t* list1, int16_t* list2, int TRIPBOMB, int LASERLINE, int CRANE, int shift);
|
2020-10-21 22:59:42 +00:00
|
|
|
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
|
2020-10-21 22:35:30 +00:00
|
|
|
void handle_se26(DDukeActor* i);
|
2020-10-21 22:40:57 +00:00
|
|
|
void handle_se27(DDukeActor* i);
|
2020-10-21 23:04:13 +00:00
|
|
|
void handle_se31(DDukeActor* a, bool choosedir);
|
2020-10-21 22:40:57 +00:00
|
|
|
void handle_se32(DDukeActor* i);
|
|
|
|
void handle_se35(DDukeActor* i, int SMALLSMOKE, int EXPLOSION2);
|
|
|
|
void handle_se128(DDukeActor* i);
|
|
|
|
void handle_se130(DDukeActor* i, int countmax, int EXPLOSION2);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-24 08:30:17 +00:00
|
|
|
void respawn_rrra(DDukeActor* oldact, DDukeActor* newact);
|
2020-10-22 17:08:10 +00:00
|
|
|
// This is only called from game specific code so it does not need an indirection.
|
|
|
|
void check_fta_sounds_d(DDukeActor* i);
|
|
|
|
void check_fta_sounds_r(DDukeActor* i);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 23:12:16 +00:00
|
|
|
int dodge(DDukeActor*);
|
2020-10-22 14:40:48 +00:00
|
|
|
void alterang(int ang, DDukeActor* actor, int g_p);
|
2020-11-01 16:57:40 +00:00
|
|
|
void fall_common(DDukeActor* actor, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOTSPARK1, int squished, int thud, int(*fallspecial)(DDukeActor*, int));
|
2020-06-24 19:21:02 +00:00
|
|
|
void checkavailweapon(struct player_struct* p);
|
2020-10-21 17:14:41 +00:00
|
|
|
void deletesprite(DDukeActor* num);
|
2020-07-06 14:24:22 +00:00
|
|
|
void addammo(int weapon, struct player_struct* p, int amount);
|
2020-06-24 19:21:02 +00:00
|
|
|
|
2020-10-21 17:38:53 +00:00
|
|
|
int ssp(DDukeActor* i, unsigned int cliptype); //The set sprite function
|
2020-10-24 07:40:10 +00:00
|
|
|
void insertspriteq(DDukeActor *i);
|
2020-10-22 17:27:59 +00:00
|
|
|
int wakeup(DDukeActor* sn, int pn);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
int timedexit(int snum);
|
|
|
|
void dokneeattack(int snum, int pi, const std::initializer_list<int>& respawnlist);
|
|
|
|
int endoflevel(int snum);
|
|
|
|
void playerisdead(int snum, int psectlotag, int fz, int cz);
|
|
|
|
void footprints(int snum);
|
|
|
|
int makepainsounds(int snum, int type);
|
|
|
|
void playerCrouch(int snum);
|
|
|
|
void playerJump(int snum, int fz, int cz);
|
2020-10-08 03:47:30 +00:00
|
|
|
void processavel(player_struct* p, float* avel);
|
2020-08-29 11:32:14 +00:00
|
|
|
void checklook(int snum, ESyncBits actions);
|
2020-07-06 20:23:18 +00:00
|
|
|
void playerCenterView(int snum);
|
2020-08-29 11:32:14 +00:00
|
|
|
void playerLookUp(int snum, ESyncBits actions);
|
|
|
|
void playerLookDown(int snum, ESyncBits actions);
|
|
|
|
void playerAimUp(int snum, ESyncBits actions);
|
|
|
|
void playerAimDown(int snum, ESyncBits actions);
|
2020-09-23 13:12:59 +00:00
|
|
|
bool view(struct player_struct* pp, int* vx, int* vy, int* vz, short* vsectnum, int ang, fixed_t q16horiz, double smoothratio);
|
2020-07-06 20:23:18 +00:00
|
|
|
void tracers(int x1, int y1, int z1, int x2, int y2, int z2, int n);
|
|
|
|
int hits(int i);
|
|
|
|
int hitasprite(int i, short* hitsp);
|
|
|
|
int aim(spritetype* s, int aang);
|
|
|
|
void checkweapons(struct player_struct* const p);
|
|
|
|
int findotherplayer(int p, int* d);
|
|
|
|
void quickkill(struct player_struct* p);
|
|
|
|
void setpal(struct player_struct* p);
|
|
|
|
int madenoise(int playerNum);
|
|
|
|
int haskey(int sect, int snum);
|
2020-10-20 23:03:38 +00:00
|
|
|
void shootbloodsplat(int i, int p, int sx, int sy, int sz, int sa, int atwith, int BIGFORCE, int OOZFILTER, int NEWBEAST);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
|
|
|
void breakwall(short newpn, short spr, short dawallnum);
|
2020-10-23 15:38:49 +00:00
|
|
|
int callsound(int sectnum,DDukeActor* snum);
|
2020-07-06 21:33:33 +00:00
|
|
|
int hitasprite(int snum,short *hitSprite);
|
2020-10-23 15:44:45 +00:00
|
|
|
int findplayer(const DDukeActor* s, int* dist);
|
2020-07-06 20:23:18 +00:00
|
|
|
void operatejaildoors(int hitag);
|
|
|
|
void allignwarpelevators(void);
|
|
|
|
bool isablockdoor(int tileNum);
|
2020-10-23 15:46:46 +00:00
|
|
|
bool activatewarpelevators(DDukeActor* s, int w);
|
2020-07-06 20:23:18 +00:00
|
|
|
int check_activator_motion(int lotag);
|
|
|
|
void operateactivators(int l, int w);
|
2020-10-23 18:02:57 +00:00
|
|
|
void operateforcefields_common(DDukeActor* s, int low, const std::initializer_list<int>& tiles);
|
2020-07-06 20:23:18 +00:00
|
|
|
void operatemasterswitches(int lotag);
|
2020-10-23 17:35:59 +00:00
|
|
|
void operatesectors(int s, DDukeActor* i);
|
2020-07-06 20:23:18 +00:00
|
|
|
void hud_input(int playerNum);
|
2020-07-20 18:40:29 +00:00
|
|
|
int getanimationgoal(int animtype, int animindex);
|
2020-07-06 20:23:18 +00:00
|
|
|
bool isanearoperator(int lotag);
|
|
|
|
bool isanunderoperator(int lotag);
|
2020-07-20 18:40:29 +00:00
|
|
|
int setanimation(short animsect, int animtype, int animindex, int thegoal, int thevel);
|
2020-07-06 21:33:33 +00:00
|
|
|
void dofurniture(int wallNum, int sectnum, int playerNum);
|
2020-07-06 20:23:18 +00:00
|
|
|
void dotorch();
|
2020-07-06 21:33:33 +00:00
|
|
|
int hitawall(struct player_struct* pl, int* hitWall);
|
|
|
|
int hits(int snum);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
|
|
|
void clearsectinterpolate(int sprnum);
|
|
|
|
void setsectinterpolate(int sprnum);
|
2020-11-01 06:56:49 +00:00
|
|
|
DDukeActor* LocateTheLocator(int n, int sectnum);
|
2020-07-06 20:23:18 +00:00
|
|
|
void clearcamera(player_struct* ps);
|
|
|
|
|
2020-07-19 09:57:00 +00:00
|
|
|
void showtwoscreens(const CompletionFunc& func);
|
|
|
|
void doorders(const CompletionFunc& func);
|
2020-07-06 20:23:18 +00:00
|
|
|
|
2020-10-23 18:27:05 +00:00
|
|
|
void LoadActor(DDukeActor* i, int p, int x);
|
2020-10-23 18:28:29 +00:00
|
|
|
void execute(DDukeActor* s, int p, int d);
|
2020-10-21 23:11:38 +00:00
|
|
|
void makeitfall(DDukeActor* s);
|
2020-10-21 23:12:16 +00:00
|
|
|
int furthestangle(DDukeActor* snum, int angDiv);
|
2020-10-21 23:10:56 +00:00
|
|
|
void getglobalz(DDukeActor* s);
|
2020-11-01 16:57:40 +00:00
|
|
|
void OnEvent(int id, int pnum = -1, DDukeActor* snum = nullptr, int dist = -1);
|
2020-07-06 15:30:23 +00:00
|
|
|
|
2020-07-06 16:08:31 +00:00
|
|
|
short EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, signed char s_s, signed char s_xr, signed char s_yr, short s_a, short s_ve, int s_zv, short s_ow, signed char s_ss);
|
2020-07-06 21:33:33 +00:00
|
|
|
void ceilingglass(int snum, int sectnum, int cnt);
|
|
|
|
void spriteglass(int snum, int cnt);
|
|
|
|
void lotsofcolourglass(int snum, int wallNum, int cnt);
|
|
|
|
void lotsofglass(int snum, int wallnum, int cnt);
|
2020-07-06 16:08:31 +00:00
|
|
|
|
2020-10-22 16:51:20 +00:00
|
|
|
void addspritetodelete(int spnum=0);
|
2020-07-06 16:08:31 +00:00
|
|
|
void checkavailinven(struct player_struct* p);
|
|
|
|
int initspriteforspawn(int j, int pn, const std::initializer_list<int> &excludes);
|
|
|
|
void spawninitdefault(int j, int i);
|
|
|
|
void spawntransporter(int j, int i, bool beam);
|
|
|
|
int spawnbloodpoolpart1(int j, int i);
|
|
|
|
void initfootprint(int j, int i);
|
|
|
|
void initshell(int j, int i, bool isshell);
|
|
|
|
void initcrane(int j, int i, int CRANEPOLE);
|
|
|
|
void initwaterdrip(int j, int i);
|
|
|
|
int initreactor(int j, int i, bool isrecon);
|
|
|
|
void spawneffector(int i);
|
|
|
|
void gameexitfrommenu();
|
2020-07-15 16:10:31 +00:00
|
|
|
int startrts(int lumpNum, int localPlayer);
|
2020-07-06 16:08:31 +00:00
|
|
|
|
2020-07-06 19:10:20 +00:00
|
|
|
void pickrandomspot(int pn);
|
|
|
|
void resetinventory(int pn);
|
|
|
|
void resetplayerstats(int pn);
|
|
|
|
void resetweapons(int pn);
|
|
|
|
void resetprestat(int snum, int g);
|
|
|
|
void prelevel_common(int g);
|
2020-07-07 11:19:09 +00:00
|
|
|
void cacheit_d();
|
|
|
|
void cacheit_r();
|
2020-07-06 19:10:20 +00:00
|
|
|
|
2020-07-06 21:33:33 +00:00
|
|
|
void FTA(int q, struct player_struct* p);
|
|
|
|
void OnMotorcycle(player_struct *pl, int snum);
|
|
|
|
void OffMotorcycle(player_struct *pl);
|
2020-10-23 19:53:39 +00:00
|
|
|
void OnBoat(player_struct *pl, DDukeActor* snum);
|
2020-07-06 21:33:33 +00:00
|
|
|
void OffBoat(player_struct *pl);
|
|
|
|
|
2020-07-07 02:54:12 +00:00
|
|
|
void cameratext(int i);
|
2020-07-19 09:57:00 +00:00
|
|
|
void dobonus(int bonusonly, const CompletionFunc& completion);
|
2020-09-03 21:10:28 +00:00
|
|
|
void dobonus_d(int bonusonly, const CompletionFunc& completion);
|
|
|
|
void dobonus_r(int bonusonly, const CompletionFunc& completion);
|
2020-07-07 02:54:12 +00:00
|
|
|
|
2020-08-29 19:20:10 +00:00
|
|
|
void drawoverlays(double smoothratio);
|
2020-07-07 02:54:12 +00:00
|
|
|
void drawbackground(void);
|
2020-08-25 10:04:29 +00:00
|
|
|
void displayrooms(int32_t playerNum, double smoothratio);
|
2020-07-07 02:54:12 +00:00
|
|
|
void setgamepalette(int palid);
|
2020-07-07 11:19:09 +00:00
|
|
|
void resetmys();
|
2020-07-07 15:56:20 +00:00
|
|
|
void resettimevars();
|
|
|
|
bool setnextmap(bool checksecretexit);
|
|
|
|
void prelevel_d(int g);
|
|
|
|
void prelevel_r(int g);
|
2020-07-19 09:57:00 +00:00
|
|
|
void e4intro(const CompletionFunc& completion);
|
2020-09-03 21:10:28 +00:00
|
|
|
void exitlevel(MapRecord *next);
|
2020-09-09 20:42:01 +00:00
|
|
|
void enterlevel(MapRecord* mi, int gm);
|
2020-07-18 22:26:36 +00:00
|
|
|
void donewgame(MapRecord* map, int sk);
|
2020-07-15 16:10:31 +00:00
|
|
|
void startnewgame(MapRecord* map, int skill);
|
|
|
|
void setlocalplayerinput(player_struct *pp);
|
2020-08-23 18:44:17 +00:00
|
|
|
int playercolor2lookup(int color);
|
2020-07-15 16:10:31 +00:00
|
|
|
void PlayerColorChanged(void);
|
2020-07-16 15:59:25 +00:00
|
|
|
void apply_seasick(player_struct* p, double scalefactor);
|
2020-07-17 22:34:20 +00:00
|
|
|
void calcviewpitch(player_struct* p, double factor);
|
2020-07-17 23:34:13 +00:00
|
|
|
bool movementBlocked(int snum);
|
2020-07-19 17:13:27 +00:00
|
|
|
void loadcons();
|
2020-09-11 20:54:52 +00:00
|
|
|
void recordoldspritepos();
|
2020-07-07 02:54:12 +00:00
|
|
|
|
2020-07-19 20:34:59 +00:00
|
|
|
void updateinterpolations();
|
|
|
|
void restoreinterpolations();
|
|
|
|
void setinterpolation(int* posptr);
|
|
|
|
void stopinterpolation(int* posptr);
|
|
|
|
void dointerpolations(int smoothratio);
|
2020-07-20 21:07:44 +00:00
|
|
|
int* animateptr(int i);
|
2020-07-19 20:34:59 +00:00
|
|
|
|
2020-07-29 22:49:01 +00:00
|
|
|
void backuppos(player_struct* p, bool noclipping = false);
|
2020-08-03 03:28:16 +00:00
|
|
|
void backupweapon(player_struct* p);
|
2020-08-05 07:53:22 +00:00
|
|
|
void checkhardlanding(player_struct* p);
|
2020-08-05 10:04:14 +00:00
|
|
|
void playerweaponsway(player_struct* p, spritetype* s);
|
2020-07-29 22:24:27 +00:00
|
|
|
|
2020-07-06 20:23:18 +00:00
|
|
|
END_DUKE_NS
|