Commit graph

19568 commits

Author SHA1 Message Date
ChillerDragon c5fb857893 Remove demo snap buffer and mem copy
Adding the snap to the demo is the last usage of `pTmpBuffer3`
all prior usages of it copy the data if needed.
So we can edit it in place. No need to copy it into a new buffer.
2024-04-04 07:38:52 +08:00
Robert Müller 3c6fce376d Remove unused CTextCursor variable 2024-04-03 22:01:10 +02:00
Dennis Felsing e263ce9bdc
Merge pull request #8181 from dobrykafe/pr-discord-activity
Show Discord activity when offline
2024-04-03 05:35:16 +00:00
Dennis Felsing 7286a05dd4
Merge pull request #8182 from furo321/ec-password
Specify that `ec_password` is required to be set for econ to be enabled
2024-04-03 05:34:40 +00:00
Dennis Felsing 4a75244e97
Merge pull request #8178 from Robyt3/Menus-Settings-Apprearance-Improvement
Improve layout of Appearance settings, overall settings menus and restart message
2024-04-03 05:24:09 +00:00
Dennis Felsing 19c48e32ee
Merge pull request #8176 from furo321/arm-signed-char
Add `-fsigned-char` by default for ARM systems
2024-04-03 05:17:49 +00:00
furo ff1b1ae7b0 Specify that ec_password is required to be set for econ to be enabled 2024-04-03 00:24:24 +02:00
dobrykafe 990bb9b1ef show discord activity when offline 2024-04-02 23:57:17 +02:00
Robert Müller 44cd59379d Improve layout of settings menus and restart message
Remove unnecessary, inconsistent margin at the top of all settings menus.

Reserve space for restart message and button only when necessary, so more height is available for settings menus per default.

Improve vertical alignment of restart message and button with settings menus.

Ensure consistent margin on all sides of settings menus.
2024-04-02 21:28:15 +02:00
Robert Müller 7727628eeb Improve layout of Appearance settings
Use consistent margins for all settings pages and titles.

Fix chat preview overlapping with the restart warning.

Simplify layout code. Remove array of `CButtonContainer`s with arbitrary size and use individual variables instead.
2024-04-02 21:28:15 +02:00
furo 09f1c6b694 Add -fsigned-char by default for ARM systems 2024-04-02 16:50:23 +02:00
Dennis Felsing a9b254b0e2
Merge pull request #8173 from Robyt3/Client-Demo-Loading-Message
Render loading popup also while loading demo files
2024-04-01 15:23:27 +00:00
Robert Müller 1a9f15d11b Render loading popup also while loading demo files
As this can take a few seconds for large demos.
2024-04-01 16:44:10 +02:00
Zwelf 467a3187dc Simplify and fix HookBase calculation
Saw this while implementing TwGame. Increase teehistorian version_minor
to make replaying teehistorian files easier.
2024-04-01 12:58:41 +02:00
Dennis Felsing 9122080514
Merge pull request #8170 from Robyt3/Gameclient-Render-Checks
Improve performance when rendering menus
2024-04-01 03:58:07 +00:00
Dennis Felsing 295b095d29
Merge pull request #8167 from Robyt3/Client-Rcon-Username-State-Fix
Fix rcon username not reset when disconnecting while connecting
2024-04-01 03:06:10 +00:00
Dennis Felsing c9f0075330
Merge pull request #8166 from Robyt3/Browser-Favorite-Communities-Increase
Increase maximum number of favorite communities from 3 to 5
2024-04-01 03:00:26 +00:00
Robert Müller 2790530bbe Increase maximum number of favorite communities from 3 to 5
Simply hide the favorite community tabs in the offline server browser with screen resolutions where not enough width is available.

