Commit graph

2947 commits

Author SHA1 Message Date
Christoph Oelckers
2386ea9930 - implemented the 3 special switches
That's the developer commentary icon in World Tour, the deactivation switch for the chicken processing plant in RR and one shootable alarm bell in RRRA.
2022-12-29 13:32:30 +01:00
Christoph Oelckers
0d9fe83cba - implemented the switch parser and set up the external definitions. 2022-12-29 13:32:29 +01:00
Mitchell Richters
22f5c69b4c - Duke: Fix bad checkaccessswitch_*() calls.
* Fixes #815.
2022-12-29 22:45:36 +11:00
Mitchell Richters
1d69ebe9b0 - Duke: Ensure that the expander hitscans when autoaim is "hitscan only".
* Fixes #827.
2022-12-29 21:17:41 +11:00
Mitchell Richters
adc2396f31 - Duke: Extend fix from previous commit to appropriately resize the VMValue array also. 2022-12-24 15:41:37 +11:00
CandiceJoy
a943652799 Fixed a Mac debug build crash where CallAnimate attempted to pass one too many parameters to the VM. 2022-12-23 10:38:59 +01:00
Christoph Oelckers
c7e25726c1 - use memset to clear 'gs' in loadconst.
MSVC compiled the old assignment to memsetting a local copy and then memcpying it to the destination, but this struct is far too large for that and was causing occasional stack errors when debugging.
2022-12-20 12:44:34 +01:00
Christoph Oelckers
8c41294cb0 - overpicnum lightening.
Especially make sure that it is never set to tile 0. There seems to have been some undefined behavior here treating 0 as 'no texture', but doing so inconsistently.
2022-12-18 15:13:22 +01:00
Christoph Oelckers
837e4d1438 - eliminated many uses of wallpicnum.
The ones left require a bit more work on the data first.
2022-12-18 15:11:08 +01:00
Christoph Oelckers
ffb471666d - moved the access switch handlers out of checkhitswitch_*. 2022-12-18 15:08:27 +01:00
Christoph Oelckers
a9ea2cd5c0 - moved GetReservedScreenSpace function into the scripted status bar where it belongs.
Since this is supposed to return the height of the status bar, keeping it native is a bit pointless as it cannot be modified that way.
2022-12-18 14:47:38 +01:00
Christoph Oelckers
e78fd90f67 - adapted sky code for using texture IDs. 2022-12-18 14:42:27 +01:00
Christoph Oelckers
8dfbbc8220 - migrated floorpicnum and ceilingpicnum to FTextures.
The sky code still needs some work.
2022-12-18 14:32:52 +01:00
Christoph Oelckers
622710ede4 - migrated all uses of floorpicnum.
This necessitated a few more surface type definitions.
2022-12-18 14:02:56 +01:00
Christoph Oelckers
4a306a21dc - split several texture flags off into a surface type value.
Using the same field in the TexExtInfo struct as Blood's surfType.
This frees up a lot of flags for later use.
2022-12-18 13:56:54 +01:00
Christoph Oelckers
1a98f9b478 - Duke: change all checks for mirrors to texture IDs 2022-12-18 13:52:10 +01:00
Christoph Oelckers
5b8dd84361 - use setceilingtexture where textures are simply copied around 2022-12-18 13:52:10 +01:00
Christoph Oelckers
ee8b685fe2 - adapted the breakable stuff interface in Duke to Texture IDs. 2022-12-18 13:52:03 +01:00
Christoph Oelckers
0ffeb2378a - generalize Duke's purple lava check. 2022-12-18 13:43:26 +01:00
Christoph Oelckers
6848af9b6c - use texture IDs in Duke's texture flag checkers. 2022-12-18 13:42:28 +01:00
Christoph Oelckers
5147826eeb - consolidated precaching code and rewrote the core to work on texture IDs. 2022-12-18 13:37:54 +01:00
Christoph Oelckers
8a789b9015 - voxel management cleanup.
Moving the voxel index into the texExtInfo array and removing most of Blood's and SW's special handling.
2022-12-18 13:18:43 +01:00
Christoph Oelckers
20edd800f9 - big texture system refactor.
Finally that quickly slapped together BuildTiles class is gone and replaced with something that better integrates with the underlying texture manager
2022-12-18 13:05:58 +01:00
Christoph Oelckers
e9acd74157 - added a fallback in shoot_* for incompletely ported items. 2022-12-18 00:34:17 +01:00
Mitchell Richters
53dfac5327 - Duke: Fix bad sector variable check in floorspace().
* Originated from 1b3f551216.
* Was causing the player to die quite easily when coming out of the transporter at the start of E2L2.
2022-12-14 18:14:06 +11:00
Christoph Oelckers
cd28c818b0 - fixed bad hitradius distance calculation.
Player offset was retrieved from the wrong actor here.
2022-12-13 17:19:04 +01:00
Christoph Oelckers
fba882e368 - fixed SE30 moving player twice each step.
With the changes in dd5834444e it was applying movement to the player in both the player and the actor loop.
2022-12-13 16:16:48 +01:00
Christoph Oelckers
f45265352d - added a few class types needed for RR's UFO spawners. 2022-12-13 15:49:09 +01:00
Christoph Oelckers
efd6d2cf07 - fix initialization issues with a few serializer functions. 2022-12-13 14:38:58 +01:00
Christoph Oelckers
4f388c3589 - fixed bad direction setup for vertically moving SE 0.
This also adds missing interpolation for this case.
2022-12-13 13:46:55 +01:00
Christoph Oelckers
5f6cd0da79 - Duke/RR: fixed floor alignment of flames in sloped sectors 2022-12-13 12:01:34 +01:00
Christoph Oelckers
6b0c067d46 - Duke: fixed flames not being floor aligned.
The same code was correct in the RR variant, so it just got copied over.
2022-12-13 11:51:14 +01:00
Christoph Oelckers
13e6718153 - added mapSpawned member to DDukeActor
Duke uses the owner a lot to check if an actor was spawned at map start or in-game, but that depends a lot on stale pointers being maintained, which our garbage collected system does not allow. So this field now serves as a more reliable stand-in for these cases.
No actual changes yet.
2022-12-13 10:36:45 +01:00
Christoph Oelckers
87ff99caa1 - fixed typo 2022-12-12 09:26:43 +01:00
Christoph Oelckers
1f7954fc29 - fixed World Tour fallback sound lookup. 2022-12-12 08:25:02 +11:00
Christoph Oelckers
1e249d3536 - fixed bad actor type check. 2022-12-11 20:15:14 +01:00
Mitchell Richters
7d6eb2bae6 - Remove some pitch/yaw deltaangle additions in lieu of setting the angle directly.
* This deltaangle addition was needed with the old input setup.
2022-12-11 19:46:27 +01:00
Mitchell Richters
c3f276a08a - Tidy up remaining Build angle constants in gamefuncs.h. 2022-12-11 19:46:27 +01:00
Mitchell Richters
de8353f085 - Eliminate BAngToDegree constant. 2022-12-11 19:46:26 +01:00
Mitchell Richters
67b40ee1d5 - Convert angle in hud_drawsprite() to work on true degrees, and in the right direction. 2022-12-11 19:46:26 +01:00
Mitchell Richters
3a1729a9ce - Duke (RR): Final tidy-up of displayweapon_r(). 2022-12-11 19:46:26 +01:00
Mitchell Richters
3eb3a29a7e - Duke: Tidy up animateshrunken(). 2022-12-11 19:46:26 +01:00
Mitchell Richters
c45b755773 - Duke (RR): Tidy up remaining uses of old weapon offset code. 2022-12-11 19:46:26 +01:00
Mitchell Richters
7ec2c1a0fa - Duke (RR): Move displaysaw() lambda to new weapon offsets. 2022-12-11 19:46:26 +01:00
Mitchell Richters
6d9b53af3d - Duke (RR): Move displayblaster() lambda to new weapon offsets. 2022-12-11 19:46:26 +01:00
Mitchell Richters
21fe395c2e - Duke (RR): Move displaytits() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
717955d5ab - Duke (RR): Move displaythrowingdynamite() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
70d7210462 - Duke (RR): Move displaydynamite() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
387e0286ac - Duke (RR): Move displaypistol() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
755e2be0a4 - Duke (RR): Move displayrifle() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00