Commit graph

68 commits

Author SHA1 Message Date
Boondorl
a8e350aed8 Renamed Networking Functions
New names more appropriately match the size of the value they write to/read from the stream.
2024-01-05 23:33:15 +01:00
Ricardo Luís Vaz Silva
f4fb583c6c more GetChars fixes in linux/macOS 2023-10-08 07:31:59 +02:00
Christoph Oelckers
1717ff47b2 add GetChars() accessors to many FString uses where const char* is wanted.
By no means complete, it's just a start to get rid of that automatic type conversion operator.
2023-10-03 14:27:39 +02:00
Christoph Oelckers
b695e845e1 - eliminated several pointless string copies in network code. 2023-08-12 10:56:34 +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
01f8131969 - moved chatmodeon to the backend. 2022-10-02 14:01:43 +02:00
Christoph Oelckers
12adee5256 - fixed a few includes 2022-10-02 13:57:36 +02:00
Christoph Oelckers
efd4a0b33a - the chat should use the console's scaling, not the one for the messages printed with the small font. 2022-06-05 16:29:42 +02:00
Christoph Oelckers
390bf58698 - first stage of migrating intermissions to screenjobs. 2022-04-26 20:50:35 +02:00
Christoph Oelckers
f912712f9d - cleaned up c_console.cpp to be moved into 'common'. 2020-10-25 13:14:19 +01:00
Christoph Oelckers
fb8bc9876c - clear the button state when entering chat mode.
Since the game cannot be controlled while typing a chat the state must be reset to prevent residual state from triggering actions afterward.
2020-10-17 13:07:30 +02:00
Christoph Oelckers
ddef3f7b98 - made video base code game independent 2020-04-28 22:54:53 +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
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
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
Marisa Kirisame
14dc288f22 Allow custom status bars to override notifications, centered prints and chat prompt. 2019-08-19 11:19:36 +02:00
Christoph Oelckers
0837178518 - do proper checks for chat string length.
The counter variable was not only used incorrectly, it was completely redundant.
This still has a byte limit due to how the network code works so for non-Latin languages may result in shorter strings.
2019-04-19 08:27:31 +02:00
Christoph Oelckers
ed1615babb - allow using the console font for notification messages (e.g. item pickup)
This is optional because it impacts display of game content, but for readability the new font definitely has advantages.
2019-03-11 19:09:37 +01:00
Christoph Oelckers
e2d3c6feea - use the new console font for the chat input. 2019-03-11 18:42:28 +01:00
Christoph Oelckers
add10029b9 - fixed chat input. 2019-02-23 09:54:18 +01:00
Christoph Oelckers
deb233677e - made the menu's text input handler Unicode capable.
Also make sure that the savegame description remains readable. Unlike in-game text this can be done without double-encoding existing UTF-8.
2019-02-16 21:29:46 +01:00
Christoph Oelckers
54cb16ad8e - made the chat input Unicode-capable.
Also changed this to use the console font because it is far better equipped with special characters than the small font.
2019-02-16 18:49:38 +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
3d28006eda - started removing literal references of AInventory, so far only simple stuff. 2018-12-04 00:41:39 +01:00
Christoph Oelckers
0e095b0c05 - removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code. 2018-12-03 17:41:05 +01:00
Christoph Oelckers
d6b781312c - removed all remaining native components of the weapon class. 2018-11-25 10:00:55 +01:00
Christoph Oelckers
b5c4ab8c47 - removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2018-11-25 08:17:37 +01:00
Christoph Oelckers
b75ee1027a - a little bit of cleanup on some code that repeatedly accessed some fields in AWeapon and produced far too many search results when looking for this. 2018-11-24 23:51:09 +01:00
alexey.lysiuk
2ae8d39441 Removed all superfluous #include's
Automatically optimized by CLion IDE with manual corrections
2018-04-24 14:30:35 +03:00
Christoph Oelckers
853903bb7e - removed the border refresh counter.
This was just a relic of DirectDraw as main backend and is no longer needed.
2018-04-03 00:50:40 +02:00
Christoph Oelckers
96d328de9b - removed all Doom Source license and all default Raven copyright headers and replaced them with GPLv3. Also fixed the license in a few other files.
For some files that had the Doom Source license attached but saw heavy external contributions over the years I added a special note to license all original ZDoom code under BSD.
2017-04-17 13:33:19 +02:00
Christoph Oelckers
f95c29ad28 cleaned up the scaling options.
- all 5 settings affected by uiscale have been changed to have the exact same semantics: -1, if supported means special scaling, this is available for HUD and status bar, 0 means to use uiscale, any larger value is a direct scaling factor.
- scaling is cut off when the factor is larger than screenwidth/320 or screenheight/200 because anything larger will definitely not fit.
- a lot of code has been cleaned up and consolidated. Especially the message code had an incredible amount of redundancy.
- all scaling options have been moved into a submenu. This menu is not complete, though - it still requires a special menu widget to convey the intended information without confusing the user.
2017-03-30 02:16:23 +02:00
Christoph Oelckers
1d4ab0cc2a - implemented proper scaling for the status bar itself.
This allows using the UI scale or its own value, like all other scaling values.
In addition there is a choice between preserving equal pixel size or aspect ratio because the squashed non-corrected versions tend to look odd, but since proper scaling requires ununiform pixel sizes it is an option.

