diff lib64gfx.h @ 435:e4a3f183e463

Modularize some more.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 03 Nov 2012 16:08:30 +0200
parents 936bc27a79d6
children 272e64259fde
line wrap: on
line diff
--- a/lib64gfx.h	Sat Nov 03 14:52:52 2012 +0200
+++ b/lib64gfx.h	Sat Nov 03 16:08:30 2012 +0200
@@ -9,7 +9,12 @@
 #ifndef LIB64GFX_H
 #define LIB64GFX_H 1
 
-#include "dmlib.h"
+#include "libgfx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 // Bitmap constants
 #define C64_SCR_WIDTH          320
@@ -45,40 +50,6 @@
 #define C64_MAX_SPRITES        (C64_VIDBANK_SIZE / C64_SPR_SIZE)
 #define C64_MAX_CHARS          256
 
-// Probe scores
-#define DM_PROBE_SCORE_MAX     1000
-#define DM_PROBE_SCORE_GOOD    750
-#define DM_PROBE_SCORE_AVG     500
-#define DM_PROBE_SCORE_MAYBE   250
-#define DM_PROBE_SCORE_FALSE   0
-
-enum
-{
-    DM_IFMT_PALETTE,
-    DM_IFMT_RGB,
-    DM_IFMT_RGBA,
-    DM_IFMT_RGB_PLANE,
-};
-
-
-// RGBx color struct
-typedef struct
-{
-    Uint8 r, g, b, x;
-} DMColor;
-
-
-// Bitmapped image struct (can be one of types specified by DM_IFMT_*)
-typedef struct
-{
-    int width, height, pitch;
-    BOOL constpal;
-    int ncolors, ctrans;
-    DMColor *pal;
-    Uint8 *data;
-} DMImage;
-
-
 // Different supported C64 bitmap "modes"
 enum
 {
@@ -171,11 +142,6 @@
 extern const char *      dmC64ImageTypeNames[];
 
 
-DMImage * dmImageAlloc(int width, int height);
-void      dmImageFree(DMImage *img);
-int       dmImageGetBytesPerPixel(int format);
-
-
 int       dmC64ConvertCSData(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors);
 int       dmC64ProbeGeneric(const Uint8 *buf, const size_t len, DMC64ImageFormat **fmt);
 int       dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt);
@@ -184,4 +150,9 @@
 
 int       dmReadDataFile(FILE *inFile, const char *filename, Uint8 **buf, size_t *size);
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif // LIB64GFX_H