Commit graph

232 commits

Author SHA1 Message Date
Christoph Oelckers
dbf2d4d7d7 - backported all new scaling and rotation options for the 2D drawer from Raze.
With proper scaling and viewport support, things should become a lot easier now. The 2D drawer now also can rotate content by arbitrary angles.
2020-09-27 09:17:41 +02:00
Christoph Oelckers
9f6d244016 - advanced coordinate control for overlays over DTA_Fullscreen images. 2020-06-06 12:51:03 +02:00
Rachael Alexanderson
6e3ec96250 - export common formulae to functions instead of copy-pasting them
- screen bevel now enlarges also when screenblocks <= 11

- make intermission and status bar scaling game-specific in the config

- add scaling customization for classic ui flat scaling

- make screen border flat scale up

- inter_classic_scaling now defaults to true
- fixed: last commit I accidentally left hardcoded testing values and did not change them back to check for the texture's original size

- implement cvar 'inter_classic_scaling' to render the intermission flat as if it were 320x200
2020-05-07 04:34:17 -04:00
Christoph Oelckers
ddef3f7b98 - made video base code game independent 2020-04-28 22:54:53 +02:00
Christoph Oelckers
9e7094848c - transitioned the 2D drawer to FGameTexture. 2020-04-19 10:57:45 +02:00
Christoph Oelckers
c7db5b932e - switched the entire status bar code to use FGameTexture.
- scale the automap parchment to clean 320x200 dimensions.
2020-04-19 10:57:45 +02:00
Christoph Oelckers
9a3b663e04 - fixed text size calculations in the status bar.
To avoid errors, all spacing calculations have been added to FFont::StringWidth which already performs proper escape filtering.
2020-04-13 12:11:14 +02:00
Major Cooke
a56177f178 Begin TICRATE conversion.
- Moved TICRATE from Thinker to Object in ZScript so status bars have access to it.
2020-04-12 22:43:33 +02:00
Christoph Oelckers
ce4c2be3c7 - use the 2d drawer's size where appropriate. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
b18faacab0 - 2D drawer cleanup. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
7b292cca57 - split the serializer in two to keep the Doom specific parts out of the main file. 2020-04-11 20:20:53 +02:00
Christoph Oelckers
f74efcf721 - split the TObjPtr serializers into a separate file to avoid polluting everything that needs to use the serializer.
To use these it is necessary to include dobject.h and all its dependencies, so this should not be done unless necessary.
2020-04-11 20:20:53 +02:00
Christoph Oelckers
74c5f83658 - moved most of the root marking out of the garbage collector, replacing it with callbacks.
Yet another place where low level code was tied too tightly to the game instead of providing a proper interface.
2020-04-11 20:20:52 +02:00
Christoph Oelckers
3e285d2261 - moved renderstyle and colortables code to 'common'. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
f8e9cb8fbc - major dependency reduction of the texture system. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
05d8856fe0 - moved file system implementation to 'common'. 2020-04-11 14:00:20 +02:00
Christoph Oelckers
80c6d5b276 - renamed more stuff and also moved the Strife teaser voice handling out of the file system. 2020-04-11 14:00:19 +02:00
Christoph Oelckers
c1bb7de23a - more file system refactoring.
* moved the sprite renaming out of the file system entirely into a caller-provided callback.
* renamed several functions to closer match the terms of a file system.
* moved the VM interface out of the implementation.
2020-04-11 14:00:19 +02:00
Christoph Oelckers
6bccde3b51 - renamed the file system related classes to actually use the term "FileSystem". 2020-04-11 14:00:18 +02:00
Christoph Oelckers
ace3e29473 - removed the implicit conversion operators from FName.
These were creating dangerous interdependencies. It is better to do explicit conversions when needed.
As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
2020-04-11 14:00:13 +02:00
Christoph Oelckers
b0ecb02d6b - move SuperFastHash to its own set of files, instead of having this tied to the console.
- replace swapvalues with std::swap globally.
- added some additions to utility code from Raze, mainly to reduce file content differences.
- reduced some unused utilities
2020-04-11 14:00:10 +02:00
Rachael Alexanderson
5e262c6145 -- revert last 2 commits 2020-03-22 07:29:22 -04:00
Rachael Alexanderson
442bead31b - undo the change from last commit for 5:4 monitors - turns out the scale is calculated differently for 1280x1024 and needs the buggy version to work correctly. 2020-03-22 07:23:13 -04:00
Rachael Alexanderson
e7bad7218f - fix status bar scaling: use a fractional that takes full advantage of the precision type, rather than a static numerical constant. (this fixes rendering in very odd resolutions such as 1440x847) 2020-03-22 07:12:08 -04:00
alexey.lysiuk
59f09d4893 - move setting status bar defaults to proper location
BaseStatusBar.Init() method isn't suitable for this because it will override SBarInfoWrapper setup done in native code

https://forum.zdoom.org/viewtopic.php?t=66676
https://forum.zdoom.org/viewtopic.php?t=66339
2019-12-18 15:40:39 +02:00
alexey.lysiuk
51c90f54a4 - fixed wrong display of Hexen AC for SBARINFO
Do not use BasicArmor's save percentage when no armor present
Applied change from 34c2c65bb6 to old status bar definitions
2019-12-01 10:30:06 +02:00
alexey.lysiuk
fdd17403e5 - added ability to force internal alternative HUD
Set hud_althud_forceinternal CVAR to disable unwanted HUD customizations
2019-11-26 15:45:18 +02:00
alexey.lysiuk
a7f2df4fef - added ability to set custom alternative HUD
Use GAMEINFO key 'althudclass' to specify own class derived from AltHud