The ingame server browser can always show at least 5 favorite community tabs with all screen resolutions.
2024-03-31 20:17:51 +02:00
Dennis Felsing 94323b7704
Merge pull request #8168 from Robyt3/Dummy-Tuning-Reset
Reset tuning of dummy and main when disconnecting
2024-03-31 13:39:35 +00:00
Robert Müller b730d9d890 Improve performance when rendering menus
Skip rendering various client components (players, ghosts, nameplates, HUD etc.) while not ingame to improve performance. This increases FPS when rendering the start menu by around 300-400 both in debug and release builds.

This also fixes potential crashes when components using the map data where rendered while the client is loading a new map.
2024-03-31 15:30:19 +02:00
Robert Müller a287669500 Reset tuning of dummy and main when disconnecting
Instead of only resetting the tuning for either one which is currently active.
2024-03-31 12:48:43 +02:00
Robert Müller 830e8fea8c Fix rcon username not reset when disconnecting while connecting
The rcon username requirement was not reset correctly when disconnecting from a server while connecting/loading, at which point the `NETMSG_RCONTYPE` message has already been received.

Closes #4170.
2024-03-31 11:17:29 +02:00
Edgar 8412d2be6e
Merge pull request #8160 from edg-l/incl_algo
include algorithm in jobs.cpp, try to fix #8159
2024-03-30 10:46:57 +00:00
murpii ed90392636 Refresh the jumps after teleporting 2024-03-29 13:40:45 +01:00
Dennis Felsing 3eda861c37
Merge pull request #8163 from Robyt3/Scripts-DrMingw-Windows
Make `parse_drmingw.sh` script also useable on Windows with MSYS2
2024-03-29 11:28:09 +00:00
Robert Müller 00bf9b5248 Make parse_drmingw.sh script also useable on Windows with MSYS2
Use `objdump` instead of `winedump` to determine the image base address of the executable file, as `winedump` is not easily available on Windows.

It should be enough to install the `binutils` package (containing `addr2line` and `objdump`) from a package manager to use the script now.
2024-03-29 11:13:48 +01:00
Dennis Felsing 172bc33137
Merge pull request #8161 from Robyt3/Graphics-ImageInfo-Parameter
Pass arguments as `CImageInfo` to graphics functions, add `CImageInfo::DataSize` convenience function
2024-03-28 19:33:42 +00:00
Edgar 78cb4d4373
include algorithm in jobs.cpp, try to fix #8159 2024-03-28 20:14:16 +01:00
Robert Müller 2b8af7f40f Pass arguments as CImageInfo to graphics functions
Pass `CImageInfo` arguments to various graphics and text render functions instead of passing the components (data pointer, width, height, format/pixel size) of the image info separately.

Pass texture/file name to loading functions when available to improve error/warning messages.
2024-03-27 21:12:02 +01:00
Robert Müller 8218dbb6f8 Add CImageInfo::DataSize convenience function
To calculate the size of the image data based on its width, height and pixel size.
2024-03-27 21:12:02 +01:00
Dennis Felsing 1147d28007
Merge pull request #8157 from integer2bit/master
add windows installation with scoop
2024-03-27 07:40:52 +00:00
integer2bit 707240ed37 add windows installation with scoop 2024-03-27 10:25:45 +08:00
Dennis Felsing b092896b76
Merge pull request #8156 from Robyt3/Menus-State-Refactoring
Refactor client state handling in menus
2024-03-25 22:43:34 +00:00
Robert Müller b4a22e2fee Refactor client state handling in menus
Split menu rendering explicitly by client state. This makes the code more readable by not mixing code for rendering different states together as much and fixes issues where the menu was being rendered inconsistently for one frame when the state is changed, at the cost of some additional duplicated code.

The fullscreen popups shown when in the connecting and loading client states are now hard-coded for these states, instead of being mixed together with the other fullscreen popups, which can be shown when offline, ingame or during demo playback.

As a side effect of rendering the demo controls like the regular menu, the UI color will now also affect the demo controls menu background.

Move `CBackground::ChangePosition` calls inside functions to reduce duplicate code and improve readability.

Remove unnecessary `CMenus::m_ActivePage` variable.

