Commit graph

149 commits

Author SHA1 Message Date
Christoph Oelckers
db21d5e946 - took all script exports out of the namespaces.
It looks like GCC cannot deal with this - on MSVC it works fine.
2020-10-10 10:11:22 +02:00
Christoph Oelckers
16fd505f9a - make sure that sfxinfo_t is always fully initialized by adding initializer values to all fields.
Let's hope this finally fixes those sound hiccups.
2020-10-10 09:47:00 +02:00
Christoph Oelckers
b21beb4039 - made the options search work.
This required changing how the engine credits menu work because it created a circular dependency in its original form.
2020-10-09 22:33:02 +02:00
Christoph Oelckers
6ba06f5ed0 - ImageScroller WIP commit. 2020-10-08 22:20:41 +02:00
Christoph Oelckers
15eaf86f5a - preparations for the image scroller menu. 2020-10-08 18:02:25 +02:00
Christoph Oelckers
56eae0b42d - got the basics working for Exhumed's main menu. 2020-10-08 00:21:07 +02:00
Christoph Oelckers
a953404331 - SW's text menus done.
This also copies the Build texture animation info into the texture manager so that the 2D code can access it through existing interfaces.
2020-10-07 23:22:29 +02:00
Christoph Oelckers
38ddbfe65f - activated most of the support code for programmatically created menus again.
Blood's regular menu screens mostly work again
2020-10-07 01:31:41 +02:00
Christoph Oelckers
5726b693bd - added back the menu transition, although it cannot be used yet, and all game specific menu CCMDs. 2020-10-07 01:12:57 +02:00
Christoph Oelckers
603c3b50ec - reimplemented Blood's menu items. 2020-10-07 00:50:26 +02:00
Christoph Oelckers
bec1f67178 - implemented the menu caption for Duke et.al. 2020-10-06 20:49:55 +02:00
Christoph Oelckers
29a4955f79 - missing global variables. 2020-10-05 20:44:30 +02:00
Christoph Oelckers
9606b09ddd - update of language code from GZDoom. 2020-10-05 00:46:24 +02:00
Christoph Oelckers
16431e9f0a - SetupMenuColors restored. 2020-10-04 22:21:11 +02:00
Christoph Oelckers
26a31a626d - option menus are working, although all colors are still wrong and the captions are not displayed. 2020-10-04 21:42:40 +02:00
Christoph Oelckers
7f6b02c451 - merged string table and system callbacks. 2020-10-04 21:15:51 +02:00
Christoph Oelckers
82612a1330 - it compiles again (with lots of code commented out.) 2020-10-04 20:11:02 +02:00
Christoph Oelckers
f8caf88089 - backend update. 2020-10-03 17:04:45 +02:00
Mitchell Richters
0bb9904338 - Tune mouse input following changes in b57e13ff62.
* Reduce `hidInput->mouseturny` to previous scaling (0.25 of incoming input).
* Change `hidInput->mouseturnx` to be 0.5 of incoming input (33% slower than b57e13ff62, but matches what other ports by providing a 2:1 scale).
* Remove further divisions beyond m_side and m_forward and adjust code in `processMovement()` accordingly.
* Change scaling for `mousevelscale` in `processMovement()` to be 1/160th of keymove. Slightly lower for Duke and a lot faster for Blood where it's needed.
2020-09-29 21:02:36 +10:00
Christoph Oelckers
b57e13ff62 - mouse code update.
May still need some tweaking of the factors.
2020-09-28 22:36:43 +02:00
Christoph Oelckers
9764c9de0b - use the proper variable for timer frequency only.
MinFPSRate was an obsolete leftover.
2020-09-27 16:12:52 +02:00
Christoph Oelckers
1e12bca0a6 - route World Tour's texts through the string table by adding an indirection option
This way they can be translated into all languages without duplicating all relevant content.
The original text files are no longer being used.
2020-09-26 10:08:48 +02:00
Mitchell Richters
e9326fffe3 - processMovement(): Slightly adjust some ratios to provide proper average values. 2020-09-25 23:07:38 +10:00
Mitchell Richters
9b12675f4e - processMovement(): Re-arrange parameter variables somewhat so game-specific parameters are at the end and to allow some common defaults so they don't need specifying. 2020-09-25 22:26:50 +10:00
Mitchell Richters
73f52b2cee - SW: Fix turn scaling while pp->sop_control and specify !pp->sop to processMovement()s allowstrafe bool instead of an unconditional true. 2020-09-25 22:17:21 +10:00
Mitchell Richters
67c8187d62 - processMovement(): Attenuate hidInput->dyaw when using for strafing. 2020-09-25 12:03:56 +10:00
Mitchell Richters
6aa494285d - processMovement(): Add scaling for Exhumed's keymove. Input was far too slow and didn't match the others. 2020-09-25 00:57:48 +10:00
Mitchell Richters
04af1d9ce8 - All Games: Unify processMovement(). 2020-09-24 22:32:37 +10:00
Mitchell Richters
d40a2d3e95 Merge branch 'back_to_basics2' into Blood_InputReworking
# Conflicts:
#	source/blood/src/hudsprites.cpp
#	source/exhumed/src/status.cpp
#	source/games/duke/src/game_misc.cpp
#	source/sw/src/draw.cpp
2020-09-22 07:34:39 +10:00
Mitchell Richters
9859571ded - DrawCrosshair(): Factor in Blood's adjustable horizon which defaults to 90.
* Fixes https://forum.zdoom.org/viewtopic.php?f=340&t=69920.
2020-09-22 07:29:52 +10:00
Mitchell Richters
59e4fae064 - Game input: Fix miscellaneous issues.
* Duke/RR: Fix `SB_CENTERVIEW` not clearing while `cl_syncinput 1`.
* Duke/RR: Remove superfluous call to `apply_seasick()`.
* RR: Change two calls from `playerSetAngle()` to `playerAddAngle()` Updated version of `playerSetAngle()` doesn't stop setting angle until target is reached, a bit too strict for this and compromised vehicle turning.
* `applylook()`: Remove dead flag. Was only used with Duke, no other game called the function when dead anyway. Since the input helpers are processed outside of `applylook()` now this is not needed.
* `applylook()`: Extend function with a bit of commentary.
2020-09-21 17:12:53 +10:00
Mitchell Richters
f806cdcec6 - Blood/Duke/RR/SW: Unify the player's angle/horizon helper functions. 2020-09-21 17:12:51 +10:00
Mitchell Richters
7bf1cacc7f - Blood/Duke/RR/SW: Unify the player's angle function.
* For Blood/SW, exposes `SB_LOOK_LEFT`/`SB_LOOK_RIGHT` to games, hooking up `q16look_ang` and `q16rotscrnang` within.
* For SW, use Duke & Blood's return to center function and remove `PF_TURN_180` bit.
* For RR, replace a few misused bits with some bools inside of `player_struct`.
* Since bulk of functionality is sourced from Duke (30Hz), apply proper scaling so SW speed matches (40Hz).
2020-09-21 17:12:26 +10:00
Mitchell Richters
0ab3b33a6c - Blood/Duke/RR/SW: Unify the player's horizon function.
* For Duke/SW, we continually apply `SB_CENTERVIEW` only if it was previously a toggled action, similar to Blood.
* For SW, we remove two SW-specific bits (`PF_LOCK_HORIZ` and `PF_LOOKING`) that are no longer needed.
* For Duke, we remove `return_to_center` and just use the `SB_CENTERVIEW` action bit as required.
* For `sethorizon()`, feature set and adjustment speeds are an averaged out accumulation across Duke/SW:
** GameTicRate is factored in for adjustment decisions to provide consistency for SW being the faster game.
** Adjustment amounts are half way between Duke/SW.
2020-09-20 20:01:36 +10:00
Mitchell Richters
1900cf1fcc - Move Duke's getincangle() function to the backend, create Q16.16 variant (getincangleq16()) and replace Shadow Warrior's discrete implementations shared versions.
* Need SW's input helpers available for Blood but therefore also need an angle delta function that does not seem to exist in Blood.
* Realise that gamecontrol.h/cpp might not be the most appropriate place, but it's a shared location and these will go into binaryangle.h when its utilisation can be more realised.
* Because SW's logic was reversed, in that param #1 was the new angle and param #2 was the current, all calls have been reversed.
* By happenstance, also fixes an issue with multiple 180° turns in quick succession.
2020-09-20 16:21:13 +10:00
Christoph Oelckers
6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers
0e58203d92 - fixed rintersect and removed some unused bits from engine.cpp. 2020-09-13 20:15:46 +02:00
Christoph Oelckers
9e81fa89a8 - fixed some of the issues with palette emulation
* the palette shader was not bound.
* the palette textures were not bound.
* palette mode still used regular lighting on top of the palette emulation

