Commit graph

211 commits

Author SHA1 Message Date
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
cb2bc7967a - fixed the remaining warnings. 2021-05-12 21:50:01 +02:00
Christoph Oelckers
dc8b72b2ce Merge branch 'master' into newrenderer2
# Conflicts:
#	source/games/duke/src/actors.cpp
#	source/games/duke/src/hudweapon_d.cpp
#	source/games/duke/src/hudweapon_r.cpp
#	source/games/duke/src/render.cpp
2021-04-15 19:34:03 +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
ba2defeb14 Merge branch 'master' into newrenderer2 2021-04-05 10:34:34 +02:00
Christoph Oelckers
eb2e77fb75 - Apply fix from EDuke32 commit 7225643e.
Fix undefined behavior/potential OOB access in ST_21_FLOOR_DOOR. g_AnimateGoal does not take a sector number, it takes an animation index, and caps at 1024, not 4096.
2021-04-05 00:14:15 +02:00
Christoph Oelckers
c303884274 - better handling for Duke's scrolling cloudy skies.
* Using the Doom-style dome here because it looks better.
* this necessitated changes to the backend to allow both types of sky domes at the same time
* do not clamp panning fields for cloudy sky with the new renderer because this makes the texture jump.
2021-04-04 20:35:38 +02:00
Mitchell Richters
2abda0e27d - All Games: Migrate each game's clock counter to backend solution. 2021-02-18 21:47:33 +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
0cab84f17a - Duke: Backport EDuke32 commits b1e3f3bcf9c5214ae835d09e12cc41bac4f057ce & 4c4fdd1f4ab9381b60db06f37ec270850599e1ae in relation to swinging doors. 2021-01-03 15:45:38 +11:00
Christoph Oelckers
1a2b93f402 - fixed sky panning in Duke.
This needs to take the composite texture into account because panning in Build is based on tile size, not map dimension.
It was also redone to use floating point to get rid of the horrible precision of the scrolling effect.
2020-12-06 20:49:32 +01:00
Mitchell Richters
1e8fe482f3 - Duke: Partially address excessively fast sky in E4L1 as reported in #217.
* Before d545eb7aa9, `moveclouds()` simply set `ceilingxpanning`/`ceilingypanning`. Afterwards, it was accumulating with every passing loop.
* Despite fixing this, still seems a bit fast.
2020-12-06 23:51:20 +11:00
Christoph Oelckers
b9477f147e - migrated Duke's interpolations to the common system and added handling for texture scrollers. 2020-11-26 18:32:36 +01:00
Christoph Oelckers
d545eb7aa9 - make sector panning variables floats and added some convenience wrappers. 2020-11-26 18:32:35 +01:00
Mitchell Richters
6ccf925429 - buildutils: Replace sintable[] use within Duke's sectors.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Christoph Oelckers
25c93e65fc - more script ID wrappers for sectors. 2020-11-04 20:40:26 +01:00
Christoph Oelckers
8f754d163d - removed inline wrappers that are not needed anymore.
# Conflicts:
#	source/games/duke/src/spawn_r.cpp
2020-11-04 20:40:07 +01:00
Christoph Oelckers
7aca51a6c4 - 6 more loops. 2020-11-04 19:55:17 +01:00
Christoph Oelckers
7e29be7569 - switched checkhitwall interface to actors. 2020-11-03 21:49:57 +01:00
Christoph Oelckers
ad84c8149e - the rest of sectors.cpp 2020-11-03 07:06:27 +01:00
Christoph Oelckers
4236f800f6 - operateactivators and operatemasterswitches. 2020-11-03 07:06:26 +01:00
Christoph Oelckers
7635fc9ad6 - operatesectors. 2020-11-03 07:06:26 +01:00
Christoph Oelckers
326ca9e172 - handle_st28, 2020-11-03 07:06:26 +01:00
Christoph Oelckers
06695073d0 - handle_st27. 2020-11-03 07:06:26 +01:00
Christoph Oelckers
d4c53226d0 - handle_st25. 2020-11-03 07:06:26 +01:00
Christoph Oelckers
fd8ee214f5 - handle_st23. 2020-11-03 07:06:25 +01:00
Christoph Oelckers
e6507887d3 - handle_st20. 2020-11-03 07:06:25 +01:00
Christoph Oelckers
2afbbcb157 - handle_st29. 2020-11-03 07:06:25 +01:00
Christoph Oelckers
7c491742f9 - handle_st15. 2020-11-03 07:06:25 +01:00
Christoph Oelckers
88adef3caa - split up operatesectors into more digestable pieces. 2020-11-03 07:03:01 +01:00
Christoph Oelckers
4dd9be7b6d ..
- activatewarpelevators
2020-11-03 06:52:26 +01:00
Christoph Oelckers
6adc2f8e55 - findplayer 2020-11-01 17:07:47 +01:00
Christoph Oelckers
fa5b48d270 - check_activator_motion, doanimations. 2020-11-01 17:07:47 +01:00
Christoph Oelckers
b2a2232260 - callsound 2020-11-01 17:07:46 +01: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
53414afbe5 - all stat iterators in sectors.cpp handled. 2020-10-15 01:34:28 +02:00
Christoph Oelckers
760a557f73 - converted the remaining sector iterators in Duke. 2020-10-15 01:34:27 +02:00
Christoph Oelckers
fe2e96d3a6 Merge branch 'master' into InputContinuation
# Conflicts:
#	source/games/duke/src/duke3d.h
2020-10-10 21:39:27 +02:00
Christoph Oelckers
b142f33edd - fixed problems with stopping sector effect sounds.
The old check only accounted for the case of trying to play a valid follow-up sound, but not for merely stopping the old one.
Restored the original check that was here.
2020-10-10 18:11:26 +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
Christoph Oelckers
71c3441b1e - transitioned cloudclock.
This timer runs at 60 Hz in the render code, so it needs to take smoothratio into account.
2020-08-31 19:22:21 +02:00
Mitchell Richters
c207437a57 - Duke: Rename cloudtotalclock to cloudclock.
* Mostly so it doesn't come up on searches for `totalclock`.
2020-08-26 09:49:32 +10:00
Mitchell Richters
afb09456e0 - Duke: Migrate away from using totalclock and use new game-specific gameclock with underlying timer code in common.
* Build timer still requires initialisation due to multiple `timerSetCallback()` that still need to work.

