/* Transparent datatype image conversion library */
/* (C) 1997 by Ben Matthew */

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifndef GRAPHICS_GFX_H
#include <graphics/gfx.h>
#endif

/* Error codes */

#define DTERR_OK 0			/* Loaded ok! */
#define DTERR_FILE 1		/* Couldn't open file */
#define DTERR_MEM 2			/* Not enough free memory */
#define DTERR_SCR 3			/* Invalid remapping info */
#define DTERR_INT 4			/* Internal datatype error, poss incorrect media */
#define DTERR_LIB 5			/* Cuuldn't open library */

extern char *dterr_msgs[];

#define DT_Error(x) printf("%s\n",dterr_msgs[x]);

struct DTImage {

	struct BitMap *BitMap;	/* BitMap pointer, don't assume anything! */

	USHORT Width;
	USHORT Height;
	UBYTE Depth;

};


/* Prototypes */

struct DTImage *LoadDTBitMap(UBYTE *filename, struct Screen *scr, USHORT *err);
struct Window *OpenWindowBitMap(UBYTE *image, ULONG flags, ULONG idcmp, struct Screen *scr, BOOL keepbitmap, USHORT *err);
void CloseWindowBitMap(struct Window *win);
void UnLoadDTBitMap(struct DTImage *img);
