Commit graph

233 commits

Author SHA1 Message Date
Christoph Oelckers
066896db8e - warnings fix 2021-11-08 18:37:20 +01:00
Christoph Oelckers
fd2764dc6e - Duke: eliminated all local short variables in actors*.cpp. 2021-11-07 16:30:55 +01:00
Christoph Oelckers
0eba3335c6 - eliminated some leftover 16 bit values used for storing indices. 2021-11-07 16:30:44 +01:00
Christoph Oelckers
a594e6465c - added nextSector access function to walltype and used it to eliminate a few more sector[] references. 2021-11-07 15:56:29 +01:00
Christoph Oelckers
e0f3fa2aa0 -Duke: replaced sector array accesses in actors_d.cpp. 2021-11-07 15:00:07 +01:00
Christoph Oelckers
d45f687d4b - pass a sector pointer to floorspace/ceilingspace. 2021-11-07 15:00:06 +01:00
Christoph Oelckers
1c0e3d849b - addressed the updatesector related deprecation warnings with Duke. 2021-11-06 20:46:08 +01:00
Christoph Oelckers
83fe41e71e - made updatesector receive a 32 bit int pointer and deprecated the 16 bit variant. 2021-11-06 15:53:16 +01:00
Christoph Oelckers
f4cc5b5b89 - Duke: const-ify SE24 tile lists 2021-11-06 14:19:55 +01:00
Christoph Oelckers
c8d65a1f06 - use sector wrappers where easily doable with search and replace. 2021-11-06 14:19:55 +01:00
Christoph Oelckers
b548d9eca2 - a few more quick sector[] replacements. 2021-11-06 14:19:55 +01:00
Christoph Oelckers
8818a3f1cb - Duke: added a getSector method to DDukeActor. 2021-11-06 14:19:54 +01:00
Mitch Richters
a1570c185f - Duke: Remove posx/posy/posz variables and replace with points in the previously unionised pos vec3_t variable. 2021-10-31 17:52:52 +11:00
Christoph Oelckers
821f3d356b - renamed DDukeActor::GetIndex to GetSpriteIndex to bring it in line with the other games. 2021-10-24 09:22:35 +02:00
Christoph Oelckers
b1ac1ad585 - more changesprite* renaming. 2021-10-12 21:36:42 +02:00
Christoph Oelckers
2e37cc627c - function renaming for clarity and easier lookup. 2021-10-12 21:36:42 +02:00
Mitchell Richters
ec20f66eda - Duke/RR: Always ensure player's wantweaponfire is reset to -1 after switching weapon.
* Fixes #333.
2021-07-17 12:12:12 +10:00
Christoph Oelckers
d311792e06 - engine side preparations for Duke Statusbar scriptification.
Mainly, gotweapon had to be reverted to a flat bool array to avoid implementing FixedBitArray for the VM.
Also adding a few new tile names and PushV for string arrays.
2021-05-15 10:44:35 +02:00
Christoph Oelckers
cf22a70d82 - fixed all warnings in Duke. 2021-05-12 21:50:01 +02:00
Christoph Oelckers
60d007fa93 - Duke: fixed non-scrolling SE24. 2021-05-02 19:32:20 +02:00
Christoph Oelckers
96d78ab9e6 - made DukeActor::s a pointer.
As a reference we would never be able to export this to scripting
2021-04-15 19:21:43 +02:00
Christoph Oelckers
68b7628f56 - RRRA: Sector effector type 156 is not supposed to scroll the floor texture. 2021-04-07 18:12:25 +02:00
Christoph Oelckers
9828cd7129 - this better have a null check... 2021-04-04 13:02:26 +02:00
Mitchell Richters
18fbc8996b - Duke: Remove a few redundant sprite backups and change some backups to what's actually needed. 2021-01-06 06:22:31 +11:00
Mitchell Richters
97159c20c1 - Duke: Leverage new spritetype methods within Duke, removing bposx/bposy/bposz from hittype. 2021-01-06 06:22:29 +11:00
Mitchell Richters
5124c0daec - Amalgamate ksgn and sgn into Sgn in cmdlib.h, and remove pragmas.h. 2021-01-05 07:31:37 +11:00
Mitchell Richters
868aa7f07a - Replace mulscale() calls with MulScale() from common. 2021-01-05 07:31:24 +11:00
Mitchell Richters
2396179dfc - Replace mulscale##() calls with MulScale() from common.
* Regex for reference: mulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:15 +11:00
Christoph Oelckers
3787e103d2 - use the same camera sprite selection logic as EDuke32 and RedNukem.
This is the only one that makes some sense.
2020-12-13 14:13:51 +01:00
Christoph Oelckers
72df9c26d8 - Duke: fixed: SE31's handler overwrote the interpolation coordinates, which rendered interpolation ineffective.
Also removing some redundant coordinate copying. Since we save all sprite coordinates at the start of a frame, there is no need to do the same again in the stat handlers.
Fixes #237
2020-12-11 19:17:41 +01:00
Christoph Oelckers
7ad0750839 - grouped all of Duke's constant per-session state in a single struct.
Mainly done so later the script export can be done more easily.
This also renames a few of the affected variables for clarity.
2020-11-29 13:54:58 +01:00
Christoph Oelckers
daf71fa470 - replaced a few more literal numbers. 2020-11-27 20:06:38 +01:00
Mitchell Richters
abc49fed62 - buildutils: Replace sintable[] use within Duke's actors_d.cpp with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
6e3d414b3c - inputstate.cpp: Move checkCrouchToggle() from gameinput.ccp into ApplyGlobalInput() and use static bool for crouch toggling vs. game-side bool. 2020-11-07 18:16:16 +11:00
Christoph Oelckers
d8e331ef0f - changed Duke/RR palette handling to only retrieve the currently active palette right before rendering.
Storing this in the player_struct is pointless and a relic from having to use real hardware palette switches.
With this now just being a translation index being passed to the backend it can be cheaply retrieved right when used and nowhere else.
Also making some changes to how RRRA's psychedelic cactus handles the projection. This fixes issues with occasionally passing a bad matrix.
2020-11-05 07:31:48 +01:00
Christoph Oelckers
083454986b - made camsprite an actor variable. 2020-11-04 20:40:26 +01:00
Christoph Oelckers
aac5ab55a3 - movesprite cleanup. 2020-11-04 20:40:25 +01:00
Christoph Oelckers
0eb10f0313 - newowner and related code. 2020-11-04 20:40:25 +01:00
Christoph Oelckers
eb5cd98d9a - fixed a few bad parameters. 2020-11-04 20:39:39 +01:00
Christoph Oelckers
635b53f78f - RR-movement + dummyplayersprite 2020-11-04 19:55:13 +01:00
Christoph Oelckers
32a7c2349e - shoot interface transitioned/operateweapon mostly done. 2020-11-03 22:01:58 +01:00
Christoph Oelckers
7e29be7569 - switched checkhitwall interface to actors. 2020-11-03 21:49:57 +01:00
Christoph Oelckers
4258c27248 - switched the checkhitsprite interface to actors. 2020-11-03 21:43:50 +01:00
Christoph Oelckers
f5cccb0df2 - actorflag, actorfella, automap, animateaccess, holoduke spawn, initreactor.
# Conflicts:
#	source/games/duke/src/game_misc.cpp
2020-11-03 19:21:43 +01:00
Christoph Oelckers
a514910aa4 - use an actor pointer in Get/SetGameVarID's parameters to weed out the ordering screwups. 2020-11-03 19:21:43 +01:00
Christoph Oelckers
de92287d0b - fixed the messed up parameter order of OnEvent.
This should serve as a textbook example why passing around indices is a very, very bad idea!
2020-11-03 19:21:42 +01:00
Christoph Oelckers
595a2156e4 - fixed bad spawn owner in refactored loop. 2020-11-02 21:45:36 +01:00
Christoph Oelckers
6adc2f8e55 - findplayer 2020-11-01 17:07:47 +01:00
Christoph Oelckers
3c19f8e44e - the last remaining small functions in actors_d.cpp and actors_r.cpp. 2020-11-01 17:07:46 +01:00
Christoph Oelckers
52c342a2ff - renamed variables in move functions. 2020-11-01 17:07:46 +01:00
Christoph Oelckers
e6e53d1954 - move, fakebubbaspawn and destroyit. 2020-11-01 17:07:46 +01:00
Christoph Oelckers
a6f9673403 - moveeffectors. 2020-11-01 17:07:46 +01:00
Christoph Oelckers
c438061b83 - made SE06 and SE28 separate functions. 2020-11-01 17:07:45 +01:00
Christoph Oelckers
f5338d0acb - moveexplosions. 2020-11-01 17:07:45 +01:00
Christoph Oelckers
76c4eeddc4 - moveactors. 2020-11-01 17:07:45 +01:00
Christoph Oelckers
63646e7c5c - heavyhbomb 2020-11-01 15:19:51 +01:00
Christoph Oelckers
441ed6bdc5 - flamethrowerflame 2020-11-01 15:17:49 +01:00
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