Commit Graph

493 Commits

Author SHA1 Message Date
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
Mitchell Richters 20c73e1249 - Blood: Remove `r_horizcenter` and standardise horizon in game to that of the default in the backend (currently 100).
* The use of this will go when the input is re-factored to operate on the standard horizon of 100, not 0.
2020-09-20 16:20:08 +10:00
Christoph Oelckers d8639a9a64 - fixed bad checks for uncapped frame rate. 2020-09-18 23:18:42 +02:00
Christoph Oelckers 005f8feceb - properly use the correct delay for an ANM's final frame. 2020-09-18 22:49:51 +02:00
Mitchell Richters 4370686c81 - SW: Allow disabling melee weapon blurring. 2020-09-16 19:18:08 +02:00
Christoph Oelckers b0090b07fc - do not fade screen jobs in when in the menu.
This doesn't work properly because the timer is stopped, leading to visual artifacts with the fading.
2020-09-16 19:13:21 +02:00
Christoph Oelckers 6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers 5c777eeb38 - moved implementation of 'animtilerange' into buildtiles.cpp. 2020-09-16 19:13:05 +02:00
Christoph Oelckers 616838dd0a - little bit of cleanup on tileImport. 2020-09-16 19:13:05 +02:00
Christoph Oelckers d74d65bece - clear the 2D drawers in the correct place. 2020-09-15 21:52:02 +02:00
Christoph Oelckers 8babdd6296 - fixed "pointers to temporary" errors reported by XCode 2020-09-15 21:45:54 +02:00
Christoph Oelckers 2c3041081d - remove indirection in picanm access. 2020-09-15 21:17:08 +02:00
Christoph Oelckers d1293da8dc - connecting the dots for Blood's special tile features. 2020-09-15 01:27:24 +02:00
Christoph Oelckers bc5d3eea88 - split the worker part for tileImportTexture out of the parser. 2020-09-15 01:21:17 +02:00
Christoph Oelckers 42d4e112a1 - clear the message display unconditionally when restarting the game.
It was only done when the level was reloaded.
Fixes #400
2020-09-14 21:32:36 +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 6ad8046b47 - dual license d_net.cpp and i_net.cpp
The same source was available under both in GZDoom, so keep it.
2020-09-13 19:38:31 +02:00
Christoph Oelckers b289e6bc5e - cleanup. 2020-09-13 19:27:05 +02:00
Christoph Oelckers 4f0856c02b - fixed a typo. 2020-09-13 19:21:08 +02:00
Christoph Oelckers a4754d7f34 - rewrote the map hack parser using sc_man.
This unexpectedly turned out a complete rewrite so now it is under my own license.
Also moved the remaining parts of map hack loading into the engine.

Overall I have to say that the feature is not what I expected, it's merely used to fudge the positioning of model sprites and for adding Polymer lights.
2020-09-13 13:01:44 +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 222f82304d - fixed savegame image generation.
There were two errors:
1. The postprocessor was not run on the generated scene so that the target framebuffer never got set.
2. The generated PNG was not finalized and failed the integrity check of the savegame menu.

Fixes #48
2020-09-12 01:11:32 +02:00
Christoph Oelckers 807dd17165 - forgotten debug output removed. 2020-09-11 21:20:44 +02:00
Christoph Oelckers 1646e302d2 - fixed screenjob fadeout. 2020-09-11 20:55:58 +02:00
Christoph Oelckers 38cc094ac3 - adapt ClearAllInput to new globalized code. 2020-09-10 23:35:42 +02:00
Christoph Oelckers d5b9a9ee43 Merge remote-tracking branch 'remotes/Github_private/InputStuffs' into back_to_basics2 2020-09-10 23:25:43 +02:00
Christoph Oelckers 52cbb5c9dc - implemented reloading from the last saved game, like in GZDoom.
Fixes #352
2020-09-10 22:45:42 +02:00
Christoph Oelckers 59eb923c11 - fixed replacement of hires textures.
Fixes #107
2020-09-10 20:52:40 +02:00
Christoph Oelckers 41a2a63efd - moved the VP8 decoding loop into the movie player class and got rid of animvpx.
This allowed significant simplification of code data and many of the error checks could also be simplified because this player doesn't really need it all.
Also use nanoseconds to count frame delays, not milliseconds, as milliseconds can cause timing anomalies with common frame rates very easily.
2020-09-10 17:54:27 +02:00
Christoph Oelckers 83eba019b8 - added support for Megaton's widescreen assets.
Fixes #386
2020-09-10 00:05:10 +02:00
Mitchell Richters ee5689b07e Merge branch 'back_to_basics2' into InputStuffs 2020-09-09 21:04:42 +10:00
Christoph Oelckers 2fc058e487 - don't autosave just after starting a new game. 2020-09-08 23:00:31 +02:00
Mitchell Richters b72a3326d0 Merge branch 'back_to_basics2' into InputStuffs
# Conflicts:
#	source/core/d_net.cpp
2020-09-09 06:56:27 +10: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 298949ceb8 - more compat.h cleanup
Its elimination is getting closer. :)
2020-09-08 18:48:18 +02:00
Christoph Oelckers ec1c42b04a - got rid of common.h
All still relevant content was moved to places closer to its use.
2020-09-08 18:39:47 +02:00
Christoph Oelckers 8d2d36457f - consolidated the map name display on startup
Fixes #275
2020-09-08 18:28:41 +02:00
Christoph Oelckers d1f1bf2ae1 - fixed icorrect validation of give ccmd
Fixes #379
2020-09-08 16:18:17 +02:00
Mitchell Richters 92443806af Merge branch 'back_to_basics2' into InputStuffs 2020-09-08 06:26:32 +10:00
Christoph Oelckers 703b142bad - added a CVAR to disable WT's ogg music and a fallback for when it cannot be found.
Fixes #354
2020-09-07 21:26:07 +02:00
Christoph Oelckers e4fa695b57 - fixed the movement factor for automap panning.
Fixes #363
2020-09-07 20:39:07 +02:00
Christoph Oelckers 9bb99e5c05 - fixed 361 - togglerotate CCMD still had some bugs. 2020-09-07 19:56:28 +02:00
Mitchell Richters 6e6373deda - SW: Remove `camq16*` variables from game and backend code that supported them.
* `cl_syncinput 0` is very raw at the moment.
2020-09-07 08:40:14 +10:00
Mitchell Richters fa9fa88fce Merge branch 'back_to_basics2' into InputStuffs
# Conflicts:
#	source/core/gamestruct.h
#	source/games/duke/src/duke3d.h
#	source/sw/src/input.cpp
#	source/sw/src/player.cpp
2020-09-07 07:51:37 +10:00
Christoph Oelckers e63e134195 - fixed automap follow mode and added some menu entries for the new options and key bindings. 2020-09-06 23:12:47 +02:00
Christoph Oelckers 2d547a4ef1 - re-added the sprite drawer for Duke's automap. 2020-09-06 21:31:05 +02:00
Christoph Oelckers 9d39f770d4 - reimplemented player sprite display on Blood's automap. 2020-09-06 21:15:59 +02:00