Remove the bitmap type since it is not really needed and complicate things.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5603 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -60,23 +60,10 @@
|
||||
/* Safety limit for the size of the bitmap in pixels */
|
||||
#define BM_MAX_SIZE 4194304UL
|
||||
|
||||
/* Bitmap type */
|
||||
enum BitmapType {
|
||||
bmUnknown,
|
||||
bmMonochrome,
|
||||
bmIndexed,
|
||||
bmRGB,
|
||||
bmRGBA
|
||||
};
|
||||
typedef enum BitmapType BitmapType;
|
||||
|
||||
/* Bitmap structure */
|
||||
typedef struct Bitmap Bitmap;
|
||||
struct Bitmap {
|
||||
|
||||
/* Type of the bitmap */
|
||||
BitmapType Type;
|
||||
|
||||
/* Name of the bitmap. This is used for error messages and should be
|
||||
* something that allows the user to identify which bitmap the message
|
||||
* refers to. For bitmaps loaded from a file, using the file name is
|
||||
@@ -88,7 +75,7 @@ struct Bitmap {
|
||||
unsigned Width;
|
||||
unsigned Height;
|
||||
|
||||
/* Palette for monochrome and indexed bitmap types, otherwise NULL */
|
||||
/* Palette for indexed bitmap types, otherwise NULL */
|
||||
Palette* Pal;
|
||||
|
||||
/* Pixel data, dynamically allocated */
|
||||
@@ -131,13 +118,13 @@ Pixel GetPixel (const Bitmap* B, unsigned X, unsigned Y);
|
||||
*/
|
||||
|
||||
#if defined(HAVE_INLINE)
|
||||
INLINE BitmapType GetBitmapType (const Bitmap* B)
|
||||
/* Get the type of a bitmap */
|
||||
INLINE int BitmapIsIndexed (const Bitmap* B)
|
||||
/* Return true if this is an indexed bitmap */
|
||||
{
|
||||
return B->Type;
|
||||
return (B->Pal != 0);
|
||||
}
|
||||
#else
|
||||
# define GetBitmapType(B) ((B)->Type)
|
||||
# define BitmapIsIndexed(B) ((B)->Pal != 0)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_INLINE)
|
||||
|
||||
Reference in New Issue
Block a user