This works a lot better than before but is still not complete.
2020-09-12 21:23:14 +02:00
Christoph Oelckers
d011a16c5b - added a menu option for WT's music switch.
Fixes #370
2020-09-08 22:37:21 +02:00
Christoph Oelckers
18b39fd952 - first stage of generic automap code.
Lines and textures get rendered, not all colors are correct - sprites yet to do...
2020-09-06 20:49:43 +02:00
Christoph Oelckers
36b9ac54b7 - added a parser for World Tour's language files. 2020-09-05 21:33:04 +02:00
Christoph Oelckers
c1786001b2 - route all game state changes through game actions.
This is to avoid problems with the main loop not calling Ticker and Render in sync.
2020-09-05 15:43:34 +02:00
Christoph Oelckers
32ec9ff369 - consolidated crosshair drawing and added ZDoom's crosshair code.
For Exhumed this is the default, for the other games it is an option.
Fixes #269.
2020-09-05 13:57:26 +02:00
Christoph Oelckers
80cea90854 - implemented zoom by mouse wheel for the automap.
Fixes #121
2020-09-05 09:10:24 +02:00
Christoph Oelckers
adbedd30c4 - consolidated the 4 functions for handling the automap zoom. 2020-09-05 00:58:25 +02:00
Christoph Oelckers
e5e8c02f1d - WIP level transition refactored to a game independent event system. 2020-09-04 19:43:35 +02:00
Christoph Oelckers
66bf8113b8 - implemented the 'god' cheat as a network command.
This was mainly chosen as something simple to get the basics set up.
2020-09-03 00:29:17 +02:00
Christoph Oelckers
b3d89a6a0b - removed the old main loop. 2020-09-02 23:03:48 +02:00
Christoph Oelckers
b49e050baf - transitioned Exhumed to the new main loop.
Fixed #301
2020-09-02 22:55:57 +02:00
Christoph Oelckers
b1a3080671 - migrated Exhumed to a local ticker as well.
gameclock is history - all games now run on a timer that increments once per tick under their own control and not independently of the ticker routine.
2020-09-02 21:42:12 +02:00