Commit graph

286 commits

Author SHA1 Message Date
Christoph Oelckers
671b8696bb - made CVar declarations type safe again. 2022-10-22 09:29:38 +02:00
Christoph Oelckers
453688ccc6 - reworked CVARs to not use a linked list and to be initialized manually.
This solves two problems:

* The linked list is too slow, a map is better. A map cannot be used with statically allocated CVARs because order of initialization is undefined.
* The current CVAR system is an unordered mishmash of static variables and dynamically allocated ones and the means of identification are unsafe. With this everything is allocated on the heap so it can all be handled the same by the cleanup code.
2022-10-21 18:56:43 +02:00
Christoph Oelckers
c0c9f8e15c - Backend update from Raze. 2022-10-14 20:11:05 +02:00
Christoph Oelckers
4032576519 - blocked off direct access to TAngle’s internal storage. 2022-08-26 18:09:29 +02:00
Christoph Oelckers
3d2578820b - block direct comparisons of TAngle with floats 2022-08-26 18:01:52 +02:00
Christoph Oelckers
f0fbdba593 - disable implicit conversions from float to TAngle 2022-08-26 18:01:26 +02:00
Christoph Oelckers
735c2a9545 - pass clip rect as pointer to F2DDrawer::AddLine. 2022-08-05 21:13:47 +02:00
Christoph Oelckers
77a4bc16cf - fixed handling of automap sprites with negative scale. 2022-05-23 00:08:33 +02:00
Christoph Oelckers
77d74a11d1 - removed most templates.h includes. 2021-10-30 10:49:12 +02:00
Hugo Locurcio
d0975467f5 Add cvars to control automap line alpha and thickness
This can be used to improve automap readability on high-resolution
displays.

Some automap options in the menu were reordered to follow a more
logical order.
2021-10-11 22:30:31 +02:00
Marisa Kirisame
7c591cd0e9 Allow map markers to scale relative to automap zoom. 2021-10-08 16:03:51 +02:00
Christoph Oelckers
109069f718 - removed the unused palette parameter from the V_GetColor family of functions. 2021-08-14 09:57:23 +02:00
drfrag
d1373c7ffd - Fix am_zoom and adjust am_zoomout speed for the automap. 2020-07-07 20:30:33 +02:00
Hugo Locurcio
f7bec90e74 Interpolate positions and angles in the automap for smoother appearance 2020-06-20 19:49:48 +02:00
Cacodemon345
da04616b7d Update am_map.cpp 2020-06-20 09:10:05 +02:00
Christoph Oelckers
5896f24eba - added a new light mode that emulates Build's depth fading.
Not active yet, this needs some testing and finetuning.
2020-06-08 23:37:20 +02:00
Christoph Oelckers
3b65b0caec - fixed: The size parameters for automap sprites are floats, so they need the matching tag. 2020-05-25 21:32:49 +02:00
Christoph Oelckers
ddef3f7b98 - made video base code game independent 2020-04-28 22:54:53 +02:00
Christoph Oelckers
2196b4fb04 - moved the frame rate drawer out of DFrameBuffer.
Too much of this is not shareable and all it consists of are drawing operations on the 2D drawer.
2020-04-27 23:53:26 +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
73b4fbe861 - FGameTexture conversion in am_map.cpp 2020-04-19 10:57:44 +02:00
Christoph Oelckers
1e40b745d5 - added some things from Raze to allow using the same code in both projects. 2020-04-11 20:20:59 +02:00
Christoph Oelckers
def123823b - cleanup of 2D code. 2020-04-11 20:20:58 +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
f8e9cb8fbc - major dependency reduction of the texture system. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
8dacdf2951 - use an array to store the buttons.
This puts a lot less knowledge about the game's features into the low level code.
2020-04-11 20:19:50 +02:00
Christoph Oelckers
603ad755ab - separated the button code from c_dispatch.
Two separate features justify two separate files.
2020-04-11 20:19:24 +02:00
Christoph Oelckers
1479e3a1c3 - CVAR cleanup, in particular decoupling from game internals, which now get handled via callbacks. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
05d8856fe0 - moved file system implementation to 'common'. 2020-04-11 14:00:20 +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
Cacodemon345
0090925fac Implement renderstyle and transparent actor sprite rendering in automap (#997)
* Implement renderstyle and transparent actor sprite rendering in automap

* Add "am_advspriterender" CVAR and add invisible actor checks.

* Rename cvar to `am_thingrenderstyles`
2019-12-23 10:29:14 -05:00
Christoph Oelckers
03537e90ff - linked new properties with the renderer.
Support for the softpoly renderer still missing.
2019-12-20 18:56:03 +01:00
Christoph Oelckers
7346288bf5 - moved some more files. 2019-07-14 21:09:49 +02:00
alexey.lysiuk
769be00483 - fixed automap marks placement with custom fonts
Automap rotation wasn't taken into account when drawing marks

https://forum.zdoom.org/viewtopic.php?t=63693
2019-02-15 17:21:59 +02:00
alexey.lysiuk
be6ce43045 - added ability to customize font of automap marks
Set am_markfont CVAR to a desired font name
Use am_markcolor to select a text color, has no effect with the default font, AMMNUMx
2019-02-13 21:47:53 +01:00
Christoph Oelckers
53162a8a5c Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/am_map.cpp
2019-02-03 09:20:13 +01:00
Alexander
03a2b9dc2e added am_showkeys_always 2019-02-02 17:54:00 +01:00
Christoph Oelckers
45dc9a7b47 - renamed the level variables.
currentUILevel is now primaryLevel.
For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed.
This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer.
The remaining global variables are not relevant for the level state.

The static 'level' has been mostly removed from the code except some places that still need work.
2019-02-02 00:25:51 +01:00
Christoph Oelckers
e3eaa5964d - removed v_video.h include from portals.h
This has no business in a play related file which also made no use of it.
2019-02-01 00:30:21 +01:00
Christoph Oelckers
fa3312e2a9 - moved gamestate_t to g_game.h.
This made reviewing the code for accessing the global state hard, because the doomdef.h contains mainly constants, this particular item was the only thing in there that represents actual engine state.
2019-01-31 00:28:43 +01:00
Christoph Oelckers
60873bc5d6 Moved the PointInSector functions into FLevelLocals 2019-01-29 01:30:41 +01:00
Christoph Oelckers
44f622c644 - more XCode warnings fixed. 2019-01-28 15:41:52 +01:00
Christoph Oelckers
d1ca3ef994 - added braces as per XCode's suggestion. 2019-01-28 15:20:02 +01:00
Christoph Oelckers
648e472744 - handled approx. half of all cases where the address of level is taken. 2019-01-28 00:55:21 +01:00
Christoph Oelckers
9b1b6db85d - added a pseudo-serializer for FLevelLocals pointers.
This doesn't really write out any info for the pointer, if the level does not match it just errors out.
This is both for quick detection of badly used level data and for automatic restoring of the pointer from the serializer's working level.

This also removed the temporary workarounds in DAutomap and DLevelScript to restore these pointers when a savegame is loaded.
2019-01-26 21:23:19 +01:00
Christoph Oelckers
fe06c49e34 - fixed: DAutomap::Serialize needs to call its super method. 2019-01-26 17:54:58 +01:00
Christoph Oelckers
05830455e7 - made the automap an object.
This simplifies handling a lot because it allows to make the level the owner of its map.
2019-01-26 15:21:20 +01:00