mirror of
https://github.com/jorio/Pomme.git
synced 2024-11-27 05:49:18 +00:00
QD3D: RGBA32 edge padding extension
This commit is contained in:
parent
80349be4c0
commit
ad9cc177d2
@ -510,6 +510,7 @@ TQ3Pixmap* Q3MetaFileParser::ParsePixmap(uint32_t chunkType, uint32_t chunkSize)
|
||||
case kQ3PixelTypeARGB16: printf(" ARGB16"); break;
|
||||
case kQ3PixelTypeRGB16_565: printf(" RGB16_565"); break;
|
||||
case kQ3PixelTypeRGB24: printf(" RGB24"); break;
|
||||
case kQ3PixelTypeRGBA32: printf(" RGBA32"); break;
|
||||
default: printf(" UnknownPixelType"); break;
|
||||
}
|
||||
#endif
|
||||
|
@ -123,6 +123,16 @@ void Q3Pixmap_ApplyEdgePadding(TQ3Pixmap* pm)
|
||||
pm->byteOrder==kQ3EndianNative? 0xFF000000: 0x000000FF);
|
||||
break;
|
||||
|
||||
case kQ3PixelTypeRGBA32:
|
||||
Assert(pm->rowBytes >= pm->width * 4, "EdgePadding RGBA32: incorrect rowBytes");
|
||||
_EdgePadding<uint32_t>(
|
||||
(uint32_t *) pm->image,
|
||||
pm->width,
|
||||
pm->height,
|
||||
pm->rowBytes,
|
||||
pm->byteOrder==kQ3EndianNative? 0x000000FF: 0xFF000000);
|
||||
break;
|
||||
|
||||
case kQ3PixelTypeRGB16:
|
||||
case kQ3PixelTypeRGB16_565:
|
||||
case kQ3PixelTypeRGB24:
|
||||
|
@ -91,6 +91,9 @@ typedef enum
|
||||
/// 8 bits for red, green, and blue. No alpha byte.
|
||||
kQ3PixelTypeRGB24 = 5,
|
||||
|
||||
/// 8 bits for red, green, and blue, and alpha (Pomme extension, not in real 3DMF files)
|
||||
kQ3PixelTypeRGBA32 = 6,
|
||||
|
||||
kQ3PixelTypeUnknown = 200,
|
||||
kQ3PixelTypeSize32 = 0xFFFFFFFF
|
||||
} TQ3PixelType;
|
||||
|
Loading…
Reference in New Issue
Block a user