Commit graph

7177 commits

Author SHA1 Message Date
Christoph Oelckers
793d2d99ef - re-fixed the music lookup. 2021-04-08 17:46:53 +02:00
Christoph Oelckers
a53ed46bae - fixed item placement on SW minihud.
Fixes #295
2021-04-08 17:43:56 +02:00
Christoph Oelckers
fc1fbfe8b3 - fixed .def 'music' parsing.
This was incomplete and just ignored Duke's special music, and the levelnum generation used an outdated formula so that it never managed to assign any music to the maps.
2021-04-08 16:35:26 +02:00
Christoph Oelckers
e2f570a70a - fixed: extended sound lookup must check the sound/ folder. 2021-04-08 16:05:32 +02:00
Christoph Oelckers
1439897b65 - fixed extended music lookup.
The logic was inverted for extended lookup which always resulted in failure to find the song.
2021-04-08 15:55:37 +02:00
Christoph Oelckers
e0ee3a6701 - fixed: Vulkan did not define NPOT_EMULATION for its fragment shader. 2021-04-08 09:29:08 +02:00
Christoph Oelckers
a80c5db02b - forgot to save the Exhumed part of the last commit 2021-04-07 21:37:01 +02:00
Christoph Oelckers
58fb938aa7 - block opening of the menu in the fade out phase of a screenjob and in Exhumed's map/intermission screens.
At these places there's some inteference that can bring the engine into an unstable state.
This is not a real fix, just a quick workaround. The actual problem requires closer examination why these are the only places where this happens.
2021-04-07 19:39:48 +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
4a6a999f89 - SW: fixed interpolation for sector object sprites.
When checking for an existing interpolation it needs to check the actual sprite, not just the interpolation type.
2021-04-07 15:08:26 +02:00
Christoph Oelckers
424c0ce3f4 - testing some script parser improvements. 2021-04-06 15:07:12 +02:00
Christoph Oelckers
cbe25d9d6b - Blood: disable look left and look right in the classic key configuration. 2021-04-06 12:06:03 +02:00
Christoph Oelckers
fc314b6616 - allow loading Zips where all content is in a subdirectory.
The same logic as in GZDoom applies: The root must not have any other content and the subdirectory must contain identifiable game content.
Some handling was also added to strip out macOS resource fork folders because they can contain data that can confuse file detection.
2021-04-06 01:06:03 +02:00
Christoph Oelckers
bfcedc2177 - autodetect .inis when loading Blood mods.
This works as long as the loaded mods have one single .ini file in them - in that case it is assumed that it is supposed to replace blood.ini, which will allow dragging & dropping such archives without further user intervention.
2021-04-06 00:57:31 +02:00
Mitchell Richters
5984fda8a1 - PlayerAngle: Repair issues with addadjustment() method following changes in 4ffe004483 that were affecting negative input. 2021-04-06 06:01:54 +10:00
Christoph Oelckers
8ea13f7c65 - implemented support for paletted textures to Vulkan backend. 2021-04-05 21:24:29 +02:00
Christoph Oelckers
869433ee2e - fixed invalidation of programmatic textures.
This is only relevant for Vulkan because it stores the descriptor sets with the material, not the hardware texture.
2021-04-05 19:18:57 +02:00
Christoph Oelckers
c0f1949fb9 - fixed some swapped parameters in status bar code. 2021-04-05 19:07:59 +02:00
Christoph Oelckers
0017b5d9c5 - pad out the StreamData buffer to 16 bytes and avoid any form of conditional compilation here.
Vulkan does not manage to get the shader properly compiled without this.
2021-04-05 18:00:02 +02:00
Christoph Oelckers
f2dd4ceaab - always ensure that the global index buffer is not empty.
This needs to be valid for Vulkan, even if it isn't used.
2021-04-05 18:00:02 +02:00
Christoph Oelckers
96fb96617f - backend update from GZDoom. 2021-04-05 17:59:54 +02:00
Christoph Oelckers
008391a2ad - license correction for ct_chat.cpp
This was supposed to get the same treatment as d_net.cpp, i.e get the old license restored and be released under a duplicate GPL/Doom Source license but it was somehow missed when it got added. Also removed all leftover Doom specific parts.
2021-04-05 08:59:06 +02:00
Christoph Oelckers
658712d893 - removed duplicate d_gui.h file. 2021-04-05 08:56:44 +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
8e31c34b06 - fixed tileImportFromTexture.
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:02:04 +02:00
Christoph Oelckers
9828cd7129 - this better have a null check... 2021-04-04 13:02:26 +02:00
Christoph Oelckers
6ebbf1288d - Duke/RR: Don't delete master switch sprites.
The sound system may play sounds on them after their deletion - this resulted in undefined behavior. To ensure properly defined behavior the sprite needs to be retained at least as long as the sound controller may still need it - which cannot be reliably determined so it has to be kept around forever. This would be easier if the sound controller code had proper start and stop events instead of inferring what to do from secondary information.
Fixes #288.
2021-04-04 13:01:32 +02:00
Christoph Oelckers
97a0cb2a10 - handle voxel rotation in the backend to enable it for all games.
This was previously only present in the Blood module and missed in Exhumed from upstream so the entire option was rather pointless.
Fixes #290
2021-04-04 10:33:29 +02:00
Christoph Oelckers
a298a3d3df - disabled 'isRunning' in Blood entirely.
After discovering yet another misbehaving place in the game I think it can be safely concluded that this is better left off unconditionally.
The only remaining place where this still gets checked is in nnexts, but I wouldn't expect this to work either.
Fixes #292
2021-04-04 09:35:05 +02:00
Christoph Oelckers
ebac57fb4f - fixed music in Blood's menu
This is only supposed to play for the fade-in of the background but needs to stop when the menu appears.
Fixes #291
2021-04-04 09:25:41 +02:00
Christoph Oelckers
952bccbf5f - added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back. 2021-04-03 21:49:28 +02:00
Mitchell Richters
e3c2757f1c - sethorizon(): Ensure SB_CENTERVIEW bit is always cleared if horizon target is set. 2021-04-02 23:23:24 +11:00
Mitchell Richters
9c01bde44e - gameinput.cpp: Block player input within sethorizon() and applylook() if target for each has been set by the ticker.
* Stops players having the ability to provide input and fight the system trying to set an input.
2021-04-02 22:47:19 +11:00
Mitchell Richters
4ffe004483 - Further work within PlayerAngle and PlayerHorizon structs following 39fe9efaff and bf2d8078a4.
* Reduce code repetition.
* Clamp incoming horizon when using `settarget()` methods.
* Eliminate double calculation that was occurring in `processhelpers()`.
2021-04-02 22:47:17 +11:00
Mitchell Richters
c076310e34 - InputState::ClearAllInput(): Only clear crouch_toggle bool if outside of a level, and resend SB_CROUCH sync bit if inside a level and crouch_toggle is true.
* Fixes #287.
2021-04-01 13:46:16 +11:00
Mitchell Richters
4321efa21c - Re-arrange swaddons[] const char array so that /gameroot is picked up first following changes in f4b27bbd27.
* Since f4b27bbd27, `D:/Program Files (x86)/Steam/steamapps/common/Shadow Warrior Classic/gameroot/addons/Sw.grp` was being picked up instead of `D:/Program Files (x86)/Steam/steamapps/common/Shadow Warrior Classic/gameroot/SW.GRP`.
* Fixes #289.
2021-04-01 12:25:57 +11:00
Mitchell Richters
029f8807df - Make 360. / 2048. a constant expression and replace all uses throughout code. 2021-04-01 10:42:22 +11:00
Mitchell Richters
aa35b6a479 - binaryangle.h: Fix constexpr issue on GCC builds following bf2d8078a4. 2021-04-01 08:32:07 +11:00
Mitchell Richters
c630ad9110 Revert "- subjective fix to Duke 3D's RPG harsh recoil."
This reverts commit 839a7bcbe4.

