raze/source/games/sw/src/misc.h

93 lines
2.7 KiB
C
Raw Normal View History

#pragma once
#include "game.h"
// This consolidates the contents of several smaller includes
BEGIN_SW_NS
enum
{
CACHE_SOUND_PRECACHE = 0,
CACHE_SOUND_PLAY =1
};
void DoTheCache(void);
void InitCheats();
void MapColors(short num,COLOR_MAP cm,short create);
int32_t CONFIG_ReadSetup(void);
2021-11-24 22:27:20 +00:00
bool WarpSectorInfo(sectortype* sect, DSWActor** sp_warp);
2021-11-26 16:03:00 +00:00
DSWActor* Warp(int32_t* x, int32_t* y, int32_t* z, sectortype** sect);
DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, sectortype** sect);
2020-08-05 22:18:45 +00:00
void ProcessVisOn(void);
2021-12-31 14:59:11 +00:00
void VisViewChange(PLAYER* pp, int* vis);
2021-11-25 17:30:10 +00:00
void SpawnVis(DSWActor* Parent, sectortype* sect, int x, int y, int z, int amt);
2020-08-05 22:18:45 +00:00
enum TriggerType { TRIGGER_TYPE_REMOTE_SO };
2021-11-01 13:36:46 +00:00
int ActorFollowTrack(DSWActor*, short locktics);
2021-11-05 23:37:16 +00:00
void ActorLeaveTrack(DSWActor*);
2021-12-31 14:50:44 +00:00
void RefreshPoints(SECTOR_OBJECT* sop, int nx, int ny, bool dynamic);
2020-08-05 22:18:45 +00:00
void TrackSetup(void);
2021-12-31 14:50:44 +00:00
void PlaceSectorObject(SECTOR_OBJECT* sop, int newx, int newy);
2020-08-05 22:18:45 +00:00
void PlaceSectorObjectsOnTracks(void);
void PlaceActorsOnTracks(void);
2021-11-26 15:44:45 +00:00
void SetupSectorObject(sectortype* sect, short tag);
2020-08-05 22:18:45 +00:00
void PostSetupSectorObject(void);
2021-12-31 14:50:44 +00:00
void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATORp animator);
void CollapseSectorObject(SECTOR_OBJECT* sop, int nx, int ny);
void KillSectorObjectSprites(SECTOR_OBJECT* sop);
void MoveSectorObjects(SECTOR_OBJECT* sop, short locktics);
2020-08-05 22:18:45 +00:00
#define TEXT_INFO_TIME (3)
#define TEXT_INFO_Y (40)
#define TEXT_INFO_YOFF (10)
inline constexpr int TEXT_INFO_LINE(int line) { return (TEXT_INFO_Y + ((line)*TEXT_INFO_YOFF)); }
2020-08-05 22:18:45 +00:00
2021-12-31 14:59:11 +00:00
void PutStringInfo(PLAYER* pp, const char* string);
2020-08-05 22:18:45 +00:00
2021-12-31 14:59:11 +00:00
void DoSlidorMatch(PLAYER* pp, short match, bool);
2020-09-09 18:32:24 +00:00
bool TestSlidorMatchActive(short match);
void InterpSectorSprites(sectortype* sect, bool state);
2020-08-05 22:18:45 +00:00
using INTERP_FUNC = void(*)(walltype*, int);
2020-08-05 22:18:45 +00:00
2021-11-02 21:37:33 +00:00
void SetSlidorActive(DSWActor*);
2021-11-02 21:44:31 +00:00
void DoSlidorInterp(DSWActor*, INTERP_FUNC);
2020-08-05 22:18:45 +00:00
2021-10-29 21:03:47 +00:00
int DoBeginJump(DSWActor* actor);
2021-10-29 21:38:21 +00:00
int DoJump(DSWActor* actor);
2021-10-29 21:41:33 +00:00
int DoBeginFall(DSWActor* actor);
int DoFall(DSWActor* actor);
2021-10-29 20:34:54 +00:00
void KeepActorOnFloor(DSWActor* actor);
int DoActorSlide(DSWActor* actor);
int DoActorSectorDamage(DSWActor* actor);
2021-10-29 19:06:37 +00:00
int DoScaleSprite(DSWActor* actor);
2021-10-29 20:00:27 +00:00
int DoActorStopFall(DSWActor* actor);
2020-08-16 21:21:24 +00:00
2021-12-31 14:59:11 +00:00
void InitPlayerSprite(PLAYER* pp);
2020-08-16 21:21:24 +00:00
void InitAllPlayerSprites(void);
void PlayerPanelSetup(void);
2021-12-31 14:59:11 +00:00
void PlayerDeathReset(PLAYER* pp);
void SpawnPlayerUnderSprite(PLAYER* pp);
2020-08-16 21:21:24 +00:00
void DoQuakeMatch(short match);
void ProcessQuakeOn(void);
void ProcessQuakeSpot(void);
2021-12-31 14:59:11 +00:00
void QuakeViewChange(PLAYER* pp, int* z_diff, int* x_diff, int* y_diff, short* ang_diff);
void DoQuake(PLAYER* pp);
bool SetQuake(PLAYER* pp, short tics, short amt);
2021-11-05 17:57:31 +00:00
int SetExpQuake(DSWActor*);
2021-11-06 09:25:24 +00:00
int SetGunQuake(DSWActor*);
2021-12-31 14:59:11 +00:00
int SetPlayerQuake(PLAYER* mpp);
2021-11-05 17:57:31 +00:00
int SetNuclearQuake(DSWActor*);
int SetSumoQuake(DSWActor*);
int SetSumoFartQuake(DSWActor*);
2020-08-16 21:21:24 +00:00
END_SW_NS