Commit graph

712 commits

Author SHA1 Message Date
Rachael Alexanderson
735740e453 - add level names to title bar (and by proxy, to RPC) 2022-03-18 05:06:58 -04:00
Christoph Oelckers
a1339f014c - store indices in sectionsPerSector. 2022-02-20 23:11:04 +01:00
Mitchell Richters
009c03f430 - Exhumed: Properly fix interpolation issues when at the end of the level instead of trying to back up everything.
Revert "- Exhumed: Don't force the framerate to reduce to ticrate at end of each level, instead interpolate player's position to prevent draw errors."

This reverts commit 57d54a2105.

Revert "- Exhumed: Extend 57d54a2105 to back up the player's `bobangle` variable as well at the map's end."

This reverts commit 520c03b4f1.

Revert "- Exhumed: Extend 520c03b4f1 to back up the player's `totalvel` variable as well at the map's end."

This reverts commit 1446486871.
2022-02-20 20:35:35 +11:00
Christoph Oelckers
892c361449 - avoid pointer arithmetic in feebtag. 2022-02-19 10:11:12 +01:00
Christoph Oelckers
71943abed0 - changed math utilities to floating point coordinate system. 2022-02-15 22:18:26 +01:00
Christoph Oelckers
f44736a5b6 -use an access function for reading wall positions so that we have a non-modifiable value wherever this is possible. 2022-02-15 22:18:23 +01:00
Christoph Oelckers
89ef81da55 - renamed walltype::pos as preparation for refactoring.
no functional changes here
2022-02-15 22:18:22 +01:00
Christoph Oelckers
12b25df582 - Exhumed: handle unterminated strings in LoadSound without reading beyond their end. 2022-01-29 13:29:59 +01:00
Christoph Oelckers
ca9936a601 - Exhumed: fix issues with uninitialized buffer data in seq_ReadSequence. 2022-01-29 12:25:48 +01:00
Christoph Oelckers
0e89bffabd - Exhumed: fixed surace collisions of projectiles.
There was some commented out undefined behavior here, we need to properly define this case.
2022-01-25 00:57:59 +01:00
Christoph Oelckers
30adac6e7f - Exhumed: removed erroneous target assignment in Anubis AI. 2022-01-25 00:25:52 +01:00
Christoph Oelckers
f194fb6c90 - added a name to tilenum function so that we can define picnums by name in scripted actors. 2022-01-24 00:24:47 +01:00
Christoph Oelckers
a23124a201 - Exhumed: fixed check for bad ending cutscene. 2022-01-22 23:11:34 +01:00
Mitchell Richters
1446486871 - Exhumed: Extend 520c03b4f1 to back up the player's totalvel variable as well at the map's end. 2022-01-19 23:00:04 +11:00
Christoph Oelckers
3aff12cf4c - sky management rework. 2022-01-16 12:12:43 +01:00
Mitchell Richters
520c03b4f1 - Exhumed: Extend 57d54a2105 to back up the player's bobangle variable as well at the map's end. 2022-01-16 08:32:22 +11:00
Christoph Oelckers
40cee808a1 - Exhumed: use proper distance calculations when spawning weapon flashes.
The cheap distance approximation here tended to fail on longer walls.
2022-01-15 18:33:37 +01:00
Christoph Oelckers
b1d3e8ee54 - Exhumed: Avoid playing the same pickup sound while another copy of it is already active.
The pickup code here is not robust enough to play the sound only once per pickup.
2022-01-15 16:11:42 +01:00
Christoph Oelckers
e892de21ec - preparations for unlimited tsprites.
Right now it is a no-op because Polymost cannot deal with this properly.
2022-01-11 00:12:32 +01:00
Christoph Oelckers
70087ebc12 - fixed: The new renderer still called the Polymost screen finish function.
This led to a second, redundant postprocessing step with incorrect matrix values.
It now calls screen->Update() directly without the unneeded stuff, but this required a bit of reordering in the game code to ensure that the renderer receives the weapon data to display.
2022-01-08 13:50:47 +01:00
Christoph Oelckers
a3162f6ccf - renamed testnewrenderer CVAR. 2022-01-07 12:49:41 +01:00
Christoph Oelckers
2f66377511 - Exhumed: use the loop flag when starting music. 2022-01-04 12:42:45 +01:00
Christoph Oelckers
9c07f05f0f - Exhumed: clear all pointers in the player struct when starting a level. 2022-01-04 12:42:45 +01:00
Christoph Oelckers
78f02fbd55 - avoid larger time jumps in Ramses text scroll. 2022-01-04 12:42:45 +01:00
Christoph Oelckers
8267f327e3 - Exhumed: hide all screen overlays when Ramses is talking. 2022-01-04 12:42:45 +01:00
Christoph Oelckers
894f9a6b0a - Exhumed: fix Ramses text overlay display. 2022-01-04 12:42:44 +01:00
Mitchell Richters
57d54a2105 - Exhumed: Don't force the framerate to reduce to ticrate at end of each level, instead interpolate player's position to prevent draw errors. 2022-01-04 21:43:08 +11:00
Christoph Oelckers
a9b162b8e9 - moved the tsprite flags from cstat2 to clipdist which was already holding other ones.
cstat2 should only hold flags for game-side sprites.
2021-12-30 19:00:35 +01:00
Christoph Oelckers
552668418a - moved opos and oang to DCoreActor. 2021-12-30 18:21:02 +01:00
Christoph Oelckers
7f62df517d - moved all interpolate* methods from spritetypebase to DCoreActor.
The places where it was used on tsprites were redone to use the actor's base coordinate, which at the point of the operation would always be the same.
2021-12-30 17:32:31 +01:00
Christoph Oelckers
c10fb1278a - moved the backup... methods to DCoreActor. 2021-12-30 17:10:08 +01:00
Christoph Oelckers
6c381d4392 - removed sector() method from low level sprite type. 2021-12-30 16:58:48 +01:00
Christoph Oelckers
5498699faf - use DCoreActor::sector() wherever possible. 2021-12-30 16:51:56 +01:00
Christoph Oelckers
f0b7fe4add - use setsector from DCoreActor.
Also did a bit of cleanup
2021-12-30 16:36:04 +01:00
Mitchell Richters
8f468607ff - Exhumed: Replace Player velocity and damage variables with vectors. 2021-12-31 00:19:33 +11:00
Christoph Oelckers
9158796284 - partial replacement of tspriteptr_t. 2021-12-30 11:48:10 +01:00
Mitchell Richters
9bbb54fe2e - Replace every line that just contains spaces or tabs with an empty line feed in all files except 3rd party libraries. 2021-12-30 20:30:21 +11:00
Christoph Oelckers
3fcecedf32 - deleted ClearContent functions from actor classes.
this is a leftover from pre-DObject times and no longer needed.
2021-12-30 09:58:47 +01:00
Christoph Oelckers
bf9defc062 - SW: moved some Polymost hack stuff to its proper place. 2021-12-30 09:58:46 +01:00
Christoph Oelckers
fb53f32603 - handle the remaining write accesses to ceilingz and floorz.
Everything is routed through the wrapper functions now.
2021-12-30 09:58:14 +01:00
Christoph Oelckers
913f6e713d - Hack for Exhumed: palette 4 does not fade to black so sprites should not have shades above numshades.
The new renderer will treat such shades as completely black to ensure proper rendering of shadows - but for this palette this must be skipped.
2021-12-30 09:58:09 +01:00
Christoph Oelckers
de3e66016c - removed the Actor() access method from Exhumed's player as well. 2021-12-30 09:58:06 +01:00
Mitchell Richters
95d270fbdd - Exhumed: Clean up local functions variables to prevent redefinition conflicts. 2021-12-30 09:57:31 +01:00
Christoph Oelckers
fd78cb57c1 - fixed some bad flag replacements.
0x7fff is not ~CSTAT_SPRITE_BLOCK but ~CSTAT_SPRITE_INVISIBLE.
2021-12-30 09:57:29 +01:00
Christoph Oelckers
92f2182e6e - SW: all s() in actor.cpp 2021-12-30 09:57:28 +01:00
Christoph Oelckers
2718b3a5e3 - remaining s() in Exhumed 2021-12-30 09:57:28 +01:00
Christoph Oelckers
d4c01ce957 - remaining s() in queen.cpp. 2021-12-30 09:57:28 +01:00
Christoph Oelckers
4610fc6e99 - remaining s() in player.cpp. 2021-12-30 09:57:27 +01:00
Christoph Oelckers
d40da386a4 - remaining s() in object.cpp. 2021-12-30 09:57:27 +01:00
Christoph Oelckers
301350ef8c - remaining s() in move.cpp 2021-12-30 09:57:27 +01:00
Christoph Oelckers
7eaf669295 - remaining s() in bullet.cpp, grenade.cpp and gun.cpp. 2021-12-30 09:57:27 +01:00
Christoph Oelckers
cd6bb5305e - second batch of Exhumed's s(). 2021-12-30 09:57:27 +01:00
Christoph Oelckers
6f0e7e3784 - Exhumed: batch of several s(). 2021-12-30 09:57:27 +01:00
Christoph Oelckers
56bd9e7e27 - Exhumed: pActor->s() in spider.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
05d2b90418 - Exhumed: pActor->s() in anubis.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
046ff607dc - Exhumed: pActor->s() in wasp.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
eda75a38d2 - Exhumed: pActor->s() in snake.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
0fb92e3928 - Exhumed: pActor->s() in set.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
b34a4af15e - Exhumed: pActor->s() in scorp.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
013cf05042 - Exhumed: pActor->s() in runlist.cpp 2021-12-30 09:57:26 +01:00
Christoph Oelckers
318678b5a1 - Exhumed: pActor->s() in roach.cpp 2021-12-30 09:57:25 +01:00
Christoph Oelckers
a6c592b12c - Exhumed: pActor->s() in rex.cpp 2021-12-30 09:57:25 +01:00
Christoph Oelckers
b02feec2e8 - Exhumed: pActor->s() in rat.cpp 2021-12-30 09:57:25 +01:00
Christoph Oelckers
430a0263d5 - Exhumed: pActor->s() in ra.cpp 2021-12-30 09:57:25 +01:00
Christoph Oelckers
d162c36113 - Exhumed: pActor->s() in queen.cpp 2021-12-30 09:57:25 +01:00
Christoph Oelckers
b641da3959 - Exhumed: pActor->s() in player.cpp and view.cpp. 2021-12-30 09:57:25 +01:00
Christoph Oelckers
b6d04ffec0 - Exhumed: pActor->s() in object.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
dca478d284 - Exhumed: pActor->s() in mummy.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
23f274120c - Exhumed: pActor->s() in move.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
ca88e241e1 - Exhumed: pActor->s() in lion.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
5700b8ade6 - Exhumed: pActor->s() in lavadude.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
33918ac554 - Exhumed: pActor->s() in items.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
1d01a6cff7 - Exhumed: pActor->s() in init.cpp + lighting.cpp 2021-12-30 09:57:24 +01:00
Christoph Oelckers
613dd67578 - Exhumed: pActor->s() in grenade.cpp 2021-12-30 09:57:23 +01:00
Christoph Oelckers
79e6412ad5 - Exhumed: pActor->s() in fish.cpp 2021-12-30 09:57:23 +01:00
Christoph Oelckers
a7cebcafbb - Exhumed: pActor->s() in bullet.cpp 2021-12-30 09:57:23 +01:00
Christoph Oelckers
03759ef73b - Exhumed: pActor->s() in bubbles.cpp 2021-12-30 09:57:23 +01:00
Christoph Oelckers
89a1fcdfac - Exhumed: pActor->s() in anims.cpp 2021-12-30 09:57:23 +01:00
Christoph Oelckers
1bb7f3764d - handle all s() cases in Exhumed using pSprite but not pActor->s(). 2021-12-30 09:57:23 +01:00
Christoph Oelckers
6766a5922a - pass actors to calcChaseCamPos. 2021-12-30 09:57:18 +01:00
Christoph Oelckers
f67e39450e - deal with a handful of s() uses that do not match the more common patterns. 2021-12-30 09:57:13 +01:00
Christoph Oelckers
a2fc415b30 - fixed Exhumed panning setup.
Converted it to floating point and removed the nonsensical & with the texture size that was clearing significant bits.
2021-12-30 09:57:09 +01:00
Mitchell Richters
dd0ff465b0 - Replace spritetypebase oz with opos.Z calls and eliminate spritetypebase opos union. 2021-12-30 09:57:07 +01:00
Mitchell Richters
a79b4b5ffc - Replace spritetypebase oy with opos.Y calls. 2021-12-30 09:57:06 +01:00
Mitchell Richters
e0fb92bb01 - Replace spritetypebase ox with opos.X calls. 2021-12-30 09:57:06 +01:00
Mitchell Richters
baf78848eb - Replace spritetypebase z with pos.Z calls and eliminate spritetypebase pos union. 2021-12-30 09:57:06 +01:00
Mitchell Richters
cecb8dc48e - Replace spritetypebase y with pos.Y calls. 2021-12-30 09:57:05 +01:00
Mitchell Richters
33ca55023f - Replace spritetypebase x with pos.X calls. 2021-12-30 09:57:05 +01:00
Mitchell Richters
09e00a69fe - Replace walltype y with pos.Y calls and eliminate walltype pos union. 2021-12-30 09:57:04 +01:00
Mitchell Richters
51b647da87 - Replace walltype x with pos.X calls. 2021-12-30 09:57:04 +01:00
Mitchell Richters
b2ab64bb62 - Capitalise vec3_t z variable. 2021-12-30 09:57:03 +01:00
Mitchell Richters
68e2691be7 - Capitalise vec3_t y variable. 2021-12-30 09:57:03 +01:00
Mitchell Richters
c549cc5276 - Capitalise vec3_t x variable. 2021-12-30 09:57:02 +01:00
Mitchell Richters
118ceb18ca - Capitalise vec2_t y variable. 2021-12-30 09:57:02 +01:00
Mitchell Richters
3c9cd926ba - Capitalise vec2_t x variable. 2021-12-30 09:57:02 +01:00
Christoph Oelckers
e0e6efe0a0 - Exhumed: fixed some sound source issues. 2021-12-30 09:57:01 +01:00
Christoph Oelckers
d9d05e90b5 - globally replaced all occurences of '->s().' with '->spr.' 2021-12-30 09:57:00 +01:00
Christoph Oelckers
c16b090fbe - Exhumed: clear lasthitsect when starting a new level. 2021-12-30 09:56:55 +01:00
Christoph Oelckers
e42c3afbea - Exhumed: fixed trap setup.
Must clear the structure before the first return and iterate over the walls by reference, otherwise bad pointers will get copied.
2021-12-30 09:56:55 +01:00
Christoph Oelckers
f1c0298825 - replaced numwalls with wall.Size in several places. 2021-12-30 09:56:54 +01:00
Christoph Oelckers
65bc6e6aef - removed the now redundant wall() and sector() interator helper functions.
With both wall and sector now being TArrays they are not needed anymore.
2021-12-30 09:56:53 +01:00
Christoph Oelckers
8039d81467 - the remaining Exhumed flags. 2021-12-30 09:56:50 +01:00
Christoph Oelckers
988a91904a - a large of Exhumed flags, most search& replace plus a few local variable types. 2021-12-30 09:56:49 +01:00
Christoph Oelckers
82fb03e399 - another batch of search&replace, with smaller results. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
c5ae454207 - another big batch of automatic replacements. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
5b65e214e0 - global search & replace of the more frequent sprite flag patterns. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
b0e3c6b5ec - some remaining sector flag stuff 2021-12-30 09:56:45 +01:00
Christoph Oelckers
d0a06ae961 - deal with most of CSTAT_SECTOR_SKY and CSTAT_SECTOR_SLOPE 2021-12-30 09:56:45 +01:00
Christoph Oelckers
8d0013128e - Exhumed: use symbolic constant CSTAT_SPRITE_INVISIBLE 2021-12-30 09:56:45 +01:00
Christoph Oelckers
dddf48fd3e - cleaned up and renamed buildtypes.h.
Content was reordered so that the file can contain the inlines belonging to the map data types that previously had to be stored elsewhere.
Also moved out of the Build folder because virtually everything in here can be traced to content available in Duke Nukem 3D's and Shadow Warrior's source releases.
2021-12-30 09:53:46 +01:00
Christoph Oelckers
46d7487a3b - SW: clear all pointer variables the player may still hold when terminating a level. 2021-12-30 09:53:10 +01:00
Christoph Oelckers
d1f088a858 - SW/Exhumed fixed sound relinking on actor destruction.
This still passed the sprites instead of the actors. Moved the relinking code to DCoreActor::Destroy because it is the same for all games.
Also did a little bit of sound cleanup to ensure the sound backend does not hold stale actor pointers.
2021-12-30 09:53:10 +01:00
Mitchell Richters
2f567bdb74 - Exhumed: Fix two signed/unsigned comparison warnings in PlayFX2().
* Lines in question:
** 606 | if (chan->SoundID == nSound + 1)
** 621 | if (chan->SoundID == nSound + 1)
* All data sent to `PlayFX2()` and functions that wrap `PlayFX2()` are signed values, so keep signed all the way through.
2021-12-26 23:10:06 +01:00
Christoph Oelckers
d8ccfa1a5f - cleaned up nextsectorneighborz, added a safe variant and use this in all places where the sector pointer is not validated. 2021-12-26 23:10:05 +01:00
Christoph Oelckers
b8c4354691 - got rid of the MAX... constants and adjusted all places still using them. 2021-12-26 23:10:02 +01:00
Christoph Oelckers
838bed7800 - final cleanup of sectnum related stuff.
Made sure that remaining uses of sector indices are safe to be kept and deleted a few redundant functions.
2021-12-26 23:10:01 +01:00
Christoph Oelckers
6d432fca0a - made spritetype::sectnum a pointer. 2021-12-26 23:10:01 +01:00
Christoph Oelckers
6a43a270fa - use sectno() access function where we really need a sector index. 2021-12-26 23:10:01 +01:00
Christoph Oelckers
8ee5d1b0d7 - activated the garbage collector
This finally gets rid of all static storage for actors - so no more indices ever! :)
2021-12-26 23:10:00 +01:00
Christoph Oelckers
1d371b8cbf - clear some data on init. 2021-12-26 23:09:59 +01:00
Christoph Oelckers
8dde6a3074 - Added GC support to Exhumed 2021-12-26 23:09:59 +01:00
Christoph Oelckers
588f88c9cc - migrated the actors to DObjects.
No GC yet, only the classes have been altered and some GC-related features been added.
Full switchover will require adding GC support to all data in the game.
2021-12-26 23:09:57 +01:00
Christoph Oelckers
8a2385dd89 - actor clearing cleaned up.
We still need this until we can get rid of the static arrays...
2021-12-26 23:09:55 +01:00
Christoph Oelckers
4cecb6f955 - removed the old actor savegame code and instead implemented a virtual Serialize function.
This isn't hooked up yet, currently savegames are non-functional. They will come back once the global actor arrays are no longer relevant for maintenance.
2021-12-26 23:09:55 +01:00
Christoph Oelckers
f855b1020f - actor lists refactored.
No more shorts, no more static arrays.
This was one of the biggest blockers for unlimiting the engine.
2021-12-26 23:09:54 +01:00
Christoph Oelckers
eaff9e359f - refactored the owner index in tspritetype.
This is now a separate type from spritetype which contains an actor pointer instead so that sprite display can be handled without requiring a static sprite array.
2021-12-26 23:09:53 +01:00
Christoph Oelckers
e13a275cfc - got rid of the sole linear sprite iterator in Exhumed and deleted the iterator code entirely. 2021-12-26 23:09:52 +01:00
Christoph Oelckers
6600f55543 - separate map loading from actor spawning for the other games, too.
It still uses the horribly messed up original spawn logic, though.
2021-12-26 23:09:51 +01:00
Mitchell Richters
0c6e55d1b8 - Silence all the -Wuninitialized and -Wmaybe-uninitialized warnings relating to HitInfo objects passed through to functions by reference. 2021-12-26 23:09:50 +01:00
Christoph Oelckers
5dfc79bdbe - MarkSectorSeen 2021-12-26 23:09:48 +01:00
Christoph Oelckers
a22634f228 - sectnum reduction. 2021-12-26 23:09:47 +01:00
Christoph Oelckers
221d9fe28e - adapted Duke's and Exhumed's sound code to directly work with actors.
This was already wrapped so all that needed to be done was removing the wrapper.
2021-12-26 23:09:46 +01:00
Christoph Oelckers
97b19a5cb1 - adapted Blood's sound engine to using actors.
Note: Savegames won't work on this commit for the other games!
2021-12-26 23:09:45 +01:00
Christoph Oelckers
b7a5ea8ef6 - moved some common utilities into the backend. 2021-12-26 23:09:44 +01:00
Christoph Oelckers
bbb860ccf3 - consolidate the iterators in the backend.
Using a template class that can adapt to the game specific types.
2021-12-26 23:09:44 +01:00
Christoph Oelckers
12f6b05cbe - use access functions, all done by search & replace. 2021-12-26 23:09:44 +01:00
Christoph Oelckers
6748a39c8f - deprecate the sector index variant of pushmove 2021-12-26 23:09:43 +01:00
Christoph Oelckers
70d7e81f4f - adapted getzrange to the new interface.
This was mainly removing game side solutions in favor of a common one in the backend.
2021-12-26 23:09:42 +01:00
Christoph Oelckers
729076b79d - adapted neartag in SW and Exhumed. 2021-12-26 23:09:42 +01:00
Christoph Oelckers
91e2391911 - adapted neartag in Duke. 2021-12-26 23:09:42 +01:00
Christoph Oelckers
b3bbf8932e - same procedure for Exhumed. 2021-12-26 23:08:58 +01:00
Christoph Oelckers
96b9572905 - moved parts of the HitInfo subclasses into the backend.
All the game code now needs to do is a single 'using' statement.
2021-12-26 23:08:57 +01:00
Christoph Oelckers
4bfb03b6b3 - adapted hitscan calls in Exhumed. 2021-12-26 23:08:56 +01:00
Christoph Oelckers
9380819e4e - initialize actorArray for all games.
- the foundation for an actor aware backend.
2021-12-26 23:08:56 +01:00
Christoph Oelckers
52c80f187a - added coreactor.h 2021-12-26 23:08:55 +01:00
Christoph Oelckers
624ad6a2ad - cleanup stuff.
Removed unneeded prototypes, renamed some variables; no logic changes.
2021-12-25 21:29:05 +01:00
Christoph Oelckers
943641d18e - renamed all nSector pointers to pSector
No logic changes!
2021-12-25 21:29:04 +01:00
Christoph Oelckers
a3ecbe6371 - MoveQS 2021-12-25 21:29:04 +01:00
Christoph Oelckers
b1b7608cf7 - most remaining sectnum references. 2021-12-25 21:29:04 +01:00
Christoph Oelckers
2027c6ebaf - the last sector[] 2021-12-25 21:29:04 +01:00
Christoph Oelckers
6e786fcf1e - RadialDamage + DimSector 2021-12-25 21:29:04 +01:00
Christoph Oelckers
24d4680f6e - sector[] in move.cpp 2021-12-25 21:29:03 +01:00
Christoph Oelckers
80f80ed5e5 - initsect 2021-12-25 21:29:03 +01:00
Christoph Oelckers
f09e7ed32f - spawn functions. 2021-12-25 21:29:03 +01:00
Christoph Oelckers
40ae38c173 - calcChaseCamPos. 2021-12-25 21:29:03 +01:00
Christoph Oelckers
a3f1821670 - nPlayerViewSect 2021-12-25 21:29:03 +01:00
Christoph Oelckers
eaa155d52e - various sectnums, 2021-12-25 21:29:02 +01:00
Christoph Oelckers
9b19845dfb - AddMovingSector/CheckPushBlock 2021-12-25 21:29:02 +01:00
Christoph Oelckers
63d66e95c5 - runlist_ProcessSectorTag 2021-12-25 21:29:02 +01:00
Christoph Oelckers
1163a79da9 - renamed sectp in runlist_ProcessSectorTag 2021-12-25 21:29:02 +01:00
Christoph Oelckers
a58548c2f9 - AIElev 2021-12-25 21:29:02 +01:00
Christoph Oelckers
7713723045 - Bullets and bobs. 2021-12-25 21:29:02 +01:00
Christoph Oelckers
b191bca49e - BuildAnim 2021-12-25 21:29:01 +01:00
Christoph Oelckers
2394420f48 - quick replacements 2021-12-25 21:29:01 +01:00
Christoph Oelckers
109ff8c3cb - Above and Below 2021-12-25 21:29:01 +01:00
Christoph Oelckers
7b84a1464c - don't access invalid sector in DrawView.
Old bug exposed by having operator[] assert on bad access to sector[].
2021-12-25 21:29:01 +01:00
Christoph Oelckers
aee560624d - some more sectors. 2021-12-25 21:29:01 +01:00
Christoph Oelckers
78d9b78193 - most of the rest of the walls. 2021-12-25 21:29:00 +01:00
Christoph Oelckers
5374dafb56 - switches 2021-12-25 21:29:00 +01:00
Christoph Oelckers
ec12eb11f6 - palette loops for renderer. 2021-12-25 21:29:00 +01:00
Christoph Oelckers
cdef530597 - PlayerPushSect 2021-12-25 21:29:00 +01:00
Christoph Oelckers
5e01841f1e - MoveSector et.al. 2021-12-25 21:29:00 +01:00
Christoph Oelckers
0b254255e2 - sector ambience 2021-12-25 21:28:59 +01:00
Christoph Oelckers
c933eff59f - Traps 2021-12-25 21:28:59 +01:00
Christoph Oelckers
e57f9e08e9 - slides. 2021-12-25 21:28:59 +01:00
Christoph Oelckers
44639faabb - Flickers 2021-12-25 21:28:59 +01:00
Christoph Oelckers
e90d1266ae - Glows. 2021-12-25 21:28:59 +01:00
Christoph Oelckers
dfbb5192fb - addFlash at.al. 2021-12-25 21:28:59 +01:00
Christoph Oelckers
20891f276d - use pointers in runlist_ProcessWallTag and all its subfunctions. 2021-12-25 21:28:58 +01:00
Christoph Oelckers
2d937891ac - 3x twoSided 2021-12-25 21:28:58 +01:00
Christoph Oelckers
2d1f5fc576 - Exhumed: some cleanup. 2021-12-25 21:28:58 +01:00
Christoph Oelckers
61d5680950 more wall loops 2021-12-25 21:28:58 +01:00
Christoph Oelckers
269bac76cd loop cleanup in SnapSectors 2021-12-25 21:28:58 +01:00
Christoph Oelckers
9203ca425e Exhumed: ExplodeEnergyBlock 2021-12-25 21:28:57 +01:00
Christoph Oelckers
e179b9332d - all shorts reviewed.
Should be all clear now - the biggest limiter in Exhumed is the run list with ~25000 entries which may need more work if it is to be extended.
2021-12-25 21:28:53 +01:00
Christoph Oelckers
83a928adde - next 100 shorts reviewed.
seq.cpp/seq.h was just renamed to int16_t.
2021-12-25 21:28:52 +01:00
Christoph Oelckers
d73c7aa543 - short review and disasm variable renaming
(down to 200 shorts)
2021-12-25 21:28:52 +01:00
Christoph Oelckers
033a73bce0 - Exhumed short review, part 2.
Down to 350.
2021-12-25 21:28:52 +01:00
Christoph Oelckers
1790ced1f8 - Exhumed: renamed disassembly fields in player struct. 2021-12-25 21:28:52 +01:00
Christoph Oelckers
30b42d24a0 - Exhumed short review
(down to < 550)
2021-12-25 21:28:52 +01:00
Christoph Oelckers
d5c27e6239 - unlimited the bit arrays for the automap and the bunch drawer, removed some leftover constants/declarations. 2021-12-25 21:28:50 +01:00
Christoph Oelckers
a21f6b6240 - migrated Exhumed's sector extensions to the actual struct. 2021-12-25 21:28:49 +01:00
Mitch Richters
c6f2aaf1b7 - Miscellaneous fixes to commit to change sector checks over to validSectorIndex().
* Fix missed changeover in Blood's `actSpawnSprite()`.
* Fix non-negated check on a `validSectorIndex()` call in Blood's `debrisMove()`.
* Removed a superfluous terminator in Duke's `actor.cpp`.
* Fixed bad call to `validSectorIndex()` in Exhumed's `AIAnim::Tick()`.
2021-12-25 21:28:37 +01:00
Christoph Oelckers
999ec3c95a use validSectorIndex checks where appropriate.
Let’s hope that this sloppiness doesn’t have negative effects with broken maps.