Revert "- Duke: Restore RPG harsh recoil behind a CVAR."

This reverts commit 88a49b0d22.

# Conflicts:
#	source/core/gamecvars.cpp
#	source/core/gamecvars.h
2021-03-31 20:35:18 +11:00
Mitchell Richters
760c918e75 - Duke: Remove unnecessary int casts from gameexec.cpp.
* Incoming vars are already int and called functions only accept an int so really just no need at all.
2021-03-31 20:07:36 +11:00
Mitchell Richters
16886895b0 - Duke: DoPlayer(): Ensure SB_CENTERVIEW bit is cleared when setting a horiz target from CON.
* Repairs horizon issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365.
2021-03-31 19:48:38 +11:00
Mitchell Richters
bf2d8078a4 - PlayerHorizon: Replicate changes to settarget() and processhelpers() methods from 39fe9efaff. 2021-03-31 19:44:50 +11:00
Mitchell Richters
39fe9efaff - PlayerAngle: Adjust how settarget() methods store angle for unsynchronised angle adjustments and adjust processhelpers() method accordingly.
* Repairs angle issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365.
2021-03-31 19:43:41 +11:00
Christoph Oelckers
a12f277846 - fixed uninitialized clear color variable. 2021-03-22 12:07:51 +01:00
Christoph Oelckers
98e4a3035d - updated the earcut.hpp triangulator.
The old one wasn't triangulating the bathroom sector in DUKEDC2 properly, the bug got fixed upstream in the mean time.
2021-03-21 17:18:15 +01:00
Christoph Oelckers
7c68261fbf - redirect Exhumed's shareware exit to the main menu. 2021-03-15 18:58:28 +01:00
Christoph Oelckers
ac82838859 - removed unused 'wallvisible' function. 2021-03-15 18:58:14 +01:00
Christoph Oelckers
8aa59f2385 - use clamp instead of bit masking to handle out of range interpolation factors for models. 2021-03-15 11:35:39 +01:00
Christoph Oelckers
60979ee478 - fixed: G_BuildTiccmd needs to clear the command struct.
This could otherwise pick up some stray data from earlier calls and create bogus input.
Fixes #97
2021-03-15 10:11:49 +01:00
Christoph Oelckers
834da8b83b - Exhumed: refresh the status bar after loading a saved game.
It is actually not necessary to save the state - but the RefreshStatus function must be called to update all current values.
Fixes #282
2021-03-14 12:57:23 +01:00
Christoph Oelckers
90cb82d244 - disable the player specific volume modifiers if replay gain is enabled.
These two functions would get into the way of each other otherwise.
2021-03-14 09:05:28 +01:00
Christoph Oelckers
aa789c7605 - adapt to changed value range of module master volume in ZMusic.
The default was far too quiet and had to be increased to let the player have comparable output to the rest of the music system.
2021-03-14 08:51:59 +01:00
Christoph Oelckers
8ae5d0b30e - backend update from GZDoom. 2021-03-13 01:21:38 +01:00
Christoph Oelckers
f4b27bbd27 - sort the game selection list by definition order in grpinfo.txt.
This is to have consistent ordering, independent of where the files are found.
Game order is: Duke, Blood, Shadow Warrior, Redneck Rampage, Nam, WW2GI, Exhumed, all the official mission packs are grouped below the game they belong to.
2021-03-12 23:45:03 +01:00
Christoph Oelckers
25bf0854cf - allow game specific music names for all games supporting an Ogg-format CD audio soundtrack.
New names are:

