1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Add new method GetBitmapBPP as we need it for sprite math

This commit is contained in:
karri 2022-12-30 12:16:46 +02:00
parent ebd1381030
commit aed6591b19

View File

@ -75,6 +75,9 @@ struct Bitmap {
unsigned Width;
unsigned Height;
/* Bits per pixels */
unsigned BPP;
/* Palette for indexed bitmap types, otherwise NULL */
Palette* Pal;
@ -179,6 +182,17 @@ INLINE unsigned GetBitmapColors (const Bitmap* B)
# define GetBitmapColors(B) ((B)->Pal? (B)->Pal->Count : (1U << 24))
#endif
#if defined(HAVE_INLINE)
INLINE unsigned GetBitmapBPP (const Bitmap* B)
/* Get the bits per pixel of the converted sprite
*/
{
return B->BPP;
}
#else
# define GetBitmapBPP(B) ((B)->BPP
#endif
/* End of bitmap.h */