X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fmsdos.h;h=9d6a21552f6141f79dc40a140362f4f64313fe72;hp=d071cf03f7546f76de1ea49c082685a9b0784882;hb=61c3da024802ecc0268bab42d7499fc0346e4fd3;hpb=998be01ad92a672b69b11e24d472f6c0c076817f diff --git a/src/libgame/msdos.h b/src/libgame/msdos.h index d071cf03..9d6a2155 100644 --- a/src/libgame/msdos.h +++ b/src/libgame/msdos.h @@ -1,7 +1,7 @@ /*********************************************************** * Artsoft Retro-Game Library * *----------------------------------------------------------* -* (c) 1994-2000 Artsoft Entertainment * +* (c) 1994-2006 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -19,10 +19,10 @@ /* symbol 'window' is defined in DJGPP cross-compiler in libc.a(conio.o) */ -#define window window_djgpp +#define window window_internal /* symbol 'font' is defined in "allegro.h" */ -#define font font_allegro +#define font font_internal /* system dependent definitions */ @@ -40,6 +40,18 @@ #define XRES 800 #define YRES 600 +/* allegro defines some macros that bother the rest of the program */ +#ifdef joy_x +#undef joy_x +#undef joy_y +#undef joy_left +#undef joy_right +#undef joy_up +#undef joy_down +#undef joy_b1 +#undef joy_b2 +#endif + /* additional Allegro keyboard mapping */ /* The following are all undefined in Allegro */ @@ -450,7 +462,6 @@ /* end of X11 keyboard mapping */ -#define JOYSTICK_FILENAME "joystick.cnf" #define screen myscreen @@ -544,7 +555,7 @@ #define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel) #define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel) #define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root) -#define AllPlanes ((unsigned long)~0L) +#define AllPlanes ((unsigned int)~0L) #define DefaultVisual(dpy, scr) (NULL) #define DefaultDepth(dpy, scr) (NULL) @@ -554,8 +565,8 @@ #define XGetPixel(ximage, x, y) \ ((*((ximage)->f.get_pixel))((ximage), (x), (y))) -typedef unsigned long Pixel; /* Index into colormap */ -typedef unsigned long XID; +typedef unsigned int Pixel; /* Index into colormap */ +typedef unsigned int XID; typedef XID Window; typedef XID Drawable; typedef XID Pixmap; @@ -563,9 +574,9 @@ typedef XID Colormap; typedef XID KeySym; typedef XID GContext; typedef struct _XDisplay Display; -typedef long Visual; -typedef long XVisualInfo; -typedef long Atom; +typedef int Visual; +typedef int XVisualInfo; +typedef int Atom; typedef int Status; typedef int Bool; typedef int XComposeStatus; /* we don't need the real type */ @@ -579,8 +590,8 @@ typedef struct { Colormap cmap; /* default color map */ Window root; /* root window id */ - unsigned long white_pixel; /* white pixel value */ - unsigned long black_pixel; /* black pixel value */ + unsigned int white_pixel; /* white pixel value */ + unsigned int black_pixel; /* black pixel value */ int x; int y; unsigned int width; @@ -599,13 +610,13 @@ typedef struct _XImage { struct funcs { - unsigned long (*get_pixel) (struct _XImage *, int, int); + unsigned int (*get_pixel) (struct _XImage *, int, int); } f; } XImage; typedef struct { - long flags; /* marks which fields in this structure are defined */ + int flags; /* marks which fields in this structure are defined */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; int max_width, max_height; @@ -613,7 +624,7 @@ typedef struct typedef struct { - long flags; /* marks which fields in this structure are defined */ + int flags; /* marks which fields in this structure are defined */ Bool input; /* does this application rely on the window manager to get keyboard input? */ int initial_state; /* see below */ @@ -634,13 +645,13 @@ typedef struct typedef struct { - unsigned long foreground; /* foreground pixel */ - unsigned long background; /* background pixel */ + unsigned int foreground; /* foreground pixel */ + unsigned int background; /* background pixel */ Bool graphics_exposures; /* boolean, should exposures be generated */ Pixmap clip_mask; /* bitmap clipping; other calls for rects */ int clip_x_origin; /* x origin for clipping */ int clip_y_origin; /* y origin for clipping */ - unsigned long value_mask; + unsigned int value_mask; int line_width; /* line width */ int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */ int cap_style; /* CapNotLast, CapButt, @@ -694,14 +705,16 @@ typedef union _XEvent XKeyEvent xkey; } XEvent; +Pixel AllegroAllocColorCell(int, int, int); + void XMapWindow(Display *, Window); Display *XOpenDisplay(char *); Window XCreateSimpleWindow(Display *, Window, int, int, unsigned int, unsigned int, unsigned int, - unsigned long, unsigned long); + unsigned int, unsigned int); Status XStringListToTextProperty(char **, int, XTextProperty *); void XFree(void *); -GC XCreateGC(Display *, Drawable, unsigned long, XGCValues *); +GC XCreateGC(Display *, Drawable, unsigned int, XGCValues *); void XSetClipMask(Display *, GC, Pixmap); void XSetClipOrigin(Display *, GC, int, int); void XFillRectangle(Display *, Drawable, GC, int, int, @@ -709,8 +722,8 @@ void XFillRectangle(Display *, Drawable, GC, int, int, Pixmap XCreatePixmap(Display *, Drawable, unsigned int, unsigned int, unsigned int); void XSync(Display *, Bool); -inline void XCopyArea(Display *, Drawable, Drawable, GC, int, int, - unsigned int, unsigned int, int, int); +void XCopyArea(Display *, Drawable, Drawable, GC, int, int, + unsigned int, unsigned int, int, int); int Read_PCX_to_Pixmap(Display *, Window, GC, char *, Pixmap *, Pixmap *); int XReadBitmapFile(Display *, Drawable, char *, unsigned int *, unsigned int *, Pixmap *, int *, int *); @@ -722,7 +735,7 @@ void XNextEvent(Display *, XEvent *); int XPending(Display *); KeySym XLookupKeysym(XKeyEvent *, int); int XLookupString(XKeyEvent *, char *, int, KeySym *, XComposeStatus *); -void XSetForeground(Display *, GC, unsigned long); +void XSetForeground(Display *, GC, unsigned int); void XDrawLine(Display *, Drawable, GC, int, int, int, int); void XDestroyImage(XImage *); void XDestroyWindow(Display *, Window); @@ -732,10 +745,16 @@ void XAutoRepeatOn(Display *); void XAutoRepeatOff(Display *); void AllegroDrawLine(Drawable, int, int, int, int, Pixel); +Pixel AllegroGetPixel(Drawable, int, int); -Bool MSDOSOpenAudio(void); +void AllegroZoomBitmap(Drawable, Drawable, int, int, int, int); + +void MSDOSOpenAudio(void); void MSDOSCloseAudio(void); void NetworkServer(int, int); +void MSDOSInitJoysticks(); +boolean MSDOSReadJoystick(int, int *, int *, boolean *, boolean *); + #endif /* MSDOS_H */