REDNECKxx.ogg for Redneck Rampage
REDNECKRIDESxx.ogg for RR Rides Again.
SHADOWxx.ogg for Shadow Warrior.

The motivation here is to allow copying all this music to a single folder or .zip file and reference it from all games.
2021-03-12 23:15:34 +01:00
Christoph Oelckers
d7f720664a - Exhumed: fixed uninitialized variables in Queen boss when reloading a savegame. 2021-03-09 22:18:43 +01:00
Christoph Oelckers
df742d25db - Exhumed: Replace asserts for range checks with if's.
Asserts are mere debugging aids, the code was still trashing valid date in release builds.
2021-03-09 20:02:08 +01:00
Christoph Oelckers
e375c799ce - CommonLoon102's weapon fixes from NBlood:
Fix bug when switching to another weapon from the spray while firing with primary fire won't switch to the new weapon. And telling Caleb not to put away his lighter if the spray is being switched to TNT.
Do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray.
Do not put away lighter if TNT was selected while throwing a spray can.
Fix next/prev weapon
2021-03-09 09:31:04 +01:00
Christoph Oelckers
ee5950e7ad - backend update from GZDoom. 2021-03-07 13:21:15 +01:00
Christoph Oelckers
ad8654ed06 - fixed maphack loader.
The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.

