Christoph Oelckers
56d0647412
- migrated the last 3 remaining UI controls to CCMDs.
2020-08-29 17:49:15 +02:00
Christoph Oelckers
eb34b41716
- fixed keyboard look in Blood.
2020-08-29 17:07:25 +02:00
Christoph Oelckers
694444b62a
- converted the remaining input bits.
...
Looks like it is working in all games except Blood (not that it surprises me that it's Blood again which has issues...)
2020-08-29 13:32:55 +02:00
Christoph Oelckers
7659107b75
- removed SW's SK_AUTO_AIM for good.
...
When networking becomes a thing again this can be done as a server CVAR without such a messy approach.
2020-08-29 02:19:41 +02:00
Christoph Oelckers
3a9bcb0b64
- moved Exhumed's cheat bits back into the game module.
...
They are no longer part of the packet interface.
2020-08-29 02:17:28 +02:00
Christoph Oelckers
dc1f56e8f9
Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into Packet
...
# Conflicts:
# source/core/inputstate.cpp
# source/exhumed/src/exhumed.h
2020-08-29 01:19:48 +02:00
Christoph Oelckers
fe7f3a2f9e
- handle the run key.
2020-08-29 00:57:07 +02:00
Christoph Oelckers
b9e0f493b2
- transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire.
2020-08-28 23:25:08 +02:00
Christoph Oelckers
847fa48724
- cleaned out the remaining parts of baselayer.h
...
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.
The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers
536e7455f2
- moved I_StartFrame to the top of the loop and cleaned up baselayer.hj
2020-08-28 08:44:44 +02:00
Christoph Oelckers
d73bf62465
Revert "- Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible."
...
This reverts commit 97feb483ab
.
2020-08-28 08:25:51 +02:00
Mitchell Richters
97feb483ab
- Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible.
...
* Micro-optimisation, but was getting a very occasional jitter in Duke 3D that seems to have gone with this.
2020-08-28 15:27:16 +10:00
Christoph Oelckers
d62d2eaec7
- processed all remaining local input CCMDs and removed some bits only needed for multiplayer.
...
These MP bits should be reimplemented as network commands later, they only take up valuable space in the bit field.
2020-08-28 00:03:35 +02:00
Christoph Oelckers
ee7d558282
- removed the remains of sending pause with the input packets.
...
None of this was really working anymore, but will have to be rethought once a network stream exists again.
But even then, this is better sent as a separate command, and in MP only.
2020-08-27 22:38:52 +02:00
Christoph Oelckers
447573aa36
- consolidation of invprev, invnext and invuse.
2020-08-27 22:19:24 +02:00
Christoph Oelckers
43de0d8312
- consolidation of inventory item activation through hotkeys.
...
This also adds hotkeys for Exhumed which never implemented them.
2020-08-27 21:25:09 +02:00
Mitchell Richters
8bb13bc4c2
- InputState: Exclude volume keys from setting AnyKeyStatus
to true.
2020-08-27 13:05:05 +02:00
Christoph Oelckers
10df3e094a
- rework of weapon input to use common features in shared code.
...
This also adds stubs for all unimplemented features in the games for easier addition.
2020-08-27 00:53:35 +02:00
Christoph Oelckers
f597f7c265
- made the GameFunc constants global again.
...
With most of the more specific features being migrated to CCMDs the list is relatively clean now, with merely 2 buttons that are game specific.
2020-08-27 00:25:59 +02:00
Christoph Oelckers
4b299fa412
- Exhumed also handled.
2020-08-27 00:58:21 +02:00
Christoph Oelckers
99486cba7e
- gave Blood the same treatment.
2020-08-27 00:21:11 +02:00
Christoph Oelckers
c7e667a17a
- transition weapon selection in SW.
...
Thanks to the macro insanity for trivial operations in this code base this turned out to be a lot more troublesome than Duke...
2020-08-27 00:06:59 +02:00
Mitchell Richters
55f688b13f
- SW: Rename q16horz
to q16horiz
and q16aimvel
to q16horz
for consistency and to avoid confusion down the track.
2020-08-27 08:00:50 +10:00
Christoph Oelckers
e768a2bf24
- use new bitmask for weapon selection in Duke.
2020-08-26 23:02:55 +02:00
Christoph Oelckers
36d676ca20
- renamed ESyncBits so that the replacement can take that name later.
2020-08-26 22:39:15 +02:00
Christoph Oelckers
4e846f8d66
- do not print game init messages to the notify display.
2020-08-26 20:19:54 +02:00
Christoph Oelckers
f90d953ab5
default cl_smoothsway to false.
2020-08-26 17:23:08 +02:00
Christoph Oelckers
abf715eace
- unified the packet structures of all games.
...
Currently the bit fields are still separate and they have to be merged, but for now the added memory does not matter.
Having this structure in the common parts will allow work on consolidating the input code, though.
2020-08-26 17:12:48 +02:00
Christoph Oelckers
c7f5f05e14
- cleaned up gamecvars.cpp and deleted a large amount of unused ones.
2020-08-26 17:05:17 +02:00
Mitchell Richters
4fcec5f6d3
- SW: Alt implementation for preparing a nuke.
...
* Given the original code in `pNukeAction()` (poorly named), the intent appeared to be that the weapon should go off-screen for preparation, returning once weapon initialised.
* Commit restores that behaviour behind a CVAR.
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 17:00:19 +02:00
Christoph Oelckers
b76168f673
- moved the main event processing functions into the global main loop.
...
Now, with all the Build timer stuff removed these calls were all identical between games.
2020-08-26 16:59:41 +02:00
Mitchell Richters
a9f556c1bd
- SW: Restore random element to player's weapon left/right bobbing behind a CVAR.
...
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 16:45:42 +02:00
Mitchell Richters
88a49b0d22
- Duke: Restore RPG harsh recoil behind a CVAR.
...
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2020-08-26 16:45:41 +02:00
Mitchell Richters
62388e30be
- fix C_SetNotifyFontScale()
for RR.
...
Fixes #264 .
2020-08-26 22:33:19 +10:00
Christoph Oelckers
cc5e6d19c3
- fixed sound updating by moving the engine's UpdateSound call into the main loop.
...
This needs to be called unconditionally for every frame being rendered, not all of the game modules did that.
Placing this call here ensures that it is independent of anything the games do.
2020-08-26 04:10:16 +02:00
Christoph Oelckers
de871c9ab9
- use the game timer, not the Build timer for the sound eviction delay.
...
This is supposed to wait for two game frames to be on the safe side.
2020-08-26 03:50:07 +02:00
Mitchell Richters
ef728429e0
- Core: Remove legacy smoothratio calculator CalcSmoothRatio()
.
2020-08-26 09:49:47 +10:00
Mitchell Richters
e0aaaf1f60
- All Games: Move gameclock
and lastTic
to gamecontrol.
2020-08-26 09:49:44 +10:00
Mitchell Richters
76776d24d7
- All Games: Remove use of ClockTicks
and replace with int
.
2020-08-26 09:49:42 +10:00
Mitchell Richters
1c8b0a20fb
- Build: Remove all timer code.
2020-08-26 09:49:40 +10:00
Mitchell Richters
b883204f6a
- All Games: Remove remaining use of totalclock
and associated timing code.
2020-08-26 09:49:34 +10:00
Christoph Oelckers
6b0e1baf02
- added a timerUpdateClock call to the main loop so that Blood and Exhumed work again.
...
This may only be removed when nothing uses totalclock anymore. We're not there yet.
2020-08-25 21:24:45 +02:00
Christoph Oelckers
a323591d5a
- call C_RunDelayedCommands() from a centralized place.
2020-08-25 21:16:37 +02:00
Christoph Oelckers
fd12ad382f
- add shadows to the statistics display.
...
Fixes #256
2020-08-25 20:58:32 +02:00
Christoph Oelckers
5df0a7241f
- disabled a few menu options for unsupported features in Exhumed.
...
Fixes #255
2020-08-25 20:40:30 +02:00
Christoph Oelckers
8256b54005
- applied a few fixes:
...
* removed the timer callback stuff that came back through the backdoor.
* do not use gameclock in the UI code - use the underlying timer directly.
* UpdateSounds must still use totalclock, until this can be refactored in its entirety.
2020-08-25 20:20:35 +02:00
Mitchell Richters
d3b506eb2b
- Duke (and Engine): Eliminate use of totalclock for game.
...
* Breaks every other game except Duke unless/until they get migrated. Done for the purpose of demonstrating PR #244 .
# Conflicts:
# source/build/src/timer.cpp
# source/games/duke/src/game.cpp
2020-08-25 19:51:12 +02:00
Christoph Oelckers
435e13dfa4
cleanup of the timer interface.
...
* rewrote all uses of timerSetCallback. Most were unnecessary or long obsolete, the sound updates need to run per frame, not per tic and the UI tickers need to be handled in the main loop anyway.
* Use a more precise timer to animate the menu transition.
* uncouple other menu animations from the game timer.
2020-08-25 19:42:11 +02:00
Christoph Oelckers
a55da24277
- hooked up the chat display.
...
Currently not really useful, aside from being usable to enter cheats. For this the cheat must be prefixed with a '#' to be recognized.
2020-08-25 18:51:56 +02:00
Christoph Oelckers
cf36e7d770
- SW: stop cutscene sound before going to the summary screen.
2020-08-25 18:28:50 +02:00
Christoph Oelckers
a0e4d6f62c
- implemented proper scaling support for the notify display - both the classic and advanced variant.
2020-08-25 18:03:15 +02:00
Christoph Oelckers
1a633ce6a6
- give Exhumed some automap labels as well.
...
This game didn't have them originally so here the 'native' mode does not exist.
2020-08-25 00:27:14 +02:00
Christoph Oelckers
faf23d8ff0
- proper defaults for Blood.
2020-08-25 00:01:33 +02:00
Christoph Oelckers
6672b8af99
- generalized the automap label code.
...
Using proper scaling and should be reusable from all games now.
2020-08-24 23:14:55 +02:00
Christoph Oelckers
88bcaf37ab
- changed the scale range of hud_statscale so that 1 is for fullscreen 320x200.
2020-08-24 22:02:49 +02:00
Christoph Oelckers
e7c58a5b29
- make hud_scale a floating point CVAR.
2020-08-24 21:48:47 +02:00
Christoph Oelckers
76811a1881
- InputState cleanup
...
This removes most of the InputState class because it is no longer used.
The only remaining places still checking scan codes are the modifiers for sizeup and sizedown.
All the rest was remapped to safer methods. The multiplayer taunts are currently inoperable, they will need support of shift-bindings to get proper support.
2020-08-24 20:34:18 +02:00
Christoph Oelckers
b88a279a57
- removed the mouse wheel up event hackery
...
With the weapon cycling commands being done as CCMDs this is no longer needed.
2020-08-24 20:26:32 +02:00
Christoph Oelckers
c09a5150a9
- added some predefined fullscreen modes
...
This is to cut down on boilerplate code because these encode the virtual screen size in the mode parameter, making it unnecessary to specify a virtual size separately.
2020-08-24 20:25:53 +02:00
Christoph Oelckers
f1a988b221
- make use of map bindings
...
All automap controls have been moved there, and sizeup/sizedown have been made CCMDs, taking screen size management entirely out of the game modules
2020-08-24 20:20:15 +02:00
Christoph Oelckers
092fb55db3
- hooked up the automap bindings.
...
Now, with centralized state management these can finally work.
2020-08-24 19:55:21 +02:00
Christoph Oelckers
7859a29e95
- use global variables to track automap state
...
So far implemented in Duke/RR.
2020-08-24 19:31:43 +02:00
Christoph Oelckers
e25d1c4cda
- improvements for automap labels.
...
* use a CVAR to decide whether to show them at the top or bottom
* draw them on top of the screen border so that they don't get overdrawn on smaller windows.
2020-08-24 00:25:42 +02:00
Christoph Oelckers
e7c1595531
- allow using a better font for the map name on the automap.
...
- allow displaying the map label on the automap.
So far only for Duke and related games, the rest will follow.
2020-08-24 00:05:36 +02:00
Christoph Oelckers
91b31cec39
- fixed: hud_messages completely blocked the messages, even from going to the console.
...
It should only block the on-screen notification display, which the backend already implements. The game code should not check this CVAR again.
2020-08-23 22:46:53 +02:00
Christoph Oelckers
41a1120033
- added a native style display mode to the notification message display.
...
Fixes #9
2020-08-23 22:39:53 +02:00
Christoph Oelckers
4469cf7edb
- only go from menu to console when closing with Escape.
2020-08-23 21:24:31 +02:00
Christoph Oelckers
7417160abd
- when closing the main menu, go directly to the full console.
...
Fixes #27
2020-08-23 20:48:48 +02:00
Christoph Oelckers
8b8f048393
- moved parts of videoNextPage to app_loop.
2020-08-23 18:08:08 +02:00
Christoph Oelckers
adb98a47ba
- restructured the main loop code so that the actual loop is in the common code.
2020-08-23 17:47:05 +02:00
Christoph Oelckers
6b1d6a44d7
- exported the item pickup messages to the string table and use the global 'nomonsters' flag.
2020-08-22 20:14:00 +02:00
Christoph Oelckers
0843f5f04a
- ported the final level's text screen and exported its text to the string table.
2020-08-22 18:12:19 +02:00
Christoph Oelckers
ca943317e7
- ported Exhumed's map to the ScreenJob interface.
2020-08-21 22:30:51 +02:00
Christoph Oelckers
78bfbdb253
- Exhumed status bar work.
...
Unfortunately this is a bit limited due to how the data was designed.
2020-08-20 17:04:21 +02:00
Christoph Oelckers
5cfd427e42
- renamed local totalclock variables to reduce noise for the forthcoming timer cleanup.
2020-08-19 17:23:18 +02:00
Christoph Oelckers
94beac937d
- scale down the notify display by 2 in RR.
...
Its fonts are double the size as the other games and this must be factored in here for HUD scaling to work as expected.
2020-08-19 16:40:54 +02:00
Christoph Oelckers
0a8f7e60b6
- fixed incompatibility of FindDistance3D with Shadow Warrior.
...
Fixes #200 and most likely many other issues as well.
2020-08-18 23:49:44 +02:00
Christoph Oelckers
b417ad2f6d
- 0 is a valid level number.
...
Fixes #206 .
2020-08-18 20:12:04 +02:00
Mitchell Richters
5cc30ad7c6
- SW: Increase precision of x/y coordinates where possible.
2020-08-18 18:26:04 +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
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
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
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
8595b9fa47
-play SW's intro through the screen job framework.
2020-08-15 13:04:15 +02:00
Christoph Oelckers
ff38cfe179
- open the in-game menu only when really inside a game and actually playing.
...
Fixes #182
This isn't foolproof but it's probably the best that can be done.
2020-08-14 22:41:32 +02:00
Christoph Oelckers
2403e8cb2c
- fixed RRRA summary screens.
2020-08-14 22:31:54 +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
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
Christoph Oelckers
2dad86a304
- made some adjustments to DMessageBoxMenu to handle screens that must close the menu before performing their option.
...
Fixes #173 . The "End Game" menu option needs this.
2020-08-12 19:04:19 +02:00
Christoph Oelckers
2d545767ef
- completely clear all texture data when setting a frame size.
...
SMK tries to draw a texture from it before the first frame has been rendered. This ensures that it gets a fully black frame.
Fixes #167 .
2020-08-12 01:32:05 +02:00
Christoph Oelckers
57edd370a7
- fixed: When quitting the game, first clear the menu.
...
This is to ensure that the menu stack is empty.
Fixes 170
2020-08-12 01:15:03 +02:00
Christoph Oelckers
85364c2bb6
- let all video players respect the SoundEnabled setting.
...
Fixes #164 .
2020-08-11 19:52:54 +02:00
Christoph Oelckers
6a10a7f266
- changed the rules for dimming the menu to be more clear
...
It will no longer depend on the game state when the menu was opened but the current game state - only on the dedicated menu screen there's no dimming - everywhere else a dim gets applied.
Also renamed GS_DEMOSCREEN to GS_MENUSCREEN for clarity
2020-08-11 00:46:27 +02:00
Christoph Oelckers
b1c8046470
- fixed dimming checks for menu.
...
Now with proper game state management this can be done better.
2020-08-10 20:43:51 +02:00
Mitchell Richters
4c74c172e3
- fix screenjob.cpp PlayVideo()
returning after stripping drive letter without checking whether it was able to re-open the file thereafter successfully.
...
Fixes #128 .
2020-08-10 21:15:17 +10: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
0492c5f4d3
- optimized reverb settings.
...
Fixes #124
2020-08-09 13:26:48 +02:00
Christoph Oelckers
596367f10f
- Screenblend fixes.
2020-08-07 22:00:43 +02:00