From fd5cf15e0e14a2f123fbd268e29f3eb8d5790721 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Sep 2022 22:52:03 +0200 Subject: [PATCH] - function separators --- source/games/sw/src/cache.cpp | 29 +++++++++++ source/games/sw/src/cheats.cpp | 45 ++++++++++++++++++ source/games/sw/src/colormap.cpp | 18 +++++++ source/games/sw/src/copysect.cpp | 12 +++++ source/games/sw/src/d_menu.cpp | 6 +++ source/games/sw/src/eel.cpp | 42 ++++++++++++++++ source/games/sw/src/game.cpp | 5 ++ source/games/sw/src/girlninj.cpp | 39 +++++++++++++++ source/games/sw/src/goro.cpp | 30 ++++++++++++ source/games/sw/src/hornet.cpp | 53 +++++++++++++++++++++ source/games/sw/src/input.cpp | 6 +++ source/games/sw/src/interpso.cpp | 82 ++++++++++++++++++++++++++++++++ source/games/sw/src/inv.cpp | 24 ++++++++++ source/games/sw/src/light.cpp | 30 ++++++++++++ source/games/sw/src/mclip.cpp | 35 ++++++++++++++ 15 files changed, 456 insertions(+) diff --git a/source/games/sw/src/cache.cpp b/source/games/sw/src/cache.cpp index 631217cbc..197878230 100644 --- a/source/games/sw/src/cache.cpp +++ b/source/games/sw/src/cache.cpp @@ -57,6 +57,12 @@ void PreCacheRange(int start_pic, int end_pic, int pal = 0) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void PreCacheOverride(void) { SWStatIterator it(STAT_CEILING_FLOOR_PIC_OVERRIDE); @@ -68,6 +74,12 @@ void PreCacheOverride(void) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void precacheMap(void) { int i; @@ -97,6 +109,12 @@ void precacheMap(void) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void SetupPreCache(void) { precacheMap(); @@ -308,6 +326,12 @@ void PreCachePachinko(int pal) PreCacheRange(4840,4863, pal); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void PreCacheActor(void) { int pic; @@ -437,6 +461,11 @@ void PreCacheActor(void) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- void DoTheCache(void) { diff --git a/source/games/sw/src/cheats.cpp b/source/games/sw/src/cheats.cpp index 359d4129f..74da6cf39 100644 --- a/source/games/sw/src/cheats.cpp +++ b/source/games/sw/src/cheats.cpp @@ -53,6 +53,12 @@ extern bool ToggleFlyMode; const char *CheatKeyType; void KeysCheat(PLAYER* pp, const char *cheat_string); +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static PLAYER* checkCheat(cheatseq_t* c) { if (::CheckCheatmode(true, true)) return nullptr; @@ -97,6 +103,11 @@ const char *GameInterface::GenericCheat(int player, int cheat) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- bool RestartCheat(cheatseq_t* c) { @@ -139,6 +150,11 @@ bool MapCheat(cheatseq_t* c) return true; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- bool WarpCheat(cheatseq_t* c) { @@ -163,6 +179,12 @@ bool WarpCheat(cheatseq_t* c) return true; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + bool EveryCheatToggle(cheatseq_t* c) { EveryCheat = !EveryCheat; @@ -192,6 +214,12 @@ static cheatseq_t swcheats[] = { {"lwroom", nullptr, RoomCheat, true}, // Room above room debug }; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static void WeaponCheat(int player) { auto p = &Player[player]; @@ -217,6 +245,12 @@ static void WeaponCheat(int player) PlayerUpdateWeapon(p, p->actor->user.WeaponNum); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static void ItemCheat(int player) { auto p = &Player[player]; @@ -243,6 +277,11 @@ static void ItemCheat(int player) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- static void cmd_Give(int player, uint8_t** stream, bool skip) { @@ -330,6 +369,12 @@ static void cmd_Give(int player, uint8_t** stream, bool skip) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void InitCheats() { SetCheats(swcheats, countof(swcheats)); diff --git a/source/games/sw/src/colormap.cpp b/source/games/sw/src/colormap.cpp index 4ac82f2ee..2ecd6ab87 100644 --- a/source/games/sw/src/colormap.cpp +++ b/source/games/sw/src/colormap.cpp @@ -34,6 +34,12 @@ BEGIN_SW_NS int f_c = 3; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void MapColors(int num, COLOR_MAP cm, int create, uint8_t *tempbuf) { int i; @@ -57,6 +63,12 @@ void MapColors(int num, COLOR_MAP cm, int create, uint8_t *tempbuf) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + #define PLAYER_COLOR_MAPS 15 static COLOR_MAP PlayerColorMap[PLAYER_COLOR_MAPS][1] = { @@ -109,6 +121,12 @@ static COLOR_MAP PlayerColorMap[PLAYER_COLOR_MAPS][1] = }; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void GameInterface::loadPalette(void) { static COLOR_MAP AllToRed[] = diff --git a/source/games/sw/src/copysect.cpp b/source/games/sw/src/copysect.cpp index aa50979cc..c56e9b7fc 100644 --- a/source/games/sw/src/copysect.cpp +++ b/source/games/sw/src/copysect.cpp @@ -40,6 +40,12 @@ BEGIN_SW_NS extern DAngle GlobSpeedSO; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect) { SECTOR_OBJECT* sop; @@ -104,6 +110,12 @@ void CopySectorWalls(sectortype* dest_sect, sectortype* src_sect) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void CopySectorMatch(int match) { sectortype* dsectp, *ssectp; diff --git a/source/games/sw/src/d_menu.cpp b/source/games/sw/src/d_menu.cpp index 36fe405c5..650cdd43a 100644 --- a/source/games/sw/src/d_menu.cpp +++ b/source/games/sw/src/d_menu.cpp @@ -89,6 +89,12 @@ bool GameInterface::CanSave() return (gamestate == GS_LEVEL && !CommEnabled && numplayers ==1 && /*!DemoMode &&*/ !(Player[myconnectindex].Flags & PF_DEAD)); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + bool GameInterface::StartGame(FNewGameStartup& gs) { PLAYER* pp = Player + screenpeek; diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index 24e8ed2ea..bd2e675d3 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -357,6 +357,12 @@ ACTOR_ACTION_SET EelActionSet = int DoEelMatchPlayerZ(DSWActor* actor); +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void EelCommon(DSWActor* actor) { actor->spr.clipdist = (100) >> 2; @@ -371,6 +377,12 @@ void EelCommon(DSWActor* actor) actor->user.Radius = 400; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int SetupEel(DSWActor* actor) { ANIMATOR DoActorDecide; @@ -400,6 +412,12 @@ int SetupEel(DSWActor* actor) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int NullEel(DSWActor* actor) { if (actor->user.Flags & (SPR_SLIDING)) @@ -412,6 +430,12 @@ int NullEel(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoEelMatchPlayerZ(DSWActor* actor) { int dist,a,b,c; @@ -507,6 +531,12 @@ int DoEelMatchPlayerZ(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoEelDeath(DSWActor* actor) { if (actor->user.Flags & (SPR_FALLING)) @@ -544,6 +574,12 @@ int DoEelDeath(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoEelMove(DSWActor* actor) { ASSERT(actor->user.Rot != nullptr); @@ -567,6 +603,12 @@ int DoEelMove(DSWActor* actor) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + #include "saveable.h" diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index e02349ac9..c6d1efb43 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -364,6 +364,11 @@ void spawnactors(SpawnSpriteDef& sprites) leveltimer = sprites.sprites.Size(); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- void InitLevel(MapRecord *maprec) { diff --git a/source/games/sw/src/girlninj.cpp b/source/games/sw/src/girlninj.cpp index 7af3d073b..ab559f430 100644 --- a/source/games/sw/src/girlninj.cpp +++ b/source/games/sw/src/girlninj.cpp @@ -710,6 +710,12 @@ ACTOR_ACTION_SET GirlNinjaActionSet = nullptr }; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int SetupGirlNinja(DSWActor* actor) { ANIMATOR DoActorDecide; @@ -738,6 +744,11 @@ int SetupGirlNinja(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- int DoGirlNinjaMove(DSWActor* actor) { @@ -774,6 +785,12 @@ int DoGirlNinjaMove(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int GirlNinjaJumpActionFunc(DSWActor* actor) { // if cannot move the sprite @@ -790,6 +807,12 @@ int GirlNinjaJumpActionFunc(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int NullGirlNinja(DSWActor* actor) { if (actor->user.WaitTics > 0) actor->user.WaitTics -= ACTORMOVETICS; @@ -805,6 +828,11 @@ int NullGirlNinja(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- int DoGirlNinjaPain(DSWActor* actor) { @@ -816,6 +844,12 @@ int DoGirlNinjaPain(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoGirlNinjaSpecial(DSWActor* actor) { if (actor->user.spal == PALETTE_PLAYER5) @@ -828,6 +862,11 @@ int DoGirlNinjaSpecial(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- #include "saveable.h" diff --git a/source/games/sw/src/goro.cpp b/source/games/sw/src/goro.cpp index 7f50b1b8c..eabecf1b2 100644 --- a/source/games/sw/src/goro.cpp +++ b/source/games/sw/src/goro.cpp @@ -481,6 +481,12 @@ ACTOR_ACTION_SET GoroActionSet = nullptr }; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int SetupGoro(DSWActor* actor) { ANIMATOR DoActorDecide; @@ -505,6 +511,12 @@ int SetupGoro(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int NullGoro(DSWActor* actor) { if (actor->user.Flags & (SPR_SLIDING)) @@ -516,6 +528,12 @@ int NullGoro(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoGoroPain(DSWActor* actor) { NullGoro(actor); @@ -525,6 +543,12 @@ int DoGoroPain(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoGoroMove(DSWActor* actor) { if (actor->user.Flags & (SPR_SLIDING)) @@ -541,6 +565,12 @@ int DoGoroMove(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + #include "saveable.h" diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index 5c582d996..c0d05aefb 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -287,6 +287,12 @@ ACTOR_ACTION_SET HornetActionSet = int DoHornetMatchPlayerZ(DSWActor* actor); +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int SetupHornet(DSWActor* actor) { ANIMATOR DoActorDecide; @@ -323,6 +329,12 @@ int SetupHornet(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int NullHornet(DSWActor* actor) { if (actor->user.Flags & (SPR_SLIDING)) @@ -334,6 +346,12 @@ int NullHornet(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static const int HORNET_BOB_AMT = 16; int DoHornetMatchPlayerZ(DSWActor* actor) @@ -403,6 +421,12 @@ int DoHornetMatchPlayerZ(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int InitHornetCircle(DSWActor* actor) { actor->user.ActorActionFunc = DoHornetCircle; @@ -432,6 +456,12 @@ int InitHornetCircle(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoHornetCircle(DSWActor* actor) { double bound; @@ -477,6 +507,12 @@ int DoHornetCircle(DSWActor* actor) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoHornetDeath(DSWActor* actor) { if (actor->user.Flags & (SPR_FALLING)) @@ -515,7 +551,12 @@ int DoHornetDeath(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// // Hornets can swarm around other hornets or whatever is tagged as swarm target +// +//--------------------------------------------------------------------------- + int DoCheckSwarm(DSWActor* actor) { int dist, pdist, a,b,c; @@ -556,6 +597,12 @@ int DoCheckSwarm(DSWActor* actor) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int DoHornetMove(DSWActor* actor) { // Check for swarming @@ -579,6 +626,12 @@ int DoHornetMove(DSWActor* actor) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + #include "saveable.h" diff --git a/source/games/sw/src/input.cpp b/source/games/sw/src/input.cpp index 96c77fa64..2461ec5d8 100644 --- a/source/games/sw/src/input.cpp +++ b/source/games/sw/src/input.cpp @@ -41,6 +41,12 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel); static InputPacket loc; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void InitNetVars(void) { loc = {}; diff --git a/source/games/sw/src/interpso.cpp b/source/games/sw/src/interpso.cpp index d7ae472b1..8d366802d 100644 --- a/source/games/sw/src/interpso.cpp +++ b/source/games/sw/src/interpso.cpp @@ -69,6 +69,12 @@ static struct so_interp bool hasvator; } so_interpdata[MAX_SECTOR_OBJECTS]; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void MarkSOInterp() { int32_t i; @@ -88,6 +94,12 @@ void MarkSOInterp() } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static double getvalue(so_interp::interp_data& element) { int index = element.curelement & soi_base; @@ -126,6 +138,12 @@ static double getvalue(so_interp::interp_data& element) return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static void setvalue(so_interp::interp_data& element, double value) { int index = element.curelement & soi_base; @@ -172,6 +190,12 @@ static void setvalue(so_interp::interp_data& element, double value) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static void so_setpointinterpolation(so_interp *interp, int element, DSWActor* actor = nullptr) { int32_t i; @@ -193,6 +217,12 @@ static void so_setpointinterpolation(so_interp *interp, int element, DSWActor* a data->lastoldipos = getvalue(*data); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + static void so_setspriteanginterpolation(so_interp *interp, DSWActor* actor) { int32_t i; @@ -213,7 +243,12 @@ static void so_setspriteanginterpolation(so_interp *interp, DSWActor* actor) data->actorofang = actor; } +//--------------------------------------------------------------------------- +// // Covers points and angles altogether +// +//--------------------------------------------------------------------------- + static void so_stopdatainterpolation(so_interp *interp, int element, DSWActor* actor) { for (int i = 0; i < interp->numinterpolations; i++) @@ -226,6 +261,12 @@ static void so_stopdatainterpolation(so_interp *interp, int element, DSWActor* a } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_addinterpolation(SECTOR_OBJECT* sop) { sectortype* *sectp; @@ -277,6 +318,12 @@ void so_addinterpolation(SECTOR_OBJECT* sop) interp->lasttic = synctics; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_setspriteinterpolation(SECTOR_OBJECT* sop, DSWActor* actor) { so_interp *interp = &so_interpdata[sop - SectorObject]; @@ -288,6 +335,12 @@ void so_setspriteinterpolation(SECTOR_OBJECT* sop, DSWActor* actor) so_setspriteanginterpolation(interp, actor); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_stopspriteinterpolation(SECTOR_OBJECT* sop, DSWActor *actor) { so_interp *interp = &so_interpdata[sop - SectorObject]; @@ -299,6 +352,12 @@ void so_stopspriteinterpolation(SECTOR_OBJECT* sop, DSWActor *actor) so_stopdatainterpolation(interp, soi_sprang, actor); } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_setinterpolationtics(SECTOR_OBJECT* sop, int16_t locktics) { so_interp *interp = &so_interpdata[sop - SectorObject]; @@ -307,6 +366,12 @@ void so_setinterpolationtics(SECTOR_OBJECT* sop, int16_t locktics) interp->lasttic = locktics; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_updateinterpolations(void) // Stick at beginning of domovethings { int32_t i; @@ -350,8 +415,13 @@ void so_updateinterpolations(void) // Stick at beginning of domovethings } } +//--------------------------------------------------------------------------- +// // must call restore for every do interpolations // make sure you don't exit +// +//--------------------------------------------------------------------------- + void so_dointerpolations(double interpfrac) // Stick at beginning of drawscreen { int32_t i; @@ -454,6 +524,12 @@ void so_dointerpolations(double interpfrac) // Stick at beg } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_restoreinterpolations(void) // Stick at end of drawscreen { int32_t i; @@ -481,6 +557,12 @@ void so_restoreinterpolations(void) // Stick at end of drawscree } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void so_serializeinterpolations(FSerializer& arc) { SECTOR_OBJECT* sop; diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 7eb1dd3af..5eca6e97c 100644 --- a/source/games/sw/src/inv.cpp +++ b/source/games/sw/src/inv.cpp @@ -82,6 +82,12 @@ INVENTORY_DATA InventoryData[MAX_INVENTORY+1] = {nullptr, nullptr, nullptr, 0, 0, 0, 0} }; +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void PanelInvTestSuicide(PANEL_SPRITE* psp) { if (psp->flags & (PANF_SUICIDE)) @@ -137,6 +143,12 @@ void AutoPickInventory(PLAYER* pp) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void UseInventoryMedkit(PLAYER* pp) { short diff; @@ -489,6 +501,12 @@ void InventoryKeys(PLAYER* pp) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void InventoryTimer(PLAYER* pp) { // called every time through loop @@ -567,6 +585,12 @@ void InventoryTimer(PLAYER* pp) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void InventoryUse(PLAYER* pp) { INVENTORY_DATA* id = &InventoryData[pp->InventoryNum]; diff --git a/source/games/sw/src/light.cpp b/source/games/sw/src/light.cpp index 2e162283f..32941181e 100644 --- a/source/games/sw/src/light.cpp +++ b/source/games/sw/src/light.cpp @@ -34,6 +34,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void SectorLightShade(DSWActor* actor, short intensity) { int8_t* wall_shade; @@ -88,6 +94,12 @@ void SectorLightShade(DSWActor* actor, short intensity) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void DiffuseLighting(DSWActor* actor) { int i; @@ -117,6 +129,12 @@ void DiffuseLighting(DSWActor* actor) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void DoLightingMatch(short match, short state) { SWStatIterator it(STAT_LIGHTING); @@ -235,6 +253,12 @@ void DoLightingMatch(short match, short state) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void InitLighting(void) { // processed on level startup @@ -249,6 +273,12 @@ void InitLighting(void) } } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void DoLighting(void) { SWStatIterator it(STAT_LIGHTING); diff --git a/source/games/sw/src/mclip.cpp b/source/games/sw/src/mclip.cpp index 8f51a1bc4..a1ac9ce84 100644 --- a/source/games/sw/src/mclip.cpp +++ b/source/games/sw/src/mclip.cpp @@ -37,6 +37,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + Collision MultiClipMove(PLAYER* pp, double zz, double floordist) { int i; @@ -112,6 +118,12 @@ Collision MultiClipMove(PLAYER* pp, double zz, double floordist) return min_ret; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int MultiClipTurn(PLAYER* pp, DAngle new_ang, double zz, double floordist) { int i; @@ -147,6 +159,12 @@ int MultiClipTurn(PLAYER* pp, DAngle new_ang, double zz, double floordist) return true; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int testquadinsect(int *point_num, DVector2 const * qp, sectortype* sect) { int i,next_i; @@ -176,7 +194,12 @@ int testquadinsect(int *point_num, DVector2 const * qp, sectortype* sect) } +//--------------------------------------------------------------------------- +// //Ken gives the tank clippin' a try... +// +//--------------------------------------------------------------------------- + int RectClipMove(PLAYER* pp, DVector2* qpos) { int i; @@ -232,6 +255,12 @@ int RectClipMove(PLAYER* pp, DVector2* qpos) return false; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + int testpointinquad(const DVector2& pt, const DVector2* quad) { for (int i = 0; i < 4; i++) @@ -242,6 +271,12 @@ int testpointinquad(const DVector2& pt, const DVector2* quad) return true; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + short RectClipTurn(PLAYER* pp, DAngle new_angl, DVector2* qpos, DVector2* opos) { int i;