Commit graph

20528 commits

Author SHA1 Message Date
Robert Müller 96cc8c5830 Move CMenus::RandomSkin function to CSkins::RandomizeSkin
This function is independent from the menus and this also makes it consistent with the `CSkins7::RandomizeSkin` function.
2024-09-18 17:36:42 +02:00
Dennis Felsing 78d702d3b7
Merge pull request #8981 from ChillerDragon/pr_qa_md
Add quick action "Map details"
2024-09-18 13:04:09 +00:00
Dennis Felsing cbc21fab4a
Merge pull request #8984 from ChillerDragon/pr_qa_afl
Add quick action "Add front layer"
2024-09-18 13:03:00 +00:00
ChillerDragon 3781f95190 Add quick action "Add front layer" 2024-09-18 20:07:00 +08:00
ChillerDragon 32e8bb1f05 Add quick action "Map details" 2024-09-18 19:27:39 +08:00
Robert Müller a2e0ab2dbe
Merge pull request #8973 from furo321/improve-annoucements
Various improvements to announcements
2024-09-18 10:34:53 +00:00
Robert Müller 255694c061
Merge pull request #8975 from furo321/android-save-minimized
Save the config file when the app is minimized on Android
2024-09-18 10:29:09 +00:00
furo b475c67039 Various improvements to announcements 2024-09-18 12:16:29 +02:00
furo a266cd2f70 Save the config file when the app is minimized on Android 2024-09-18 12:10:25 +02:00
Robert Müller 2c77e79061
Merge pull request #8980 from ChillerDragon/pr_fix_team_colors_sixup
Fix 0.7 client team colors (Closed #8977)
2024-09-18 09:51:35 +00:00
ChillerDragon 46c5344d71 Fix 0.7 client team colors (Closed #8977) 2024-09-18 16:50:23 +08:00
Dennis Felsing 96ad30eb21
Merge pull request #8978 from ChillerDragon/pr_spamprot
Describe what sv_spamprotection covers
2024-09-18 06:42:21 +00:00
Dennis Felsing b03245f7dd
Merge pull request #8979 from ChillerDragon/pr_flag_sounds7
Fix 0.7 client flag sounds being duplicated when dummy is connected
2024-09-18 06:39:16 +00:00
ChillerDragon 7192bbf397 Fix 0.7 client flag sounds being duplicated when dummy is connected
Closed https://github.com/ddnet-insta/ddnet-insta/issues/127
2024-09-18 10:40:36 +08:00
ChillerDragon 984845b2a9 Describe what sv_spamprotection covers 2024-09-18 09:40:09 +08:00
Dennis Felsing 60624d5599
Merge pull request #8976 from dobrykafe/pr-align-separators
Better alignment of upper and lower separators
2024-09-17 22:39:02 +00:00
dobrykafe 9d7b476c33 better alignment of upper and lower separators 2024-09-17 23:26:18 +02:00
Dennis Felsing 217103a0ee
Merge pull request #8968 from furo321/command-hint
Add autocompletion hint for chat commands
2024-09-17 07:09:36 +00:00
furo d86b510291 Add autocompletion hint for chat commands 2024-09-17 01:08:49 +02:00
Dennis Felsing 4f352d95d4
Merge pull request #8967 from dobrykafe/pr-fix-add-layers
Fix undo/redo for adding layers
2024-09-16 21:44:04 +00:00
dobrykafe 8f93b63b6a fix undo/redo for adding layers 2024-09-16 21:01:05 +02:00
Robert Müller e69e7d87c2
Merge pull request #8966 from furo321/reload-censorlist
Add `reload_censorlist` to reread `censorlist.txt`
2024-09-16 16:30:04 +00:00
Dennis Felsing 7dc6346b2d
Merge pull request #8965 from Robyt3/Image-Loading-Refactoring
Refactor image loading, saving and manipulation
2024-09-16 16:08:06 +00:00
furo e8e52a8b66 Add reload_censorlist to reread censorlist.txt 2024-09-16 18:07:28 +02:00
Robert Müller 3d746099fa Refactor image loading, saving and manipulation
Move `CImageInfo` from `engine/graphics.h` to own file `engine/image.h`. Also add 2-component image format to `CImageInfo::EImageFormat` for completeness, to replace the separate `EImageFormat` in `image_loader.h` with `CImageInfo::EImageFormat`.

Move `SetPixelColor`/`GetPixelColor` functions from editor to `CImageInfo` as member functions.

Replace `IGraphics::CopyTextureBufferSub` and `IGraphics::CopyTextureFromTextureBufferSub` functions with more versatile `CImageInfo::CopyRectFrom` function.

Make `IGraphics::LoadSpriteTexture` function more efficient by avoiding a copy of the image data by using the `LoadTextureRawMove` function. Remove unnecessary delegate function `CGraphics_Threaded::LoadSpriteTextureImpl` and temporary buffer `m_vSpriteHelper`.

Move `CEditorImage::DataEquals` function to `CImageInfo::DataEquals`. Use `mem_comp` to compare image data for more efficiency, instead of comparing each pixel individually.

Add another `IGraphics::LoadPng` function that loads image directly from memory and also handles the pnglite incompatibility warnings. This function will be used for more efficient loading of downloaded skin in the future.

Add convenience functions to load/save PNGs from/to `IOHANDLE` to reduce duplicate code when loading and saving images especially in the tools. These functions explicitly only allow loading images in RGBA and RGB format. Move general purpose image loading and saving functions to class `CImageLoader`.

Add more convenient `CByteBufferReader` and `CByteBufferWriter` classes for reading from and writing to a byte buffer while keeping track of the read/write position to replace existing `SImageByteBuffer`.

Extract `ConvertToGrayscale` utility function to reduce duplicate code when creating grayscale versions of skins, start menu images and community icons.

Move and rename `ConvertToRGBA` static function from graphics to `ConvertToRgba` in `image_manipulation.h/cpp`. Add `ConvertToRgbaAlloc` convenience function which allocates the target buffer. Add ``

Add `DilateImage`, `ResizeImage` and `ConvertToRgba` convenience functions that directly accept a `CImageInfo` argument that will be modified.

Remove unnecessary image size limitation in `map_replace_image` tool, which would only be relevant for 0.7 compatible maps. Adjust the maximum allowed image width/height in `map_convert_07` tool to be consistent with the actual limit that the 0.7 client has when loading images (`1 << 13 == 8192`).

Add doxygen comments for `CImageInfo`.

Pass `CImageInfo` by reference consistently, instead of sometimes passing a pointer.

Cleanup image loading and saving code. Improve error handling.
2024-09-16 17:49:18 +02:00
Robert Müller 5212d1d7ce Rename variables with PNG to Png 2024-09-16 15:45:30 +02:00
Dennis Felsing 67eb609452
Merge pull request #8964 from furo321/fix-dragger-crash
Fix crash while attached to dragger during `hot_reload`
2024-09-16 13:06:01 +00:00
furo ad0fc8898f Fix crash while attached to dragger during hot_reload 2024-09-16 13:52:49 +02:00
Robert Müller 0a3a095479
Merge pull request #8958 from dobrykafe/pr-filter-skin-parts
Make 0.7 skin filter apply to skin parts
2024-09-16 08:45:12 +00:00
Dennis Felsing ce245f479a
Merge pull request #8963 from ChillerDragon/pr_fix_hilite
Fix name in chat not being highlighted (Closed #2190)
2024-09-16 07:35:48 +00:00
ChillerDragon ac0621a062 Fix name in chat not being highlighted (Closed #2190)
The message "xfoo foo" did not highlight for player "foo" now it does.
2024-09-16 12:39:35 +08:00
Dennis Felsing 20cb02048d
Merge pull request #8957 from Robyt3/Client-Binds-Composite-Chat-Console-Menus-Fix
Fix composite binds that open chat, console or menus
2024-09-15 21:43:19 +00:00
Dennis Felsing a5138c078e
Merge pull request #8949 from MilkeeyCat/pr_fix_color_speed_values
Fix colored speed values after connecting to a server
2024-09-15 21:42:02 +00:00
dobrykafe bf442a9f95 make 0.7 skin filter apply to skin parts 2024-09-15 23:11:11 +02:00
Robert Müller 0d93b1add7 Fix composite binds that open chat, console or menus
Events with flag `FLAG_RELEASE` must always be forwarded to all components so keys being released can be handled in all components also after some components have been disabled.

Closes #8901.
2024-09-15 14:54:03 +02:00
Dennis Felsing 0f12044fcd
Merge pull request #8956 from Robyt3/UI-Scrollbar-Rail-HotItem
Fix scrollbar rail clicking being active while popups open
2024-09-15 10:21:41 +00:00
Robert Müller 8f2c288698 Fix scrollbar rail clicking being active while popups open
Scrollbars are now also set as the hot item when the rail is hovered and the rail clicking function is now only enabled for the scrollbar that is the hot item.

Closes #8954.
2024-09-15 11:45:22 +02:00
MilkeeyCat 9963a3e3db Pass color to RenderMovementInformationTextContainer function 2024-09-15 12:40:17 +03:00
Dennis Felsing 4b6f2e22a8
Merge pull request #8955 from furo321/url-master-parsing
Don't allow URLs without port from the masterserver
2024-09-15 09:28:43 +00:00
furo 7bbd51cf73 Don't allow URLs without port from the masterserver 2024-09-15 11:04:48 +02:00
Dennis Felsing dcd02b50bb
Merge pull request #8953 from ChillerDragon/pr_bind_null
Add BindNull to SQL api
2024-09-15 06:31:43 +00:00
Dennis Felsing 4fe956dffc
Merge pull request #8951 from furo321/fix-capture-count
Fix captures not being counted for certain names
2024-09-15 06:13:40 +00:00
ChillerDragon 7c2f058c40 Add BindNull to SQL api
Comes in handy in my downstream project
2024-09-15 09:14:00 +08:00
furo 6bf4a016ba Fix captures not being counted for certain names 2024-09-15 00:51:39 +02:00
Dennis Felsing 0feee9aa3e
Merge pull request #8948 from Robyt3/Client-Chat-TeeRenderInfo-Cleanup
Store `CTeeRenderInfo` instead of members for chat lines, extract `CTeeRenderInfo::Apply(const CSkin *)` function
2024-09-14 21:39:46 +00:00
MilkeeyCat d5be8d1633 Fix colored speed values after connecting to a server 2024-09-14 23:18:28 +03:00
Robert Müller 65cf776846 Extract CTeeRenderInfo::Apply(const CSkin *) function
Add function to apply information of `CSkin` to a `CTeeRenderInfo` to reduce duplicate code.
2024-09-14 21:12:43 +02:00
Robert Müller 62075d22e3 Store CTeeRenderInfo instead of members for chat lines
Avoid code to convert from `CTeeRenderInfo` to chat-internal representation and back to `CTeeRenderInfo`.
2024-09-14 21:12:25 +02:00
Robert Müller 0369946156
Merge pull request #8946 from MilkeeyCat/pr_fix_callvote_map_change
Don't add `/` if the directory is empty
2024-09-14 17:11:22 +00:00
MilkeeyCat 232018de23 Don't add / if the directory is empty 2024-09-14 19:49:01 +03:00