Commit graph

759 commits

Author SHA1 Message Date
Mitchell Richters
a29d7bd3cd - SW: Change pSpawnSprite() x/y coordinates from int to double to preserve precision for some calls. 2020-08-18 21:39:20 +10:00
Mitchell Richters
7af5d26feb - SW: Fix the Uzi's reload interpolation issues. 2020-08-18 20:58:58 +10:00
Mitchell Richters
78e0e94f58 - SW: Fix interpolation issues with sword, fists and heart. 2020-08-18 20:49:12 +10:00
Mitchell Richters
5cc30ad7c6 - SW: Increase precision of x/y coordinates where possible. 2020-08-18 18:26:04 +10:00
Mitchell Richters
d79c61d559 - SW: Interpolate between ox/x and oy/y coordinates in pDisplaySprites(). 2020-08-18 18:26:02 +10:00
Mitchell Richters
df6f27530e - SW: Define ox and oy in PANEL_SPRITEstruct and back up panel sprite x/y coordinates where appropriate. 2020-08-18 18:26:00 +10:00
Mitchell Richters
da2b1347ef - SW: Change smoothratio from int to double for storing returned result from CalcSmoothRatio() with full precision. 2020-08-18 18:25:58 +10:00
Mitchell Richters
e8faca52a2 - SW: Prepare draw and panel code for interpolation of weapon's x/y coordinates. 2020-08-18 18:25:56 +10:00
Christoph Oelckers
a535f62d4a - fixed: SW's intro cutscene must not terminate its sound.
Fixes #201.
2020-08-18 00:04:48 +02:00
Christoph Oelckers
65cb267d56 - save the cookie texts in a savegame and clear them on level exit. Also handle them on a per-player basis.
Fixes #196
2020-08-17 22:05:14 +02:00
Christoph Oelckers
9159855957 - SW: set the main view's projection after rendering the camera texture, not before.
Otherwise the main view will take over the projection settings from the camera texture.
Fixes #194.
2020-08-17 21:33:42 +02:00
Christoph Oelckers
ba2ff12f5b - fixed summary screen properly this time.
Fixes #195
2020-08-17 21:19:18 +02:00
Christoph Oelckers
55de06ab2f - fixed a few incorrect text labels.
Fixes #193
2020-08-17 20:55:57 +02:00
Christoph Oelckers
ca66e70d65 - print stats on secondary HUD. 2020-08-17 20:47:42 +02:00
Christoph Oelckers
ebc16ffe14 - do not display ammo for fists and sword
Fixes #192
2020-08-17 20:43:31 +02:00
Christoph Oelckers
522d8af6ca - SW: implement the "end game" function.
Fixes #189
2020-08-17 20:38:46 +02:00
Christoph Oelckers
17f9bc8a8a - initiate a full game reset when respawning after death.
This was done with the old code but we now have to set the respective flag explicitly because the init code is inside the main loop, not outside.
Fixes #188
2020-08-17 20:30:44 +02:00
Christoph Oelckers
8011526e71 - SW: fixed crosshair size.
Fixes #186
2020-08-17 20:28:12 +02:00
Mitchell Richters
77825b4927 - SW: Remove duplicate if statement line. 2020-08-17 21:11:53 +10:00
Mitchell Richters
d0ed88221d - SW: Alt HUD positioning tweaks. 2020-08-17 21:10:40 +10:00
Christoph Oelckers
d6701d91a3 - aded Alt. HUD icon tiles
Not tested yet, this merely uses the numbers from the item pickup function.
2020-08-17 01:06:29 +02:00
Christoph Oelckers
f7291960c3 - draft version of the secondary fullscreen HUD.
All elements are present, but the icons are still missing because I do not know the proper numbers yet.
2020-08-16 23:52:44 +02:00
Christoph Oelckers
25e8636a60 - eliminated a few smaller headers. 2020-08-16 23:21:24 +02:00
Christoph Oelckers
736f1461ca - fixed the summary screen. 2020-08-16 23:00:05 +02:00
Christoph Oelckers
85538b467b - fixed some initialization issues with the new main loop.
Looks like all map starting cases are working now.
2020-08-16 22:45:19 +02:00
Christoph Oelckers
695d81f88c - main loop WIP. 2020-08-16 21:55:26 +02:00
Christoph Oelckers
60275c9b6b - started with SW's new main loop.
Intro and menu are done, the game loop is quite a mess, unfortunately.
2020-08-16 20:10:26 +02:00
Christoph Oelckers
01d9bde7f4 - more cleanup of game.cpp.
The game init code is done.
2020-08-16 19:11:04 +02:00
Christoph Oelckers
baf1166319 - trying to bring order to game.cpp
Some reshuffling, plus moving the automap drawer to its own file.
2020-08-16 18:18:56 +02:00
Christoph Oelckers
78d3afb0bf - cleaning out more garbage. 2020-08-16 17:09:59 +02:00
Christoph Oelckers
ab7774c6d7 - thinning out some garbage. 2020-08-16 16:57:42 +02:00
Christoph Oelckers
a8b0839592 - switch SW to CCMD based input. 2020-08-16 16:00:40 +02:00
Christoph Oelckers
8c98d44620 - handle console-based map changes directly instead of the cheat handler.
This allows handling user maps again.
2020-08-16 14:54:33 +02:00
Christoph Oelckers
532b11467f - handle all level access and indexing through the mapinfo data.
No more level numbers will be stored in the game code.
2020-08-16 14:39:18 +02:00
Christoph Oelckers
90a4d0dcb8 - removed the non-functional user map handling.
This will have to be redone in a more flexible manner
2020-08-16 11:42:13 +02:00
Christoph Oelckers
f9b953eeae - removed SW's network code. 2020-08-16 10:40:20 +02:00
Christoph Oelckers
7bb6b6a1ee - do not call handleEvents outside the main loop.
In other places I_GetEvent should be used to call the system's message pump and keep the app responsive, but all game side processing should be skipped.
2020-08-16 10:00:13 +02:00
Christoph Oelckers
4b44e6e392 - removed redundant calls to timerUpdateClock. 2020-08-16 09:16:38 +02:00
Christoph Oelckers
da38ad4554 - more dead code removal.
SW really has a lot of leftover commented out code...
2020-08-16 09:14:07 +02:00
Christoph Oelckers
af2c836e54 - unused code cleanup. 2020-08-16 09:04:24 +02:00
Christoph Oelckers
af4464ba16 - remove all sound precaching code in SW
We're loading all sounds at game startup anyway so there's no point to do this.
2020-08-16 08:46:51 +02:00
Christoph Oelckers
ef78e8602a - major cleanup and consolidation of the screen/hud resizing code.
This is now being handled by the backend, except for the processing of the key bindings which cannot be done yet.
2020-08-16 02:55:50 +02:00
Christoph Oelckers
5cf54033ed - removed the demo code. 2020-08-15 22:31:44 +02:00
Christoph Oelckers
deb9b74ce2 - got rid of all remaining rotatesprite calls in SW.
Also removed some dead code from player.cpp.
2020-08-15 22:04:37 +02:00
Christoph Oelckers
67b3a38fa3 - draw all menu elements with DrawTexture instead of rotatesprite 2020-08-15 21:09:21 +02:00
Christoph Oelckers
5e81f88907 - replaced SW's stats display with the shared version. 2020-08-15 21:03:42 +02:00
Christoph Oelckers
910ca69484 - migrated all of SW's text display to the backend and removed the various redundant printing functions. 2020-08-15 20:29:13 +02:00
Christoph Oelckers
f0150569a4 - ported the load level screen and deleted some dead code in game.cpp 2020-08-15 16:41:08 +02:00
Christoph Oelckers
aa8113cf06 - ported the level summary screens. Not hooked up yet. 2020-08-15 15:29:47 +02:00
Christoph Oelckers
8595b9fa47 -play SW's intro through the screen job framework. 2020-08-15 13:04:15 +02:00
Christoph Oelckers
3f9cc1412c - transitioning helper for screen jobs. 2020-08-15 10:55:21 +02:00
Christoph Oelckers
3455610031 - base palette cleanup.
Avoid passing this anywhere in the client code. It should only be set right before rendering the 3D view and the only code using the base palette should be the 3D renderer and hud_drawsprite.
Also make the palette override CVARs 3D view only in debug mode.
2020-08-14 21:18:14 +02:00
Christoph Oelckers
249c5b5734 - removed some dead code. 2020-08-14 21:12:32 +02:00
Christoph Oelckers
66cb7f61a4 - fixed rendering on narrow screens with an aspect ratio less than 4:3 and removed some parts that are no longer needed. 2020-08-14 21:01:27 +02:00
Christoph Oelckers
a5d9886aa9 - cleaned up the remnants of the old statusbar code. 2020-08-14 00:56:34 +02:00
Christoph Oelckers
67c340b573 - ported the inventory bar.
Now the panel system is only used for displaying the weapons.
2020-08-14 00:38:27 +02:00
Christoph Oelckers
70b2215f4e - ported the minibar HUD. 2020-08-13 22:37:58 +02:00
Christoph Oelckers
8c7b93ceef - ported the compass. 2020-08-13 22:13:56 +02:00
Christoph Oelckers
9ccf717311 - ported the inventory display on the status bar. 2020-08-13 21:57:53 +02:00
Christoph Oelckers
eafaa56834 - armor and key display. 2020-08-13 21:14:01 +02:00
Christoph Oelckers
188b2d2daa - ammo and weapon display ported. 2020-08-13 20:14:53 +02:00
Christoph Oelckers
b50bdb1ca1 - SW: started transition of the status bar. 2020-08-13 18:45:55 +02:00
Christoph Oelckers
dc653bbdc0 - thinning out some crap. 2020-08-13 18:19:44 +02:00
Christoph Oelckers
d7f8d1a5bf - replaced the border drawing code in SW with Blood's. 2020-08-13 17:54:17 +02:00
Christoph Oelckers
0b6f299d0e - removed the bot code.
This would become a refactoring hassle, maybe re-add it later?
2020-08-13 00:45:50 +02:00
Christoph Oelckers
4538068bcc - more SW cleanup, removed two more files. 2020-08-13 00:04:55 +02:00
Christoph Oelckers
bb6972abb4 - SW: get rid of redundant common_game.h 2020-08-12 23:43:21 +02:00
Christoph Oelckers
aef59ef523 - migrated SW cheats to the generic system, removed the more pointless of SWP's cheats and filled in a few blanks. 2020-08-12 22:24:51 +02:00
Evan Ramos
81f85ee480 SW: Fix regression causing the last heat seeker to be a normal missile
It was caused by the fix for crashing when firing outside the map.