- changed how status bar sizes are being handled.

This has to recalculate all scaling and positioning factors, which can cause problems if the drawer leaves with some temporary values that do not reflect the status bar as a whole.
Changed it so that the status bar stores the base values and restores them after drawing is complete.
2017-03-29 19:23:40 +02:00
Christoph Oelckers
fec958cc0a - finally managed to get rid of the DWORD type.
This one was particularly nasty because Windows also defines a DWORD, but in Windows it is an unsigned long, not an unsigned int so changing types caused type conflicts and not all could be removed.
Those referring to the Windows type have to be kept, fortunately they are mostly in the Win32 directory, with a handful of exceptions elsewhere.
2017-03-10 19:46:22 +01:00
Christoph Oelckers
8ab562ef13 - the fourth. 2017-03-08 18:55:54 +01:00
Christoph Oelckers
f5421491ec - wrapped the entire DSBarInfo class in a container and completely decoupled it from DBaseStatusBar.
The idea is, when status bars are moved to ZScript that only this small wrapper class needs to be dealt with and the implementation can be left alone. SBARINFO is far too complex to be scriptified, but having it inherit directly from DBaseStatusBar and access its member variables severely limits the options of dealing with the status bar code. This way, it only accesses some globally visible functions in DBaseStatusBar and no variables.

- renamed the global ST_X and ST_Y variables because it is far too confusing and error-prone to have the same names inside and outside DBaseStatusBar.
2017-01-20 11:11:22 +01:00
Christoph Oelckers
8256f25a84 - no need to keep AArmor native, now that all child classes have been scriptified. 2017-01-18 23:46:19 +01:00
Christoph Oelckers
2fcffd1fc1 - removed the remaining native parts of ABasicArmor.
- simplified some FindInventory calls using PClass::FindActor to call the variant taking a name directly.
2017-01-18 22:57:47 +01:00
Christoph Oelckers
78fa076079 - moved armor class declarations to their own file and added necessary #includes only to those files actually using them.
- added copyright headers to a_armor.cpp and a_keys.cpp.
2016-11-30 10:55:03 +01:00
Magnus Norddahl
e794e59cd2 Add con_scale for scaling just the console 2016-09-08 00:39:52 +02:00
Magnus Norddahl
6414e01354 Add uiscale slider controlling what scale the On setting uses for hud_scale, hud_althudscale and con_scaletext 2016-09-08 00:39:51 +02:00
Magnus Norddahl
a893013dbb Adds HUD quadruple scale and a scale slider for the crosshair 2016-08-05 12:20:34 +02:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Randy Heit
5caadeba4c Use a null check instead of strlen in ShoveChatStr 2014-12-23 21:33:47 -06:00
Edward Richardson
dfa6a44402 Ignore 0 length chat messages
- There is no reason to send empty messages, and they just produced
strange output anyway
2014-12-23 22:38:12 +13:00
alexey.lysiuk
25b808cd82 Merge https://github.com/rheit/zdoom into z_osx_clean 2014-10-12 15:19:11 +03:00
ChillyDoom
c6e1ea864f - Added scoreboard toggling. 2014-10-02 21:03:15 +01:00