Commit graph

1560 commits

Author SHA1 Message Date
Christoph Oelckers
e75f0c17e4 - ported the TitleScreen class. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
1022564cab - initial framework for scriptification of screen jobs. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
4a7430c8e4 - got rid of JobDesc. 2021-04-30 20:08:23 +02:00
Christoph Oelckers
71e5f9b70f - changed screen job list to work without per-job completion callbacks.
They made things more complex than necessary and do not translate well to scripting.
2021-04-30 20:08:22 +02:00
Christoph Oelckers
fb5e2fe0c0 - use flags instead of bools. 2021-04-30 20:08:22 +02:00
Christoph Oelckers
af3eac8456 - simplified screen job setup where all elements can be skipped in one go. 2021-04-30 20:08:22 +02:00
Mitchell Richters
9bebd7fabf - Remove max ammo fudging for when showing the magazine amount for Duke since it overrides ammo maximums set from CON. 2021-04-26 12:35:07 +10:00
Christoph Oelckers
8c379f7a44 Merge branch 'master' into newrenderer 2021-04-25 11:33:47 +02:00
Christoph Oelckers
ad28630df6 - offloaded map patches to data files.
This is a lot easier to manage than having them in the code.
For now it piggybacks on the map hack feature, later this should use the same scripted approach as GZDoom.
2021-04-24 23:07:35 +02:00
Christoph Oelckers
c05df44ad4 - fixed the check for RR's geometry effect.
This always got triggered for Duke which made the entire map render 3 times. The most obvious effect was reduced translucency.
2021-04-23 21:36:51 +02:00
Christoph Oelckers
3766c5aed0 - restored original palette handling for access cards that got broken in 242f958c41
Unlike all the other HUD sprites this one works differently.
2021-04-23 19:36:55 +02:00
Christoph Oelckers
bf23d6c3b0 - corrected level number for RR's summary screen. 2021-04-23 16:07:04 +02:00
Christoph Oelckers
14971f9569 Merge branch 'master' into newrenderer 2021-04-22 00:10:37 +02:00
Christoph Oelckers
729928c576 - SW: fixed bad serialization of sector object pointers 2021-04-22 00:03:18 +02:00
Christoph Oelckers
a4f5a32680 - fixed issue with restoring SO sprite array.
This array has -1 for empty entries so it cannot be saved partially.
2021-04-22 00:03:17 +02:00
Christoph Oelckers
c3e5cf322e - SW: cleaned up the depth variable handling in SECT_USER which was endian dependent, including the savegame handler 2021-04-22 00:03:17 +02:00
Christoph Oelckers
c17ec5fa45 - cleanup of savegame framework 2021-04-22 00:03:17 +02:00
Christoph Oelckers
b85da221d7 - SW: save tracks as JSON. 2021-04-22 00:03:17 +02:00
Christoph Oelckers
bb8309831c - SW: eliminated the int pointer in ANIM.
# Conflicts:
#	source/games/sw/src/save.cpp
2021-04-22 00:03:16 +02:00
Christoph Oelckers
c49c5fcf1d - SW: serialize SO interpolations as JSON. 2021-04-22 00:03:16 +02:00
Christoph Oelckers
2d571586bd - save sector objects as JSON 2021-04-22 00:03:16 +02:00
Christoph Oelckers
e9b1342ffd - SW: save globals as JSON. 2021-04-22 00:03:16 +02:00
Christoph Oelckers
66e5b9ada7 - SW: save SectUser as JSON, also store in a managed array. 2021-04-22 00:03:16 +02:00
Christoph Oelckers
06b03f7301 - SW: save the player and related data as JSON. 2021-04-22 00:03:15 +02:00
Christoph Oelckers
9bae2295cc - better USER clearing. 2021-04-22 00:03:15 +02:00
Christoph Oelckers
8fee2b3ed7 - save SW's User array as JSON. 2021-04-22 00:03:15 +02:00
Christoph Oelckers
32955621f8 - removed all parental lock garbage from SW.
Better get rid of it as it's a major complication as implemented.
2021-04-22 00:03:15 +02:00
Christoph Oelckers
bbb53bc717 - refactored the main User array into something that's automatically managed. 2021-04-22 00:03:14 +02:00
Christoph Oelckers
cd45a1f035 - made more parts of USER serialization friendly. 2021-04-22 00:03:14 +02:00
Christoph Oelckers
dcb393bc44 - started reorganizing SW's memory management.
Need to get rid of all those unmanaged allocations and present game data in an easily serializable form.
This adds a managed TPointer class that replicates the useful parts of std::unique_pointer but steers clear of its properties that often render it useless.
2021-04-22 00:03:14 +02:00
Mitchell Richters
93edeac791 - Clean-up of input functions.
* Remove unused `getincanglef()`.
* Remove unused `getincangleq16()`.
* In `PlayerHorizon` struct, clamp value when setting target in `__settarget()`, not each public `settarget()` overload.
* Rename `PlayerAngle` method `applylook()` to `applyinput()`.
* Rename `PlayerHorizon` method `sethorizon()` to `applyinput()`.
* In `PlayerHorizon::applylook()`, slightly clean return to centre code so it doesn't do math if already at 0.
* In `PlayerAngle::applylook()`, slightly clean rotscrnang/look_ang code so it doesn't do math if already at 0 and reposition where mouse input is applied so that if input is applied, the player never enters a spin.
* In `Duke3d::player_struct::apply_seasick()`, use `buildfang()` method instead of scaling float to BAM within function.
2021-04-21 20:41:04 +10:00
Christoph Oelckers
f51872db25 Merge branch 'master' into newrenderer 2021-04-20 20:46:06 +02:00
Christoph Oelckers
aaad546729 - palookup. 2021-04-20 20:21:51 +02:00
Christoph Oelckers
9e40e49c2c - generalized the special key handling for skipping cutscenes. 2021-04-20 15:01:26 +02:00
Mitchell Richters
0c5729b0f6 - SW: Ensure all sprite angles are backed up in the ticker.
* Fixes #326.
2021-04-20 21:33:42 +10:00
Mitchell Richters
d34070b8ae - gameinput.h: Remove precise bool from horizsumfrac(), look_anghalf() and looking_arc() added in a4895cb270.
* It looks terrible to have low precision math versions of look_anghalf and looking_arc since we always interpolate `look_ang` now, so lets just not.
2021-04-20 21:12:17 +10:00
Mitchell Richters
2f696e1a95 Merge branch 'master' into newrenderer 2021-04-19 20:50:37 +10:00
Mitchell Richters
de06030ea0 - gameinput.cpp: Make sethorizon(), applylook() and calcviewpitch() class functions of PlayerHorizon and PlayerAngle where appropriate. 2021-04-19 20:50:10 +10:00
Mitchell Richters
1daa346fdd - Exhumed: Make SB_CENTERVIEW work properly when cl_syncinput 1 is set. 2021-04-19 20:24:11 +10:00
Mitchell Richters
4eaf05d95e - Duke: Fix bad vehicle speed clamp change from e79c6bacd3.
- Fixes #325.
- 🤦
2021-04-19 19:33:13 +10:00
Mitchell Richters
171d541112 Merge branch 'master' into newrenderer 2021-04-18 10:05:10 +10:00
Mitchell Richters
3961fcc28a - Exhumed: When returning to center after going up/down stairs etc (slope tilting), don't use the backend's aim/look up/down return to center code as it's slower. 2021-04-18 10:04:17 +10:00
Christoph Oelckers
eb912604d2 - RFS compatibility with GDX: The outermost path component can be left out. 2021-04-17 23:59:10 +02:00
Christoph Oelckers
82194bbf6b Merge branch 'master' into newrenderer
# Conflicts:
#	source/games/exhumed/src/2d.cpp
2021-04-17 13:22:30 +02:00
Christoph Oelckers
d2c9b5979d - gave key 7 a proper spawn record using the blue outline as image.
A proper definition here is needed to allow dropping this item.
The original code had a picnum of -1 here which caused crashes.
2021-04-17 12:05:37 +02:00
Christoph Oelckers
0cdb7a53ce - more char removal - mostly weapon.cpp 2021-04-17 10:34:12 +02:00
Christoph Oelckers
9828b0228e - made type of shade variables consistent.
Some were char, some signed char and the initializers needed type casts.
This wasn't serious but created a lot of casting noise.
2021-04-17 10:22:00 +02:00
Christoph Oelckers
ada28d8d04 - Blood: replaced 'unsigned char' with 'uint8_t' and 'signed char' with 'int8_t'.
Preparation for getting rid of all those excessively used plain chars which are a menace to code stability.
2021-04-17 10:14:03 +02:00
Christoph Oelckers
839547a9fc - Blood: gave FXDATA meaningful member names 2021-04-17 10:12:40 +02:00
Christoph Oelckers
42b87362ee - When keeping around a dummy sprite, make sure that the engine's utilities cannot find it anymore.
This was causing issues with the master switch sprites in Duke that have to be kept for sound purposes.
Unfortunately, both hitscan and neartag are far too dumb to analyze sprites they may hit in any way and needed some help skipping such sprites.
2021-04-17 09:37:38 +02:00
Christoph Oelckers
091a9b7fef - fixed Exhumed laptop cutscene. 2021-04-17 00:01:28 +02:00
Christoph Oelckers
2b9a527aba - added a 'Start' method to DScreenJob.
Since the menu pauses the ticker this is needed to perform initial setup before the first frame.
2021-04-16 23:29:53 +02:00
Christoph Oelckers
49e07a47c6 - now that everything is fixed, the map in Exhumed can be initiated from the console. 2021-04-16 22:40:21 +02:00
Christoph Oelckers
03d517c509 - removed debug assert. 2021-04-16 22:16:21 +02:00
Christoph Oelckers
1852c0b802 - properly pause the screen job player if the menu is open.
Still needs a bit of work for movies with embedded streaming sound.
2021-04-16 22:03:01 +02:00
Christoph Oelckers
2942e011bf - cleaned up the screen job's fade handling, now that the jobs no longer depend on an external timer. 2021-04-16 21:27:54 +02:00
Christoph Oelckers
e580407d7d - the remaining Exhumed screens.
These are not tested yet, a bit more work is needed to allow this.
2021-04-16 20:48:40 +02:00
Christoph Oelckers
a43259c40c - Exhumed's map. 2021-04-16 20:10:46 +02:00
Christoph Oelckers
fed15a79e4 - Exhumed's intro screens. 2021-04-16 20:08:20 +02:00
Christoph Oelckers
4950b556c9 - handled SW's screens. 2021-04-16 18:43:59 +02:00
Christoph Oelckers
9dff494e6c - handle all of RR's screens. 2021-04-16 17:38:05 +02:00
Christoph Oelckers
f4b089b776 - fixed bad sound checkin Duke's intermission. 2021-04-16 17:37:08 +02:00
Christoph Oelckers
7895d67b18 - ported the Duke intermission screen.
This also got its timing code thoroughly cleaned up.
2021-04-16 17:24:59 +02:00
Christoph Oelckers
a78af92959 - migrated the Duke end of episode animations. 2021-04-16 17:24:59 +02:00
Christoph Oelckers
2a2c85c082 - migrated Duke's intro images and the first episode's ending animation. 2021-04-16 17:24:59 +02:00
Christoph Oelckers
6ed1d5e678 - DBlackScreen and DImageScreen migrated to event-based handling. 2021-04-16 17:24:58 +02:00
Mitchell Richters
be4fbbf9ec - Exhumed: Hide player panning code behind cl_slopetilting.
* Fixes #303. again.
2021-04-16 23:37:05 +10:00
Christoph Oelckers
9c5f3f3673 - Exhumed: Skip the map when changing levels from the console.
The current screen job implementation does not coexist well with UI elements.
More like a hotfix, the screen job framework needs to be redone for properly handling input.
2021-04-15 23:04:14 +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
61a6321cd6 - Exhumed: Change map command to start the level directly without going through the scrolling map. 2021-04-15 18:55:54 +02:00
Mitchell Richters
e79c6bacd3 - Duke: Clamp RRRA vehicle input in processVehicleInput(). 2021-04-15 18:59:07 +10:00
Mitchell Richters
2176435831 - Duke: Replace sprite z pos numeric values with correct enum values for each game. 2021-04-15 18:02:16 +10:00
Mitchell Richters
6cebd7fca2 Merge branch 'master' into newrenderer2 2021-04-15 18:01:26 +10:00
Mitchell Richters
aeb16e390c - Duke: Add resurrected flag to handle resurrection via cheating or when pissing in RR. 2021-04-15 18:00:58 +10:00
Mitchell Richters
d5b14a8de3 - Duke: Remove some direct array accesses in lieu of player_struct pointer. 2021-04-15 16:34:24 +10:00
Mitchell Richters
242f958c41 - Duke: Clean up some duplicated code in hudweapon_*.cpp files. 2021-04-15 15:49:36 +10:00
Mitchell Richters
a4895cb270 - All Games: Allow for HUD interpolation to be disabled.
* Requested by users, really don't know why...
* Interpolation values are guarded by the CVAR.
* For Blood, integer truncation is employed just like original game.
* For all games where more precise sine/cosine math has been utilised, no changes have been made.
2021-04-15 13:35:53 +10:00
Christoph Oelckers
9a58299bee Merge branch 'master' into newrenderer2 2021-04-14 22:37:59 +02:00
Christoph Oelckers
f83e678ea0 - use the smooth ratio from the game logic in the renderer instead of calling I_GetTimeFrac again.
Unlike the higher level code this does not check for game over conditions.
2021-04-14 21:17:32 +02:00
Mitchell Richters
7b57df3c8f - Exhumed: Redo player panning code.
* Initial implementation from d32dcd5f8e was not working properly and already had some workarounds for when the player was underwater, etc.
* Re-read implementation in GDX and rebased off of it.
* Fixes #303.
2021-04-13 21:56:01 +10:00
Christoph Oelckers
eaebcfcd7d - Exhumed: hotfix for moving on sloped floors 2021-04-13 00:31:50 +02:00
Christoph Oelckers
798cf2f973 Merge branch 'newrenderer2' of https://github.com/coelckers/Raze-private into newrenderer2 2021-04-12 20:25:56 +02:00
Christoph Oelckers
9598b626c9 Merge branch 'master' into newrenderer2 2021-04-12 20:03:50 +02:00
Christoph Oelckers
1e40e93da4 - fixed the vertical offsets of the World Tour skies.
They were rendered too low.
2021-04-12 19:47:16 +02:00
Christoph Oelckers
efe76a6647 - Blood: fixed crash with badly defined drop objects.
Got -1 for picnum there, this was causing crashes.
2021-04-12 16:32:42 +02:00
Christoph Oelckers
10d0de8dbf Merge branch 'master' into newrenderer2 2021-04-12 15:06:12 +02:00
Christoph Oelckers
f87e40131f - Blood: add a dummy sound entry at index 0.
Parts of the sound system treat entry 0 as "no sound" so nothing placed there would play.
This made the one custom sound in "The Way of Ira" not play because as the last sound being defined it ended up in the first, invalid slot.
2021-04-12 00:31:36 +02:00
Christoph Oelckers
d25838fe15 - Blood: fixed issue with INI detection when having content added by RFS files. 2021-04-12 00:31:36 +02:00
Christoph Oelckers
9b977ba96e - fixed mixup of values 0 and -1 in sound code.
0 means 'default', -1 means 'silent'. This caused playback issues for useSoundGen. All other places were passing proper volume values along, this is the only one to read the volume from map data.
2021-04-11 22:42:24 +02:00
Christoph Oelckers
6142f9d795 - added CHANF_FORCE flag for forcing non-looped sounds to start, even when sound is paused.
Blood needs this for its PlayerSound controller, which is run right on map load - so without this it wouldn't start the sound when a map is initiated from the console.
2021-04-11 21:14:09 +02:00
Christoph Oelckers
fd6a71cac5 - fixed a random crash with an empty sprite I just experienced. 2021-04-11 21:14:09 +02:00
Christoph Oelckers
aebcc13c4a - migrated voxel parsing stuff. 2021-04-11 18:37:11 +02:00
Christoph Oelckers
42d02834b1 Merge branch 'master' into newrenderer2
# Conflicts:
#	source/build/include/build.h
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
#	source/core/gamecontrol.cpp
#	source/core/gamestruct.h
#	source/games/blood/src/animatesprite.cpp
#	source/games/blood/src/misc.h
#	source/games/blood/src/view.cpp
#	source/games/duke/src/render.cpp
#	source/games/sw/src/draw.cpp
#	source/games/sw/src/game.h
#	source/games/sw/src/jsector.cpp
#	source/glbackend/glbackend.cpp
2021-04-11 14:38:56 +02:00
Christoph Oelckers
0ee28fb45e - also handle SW's voxels. 2021-04-11 13:38:23 +02:00
Christoph Oelckers
32250f704f - mograted Blood's precaching to the backend's implementation. 2021-04-11 12:42:59 +02:00
Christoph Oelckers
6342926871 - disabled the QAV preload calls in Blood.
Aside from not having been functional, this is ultimately more harmful than useful as it forces loading of a large number of textures at the same time during gameplay instead of spreading them out.
2021-04-11 12:10:52 +02:00
Christoph Oelckers
d663d84596 - changed precaching setup for Exhumed.
This looks overly simplistic - I doubt it's enough to catch everything.
2021-04-11 10:54:10 +02:00
Mitchell Richters
e959226914 - Fix RRRA bike/boat angle adjustments following changes in f343bd8d5e.
* Because we're wrapping a negative number around to be unsigned, we need to do that after we've done our bit-shift operations.
2021-04-11 18:34:07 +10:00
Christoph Oelckers
387c62d584 - rewrote SW's precaching code.
* made it palette aware
* use backend facilities to track precached data.
* fixes bug in animation precaching loops - they only precached the base index over and over again.
2021-04-11 10:20:52 +02:00