The popup to show the completed demo rendering was also shown when the demo to be rendered could not be loaded or if the demo render popup was cancelled. Now the popup is only shown when the demo rendering was successful.
The layout of the popup is made consistent with other message popups. Long text is wrapped over multiple lines instead of decreasing the font size.
Simplify the usage of datafile reader and writer by adding utility functions to read and write zero-terminated UTF-8 strings.
Improve validation of string data read from datafiles. It is ensure that string data is null-terminated, has no internal NUL-characters and is valid UTF-8.
Fix loading of external sounds in the editor. The wrong path variable was being used, so the sound files would not be loaded from correct folder.
Add tests for new datafile reader/writer functions.
When `IMap::Load` fails, other components will continue to use the old map. However, if `IMap::Load` failed after the map was already successfully read with the datafile reader then other components kept their pointers to the old, invalid datafile reader items and data, causing random crashes in collision code. This is fixed by using a separate datafile reader to read the new map and only applying the datafile reader globally when loading was entirely successfully.
An error message is added for the case that a map has an unsupported version, which is currently the only case where a map can fail to load after the datafile was read successfully.
In particular, the block maps `blmapPepe`, `blmapV5` and `blmapDT-UPTU` did not have a version map item and were fixed separately.
Closes#7218. Regression from #5737.
Add error message in editor when loading a map that has an unsupported version.
Ensure error messages are not closed immediately when loading a map fails.
Remove unnecessary indentation by returning early.
The pixel size (bytes per pixel) always has to be 4 for the `Dilate` function to work correctly. This is already checked before calling the function, so the redundant argument which is always `4` can be removed.
Store client IDs of all victims for team killmessages instead of storing only the first victim ID, so the render info for all victims can be properly restored when skins are updated.
Ensure all killmessages are properly initialized.
The wrong color channel count was being used for loading images that use an indexed color palette, which was causing the loading to fail with the error "bytes in row incorrect". Now the correct color channel count is retrieved using the libpng API.
Closes#7157.
Avoid duplicate `SetColor` calls in loop.
Avoid `QuadsDrawTL` calls by batching quads together before drawing.
Use `SetColor` instead of `SetColorVertex`.