Closes #7834.
2024-03-25 20:48:52 +01:00
Dennis Felsing 58ee780fa7
Merge pull request #8155 from ChillerDragon/pr_add_missing_includes
Add missing includes
2024-03-25 07:51:18 +00:00
ChillerDragon e4c136d324 Add missing includes 2024-03-25 14:24:08 +08:00
archimede67 e26ccdd921
Merge pull request #8153 from Robyt3/Base-Makedir-Rec-Windows-Fix
Fix recursive folder creation with mixed slashes and drive letters
2024-03-24 12:22:42 +00:00
Robert Müller 015390a51e Fix recursive folder creation with mixed slashes and drive letters
The function `fs_makedir_rec_for` for recursively creating folders did not handle paths containing backslashes correctly and only created folders after every occurrence of a regular slash. This could cause the recursive folder creation to fail when a parent folder is not created before the child folder. For example when recursively creating folders for the path `D:\Games/DDNet\downloadedskins`, the `DDNet` folder was not being created because this path segment does not end in a forward slash. Now, backslashes are handled the same as regular slashes, which is consistent with the other filesystem functions.

Additionally, the function tried to create folders for drive letters on Windows (e.g. `C:` and `D:`). Trying to create a system drive as a folder will fail due to access being denied, whereas it seems to work for already existing non-system drives. For example when recursively creating folders for the path `C:/Games/DDNet/downloadedskins`, the `C:` "folder" could not be created which caused the entire operation to fail. Now, the function will not try to create folders for drive letters anymore, i.e. if the name of the to be created folder ends with `:`.

Closes #8148.
2024-03-24 12:33:56 +01:00
Dennis Felsing 7e8dc57194
Merge pull request #8150 from furo321/freezebar-fix
Fix freeze bar not being correct after returning from pause
2024-03-23 23:26:04 +00:00
Dennis Felsing 7826b2a4f7
Merge pull request #8149 from BlaiZephyr/finalize-german.txt
german.txt fix
2024-03-23 23:25:04 +00:00
Dennis Felsing a4aafb78bd
Merge pull request #8147 from dobrykafe/pr-fix-style
`fix_style.py`: check for newline at the end of source files
2024-03-23 23:24:02 +00:00
Dennis Felsing eefcb83a4f
Merge pull request #8144 from Robyt3/Client-Skin-Reset-Cleanup
Use `CTeeRenderInfo::Reset`
2024-03-23 23:22:44 +00:00
Dennis Felsing 3d6c022d0e
Merge pull request #8145 from Robyt3/Format-CPU-ID-Naming-Fix
Fix more variable names (`GPU` -> `Gpu`, `ID` -> `Id`)
2024-03-23 23:22:28 +00:00
c0d3d3v ab3991f821 fix freeze bar not beeing correct after returning from pause
m_FreezeStart is now corrected by the ticks the character was paused
Possible physical changes: Until now it was possible if you sit inside freeze to re-freeze instant
after unpause. Now you re-freeze after the second that was dawned before
the pause. I do not excpect that this is used on any map, and it did not
bring any benifit.
2024-03-23 23:05:14 +01:00
BlaiZephyr 6f8fca2d3b keep Anti-Ping style consistent
forgot to change credit
2024-03-23 20:56:37 +01:00
dobrykafe 6175022e39 add missing newline at EOF 2024-03-23 16:01:16 +01:00
dobrykafe e46f16ed91 check for newline at the end of source files 2024-03-23 16:01:00 +01:00
Robert Müller 134961015a Fix more variable names (GPU -> Gpu, ID -> Id) 2024-03-23 12:06:31 +01:00
Robert Müller 4d6a00d827 Use CTeeRenderInfo::Reset
To reduce duplicate code and ensure all members are reset.
2024-03-23 11:57:08 +01:00
ChillerDragon e2c02eaf7b Remove useless operation in CUIRect SplitMid 2024-03-22 15:50:38 +08:00