https://forum.zdoom.org/viewtopic.php?t=66422
2019-11-26 15:45:18 +02:00
Player701
db1359f98e - Implemented scale parameter for BaseStatusBar::DrawString 2019-11-24 10:45:07 +01:00
Christoph Oelckers
2e7af1338c - the big cleanup of the exit cleanup is done!
atterm is gone and only a few system-side functions use atexit.
All game side cleanup is performed in D_DoomMain now.
2019-10-07 20:28:55 +02:00
Christoph Oelckers
1a94e169ff - changed colors for crosshair health display to keep this in line with other health indicators on the HUD.
Use green for 100% health, not 200% and move toward blue for higher health.
2019-08-18 19:28:40 +02:00
Hugo Locurcio
61badfd694 Improve crosshair health color to be more informative
With `crosshairhealth 2`, the crosshair will now
go from white to yellow, then yellow to red as the player's health
decreases. As the player's health increases up to 200, the crosshair
will also go from white to green to indicate overheal.
This is similar to the implementation in games like Xonotic.

The old behavior (`crosshairhealth 1`) is still the default.
2019-08-18 19:09:52 +02:00
Christoph Oelckers
c3e3fda94a - fixed handling of the "ouch" face.
This depended on order of execution, taking the health values to compare from variables which were not synchronized properly.
Now both the last and current health being used here are being retrieved in the same place so that further changes cannot break this again.
2019-08-09 09:58:40 +02:00
Christoph Oelckers
8447525019 - fixed: Takedown of an expired HUD message did not properly detach it from the list. 2019-08-09 08:32:23 +02:00
Christoph Oelckers
154af34cd9 - added an option to always display the log and the subtitles with the generic font.
If this is on it will disable the status bar's pop screen for the log and always use the HUD overlay instead.
2019-07-31 17:02:39 +02:00
3saster
5eb2a6b681 FPS counter no longer blocks level time on automap
Respects HUD & Console scaling
2019-07-18 10:41:23 +02:00
Christoph Oelckers
95349822c4 - for the map name on the automap, fall back to the original SmallFont if the actual one cannot print it.
This is mainly for mods which provide a new font but do not alter the automap texts, a good example is Hell Revealed 2.
2019-07-17 20:28:07 +02:00
alexey.lysiuk
b935218dc2 - fixed: subtitles background renains visible on new game
https://forum.zdoom.org/viewtopic.php?t=65366
2019-07-16 11:37:41 +03:00
Christoph Oelckers
953e388e1c Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-07-07 08:09:14 +02:00
Major Cooke
b4cfea4e4d Re-ordered drawing a little. 2019-07-03 18:01:45 +02:00
Major Cooke
7b698b4a0e Added RenderUnderlay.
- Works exactly like RenderOverlay, but is drawn behind the status bar/huds instead.
2019-07-03 18:01:45 +02:00
Christoph Oelckers
e93de62f98 - eliminated dependency of CVar code on AActor.
As a low level feature, the CVAR management should not access game structures like actors, just to retrieve a player index. The index should be calculated by the calling code instead and passed into the function.

# Conflicts:
#	src/win32/i_specialpaths.cpp
2019-06-26 21:28:45 +02:00
Christoph Oelckers
2766303cfc - consolidated the 3 atterm implementations.
Each platform had its own copy. Why?
2019-06-10 12:01:01 +02:00
Christoph Oelckers
5b32c5b150 - fixed the write barriers for the HUD message linked list.
To ensure that no broken relations occur, any change in the list must be handled by a write barrier, not just the single message that gets added.
2019-06-05 20:58:59 +02:00
Christoph Oelckers
04334aa0fe - implemented subtitle display for Blackbird's voiceover messages. 2019-05-19 12:16:42 +02:00
Alexander
7540de4027 added a crosshair on/off toggle 2019-05-18 11:32:48 +02:00
alexey.lysiuk
a33fae19dd - improved handling of HUDMSG_TYPEON
This includes the following changes
* Validation of serialized values
* Proper fix for message cut off after an empty line, part of https://forum.zdoom.org/viewtopic.php?t=63935, which appeared to be broken again with dbf06fc
* No crash with an empty HUD message, https://forum.zdoom.org/viewtopic.php?t=63761 and https://forum.zdoom.org/viewtopic.php?t=64569
2019-05-04 13:26:36 +03:00
alexey.lysiuk
dbf06fc9ca - brought back text length check for 'type on' HUD message
https://forum.zdoom.org/viewtopic.php?t=64569
2019-05-04 11:13:59 +03:00
Christoph Oelckers
6f3982865f - refinement of font substitution logic. 2019-04-22 10:23:28 +02:00
Christoph Oelckers
e0a0be4f7b - added a CanPrint function to FFont and used that to handle the statistics display on the automap HUD to only replace the font when actually needed, not based on the language. 2019-04-22 09:08:43 +02:00