Also port said fix to the bunny rockets.
2020-08-12 19:16:25 +02:00
Christoph Oelckers
d3df4e580c - do not restart one-page image scrollers with Enter
Instead go back one menu level.

Fixed #129
2020-08-10 01:12:53 +02:00
Christoph Oelckers
4b69a181c3 - use symbolic constants for some statnums 2020-08-06 20:54:51 +02:00
Christoph Oelckers
9060abbafd - 8 more SW headers gone. 2020-08-06 00:18:45 +02:00
Christoph Oelckers
72806e27eb - cleanup work on SW
* consolidating smaller headers to reduce number of files
* remap all unmapped keyboard checks to corresponding buttons
2020-08-05 22:36:38 +02:00
Christoph Oelckers
4fef66c78a - SW script parser cleanup 2020-08-05 22:36:37 +02:00
NY00123
22b492a5b3 SW: If a saved load is loaded at a point which is right after killing
a boss, ensure that FinishTimer and FinishAnim are appropriately
updated. This commit bumps GameVersion.
Additionally, the set of FinishAnim to 0 in NewLevel had
to move to a different location (InitLevelGlobals2), so
it doesn't override the value stored in the saved game.

# Conflicts:
#	source/sw/src/game.cpp
2020-08-04 20:11:37 +02:00
Mitchell Richters
157933e902 - fixed regression from b9eef9c6a3 where the angle wouldn't apply if horizon was specified. 2020-08-04 23:13:22 +10:00
Mitchell Richters
b9eef9c6a3 - make ang and horiz optional on each game's warptocoords CCMD as suggested in commentary for 1dc6edfa56. 2020-08-04 22:33:17 +10:00
Mitchell Richters
a9b05eff86 - fix coolie death issues raised in https://forum.zdoom.org/viewtopic.php?f=340&t=69254 in manner suggested by OP. 2020-08-04 19:02:26 +10:00
Mitchell Richters
3e44d850b3 - fix issues with Exhumed and SW warptocoords CCMDs when cherry-picking from public branch. 2020-08-04 18:04:44 +10:00
Mitchell Richters
1dc6edfa56 - create SW dynamic CCMD warptocoords. 2020-08-04 17:53:34 +10:00
Christoph Oelckers
4bab061bd0 - removed some dead code from SW. 2020-08-03 20:53:00 +02:00
Christoph Oelckers
d526c6401f - use the generic cheat system for Blood. 2020-08-03 20:51:31 +02:00
Mitchell Richters
f0e0a3db41 - quick and dirty fix to get SW menu input cranking again (mostly for testing PR #77 under SW since it's the only game with a clock of 120/3). 2020-07-31 16:26:16 +10:00
Christoph Oelckers
218a9c84fd - removed the last remaining Blood helpers from the file system, also deleted a few short files whose contents could be moved. 2020-07-27 19:38:41 +02:00
Christoph Oelckers
f9d48e1f68 - removed all the intermediate variables for the status bar size.
hud_size now gets used directly by the status bar code.
2020-07-25 13:26:56 +02:00
Christoph Oelckers
6227f9f7fd - optimizations for better savegame performance. 2020-07-21 21:32:38 +02:00
Christoph Oelckers
29e107ad24 - use CCMDs for weapon and inventory selection, courtesy of ZDuke. 2020-07-17 20:56:10 +02:00
Christoph Oelckers
a0cd407632 - cleanup on pausing code. 2020-07-15 18:10:31 +02:00
Christoph Oelckers
99161e2e4a - made ps an array of player_struct like it originally was. 2020-07-15 00:26:58 +02:00
Christoph Oelckers
1e9679aceb - removed faketimerhandler and the last static remains of EDuke's netcode. 2020-07-14 21:15:37 +02:00
Christoph Oelckers
1a0b388570 - removed a few tabledivide uses in the game modules 2020-07-14 14:08:59 +02:00
Christoph Oelckers
aa01adb2f1 - removed osd.h as it was merely a minimal wrapper around c_dispatch, giving some alias names.
Nothing that's needed when cutting ties to upstream.
2020-07-14 14:00:27 +02:00
Christoph Oelckers
34874d1a21 - migrated displayrest and took the opportunity to un-fuck the palette management. 2020-07-07 04:54:12 +02:00
Christoph Oelckers
8a1206edbc Merge remote-tracking branch 'remotes/origin/master' into back_to_basics2 2020-07-05 11:55:41 +02:00
Mitchell Richters
c70cc474a0 - change mouse input from int to float and adjust games accordingly.
* Calculate game-side mousex/mousey divisions into the calculations performed in `InputState::GetMouseDelta()`.
* Fix mouse speed when `in_mousesmoothing` is true (wasn't factoring in / 3.f division used in non-true vector.
* Standard mouse forward/side movement speeds in Exhumed & SW with that of other games.
* Remove `strafeyaw` code from Duke/Exhumed/RR as it's not necessary and was leading to situations where the player would continually keep moving sideways even without input.
* Change mouse forward/side velocities to -= current value as is done with controller input and the player's angle/aim velocities.
2020-07-04 18:28:00 +02:00
Christoph Oelckers
2e98b2f8da - quote cleanup. 2020-06-30 22:53:15 +02:00
Christoph Oelckers
67fa7f8275 - work on Duke intro sequence.
Now without any Build drawing code, it goes directly to DrawTexture now. :)
2020-06-28 00:32:28 +02:00
Christoph Oelckers
e0ad1aa0cd - cleanup of animlib.
* operate on a parameter-specified data structure instead of a global one
* moved error checks into the library code.
2020-06-27 11:47:31 +02:00
Mitchell Richters
8c723f52d1 - make controller input identical across all games.
* Convert axes in ControlInfo struct from int32_t to float as what's received from the backend.
* Remove all the scale up/down math since we don't need that with floats and replace with float constants that match old behaviour.
* Store q16mlook scaling as a constant for use with mouse and upcoming controller code.
* Add required controller code to Blood as the only game not to have working controllers.
* Fix typos in (gInput.forward > input.forward) for `ctrlGetInput()` in Blood.
* Remove use of `scaleAdjustmentToInterval()` on Exhumed and Shadow Warrior as they only process forward/side velocities within the game's ticrate.
* Repair angvel/aimvel scaling mistakes from d79a5d256d.
* Scale dyaw and dpitch by 25% for Shadow Warrior as the game runs 25% faster than the other games, leading to faster input.
2020-06-24 20:08:56 +02:00
Mitchell Richters
91cc97ced0 Change Next/Previous Weapon button handling for Shadow Warrior.
- Makes consistent with Duke 3D, RR and Blood.
2020-06-22 07:47:58 +02:00