# Conflicts:
#	source/core/menu/menu.cpp
#	source/games/duke/src/game.cpp
2020-08-25 19:47:31 +02:00
Christoph Oelckers
4332d02885 - fixed sound playback for doors etc.
The play code locked out the MUSICANDSFX actor but never properly checked for the sound being finished.
Fixes #87
2020-08-01 11:56:02 +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
c16115d76c - first stage of new savegame code.
This also refactors the animateptr array into something serializable. This kind of pointer lookup is virtually unrestorable without creating platform locked savegames.
2020-07-20 20:40:29 +02:00
Christoph Oelckers
f4e763e252 - input code cleanup.
The input queues are mostly abstracted now and some EDuke specific handling that isn't needed anymore was removed.
2020-07-06 10:34:31 +02:00
Christoph Oelckers
827672a775 - moveclouds. 2020-07-06 02:05:31 +02:00
Christoph Oelckers
7872b701ce - CCMD cleanup. 2020-07-04 21:36:27 +02:00
Christoph Oelckers
2bd4173716 - renamed a few headers. 2020-06-24 21:21:02 +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
e1c76e4c26 - safety commit.
# Conflicts:
#	source/games/duke/src/zz_sbar.cpp
2020-06-21 23:07:42 +02:00
Christoph Oelckers
c28ea5792a - copyright 2020-06-21 22:59:09 +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
4c47361132 - added null check to findplayer. 2020-06-21 22:40:13 +02:00
Christoph Oelckers
577a800843 - the rest of sector.cpp, except for the input function. 2020-06-21 22:40:12 +02:00
Christoph Oelckers
92f5236b24 - more sector stuff. 2020-06-21 22:40:12 +02:00
Christoph Oelckers
c9a47d2e44 checkhitswitch
intentionally not merged because this is too messy.
2020-06-21 22:40:11 +02:00
Christoph Oelckers
536e3c886c 20% of sector.cpp
# Conflicts:
#	source/games/duke/src/zz_sector.cpp
2020-06-21 22:40:11 +02:00
Christoph Oelckers
c8cb0e4efd - the beginning of sector.cpp
The math backend functions have been moved out of Build because they originally have a good license.

# Conflicts:
#	source/build/src/mdsprite.cpp
#	source/build/src/polymost.cpp
2020-06-21 22:39:05 +02:00