ddnet/src/tools
Robert Müller dde45f7a40 Add CImageInfo::PixelSize function, use enum EImageFormat
Use `enum EImageFormat` type for image format literals and variables.

Add `PixelSize` function to get the number of bytes/color channels per pixel for a specified image format.

Remove unused store format argument of texture loading functions. All textures are automatically being stored as RGBA, so the argument was unused. Also remove the therefore unused `FORMAT_AUTO`.

Rename variables consistently to `PixelSize` and use `size_t`, instead of mixing different names like `BPP` and `ColorChannelCount`.

Validate image format loaded from maps using `CImageInfo::ImageFormatFromInt`. Add `FORMAT_ERROR` to represent invalid formats.

Remove redundant `PixelSize` parameter from graphics backends and commands, which can be derived from the texture format.

Fix memory leak when RGB image data is being converted to RGBA format when saving map in editor.
2023-09-03 20:40:28 +02:00
..
config_common.h Add templated str_append function for arrays with fixed size 2023-06-14 00:04:01 +02:00
config_retrieve.cpp Move/rename variable declarations in config_retrieve 2022-06-04 17:21:26 +02:00
config_store.cpp Move/rename variable declarations in config_store 2022-06-04 17:21:26 +02:00
crapnet.cpp Remove redundant variable assignments 2022-11-29 23:32:26 +01:00
dilate.cpp Warn about pnglite-incompatible PNGs on load 2022-07-14 18:22:46 +02:00
dummy_map.cpp Fix sv_vanilla_antispoof for vanilla 0.6.5 clients 2023-01-18 20:21:12 +01:00
map_convert_07.cpp Add CImageInfo::PixelSize function, use enum EImageFormat 2023-09-03 20:40:28 +02:00
map_create_pixelart.cpp Add CImageInfo::PixelSize function, use enum EImageFormat 2023-09-03 20:40:28 +02:00
map_diff.cpp Add default argument to CDataFileReader/IMap::GetItem 2023-05-14 16:39:46 +02:00
map_extract.cpp Support loading CMapItemImage version 2 2023-07-16 12:46:34 +02:00
map_find_env.cpp Add default argument to CDataFileReader/IMap::GetItem 2023-05-14 16:39:46 +02:00
map_optimize.cpp Support loading CMapItemImage version 2 2023-07-16 12:46:34 +02:00
map_replace_area.cpp Add default argument to CDataFileReader/IMap::GetItem 2023-05-14 16:39:46 +02:00
map_replace_image.cpp Add CImageInfo::PixelSize function, use enum EImageFormat 2023-09-03 20:40:28 +02:00
map_resave.cpp CDataFileWriter: Make it clear that Add methods do not modify the data 2023-07-08 02:44:53 +03:00
packetgen.cpp Remove namespace tw 2022-06-13 18:07:29 +02:00
stun.cpp Remove namespace tw 2022-06-13 18:07:29 +02:00
twping.cpp Show twping timeout if no ping response is received, add exit code 2023-03-23 23:26:07 +01:00
unicode_confusables.cpp Remove namespace tw 2022-06-13 18:07:29 +02:00
uuid.cpp Remove namespace tw 2022-06-13 18:07:29 +02:00