Commit graph

426 commits

Author SHA1 Message Date
Christoph Oelckers
44fc4f9243 - greenslime. 2020-11-01 15:11:49 +01:00
Christoph Oelckers
9826ff54f9 - movetransports. 2020-11-01 15:05:21 +01:00
Christoph Oelckers
076dcef5d0 - renamed variables in movetransports. 2020-11-01 14:56:23 +01:00
Christoph Oelckers
2d1b8a2b4b - use the cleaned up movesprite interface in moveweapons. 2020-11-01 14:51:32 +01:00
Christoph Oelckers
3aaf2e80a9 - moveweapons. 2020-11-01 14:46:05 +01:00
Christoph Oelckers
00b12c5fd6 - weaponcommon subfunctions. 2020-11-01 12:27:43 +01:00
Christoph Oelckers
c5f7c29ead - chickenarrow and movefireball. 2020-11-01 12:23:14 +01:00
Christoph Oelckers
a3860de440 - movestandables. 2020-11-01 12:09:01 +01:00
Christoph Oelckers
1af39eb29d - move*bolt. 2020-11-01 12:08:39 +01:00
Christoph Oelckers
dc75037d01 - movecrack, movefireext, moveviewscreen. 2020-11-01 12:06:20 +01:00
Christoph Oelckers
a4ac7764de - movetripbomb. 2020-11-01 12:02:58 +01:00
Christoph Oelckers
d9b6be83b3 - movefallers. 2020-11-01 12:00:29 +01:00
Christoph Oelckers
7e8be10b04 - movefta and ifhitsectors. 2020-11-01 11:58:41 +01:00
Christoph Oelckers
861342a278 - guts_d and guts_r. 2020-11-01 11:32:34 +01:00
Christoph Oelckers
90d1c5f7bb - ifsquished. 2020-11-01 10:55:38 +01:00
Christoph Oelckers
4c9655b110 - check_fta_sounds. 2020-11-01 10:53:45 +01:00
Christoph Oelckers
f0b1ab504d - fall_common and its fallspecial subfunction. 2020-11-01 10:48:26 +01:00
Christoph Oelckers
85ea1df76a - alterang 2020-11-01 10:44:16 +01:00
Christoph Oelckers
31e5023004 - dodge, furthestcanseepoint, furthestangle. 2020-11-01 10:41:25 +01:00
Christoph Oelckers
8f75a58343 - shared SE31 code. 2020-11-01 10:31:41 +01:00
Christoph Oelckers
21fb3fb7bb - shared SE25 code. 2020-11-01 10:27:54 +01:00
Christoph Oelckers
00f5a08390 - shared SE24 code. 2020-11-01 10:27:41 +01:00
Christoph Oelckers
02813802d4 - the 5 remaining shared SE handlers. 2020-11-01 10:12:27 +01:00
Christoph Oelckers
769bc3bd22 - handle_se20-26. 2020-11-01 10:02:58 +01:00
Christoph Oelckers
5d837176de - handle_se18+19 2020-11-01 09:58:39 +01:00
Christoph Oelckers
5b096ea35e - handle_se15-17. 2020-11-01 09:53:50 +01:00
Christoph Oelckers
b585192721 - handle_se11-13. 2020-11-01 09:37:41 +01:00
Christoph Oelckers
45905b9137 - handle_se05, 08, 10. 2020-11-01 08:51:13 +01:00
Christoph Oelckers
2edc7168ca - handle SE02-SE04. 2020-11-01 08:43:24 +01:00
Christoph Oelckers
3e62550489 - consolidated gutsdir functions by making the spawn offset for Duke's commander an actor property. 2020-11-01 08:23:03 +01:00
Christoph Oelckers
80aab4b5f7 - handle_se30. 2020-11-01 08:22:47 +01:00
Christoph Oelckers
2dd2ba1469 - handle_SE14 function signature and recordoldspritepos 2020-11-01 08:13:29 +01:00
Christoph Oelckers
1ce2600a43 - SE 0 and 1 handlers. 2020-11-01 07:36:49 +01:00
Christoph Oelckers
e9d6fb2bb5 - jibs, bloodpool, shell, glasspieces and scrap. 2020-11-01 07:27:15 +01:00
Christoph Oelckers
6cbe74e115 - forcesphere, watersplash2, frameeffect and money. 2020-11-01 07:24:00 +01:00
Christoph Oelckers
6e1d3a025a - ooz, reactor and camera. 2020-11-01 07:23:27 +01:00
Christoph Oelckers
876b6d5081 - forcesphere and recon. 2020-11-01 07:20:17 +01:00
Christoph Oelckers
3d16d9f44a - respawnmarker, rat and queball. 2020-11-01 07:15:57 +01:00
Christoph Oelckers
6257ebc30c - bounce, movetongue and rpgexplode. 2020-11-01 07:11:49 +01:00
Christoph Oelckers
e001b3117f - movetouchplate, moveooz, movecanwithsomething.
# Conflicts:
#	source/games/duke/src/funct.h
2020-11-01 07:07:59 +01:00
Christoph Oelckers
b7f26c064d - 3 smaller functions. 2020-11-01 06:54:14 +01:00
Christoph Oelckers
c42ff35dc5 - hitradius
# Conflicts:
#	source/games/duke/src/actors_d.cpp
#	source/games/duke/src/actors_r.cpp
2020-10-31 13:24:31 +01:00
Christoph Oelckers
7dbe9d4bfb - renaming in hitradius 2020-10-31 13:24:30 +01:00
Christoph Oelckers
38e0ac1e3f - movefountain and moveflammable.
# Conflicts:
#	source/games/duke/src/actors.cpp
2020-10-31 13:24:30 +01:00
Christoph Oelckers
41e1e9b51c - ifhitbyweapon.
# Conflicts:
#	source/games/duke/src/actors_d.cpp
#	source/games/duke/src/actors_r.cpp
2020-10-31 13:19:26 +01:00
Christoph Oelckers
92c21e7259 - ifhitbyweapon cleanup.
Variables renamed and array accesses replaced with pointers in RR version.
2020-10-31 13:19:26 +01:00
Christoph Oelckers
28d0bc7477 - movecrane interface cleanup. 2020-10-31 13:19:26 +01:00
Christoph Oelckers
1a21e73cd9 - fixed bad collision state check in movesprite.
Fixes #147
2020-10-24 21:36:27 +02:00
Christoph Oelckers
acda4b7799 - fixed Duke's RPG explosion
Fixes #146
2020-10-24 19:44:10 +02:00
Christoph Oelckers
34e39dd221 - pass spawner as an actor pointer to 'lotsofstuff'.
Allows doing this without using sprite indices.
2020-10-24 09:36:35 +02:00
Christoph Oelckers
a5b3681630 - foundation for a better collision info management.
The way this is handled is the main reason why Build maps are size limited, but since it is extremely invasive it needs to be taken out of the game code piece by piece, this is the framework for doing this for Duke.
2020-10-24 09:31:15 +02:00
Christoph Oelckers
9cdaaff42b - migrated EGS and deletesprite to new actor interface.
Inline wrappers for old code exist.
The backupplayer inline was moved into player.cpp because that's the only place it gets used.
2020-10-21 19:14:41 +02:00
Christoph Oelckers
6f4a0c94e8 - something on player is now a pointer as well 2020-10-21 16:31:18 +02:00
Christoph Oelckers
72329eb01b - wackedbyactor, too. 2020-10-21 16:31:18 +02:00
Christoph Oelckers
7c88de0b42 - made player.actorsqu a pointer and added the needed infrastructure for that. 2020-10-21 16:31:17 +02:00
Christoph Oelckers
a17f529c49 - fixed freezer projectile not moving.
These endless fallthrough switch/case blocks are a genuine menace. :(
Fixes #136
2020-10-20 23:21:38 +02:00
Christoph Oelckers
4d3135f4b8 - cleanup and consolidation of moveweapons_r. 2020-10-18 10:42:26 +02:00
Christoph Oelckers
08e29396e5 - split moveweapons_d further up into more smaller parts. 2020-10-18 09:45:41 +02:00
Christoph Oelckers
2b79b29fef - further splitting of moveweapons_d.
Progress with this but still not enough yet to break it down into manageable parts.
2020-10-18 08:38:29 +02:00
Christoph Oelckers
94e8213caf - split fireball handling out of moveweapons_d to reduce the function's size. 2020-10-17 19:53:04 +02:00
Christoph Oelckers
5c9b261823 - all sector iterators in actors_d.cpp, actors_r.cpp and actors_lava.cpp. 2020-10-15 01:34:27 +02:00
Christoph Oelckers
db8b454df1 - fixed ond bad statnum 2020-10-15 01:34:27 +02:00
Christoph Oelckers
053a1d46d5 - replaced all stat iterators in actors_d.cpp. 2020-10-15 01:34:26 +02:00
Christoph Oelckers
13093aef56 - a few quick ones, mostly simple search & replace. 2020-10-15 01:34:26 +02:00
Christoph Oelckers
2358f14cd1 use iterators for moveplayers, movedummyplayers and movefallers_d. 2020-10-15 01:34:25 +02:00
Christoph Oelckers
d3a31a3ab7 - hitradius_d uses the iterator now. 2020-10-15 01:34:25 +02:00
Christoph Oelckers
922122c0bc - same for movefta_d and ifhitbyweapon_d 2020-10-15 01:34:25 +02:00
Christoph Oelckers
5bcaaf45e7 - use a pointer to access sprites in movesprite. 2020-10-15 01:34:24 +02:00
Christoph Oelckers
8ece66e55c - use the new iterators in the movetransports functions.
Also prefer pointers over array access.
2020-10-15 01:34:24 +02:00
Christoph Oelckers
8e1c71b867 Merge branch 'InputContinuation' 2020-10-11 15:24:51 +02:00
Christoph Oelckers
fc82b3bc8a - Duke: replaced the game type macros with inline functions. 2020-10-11 14:30:42 +02:00
Mitchell Richters
fca846272e - gamecontrol: Initial setup of PlayerAngle struct and deployment within Duke.
* Struct made up of binangle class units.
* Create signed clone of binangle for use with look_ang and rotscrnang.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 23:13:29 +11:00
Mitchell Richters
f39939d114 - gamecontrol: Initial setup of PlayerHorizon struct and deployment within Duke.
* Started with the most complicated game first.
* Struct made up of fixedhoriz class units.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 17:12:48 +11:00
Mitchell Richters
09a05f354c - Re-standardise horizon around 0 and not 100.
* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
2020-10-07 13:28:45 +11:00
Christoph Oelckers
57945d2baf - eliminated a few overlooked 'long's. 2020-10-02 22:18:08 +02:00
Mitchell Richters
e7de0da36c - Duke: Changed some downscaled and upscaled Q16.16 variables missed when doing 46810ec490. 2020-09-25 17:08:44 +10:00
Christoph Oelckers
f4fff5ee30 - moved sync structure into the playerstruct for easier maintenance. 2020-09-23 18:18:23 +02:00
Mitchell Richters
f806cdcec6 - Blood/Duke/RR/SW: Unify the player's angle/horizon helper functions. 2020-09-21 17:12:51 +10:00
Mitchell Richters
0ab3b33a6c - Blood/Duke/RR/SW: Unify the player's horizon function.
* For Duke/SW, we continually apply `SB_CENTERVIEW` only if it was previously a toggled action, similar to Blood.
* For SW, we remove two SW-specific bits (`PF_LOCK_HORIZ` and `PF_LOOKING`) that are no longer needed.
* For Duke, we remove `return_to_center` and just use the `SB_CENTERVIEW` action bit as required.
* For `sethorizon()`, feature set and adjustment speeds are an averaged out accumulation across Duke/SW:
** GameTicRate is factored in for adjustment decisions to provide consistency for SW being the faster game.
** Adjustment amounts are half way between Duke/SW.
2020-09-20 20:01:36 +10:00
Mitchell Richters
ce82eaf899 - Duke/RR: Address weapon drawer interpolation concerns raised in #403. 2020-09-16 21:01:09 +10:00
Christoph Oelckers
1f7bc6d69e - interpolation fix from EDuke: "Patch from Striker to improve sprite interpolation"
Fixes #109
2020-09-11 22:54:52 +02:00
Christoph Oelckers
a2e3bb5725 - fixed WT's incinerator and a few other minor things I found while comparing Raze's WT support code with BuildGDX's.
Fixes #357
2020-09-07 21:38:17 +02:00
Christoph Oelckers
775c4a3b51 - fixed explosions in World Tour.
A classic result of trying to add new stuff to Duke's spaghetti code, shit like this would not happen if this code wasn't this poorly structured.
Fixes #360 and most of #357
2020-09-07 21:00:27 +02:00
Christoph Oelckers
b9e0f493b2 - transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire. 2020-08-28 23:25:08 +02:00
Mitchell Richters
03bccb3a06 - functionalise significant portions of 0ee3ab4df8. 2020-08-05 19:24:42 +10:00
Mitchell Richters
0ee3ab4df8 - revert most of e474ebc2b7 and adjust player's angle/horizon in a way that's compatible with cl_syncinput 0 and cl_syncinput 1.
Previous attempts at leveraging `applylook()` and `sethorizon()` in different spots had pros and cons, but ultimately changing where these functions were called from was a net negative and had hard to diagnose issues.

Maintaining two types of player input is considerable work. Lessons have been learned and will be beneficial when it comes time to re-doing the other games. Ideas from PR #98 for optimising RRRA vehicle experience while `cl_syncinput 0` is in use have been implemented here.
2020-08-05 17:53:41 +10:00
Mitchell Richters
e474ebc2b7 - multiple input fixes for both games, and for both cl_syncinput 0 and cl_syncinput 1 modes.
* For RR, `processweapon_r()` was performing angle and horizon changes directly which provided a harsh experience with the default `cl_syncinput 0` mode.
* Added `angAdjust` variable to `player_struct` for use with ticrate angle adjustments.
* Renamed `horizAngleAdjust` to `horizAdjust` so that there is less confusion with the new `angAdjust` variable.
* Removed `horizSkew` variable, can just use `horizAdjust` for this.
* Replaced all calls to `addang()` and `addhoriz()` with the appropriate additions/subtractions to `angAdjust` and `horizAdjust` respectively.
* Removed now unused `addang()` and `addhoriz()` setters from `player_struct`.
* Define new function `resetinputhelpers()` to eliminate code duplication between `processinput_d()` and `processinput_r()` functions.
* Remove `p->q16ang` and `p->q16horiz` direct setting from `FinalizeInput()`.
* Change `applylook()` to accept an `fixed_t adjustment` for changing the player's angle. This can either be `input.q16avel` when `cl_syncinput` is 0, or `sync[snum].q16angvel` when `cl_syncinput` is 1.
* Change `sethorizon()` to accept an `fixed_t adjustment` for changing the player's horizon. This can either be `input.q16horz` when `cl_syncinput` is 0, or `sync[snum].q16horz` when `cl_syncinput` is 1.
* Re-work `sethorizon()` to always adjust `p->q16horiz` using the true pitch code. This closer resembles the EDuke32 implementation as per SVN 7342.
* Re-work returning to center to work off the true pitch code and always ensure that the player returns to center.
* Implement work-around for RR where we need to call `sethorizon()` before the call to `fi.doincrements()` like the original game, but also after the call to `processweapon()` to apply any angle or horizon changes due to weapon recoil, etc. We work around this by calling `sethorizon()` from within `doincrements_r()` only if `cl_syncinput` is 1 and only if `doincrements_r()` is to return 1.
2020-08-03 21:19:45 +10:00
Christoph Oelckers
76ba45ac8d - fixed the reactor for good.
Fixes #70
2020-08-01 09:55:48 +02:00
Christoph Oelckers
a861126657 - fixed incorrect sprite being passed to reactor() function. 2020-07-29 20:59:32 +02:00
Christoph Oelckers
bd3b2bc5bf - always align the "loogies" to a virtual 320x200 screen to render them consistently. 2020-07-29 20:04:57 +02:00
Christoph Oelckers
5776f69d92 - transfer palette to gibs for LIZTROOP
EDuke did it for all actors - not sure if that is right. Needs checking.
2020-07-29 19:31:24 +02:00
Christoph Oelckers
a2ff8b3354 - removed JFDuke-based kill count reduction for slimers because it doesn't seem to work right. 2020-07-28 20:31:08 +02:00
Christoph Oelckers
ecdc92e6b9 - copied some changes to kill count management from DukeGDX. 2020-07-27 20:53:31 +02:00
Christoph Oelckers
2d3bf87eff - ported EDuke32's trip bomb fix
Still needs to be tested.
2020-07-27 17:52:17 +02:00
Christoph Oelckers
a0cc798c9c - cleaned up the sound system interface to have consistent naming and no aliases. 2020-07-25 09:32:54 +02:00
Christoph Oelckers
45f51b0c4b -more header work. 2020-07-06 22:55:35 +02:00
Christoph Oelckers
83bcfcfd0c - Big cleanup. 2020-07-06 22:53:20 +02:00
Christoph Oelckers
e272245537 - fixing some HUD stuff. 2020-07-06 15:48:51 +02:00
Christoph Oelckers
f2380f8829 - constant cleanup. 2020-07-06 13:26:26 +02:00
Christoph Oelckers
7872b701ce - CCMD cleanup. 2020-07-04 21:36:27 +02:00
Christoph Oelckers
d13b2dc130 - got rid of the dynamic tilemap.
Most tile access is in game specific code, the remaining code only accesses 51 tiles
2020-07-03 23:56:14 +02:00
Christoph Oelckers
7253b4eb74 - added a serializer for the flamethrower's fire map. 2020-06-29 23:36:06 +02:00
Christoph Oelckers
2bd4173716 - renamed a few headers. 2020-06-24 21:21:02 +02:00
Christoph Oelckers
99067f3bd6 - a small bit more is gone. 2020-06-23 21:12:15 +02:00
Christoph Oelckers
990cb2acb8 -'shoot' replaced.
# Conflicts:
#	source/build/src/palette.cpp
2020-06-21 23:24:49 +02:00
Christoph Oelckers
f56a8360b0 - spawnglass functions and fta_sounds. 2020-06-21 23:23:21 +02:00
Christoph Oelckers
26f3bc1857 - spawn function transitioned. 2020-06-21 23:21:10 +02:00
Christoph Oelckers
693b15a556 - use 4 byte entries for the script.
We no longer store pointers in here.
2020-06-21 23:17:51 +02:00
Christoph Oelckers
cb1824ca25 - store script code in a dynamic array.
# Conflicts:
#	source/games/duke/src/zz_game.cpp
2020-06-21 23:17:50 +02:00
Christoph Oelckers
6b2fdf24fd - cleanup after removing EDukes's script code.
# Conflicts:
#	source/games/duke/src/zz_game.cpp
#	source/games/duke/src/zz_gameexec.cpp
2020-06-21 23:07:46 +02:00
Christoph Oelckers
1fd0c279d7 - fixed some bugs. 2020-06-21 23:07:45 +02:00
Christoph Oelckers
5c780e5c5f - fixed mixed up tile numbers.
For consistency all shared numbers now use the TILE_ prefix.
2020-06-21 23:07:43 +02:00
Christoph Oelckers
1b135ecb0b - step 1. 2020-06-21 23:07:42 +02:00
Christoph Oelckers
e1c76e4c26 - safety commit.
# Conflicts:
#	source/games/duke/src/zz_sbar.cpp
2020-06-21 23:07:42 +02:00
Christoph Oelckers
e007b9bceb - safety commit 2020-06-21 23:07:41 +02:00
Christoph Oelckers
15c744f3da - movement code of the VM transitioned 2020-06-21 23:07:41 +02:00
Christoph Oelckers
c9bb23ee42 - more gamevar cleanup. 2020-06-21 22:59:10 +02:00
Christoph Oelckers
358d1a460f - tabification of new sources and replacement of the CON instruction symbols.
# Conflicts:
#	source/games/duke/src/zz_gamedef.cpp
2020-06-21 22:55:09 +02:00
Christoph Oelckers
9c3189475a - renamed unprocessed files and added missing WT firefly effect. 2020-06-21 22:38:05 +02:00
Christoph Oelckers
8cc273955d - moveeffectors, actors.c complete. 2020-06-21 22:38:04 +02:00
Christoph Oelckers
4c99eae4f6 - moveexplosions 2020-06-21 22:38:04 +02:00
Christoph Oelckers
242f78de13 - make moveactors work and RR weapon name cleanup.
# Conflicts:
#	source/games/duke/src/sbar.cpp
2020-06-21 22:38:04 +02:00
Christoph Oelckers
7b75a0683a moveactors plus backing code. 2020-06-21 22:37:29 +02:00
Christoph Oelckers
cfead10cc2 - movetransports. 2020-06-21 22:36:11 +02:00
Christoph Oelckers
63f45f57d8 - separated Duke and RR implementations because the more complex functions would become too messy otherwise. 2020-06-21 22:36:11 +02:00
Christoph Oelckers
bda3374f9b - reshuffling stuff. 2020-06-21 22:36:10 +02:00