6eab7fc47402f1ce34ed331ae80f5bcbee54da82 braney Thu Dec 16 13:30:33 2010 -0800 remove USE_PNG and GIF support #1323 diff --git src/inc/memgfx.h src/inc/memgfx.h index b206062..5688c33 100644 --- src/inc/memgfx.h +++ src/inc/memgfx.h @@ -18,53 +18,46 @@ #ifdef COLOR32 typedef unsigned int Color; #define MG_WHITE 0xffffffff #define MG_BLACK 0xff000000 #define MG_RED 0xff0000ff #define MG_GREEN 0xff00ff00 #define MG_BLUE 0xffff0000 #define MG_CYAN 0xffffff00 #define MG_MAGENTA 0xffff00ff #define MG_YELLOW 0xff00ffff #define MG_GRAY 0xff808080 #define MAKECOLOR_32(r,g,b) (((unsigned int)0xff<<24) | ((unsigned int)b<<16) | ((unsigned int)g << 8) | (unsigned int)r) -#ifndef USE_PNG -#error ------ ERROR ----- you must define USE_PNG if you define COLOR32 -#endif - - #else /* 8-bit color */ typedef unsigned char Color; #define MG_WHITE 0 #define MG_BLACK 1 #define MG_RED 2 #define MG_GREEN 3 #define MG_BLUE 4 #define MG_CYAN 5 #define MG_MAGENTA 6 #define MG_YELLOW 7 #define MG_GRAY 8 #define MG_FREE_COLORS_START 9 #endif /* COLOR32 */ - - #define MG_WRITE_MODE_NORMAL 0 #define MG_WRITE_MODE_MULTIPLY (1 << 0) struct rgbColor { unsigned char r, g, b; }; /* HSV and HSL structs can be used for changing lightness, darkness, or * color of RGB colors. Convert RGB->HS[LV], modify hue, saturation, or * value/lightness, then convert back to RGB. * The datatypes were chosen to be fast but also give accurate conversion * back to RGB. * Hue is a float [0,360) degrees 0=red, 120=green, 240=blue * S/V/L are integers [0,1000] @@ -176,50 +169,30 @@ /* Put a series of dots starting at x, y and going to right width pixels. * Don't put zero dots though. */ void mgDrawBox(struct memGfx *mg, int x, int y, int width, int height, Color color); /* Draw a (horizontal) box */ void mgDrawLine(struct memGfx *mg, int x1, int y1, int x2, int y2, Color color); /* Draw a line from one point to another. */ void mgDrawHorizontalLine(struct memGfx *mg, int y1, Color color); /*special case of mgDrawLine*/ void mgLineH(struct memGfx *mg, int y, int x1, int x2, Color color); /* Draw horizizontal line width pixels long starting at x/y in color */ -void mgSaveGif(struct memGfx *mg, char *name, boolean useTransparency); -/* Save memory bitmap as a gif. - * If useTransparency, then the first color in memgfx's colormap/palette is - * assumed to be the image background color, and pixels of that color - * are made transparent. */ - -boolean mgSaveToGif(FILE *gif_file, struct memGfx *screen, boolean useTransparency); -/* Save GIF to an already open file. - * If useTransparency, then the first color in memgfx's colormap/palette is - * assumed to be the image background color, and pixels of that color - * are made transparent. */ - -struct memGfx *mgLoadGif(char *name); -/* Create memory image based on gif file. - * Note this is based on a very old gif reader - * that only handles the GIF87a version. - * This is the same that mgSaveGif creates at - * least. This version of gif was always - * color mapped. */ - void mgSavePng(struct memGfx *mg, char *filename, boolean useTransparency); /* Save memory bitmap to filename as a PNG. * If useTransparency, then the first color in memgfx's colormap/palette is * assumed to be the image background color, and pixels of that color * are made transparent. */ boolean mgSaveToPng(FILE *png_file, struct memGfx *mg, boolean useTransparency); /* Save PNG to an already open file. * If useTransparency, then the first color in memgfx's colormap/palette is * assumed to be the image background color, and pixels of that color * are made transparent. */ typedef void (*TextBlit)(int bitWidth, int bitHeight, int bitX, int bitY, unsigned char *bitData, int bitDataRowBytes, struct memGfx *dest, int destX, int destY,