# Conflicts:
#	source/games/sw/src/sprite.cpp

# Conflicts:
#	source/games/duke/src/prediction.cpp
#	source/games/duke/src/render.cpp
2021-12-25 21:28:37 +01:00
Christoph Oelckers
7c4233bcf7 - replaced fallthrough__ with [[fallthrough]] as we are requiring C++17 and don't need workarounds for that. 2021-12-14 12:27:28 +01:00
Christoph Oelckers
7daa501a4d - removed all #include "compat.h" except the one in build.h
Still all compiles fine.
2021-12-14 12:24:10 +01:00
Christoph Oelckers
e104316e75 - fixed bad parameter to getzrange.
This originated from 1d39bb371e where the getzrange_old function was removed
2021-12-13 09:39:57 +01:00
Christoph Oelckers
5bb114ba6e - fixed two bad actor references in Exhumed's radial damage code.
The radial source is passed through pRadialActor, not pObjActor.
2021-11-30 22:44:54 +01:00
Christoph Oelckers
71dfe7ecfe - fixed handling for cl_capfps and cl_nointerpolate to never use any smoothratio value other than 1.0. 2021-11-29 00:57:11 +01:00
Christoph Oelckers
cd3288860a - fixed automap player drawing for follpw mode off in all games. 2021-11-29 00:56:32 +01:00
Christoph Oelckers
4e31360fe4 - cleaned up dragpoint
This still contained some code for EDuke32's TROR and used a shared static global array.
It now uses the BFSSearch class to manage its bit array to unlimit the size of its working set and to avoid reallocation.
2021-11-29 00:56:25 +01:00
Christoph Oelckers
33a3e0d8bf - deleted some unused global variables, code simplification plus extended wall index field in Trap
Todo: give fields more meaningful names!
2021-11-29 00:56:25 +01:00
Christoph Oelckers
c1c59006bc - Exhumed: cleaned up disassembly-like code in SnapSectors 2021-11-29 00:56:25 +01:00
Christoph Oelckers
e6682f4489 - Exhumed: some simple wall stuff 2021-11-29 00:56:25 +01:00
Christoph Oelckers
7b1345d3e5 - Exhumed: wall stuff in AddFlash 2021-11-29 00:56:24 +01:00
Christoph Oelckers
6fc43287b3 - redid Exhumed's BelowNear function.
Use BFSSearch, only run one iteration of the search and only run the search if the result is actually used.
2021-11-29 00:55:44 +01:00
Christoph Oelckers
269f2580b9 - obsolete prototypes in Exhumed 2021-11-29 00:55:43 +01:00
Christoph Oelckers
4f493d3de1 - Exhumed: made all nPlayer variables ints
This looks safe
2021-11-29 00:55:43 +01:00
Christoph Oelckers
b9b4f1e037 - shorts replaced in Exhumed
only a small part, the easy stuff
2021-11-29 00:55:42 +01:00
Christoph Oelckers
d63b6cda37 - exhumed: made all nAngle variables full ints 2021-11-29 00:55:42 +01:00
Christoph Oelckers
2fdc2ec00f - small stuff 2021-11-29 00:55:32 +01:00
Christoph Oelckers
01abe7b2ac - addressed most unused/uninitialized variable warnings from MSVC. 2021-11-29 00:55:30 +01:00
Christoph Oelckers
c6bd5c04c7 - fixed most warnings GCC pointed out in game code. 2021-11-29 00:55:29 +01:00
Mitch Richters
e491d15ff9 - Move InputScale() out of inputstate.cpp and into i_time.cpp as I_GetInputFrac() to make it available to GZDoom for potential future requirements.
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Christoph Oelckers
5a6d4f88d5 - Exhumed: eliminate all remaining MAXSECTORS references 2021-11-11 23:46:50 +01:00
Christoph Oelckers
794c4483ca -Exhumed: better handling of BuildNear/BelowNear.
BuildNear was only called right before calling BelowNear - now both functions are merged and use the global GlobalSectorList array for storage.
Since the data in this is local to this function it is also unnecessary to write it out to a savegame as it will get recereate each time before it is used.
2021-11-11 23:45:59 +01:00
Christoph Oelckers
d70e76e5c6 - Exhumed: use dynamic arrays for the palette backup in DrawView. 2021-11-11 23:34:03 +01:00
Christoph Oelckers
f2e344a235 - removed magic flags added to sector indices in Polymost.
These are better done as separate function arguments.
2021-11-11 21:28:53 +01:00
Christoph Oelckers
5465c9976c - replaced a few chars in Exhumed 2021-11-09 17:46:39 +01:00
Christoph Oelckers
baa3e531d4 - Exhumed: more ints for shorts 2021-11-09 17:32:50 +01:00
Christoph Oelckers
9b52b3b451 - made all nSector variables full ints.
This already takes care of most sector[] accesses in Exhumed
2021-11-09 17:27:54 +01:00
Christoph Oelckers
366df9d4b6 - Exhumed: use the sprite's sector() member where possible. 2021-11-09 00:26:46 +01:00
Christoph Oelckers
ef241acda2 - Exhumed: some quick sector[] substitution 2021-11-09 00:12:18 +01:00
Christoph Oelckers
94b2b0af31 - widen sector index in engineLoadBoard to 32 bit 2021-11-09 00:07:00 +01:00
Christoph Oelckers
2d91786516 - changed all sector variables being passed to pushmove to full ints 2021-11-08 23:18:40 +01:00
Christoph Oelckers
3811147f70 - use proper clipmove variant in Blood and Exhumed
This merely extends some shorts to full ints to match the desired parameter's size.
2021-11-08 23:11:30 +01:00
Christoph Oelckers
477a2a23e6 - nextSector in runlist 2021-11-08 18:37:21 +01:00
Christoph Oelckers
52389ae02e - sectp in osdcmd_spawn 2021-11-08 18:37:21 +01:00
Christoph Oelckers
f51cbf31ba - sectp in runlist_ProcessSectorTag 2021-11-08 18:37:20 +01:00
Christoph Oelckers
afec39aded - reworked non-functional anim detection when picking up an item.
This would not unregister the item's run list entries because the logic was insufficient.
2021-11-08 01:13:54 +01:00
Christoph Oelckers
43fdc1bb56 - Exhumed: fixed uninitialized variable in bullet code. 2021-11-07 23:33:39 +01:00
Christoph Oelckers
0da2250efe - Exhumed: try to improve timing of the menu plasma. 2021-11-07 22:14:58 +01:00
Christoph Oelckers
60faceaf59 - Exhumed: fixed serialization.
The exhumedActors array was not written out, resulting in all kinds of strange effects.
2021-11-07 21:45:51 +01:00
Christoph Oelckers
d20aa47adf - made sector parameter of updatesectorz an int and deprecated the short version. 2021-11-06 19:27:51 +01:00
Mitch Richters
8f37097e1b - Exhumed: Revert change from edf54b4b0a that wasn't meant to be committed. 2021-11-06 19:54:12 +11:00
Mitch Richters
edf54b4b0a - Exhumed: Remove some dead input code that isn't in any usage. 2021-11-06 19:44:59 +11:00
Mitch Richters
1d39bb371e - Exhumed: Replace use of getzrange_old() inline wrapper with getzrange(). 2021-10-30 17:30:02 +02:00
Mitch Richters
bdbe57a6b6 - Exhumed: Replace use of pushmove_old() inline wrapper with pushmove(). 2021-10-30 17:30:02 +02:00
Mitch Richters
0ac63fd663 - Exhumed: Replace use of clipmove_old() inline wrapper with clipmove(). 2021-10-30 17:30:01 +02:00
Mitch Richters
b02a6a3ec9 - Replace MIN() from templates.h with version provided in STL. 2021-10-30 10:36:15 +02:00
Mitch Richters
9894729fc2 - Replace MAX() from templates.h with version provided in STL.
# Conflicts:
#	source/common/textures/hw_ihwtexture.cpp
#	source/common/utility/templates.h
2021-10-30 10:36:02 +02:00
Christoph Oelckers
57b638f26f - use std::clamp instead of our homegrown version. 2021-10-30 10:35:00 +02:00
Mitch Richters
20d958e0a9 - Exhumed: Don't run through the slopetilting math if the view is locked. 2021-10-30 10:24:14 +02:00
Mitch Richters
738491d9e5 - Exhumed: Repair player look/aim code. 2021-10-30 10:24:14 +02:00
Mitch Richters
8f679ecf61 - Exhumed: Repair math for chase camp gi functions. 2021-10-30 10:24:14 +02:00
Christoph Oelckers
bb3a141c42 - fixed last commit. 2021-10-28 23:16:03 +02:00
Christoph Oelckers
7e191fb29b - fixed damage amount in the runlist dispatcher. 2021-10-28 23:04:50 +02:00
Christoph Oelckers
91ecda2fcb - cleaned up the run list interface.
Due to serialization concerns it still isn't optimal, though, because we cannot get rid of the index table yet.
2021-10-28 18:57:50 +02:00
Christoph Oelckers
791240786d - use a wrapper function to check for the radial damage event. 2021-10-28 18:43:54 +02:00
Christoph Oelckers
7a65cc46d0 - moved AI wrappers out of the main sources.
This is mainly to reduce commit noise for what follows. These functions will soon be deleted.
2021-10-28 18:39:49 +02:00