New option --dump-palette. Fixed a double free in the cleanup code.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5604 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-11 11:25:38 +00:00
parent c9d65c56c2
commit ca691233e4
4 changed files with 63 additions and 1 deletions

View File

@@ -147,6 +147,16 @@ INLINE unsigned GetBitmapHeight (const Bitmap* B)
# define GetBitmapHeight(B) ((B)->Height)
#endif
#if defined(HAVE_INLINE)
INLINE const Palette* GetBitmapPalette (const Bitmap* B)
/* Get the palette of a bitmap */
{
return B->Pal;
}
#else
# define GetBitmapPalette(B) ((B)->Pal)
#endif
unsigned GetBitmapColors (const Bitmap* B);
/* Get the number of colors in an image. The function will return the number
* of palette entries for indexed bitmaps and 2^24 for non indexed bitmaps.