Commit graph

19395 commits

Author SHA1 Message Date
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
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
archimede67 96889c8d41
Merge pull request #8137 from Robyt3/Editor-Envelope-Bezier-Popup-Fix
Fix envelope points not clickable after opening bezier popup
2024-03-21 20:33:00 +00:00
Robert Müller f05bbc226a Fix envelope points not clickable after opening bezier popup
Closes #8017.
2024-03-21 21:12:31 +01:00
Dennis Felsing ccdb7a2eaf
Merge pull request #8136 from archimede67/editor-fix-construct-gt-crash
[Editor] Fix crash when constructing some game tiles
2024-03-21 17:44:16 +00:00
Corantin H ad07be1492 Fix wrong array indexing in undo action label (fixes #8135)
`Result` was not the correct variable to use to index the operation names array, instead it should be what is returned from the selection popup.
2024-03-21 18:25:48 +01:00
Dennis Felsing 21d0d69bec
Merge pull request #8133 from dobrykafe/pr-more-settings
Include more options in appearance settings
2024-03-20 22:43:28 +00:00
Dennis Felsing 325c688fa1
Merge pull request #8132 from def-/pr-servers
serverbrowser: communities->servers instead of communities->icon->servers
2024-03-20 22:43:07 +00:00
dobrykafe 2a31ff1998 include more options in settings 2024-03-20 23:20:04 +01:00
Dennis Felsing f169899083 serverbrowser: communities->servers instead of communities->icon->servers 2024-03-20 12:28:41 +01:00
Dennis Felsing 214cf5f918
Merge pull request #8130 from BlaiZephyr/ger-typo
Translate Entities in german.txt
2024-03-19 22:41:58 +00:00
BlaiZephyr 6396d68dbf Translate Entities in german.txt 2024-03-19 20:11:36 +01:00
Dennis Felsing 799a3825d3
Merge pull request #8129 from gerdoe-jr/patch-2
Typo in russian.txt
2024-03-19 18:06:48 +00:00
Vladislav Gerasimov dc3cf9e62b
Typo in russian.txt 2024-03-19 20:49:12 +03:00
Robert Müller c9439eac36
Merge pull request #8102 from archimede67/editor-fix-save-missing-layers
Editor: allow saving empty quads & sounds layers
2024-03-18 22:13:34 +00:00
archimede67 95402b9559
Merge pull request #8126 from Robyt3/Engine-LineReader-UTF8-Check
Ensure line reader only returns lines which are valid UTF-8, refactoring
2024-03-18 21:19:37 +00:00
Corantin H a5a4d50237 Allow saving empty quads & sounds layers 2024-03-18 22:06:26 +01:00
Robert Müller 2a99c81721
Merge pull request #8123 from archimede67/editor-fix-autorules-crash
[Editor] Fix crash when trying to select autorule with arrow keys
2024-03-18 20:41:06 +00:00
Robert Müller 010d4dc673 Remove unnecessary UTF-8 check for config variables
Invalid UTF-8 will not be read from config files with `CLineReader` anymore and the local console never allowed entering invalid UTF-8, so this additional mangling of invalid UTF-8 string config variable values is unnecessary.
2024-03-18 21:29:43 +01:00
Robert Müller e0e6bbbbe2 Minor cleanup of CLineReader
- Use `nullptr` instead of `0`.
- Use `\0` instead of `0`.
- Move variable declaration.
2024-03-18 21:29:41 +01:00
Robert Müller 0f94d0d72c Ensure line reader only returns lines which are valid UTF-8
Skip lines containing invalid UTF-8 in `CLineReader::Get` function.
2024-03-18 21:29:34 +01:00
heinrich5991 3f70ae4b70
Merge pull request #8115 from Robyt3/Client-Mapimages-Refactoring
Various refactoring of `CMapImages`
2024-03-18 00:08:30 +00:00
Corantin H d506dc4fa9 Support navigating in selection popups with arrow keys 2024-03-17 19:44:12 +01:00
Corantin H 72029e4105 Prevent switching layer selection while popup is open 2024-03-17 15:35:32 +01:00
archimede67 47d77fad07
Merge pull request #8120 from Robyt3/UI-Color-Picker-Line-Improvement
Support clicking line color picker label to toggle checkbox
2024-03-17 10:56:31 +00:00