Fixes #279
2021-03-07 09:39:16 +01:00
Christoph Oelckers
9104fba3ec - moved colormap constants to backend. 2021-03-06 23:06:26 +01:00
Christoph Oelckers
5b85105762 - re-added the fix for the inverted card reader in Twin Dragon's Map 10.
This accidentally got lost when the one-sided key fix was generalized.
2021-03-06 12:20:03 +01:00
Christoph Oelckers
57a6bfcdcd - Blood: fixed typo in map loader that overwrote the floor y panning offset with its fractional part. 2021-03-03 13:26:58 +01:00
Christoph Oelckers
cb14e3023e - fixed "roll" in maphack parser 2021-03-02 21:47:43 +01:00
Christoph Oelckers
bbd5c0ac8b - transitioned voxel rendering to use the backend's implementation. 2021-03-02 17:10:34 +01:00
sinisterseed
8d5682fa97 - version bump.
We're past 0.8 for some time now, and slowly approaching 1.0 :) .
2021-03-02 17:53:25 +02:00
Christoph Oelckers
4b59acd251 - Blood: Check the sound's internal loop flag when playing a sound.
Fixes #275
2021-03-02 11:59:20 +01:00
Mitchell Richters
e0f1a83f40 Revert "- SW: Alt implementation for preparing a nuke."
This reverts commit 4fcec5f6d3.

Functionality wasn't working properly, most players will never use it and care only for 100% originality. Was a nice idea, though.

# Conflicts:
#	source/core/gamecvars.cpp
#	source/games/sw/src/panel.cpp
2021-03-02 20:02:20 +11:00
Christoph Oelckers
b9050b1a35 - Blood: properly clip the gauge for throwing dynamite force instead of stretching it. 2021-03-02 03:31:10 +01:00
Christoph Oelckers
a7dc86583f - Blood: commented out cultist code that should not be entered due to the 'isrunning' bug. 2021-03-02 03:04:14 +01:00
Christoph Oelckers
34bda2c962 - address excessive view swaying in Blood.
It is totally unclear what happened here in the original code, but the info apparently never reached the place where it's being checked. BloodGDX just ignores it so we do now, too.
2021-03-01 19:28:47 +01:00
Christoph Oelckers
2f2d0443f2 - fixed size setup for most menus.
All of Raze's menus scale to 320x200 and to get proper mouse coordinates the definitions must reflect that as well.
Fixes #271
2021-03-01 13:08:10 +01:00
Christoph Oelckers
80404558f6 - RR: Fixed the drink and eat meters on the status bar.
Turned out that the status bar's DrawGraphic cannot handle it with its coordinate hackery, this needs a separate, cleaner interface function that does not mess around with the pivot which needs to be passed unaltered to the backend to properly rotate around it
2021-02-28 22:34:52 +01:00
Christoph Oelckers
fa8ca81460 - SW: added persistent copy of oz.
The door movement code uses oz for its position checks so we need a persistent version of it that survives uncontrolled changes from the engine side.
2021-02-28 12:35:34 +01:00
Christoph Oelckers
d31fe01b6d - skill stuff for Exhumed.
Just for fun. ;)
2021-02-27 14:08:08 +01:00
Christoph Oelckers
ce87e18f90 - block Escape to toggle the console while AppActive is false.
This is for testing #174 - this is the only place in the code where the escape key is explicitly checked.
2021-02-27 13:47:30 +01:00
Christoph Oelckers
d28d5a5e1f - use real fog, even in palette emulation mode.
Using the palette to apply fog is just far too broken and cannot be kept in check with all the hacks the Build engine allows.
This only works if all elements on screen use the identity translation lookup which is basically never the case.
Real fog, on the other hand, can easily be applied to everything.
2021-02-27 13:30:52 +01:00
Christoph Oelckers
1e8ebf2306 - removed unused variables in Exhumed's status bar code. 2021-02-27 12:37:25 +01:00
Christoph Oelckers
d0cf9d65e7 - use 2D size in 2D code, not the engine's screen dimensions. 2021-02-27 12:33:47 +01:00
Christoph Oelckers
2094b6420f - use local screen size variables in automap code. 2021-02-27 12:30:20 +01:00
Christoph Oelckers
783328c5fa - removed some unused declarations. 2021-02-27 12:29:07 +01:00
Christoph Oelckers
e470c59263 - Exhumed: Set opos for all dynamically spawned sprites.
Fixes #253

