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
Christoph Oelckers
3e8ff96e6b
- added workaround for DukeDC's ending cutscene which was abusing undefined behavior in the original code.
2020-08-05 22:57:45 +02:00
Christoph Oelckers
454e0e36c9
- added a sound for advancing multi-screen menus.
...
Fixes #100 .
2020-08-05 00:32:29 +02:00
Christoph Oelckers
d526c6401f
- use the generic cheat system for Blood.
2020-08-03 20:51:31 +02:00
Christoph Oelckers
724c811de3
- Moved message storage to the map records.
2020-08-03 20:16:32 +02:00
Christoph Oelckers
35a5c4e23c
- undid hardcoded coupling of Mapinfo slots with episode/level pairs in Blood.
...
This both lifts the imposed limit of 16 levels and will allow dynamic management of global mapinfo data.
2020-08-03 20:11:30 +02:00
Christoph Oelckers
0036402be8
- removed most of the network code in Blood.
...
Mainly to expose the parts that still get used in single player because there's some problems here that need addressing.
ENet is also gone now.
2020-08-03 20:06:27 +02:00
Christoph Oelckers
dea0804f9a
- how could this compile?
2020-08-03 19:14:33 +02:00
Mitchell Richters
348acf95e0
- change division of delta between currentTime and lastTime from 8 to 72 to ensure smoothratio doesn't clip at 65536.
...
* Divisor of delta is there so smoothratio always starts off with some kind of value. After 10 minutes at 1100 fps, closest final result to 65536 was:
ototalclk: 4573
totalclk: 4576
gametics: 33.333 ms
elapsedTime: 33.331 ms
ratio: 0.999938
result: 65531.941356
2020-08-03 10:00:06 +10:00
Christoph Oelckers
e434df5328
- always play menu sounds by calling M_MenuSound to check the menu_sounds CVAR.
2020-08-02 22:16:26 +02:00
Christoph Oelckers
6a305748ff
- removed some C cruft from compat.h.
2020-08-02 21:25:03 +02:00
Mitchell Richters
0c12436092
- change returned value for CalcSmoothRatio()
from int to double and pass through to displayrest()
for future use with displayweapon()
.
...
* `displayrooms()` ultimately should be adjusted as well. For now, just relying on integer truncation as this is just a proof of concept.
# Conflicts:
# source/core/gamecontrol.cpp
# source/core/gamecontrol.h
2020-08-02 21:20:52 +02:00
Christoph Oelckers
18c3d9b240
- get the frame time right at the start of the frame, not when performing interpolations.
...
This is to factor think time out of the time span between frames and to avoid changes if the smoothratio gets calculated multiple times.
2020-08-02 21:16:01 +02:00
Mitchell Richters
3861064f62
- use 1/8 of delta time as initial elapsed time when calculating smoothratio on a new ototalclk.
...
* Pushes final result closer to 65536 and always ensures smoothratio never starts at 0.
2020-08-02 20:57:09 +02:00
Mitchell Richters
5000fde281
- restore legacy interpolation path behind CVAR cl_legacyintrpl
.
...
* Hoping the old path being available will allow the new code to be merged.
* Applied offset to sum of `(totalclk - ototalclk)` of 0.5 to ensure calculated smoothratio under legacy path always returns a value.
* For the above, consider Duke 3D with 4 game tics per ticrate, the returned values would be:
0
16384
32768
49152
* With offset of 0.5, the following values are returned depending on how far advanced `totalclk` is from `ototalclk`:
8192
24576
40960
57344
2020-08-02 20:57:08 +02:00
Mitchell Richters
52d9fd4cda
- add cl_debugintrpl
CVAR to print interpolation information to the console.
...
* Also revert back to use of `xs_CRoundToInt()` that was accidentally removed previously.
2020-08-02 20:57:08 +02:00
Mitchell Richters
1cf857e788
- create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant.
2020-08-02 20:57:08 +02:00
Mitchell Richters
733f3aa490
- increase granularity of CalcSmoothRatio()
.
2020-08-02 20:57:07 +02:00
Christoph Oelckers
3a32e8840f
- ported Blood's status bar to the Status bar class.
...
Now it allows downscaling just like Duke's.
2020-08-02 13:35:34 +02:00
Christoph Oelckers
cc8798f6e2
- preparations for rendering Blood's status bar through the Statusbar class.
2020-08-02 08:39:51 +02:00
Christoph Oelckers
347ed51036
- refactored Blood's main loop.
...
* moved Smacker video playing code into the backend, so now all games can play all supported video formats
* logos and level intro/exit videos use ScreenJob
2020-07-29 23:18:08 +02:00
Christoph Oelckers
b49d04fd6e
- fixed: The video player did not check the sound CVARs.
...
Fixes #58
2020-07-28 21:05:14 +02:00
Mitchell Richters
158fd46581
- change Duke's synchronized_input
to CVAR cl_syncinput
.
2020-07-28 21:38:28 +10:00
Christoph Oelckers
371a808d9e
- set MP taunt texts as CVAR defaults to ensure they won't get deleted by user actions.
2020-07-27 18:12:24 +02:00
Christoph Oelckers
4836744d26
- language update.
2020-07-26 23:27:39 +02:00
Christoph Oelckers
c0d46f6a69
- implemented proper scaling for the status bar.
...
Addresses #2 .
2020-07-26 23:06:27 +02:00
Christoph Oelckers
102f473821
- clear the input state before starting a cutscene to ensure that it won't get skipped by residual input data.
2020-07-26 19:55:06 +02:00
Christoph Oelckers
c8cde7fb3b
- stop sound in all paths of the ANM player.
...
Fixes #36 .
2020-07-26 18:02:24 +02:00
Christoph Oelckers
775eabcd3d
- fixed incorrect 'twodonly' flag set for the base palettes.
...
This let the palette creator skip all translations for the water and slime palette. Fixes #28 .
2020-07-26 17:56:33 +02:00
Christoph Oelckers
af970b091e
- set proper game state after ending the level summary screen.
...
Fixes #20 .
2020-07-26 12:43:32 +02:00
Christoph Oelckers
6e276545cd
- fixed typo in savegame metadata reader and an issue with code execution order when exiting a level.
2020-07-26 12:15:24 +02:00
Christoph Oelckers
342b90c8f9
- fixed: With hud_messages == 1 no messages were printed.
2020-07-26 10:31:12 +02:00
Mitchell Richters
f67a53a7c0
- fix sound and music pausing with tweaks to updatePauseStatus()
. Also removed unneeded game-side function. Fixes #11 .
2020-07-26 17:20:53 +10:00
Christoph Oelckers
8a5427abed
- fixed the cheat handler.
2020-07-25 17:25:21 +02:00
Christoph Oelckers
6df64f4ee3
- fixed RR status bar layout.
2020-07-25 16:43:03 +02:00
Christoph Oelckers
654391a278
- fixed layout for classic Duke fullscreen HUD.
2020-07-25 15:41:11 +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
9043123aab
- set proper engine compatibility mode.
2020-07-25 10:03:13 +02:00
Christoph Oelckers
1e8b8443b0
- implemented 2D rotation and fixed offset calculation for drawing scaled sprites on the status bar.
2020-07-24 23:08:48 +02:00
Christoph Oelckers
e2de6d9dc3
- changed status bar drawer to pass the texture offsets to the low level code instead of adding them itself.
...
This is needed for rotating around the pivot point, if the offset is applied here the low level code cannot do the rotation properly anymore.
2020-07-24 21:08:33 +02:00
Christoph Oelckers
b56f74bf32
- actually call the postAction callback for the screen job.
...
Fixes missing title music.
2020-07-24 20:11:50 +02:00
Christoph Oelckers
d10bf41b03
- removed some obsolete stuff.
2020-07-24 19:44:05 +02:00
Christoph Oelckers
25d383ac73
- re-enabled skipping of MVE movies which was disabled for easier debugging.
2020-07-24 19:05:34 +02:00