1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Improve texture creation logging and checking

This commit is contained in:
sfan5 2025-08-08 13:42:36 +02:00 committed by GitHub
parent ae97435d80
commit b1cb5fcb9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 19 deletions

View file

@ -119,6 +119,11 @@ const c8 *const ColorFormatNames[] = {
static_assert(sizeof(ColorFormatNames) / sizeof(ColorFormatNames[0])
== ECF_UNKNOWN + 2, "name table size mismatch");
inline const c8 *ColorFormatName(ECOLOR_FORMAT format)
{
return ColorFormatNames[format < ECF_UNKNOWN ? format : ECF_UNKNOWN];
}
//! Creates a 16 bit A1R5G5B5 color
inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a = 0xFF)
{