mirror of
https://github.com/cc65/cc65.git
synced 2024-06-26 05:29:30 +00:00
Add new method GetBitmapBPP as we need it for sprite math
This commit is contained in:
parent
ebd1381030
commit
aed6591b19
|
@ -75,6 +75,9 @@ struct Bitmap {
|
||||||
unsigned Width;
|
unsigned Width;
|
||||||
unsigned Height;
|
unsigned Height;
|
||||||
|
|
||||||
|
/* Bits per pixels */
|
||||||
|
unsigned BPP;
|
||||||
|
|
||||||
/* Palette for indexed bitmap types, otherwise NULL */
|
/* Palette for indexed bitmap types, otherwise NULL */
|
||||||
Palette* Pal;
|
Palette* Pal;
|
||||||
|
|
||||||
|
@ -179,6 +182,17 @@ INLINE unsigned GetBitmapColors (const Bitmap* B)
|
||||||
# define GetBitmapColors(B) ((B)->Pal? (B)->Pal->Count : (1U << 24))
|
# define GetBitmapColors(B) ((B)->Pal? (B)->Pal->Count : (1U << 24))
|
||||||
#endif
|
#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 */
|
/* End of bitmap.h */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user