Christoph Oelckers
f6568fee0c
- rewrote SW portal setup to use static data instead of ad-hoc setup.
...
This was by far the messiest game, there's two reasons for this.
First, the portal links do not need to be in an actual portal sector, so they cannot be used to detect portal sectors.
Second, the game moves portals in place, so all offsets are (0,0,0) so that not even these can be used for detection.
The only working method is the super-complicated original way to look up portals at run time, just being done at map start.
Having static portal links should reduce the render glitches quite significantly because the renderer knows now which sectors belong to a portal and can use this information to ensure proper processing.
2021-03-25 21:21:48 +01:00
Christoph Oelckers
af54cf3a3c
- made SW's sector portals operational.
...
Unlike the other games these are so poorly defined that the engine has to rely on the original fudging to pick the proper portal to link to. As a result they are just as limited as they always were.
In addition all the portal search code had to be reinstated.
2021-03-25 16:45:40 +01:00
Christoph Oelckers
168b0385cf
- moved shadeToLight out of build.h.
2021-03-25 09:13:59 +01:00
Mitchell Richters
957f7e9487
- Accept binangle, fixedhoriz and lookangle classes in SetupViewpoint()
vs. Q16.16 variables.
...
* Allows for more precision than Q16.16.
* Used as opportunity for `rollang` to be set using the `asdeg()` method, not `asbuildf()`.
2021-03-25 19:06:01 +11:00
Christoph Oelckers
13bbf0a4f9
- sector portals in RRRA are working.
2021-03-24 23:55:10 +01:00
Christoph Oelckers
dbbdfaa4ba
- sector portals in Blood are working.
2021-03-24 23:11:06 +01:00
Christoph Oelckers
b7e8815133
- some further lightening of compat.h.
2021-03-24 21:13:36 +01:00
Christoph Oelckers
d8627a2b3f
- removed all remains of projection math weirdness from the automap code in the games plus a bit more cleanup of the engine code.
2021-03-24 20:28:58 +01:00
Christoph Oelckers
09a9e14feb
- set up engine portals for SW.
...
Also moving more code to _polymost.cpp which is only needed for ad-hoc lookup of portals with a client side implementation of a two-layer renderer.
2021-03-21 17:04:06 +01:00
Christoph Oelckers
a36377111c
- engine-side portal setup for Blood and RRRA.
2021-03-21 14:48:35 +01:00
Christoph Oelckers
b91441f849
- same render interface rework for Shadow Warrior.
2021-03-21 12:22:50 +01:00
Christoph Oelckers
ecd6e68d69
- made render call adjustments to Exhumed.
...
This one was easy - no special cases at all. :)
2021-03-21 11:48:18 +01:00
Christoph Oelckers
6f7e7459ea
- did some cleanup on Duke's render code to prepare for the new way of handling portals.
...
Like for Blood, the Polymost-only code has been moved aside.
Closer examination of the preparations the engine is doing for rendering SE40/150-portals shows that all this was merely done to avoid glitches with a two-phase rendering setup - nothing of this will be needed for doing it properly.
They can just be treated as run-of-the-mill stacked sectors. when using hardware rendering capabilities for clipping.
2021-03-21 10:58:11 +01:00
Christoph Oelckers
9f36ef69e6
- fixed variable name clash caused by viewUpdateShake's global variables.
...
removed the redundant call in the Ticker, because all its results are discarded.
Use arguments instead of global variables to pass data around.
2021-03-21 08:58:38 +01:00
Christoph Oelckers
d42ce0ee7e
- WIP
2021-03-20 23:01:16 +01:00
Christoph Oelckers
4109a256ac
- Blood: cleanup of render code.
...
Renaming of disassembly variables and moving of disabled Crystal Ball renderer to a separate function.
2021-03-20 19:20:42 +01:00
Christoph Oelckers
91957e40f1
- moved some original Raze code out if the Build folder.
2021-03-20 17:08:55 +01:00
Christoph Oelckers
30f4e2b29d
- replaced the engine automap drawer with one leveraging the newly added sector geometry data.
...
This eliminates a lot of code depending on Build's projection math.
2021-03-20 16:20:48 +01:00
Christoph Oelckers
5a0c8da6bf
- Duke: fixed some incorrect assignments in CON parser
2021-03-19 23:18:09 +01:00
Christoph Oelckers
3df5c440f9
- added some helpers to make it easier to determine if a sector's geometry has been altered.
...
Walls had no sector reference so this was added for marking the sector as altered when a vertex gets dragged around.
2021-03-19 23:18:09 +01:00
Christoph Oelckers
a5b3a1dd3e
- removed some unused things from engine.cpp.
2021-03-19 15:12:54 +01:00
Christoph Oelckers
547ed4e415
- route everything through the full backend, now completely bypassing the intermediate GLInstance layer.
2021-03-18 17:18:03 +01:00
Christoph Oelckers
9ebd8fd4a5
- put all of Polymost in a namespace.
...
So that its static variables are properly separated from the rest.
2021-03-17 15:55:25 +01:00
Christoph Oelckers
7c68261fbf
- redirect Exhumed's shareware exit to the main menu.
2021-03-15 18:58:28 +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
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
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
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
bbd5c0ac8b
- transitioned voxel rendering to use the backend's implementation.
2021-03-02 17:10:34 +01: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
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
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
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
b15810e173
- SW: fixed crash with credits screen and CD tracks missing.
2021-02-26 18:58:13 +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
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
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
Christoph Oelckers
30e8111979
- fix inventory selector positioning in WW2GI.
...
This must have abused some quirk of the original code to be this far off...
2021-01-30 23:51:50 +01:00
Christoph Oelckers
40593b866f
- WW2GI: fixed event numbering.
...
There is a typo in the CON files that assigns EVENT_AIMUP and EVENT_AIMDOWN the same number. The source did not replicate this which caused several events to call the wrong handler.
Fixes #252
2021-01-30 23:42:44 +01:00
Christoph Oelckers
a0be30facb
Revert "- Exhumed: Tune x offset alignment in DrawStatusAnims()
following changes in 220283d1ec3cba03f455bd96bcf130df777b5635."
...
This reverts commit c08583ebc1
.
This does not work as intended.
Fixes #261
# Conflicts:
# source/games/exhumed/src/status.cpp
2021-01-30 10:55:58 +01:00
sinisterseed
19e7419896
- Exhumed: Fixed key offsets.
...
An int can't store a float, effectively truncating to 0 and not holding the 0.5. Thanks MJ :) .
Partially addresses #262 - The Torch icon bouncing in the HUD still remains.
2021-01-30 11:50:33 +02:00
Mitchell Richters
f11501883d
- Exhumed: Make 3rd person camera properly interpolated.
2021-01-30 11:23:38 +11:00
Mitchell Richters
e66960d9fc
- Exhumed: Ensure ox/oy/oz sprite positions are set when warping to coordinates.
2021-01-30 11:22:46 +11:00
Mitchell Richters
c08583ebc1
- Exhumed: Tune x offset alignment in DrawStatusAnims()
following changes in 220283d1ec
.
2021-01-29 22:11:03 +11:00
Mitchell Richters
c267c214c2
- Duke: Repair jumping zvel issue originating from 5e45f988e3
for Duke and 1c5c90d00f
for RR.
...
* Thanks for backtracing, Graf :)
* Fixes #259 .
2021-01-29 20:00:15 +11:00
Christoph Oelckers
8cf3e50ade
- removed bad 'pos' setup in PreDrawStackedWater
...
This was a) supposed to set 'opos' not 'pos' and is b) redundant because here both Users point to the same sprite.
Fixes #261
2021-01-25 18:07:49 +01:00
Christoph Oelckers
981a2c7e5c
- Exhumed: restored old static switch array.
...
There's side effects in here that broke the door logic and made doors automatically open sometimes.
2021-01-24 14:49:51 +01:00
Christoph Oelckers
1ab11a02e2
- RR: fixed player input for diving.
...
Fixes #260
2021-01-24 08:59:08 +01:00
Christoph Oelckers
7f75b2274f
- code updates from PCExhumed.
2021-01-19 09:44:16 +01:00
Rachael Alexanderson
47f0370512
- add some 21:9 presets
2021-01-18 06:25:04 -05:00
Christoph Oelckers
042795612e
- Exhumed: Refined sector movement code so that pickups get always moved even when not touching the floor.
...
... because it seems to be inevitable that games have to exploit some implementation shortcomings...
2021-01-16 23:42:34 +01:00
Christoph Oelckers
c342594691
- Exhumed: fixed wall scrollers.
2021-01-14 23:55:45 +01:00
Christoph Oelckers
91f8df48c6
- Exhumed: changed MoveSectorSprites so it only moves sprites that actually stand on the sector's floor.
...
Since this had no check for z it even moved things floating above a lift or players hanging over a dropoff with the lift below.
2021-01-12 20:57:28 +01:00
Christoph Oelckers
fc11f537f7
- project cleanup
...
* moved all games into the 'games' folder.
* fixed project to include all sources and move them to the proper folders.
2021-01-10 20:31:32 +01: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
b36bea7c69
- Replace scale()
calls with Scale()
from common.
2021-01-05 07:31:34 +11:00
Mitchell Richters
d460f048fa
- Remove klabs()
define and replace with abs()
.
2021-01-05 07:31:28 +11:00
Mitchell Richters
868aa7f07a
- Replace mulscale()
calls with MulScale()
from common.
2021-01-05 07:31:24 +11:00
Mitchell Richters
aae175f287
- Replace divscale##()
calls with MulScale()
from common.
...
* Regex for reference: divscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:20 +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
Mitchell Richters
8cf2588bad
- Replace fmulscale##()
calls with MulScaleF()
from common.
...
* Regex for reference: fmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:13 +11:00
Mitchell Richters
7d9f868e4c
- Replace dmulscale##()
calls with DMulScale()
from common.
...
* Regex for reference: dmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:10 +11:00
Christoph Oelckers
0f3da7194a
- actually compile the game code as larger units and integrate them in the main project.
...
This eliminates the problematic subprojects for good.
Compiling the games as larger units is necessary because otherwise compile times will break down on MSVC.
2021-01-04 11:52:10 +01:00
Christoph Oelckers
e866a9e0c0
- moved setsectinterpolate/clearsectinterpolate into the backend.
2021-01-04 10:37:14 +01:00
Mitchell Richters
e8c20f502b
- Duke: Back up sprite's angle in ticker and interpolate in gi->GetInput()
if !SyncInput()
. Sprite angle now works properly with cl_syncinput 1
.
2021-01-04 13:27:31 +11:00
Mitchell Richters
8911805e3a
- Duke: Ensure an uninterpolated angle is sent to DrawOverheadMap()
if playing with unsynchronised input.
2021-01-04 09:06:57 +11:00
Mitchell Richters
22f28477e4
- Duke: Revert backing up of sprite's ang
to tempang
from be12da6bfb
and subsequent interpolation of sprite's ang in 21da658617
and directly update the sprite's angle in gi->GetInput()
like the other games.
...
* Fixes #251 .
2021-01-04 08:49:57 +11:00
Mitchell Richters
de1b4765dc
- Duke: Partially revert edba971b7f
. I need to stop breaking this.
2021-01-03 20:14:40 +11:00
Mitchell Richters
f036e94cca
- Duke (RR): Also fix location of p->apply_seasick()
in the ticker as well.
2021-01-03 20:06:28 +11:00
Mitchell Richters
6058669e29
- Duke: Within gi->GetInput()
, call p->apply_seasick()
after applylook()
as per the original code, and call unconditionally since its guarded as to whether it runs or not internally. Original spot only had it called if on a vehicle which wasn't right.
2021-01-03 20:00:43 +11:00
Mitchell Richters
f6b9c3cba7
- Duke (RR): Fix braking on vehicles which never got picked up.
2021-01-03 19:25:49 +11:00
Mitchell Richters
edba971b7f
- Duke: Remove newOwner check from cef1f8275b
& cb93560a4a
that were just cancelling out each other, and clean up 2x if (p->newOwner != nullptr)
checks into one.
2021-01-03 18:51:43 +11:00
Mitchell Richters
d3b95d4d70
- Build/Duke: Remove the only use case for drawrooms()
inline wrapper and change getcamspriteang()
to return binangle instead of a build angle.
2021-01-03 17:35:19 +11:00
Mitchell Richters
0cab84f17a
- Duke: Backport EDuke32 commits b1e3f3bcf9c5214ae835d09e12cc41bac4f057ce & 4c4fdd1f4ab9381b60db06f37ec270850599e1ae in relation to swinging doors.
2021-01-03 15:45:38 +11:00
Mitchell Richters
9b7d07df90
- Duke: Fix flashing vehicle HUD when cl_syncinput 1
is set.
2021-01-03 09:55:25 +11:00
Mitchell Richters
86bb6b1cdc
- Duke: Backport EDuke32 commit ac64e11553344084753cdd75abd898ec2c725a16 to fix buggy swinging doors, most apparent on E4L1.
2021-01-02 23:41:03 +11:00
Mitchell Richters
21da658617
- Duke: Interpolate automap player.
2021-01-02 18:23:12 +11:00
Mitchell Richters
be12da6bfb
- Automap: Put in framework to interpolate automap player.
2021-01-02 18:23:01 +11:00
Mitchell Richters
9833c94114
- Duke: Pass the player_struct through to FinalizeInput() in line with other functions.
2021-01-02 11:04:03 +11:00
Mitchell Richters
bcb838f3fb
- Duke: Fix some broken checks in FinalizeInput()
stemming from 5f33b0087f
.
2021-01-02 10:43:03 +11:00
Mitchell Richters
4397646cc4
- Duke: Move cancellation of spin from FinalizeInput()
into applylook()
in gameinput.cpp.
2021-01-02 10:26:22 +11:00