Let's hope this covers everything, the code is a bit scattered...
2021-02-27 00:16:03 +01:00
Christoph Oelckers
ba5ede65b8 - backend update from GZDoom. 2021-02-26 19:06:10 +01:00
Christoph Oelckers
b15810e173 - SW: fixed crash with credits screen and CD tracks missing. 2021-02-26 18:58:13 +01:00
Christoph Oelckers
4c915180da - fixed stale pointer access in Unix version of D_AddFile.
Pointer was assigned a buffer of a local variable that went out of scope before checking its content.
Fixes #268 (hopefully)
2021-02-26 13:28:02 +01:00
Christoph Oelckers
a46792e519 - fixed SE21 handler.
This one is most prominently noticeable in WW2GI's first map where blowing up a crack has no effect.
This must have happened when removing all those dangerous pointer to long casts that were so popular back in the bad old days.
Fixes #266
2021-02-26 13:14:44 +01:00
Christoph Oelckers
99f1f0952a - little bit of engine cleanup. 2021-02-25 12:16:21 +01:00
Mitchell Richters
4589f6f26d Merge remote-tracking branch 'public/chasecam_unification' 2021-02-25 20:33:36 +11:00
Rachael Alexanderson
4c0591a25b - port over -noautoexec that I did from GZDoom 2021-02-21 11:12:19 -05:00
Mitchell Richters
1d48ac537a - Exhumed: Replace original chasecam code with calcChaseCamPos() within game. 2021-02-18 22:14:39 +11:00
Mitchell Richters
cff97c9cf3 - calcChaseCamPos(): Restore original algorithms for new position via GameInterface struct.
* Averaging out the values was a net negative for all games. Each games' original value is tuned to the specific games.
2021-02-18 21:47:39 +11:00
Mitchell Richters
ba57429ac6 - Blood, Duke & SW: Create new backend chasecam function and replace game-specific versions with it.
* Based off SW's implementation.
2021-02-18 21:47:37 +11:00
Mitchell Richters
2abda0e27d - All Games: Migrate each game's clock counter to backend solution. 2021-02-18 21:47:33 +11:00
Christoph Oelckers
c96e04e6c9 - backend update from GZDoom. 2021-02-12 14:44:54 +01:00
Christoph Oelckers
5b6aa372ea - fixed autoaim check and adjusted presentation in the menu to be correct for all games.
Fixes #264
2021-02-06 10:56:11 +01:00
Christoph Oelckers
ba22df2a2a - removed unused I_GetBuildTimeFrac function. 2021-02-03 12:18:58 +01:00
Christoph Oelckers
8e0c50c22c - fixed: F2DDrawer::AddPoly was missing a texture validation check.
This caused problems when the automap wanted to render portal planes, which normally use an invalid texture as marker.
Fixes #263
2021-02-02 23:13:40 +01:00
Christoph Oelckers
cf672b508f - removed unused 'updatesectorexclude' function. 2021-02-02 23:13:40 +01:00
Mitchell Richters
b1290448c5 - Duke: Slightly tune texty in FullscreenHUD1() to line it up perfectly. 2021-02-01 18:42:41 +11:00
Christoph Oelckers
8ffda1c9d1 - Duke: Calculate the true font height of the numbers for alignment in the Statusbar.
The original tiles are all 15 pixels tall, but depending on the games can vary in their true height, so use CheckRealHeight on them to get their true dimensions.
Fixes #250
2021-02-01 00:09:22 +01:00