From e6bde4abb3952d4689917ce66d6bde79cd8df7fc Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 2 Dec 2000 01:45:45 +0100 Subject: [PATCH] rnd-20001202-1-src --- src/init.c | 21 ++++++++- src/joystick.c | 84 +++++++++++++++++++++++++++++++++++ src/libgame/joystick_TMP.h | 90 -------------------------------------- src/libgame/misc.c | 86 +----------------------------------- src/libgame/sdl.c | 33 +++++++------- src/libgame/sdl.h | 3 +- src/libgame/system.c | 42 ++++++++++++++---- src/libgame/system.h | 18 +++++++- src/libgame/x11.c | 70 ++++++++++++++++++----------- src/libgame/x11.h | 3 +- src/main.h | 8 ++-- 11 files changed, 225 insertions(+), 233 deletions(-) delete mode 100644 src/libgame/joystick_TMP.h diff --git a/src/init.c b/src/init.c index d48e713c..adfd3f2c 100644 --- a/src/init.c +++ b/src/init.c @@ -38,6 +38,7 @@ static void InitLevelInfo(void); static void InitNetworkServer(void); static void InitSound(void); static void InitSoundServer(void); +static void InitDisplay(void); static void InitGfx(void); static void InitGfxBackground(void); static void LoadGfx(int, struct PictureFileInfo *); @@ -73,7 +74,7 @@ void OpenAll(int argc, char *argv[]) signal(SIGINT, CloseAllAndExit); signal(SIGTERM, CloseAllAndExit); - InitBufferedDisplay(&backbuffer, &window); + InitDisplay(); InitEventFilter(FilterMouseMotionEvents); InitGfx(); @@ -307,6 +308,22 @@ void InitJoysticks() #endif /* !TARGET_SDL */ } +void InitDisplay() +{ + char *x11_icon_filename = getPath3(options.ro_base_directory, + GRAPHICS_DIRECTORY, + "rocks_icon.xbm"); + char *x11_iconmask_filename = getPath3(options.ro_base_directory, + GRAPHICS_DIRECTORY, + "rocks_iconmask.xbm"); + + InitProgramInfo(program_name, PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING, + ICON_TITLE_STRING, x11_icon_filename, x11_iconmask_filename); + InitVideoDisplay(); + InitVideoBuffer(&backbuffer, &window, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, + setup.fullscreen); +} + void InitGfx() { int i, j; @@ -515,7 +532,7 @@ void InitGfxBackground() { int x, y; - drawto = backbuffer = pix[PIX_DB_BACK]; + drawto = backbuffer; fieldbuffer = pix[PIX_DB_FIELD]; SetDrawtoField(DRAW_BACKBUFFER); diff --git a/src/joystick.c b/src/joystick.c index 16d00d78..b21d682e 100644 --- a/src/joystick.c +++ b/src/joystick.c @@ -19,6 +19,90 @@ #include "joystick.h" +#define TRANSLATE_JOYSYMBOL_TO_JOYNAME 0 +#define TRANSLATE_JOYNAME_TO_JOYSYMBOL 1 + +void translate_joyname(int *joysymbol, char **name, int mode) +{ + static struct + { + int joysymbol; + char *name; + } translate_joy[] = + { + { JOY_LEFT, "joystick_left" }, + { JOY_RIGHT, "joystick_right" }, + { JOY_UP, "joystick_up" }, + { JOY_DOWN, "joystick_down" }, + { JOY_BUTTON_1, "joystick_button_1" }, + { JOY_BUTTON_2, "joystick_button_2" }, + }; + + int i; + + if (mode == TRANSLATE_JOYSYMBOL_TO_JOYNAME) + { + *name = "[undefined]"; + + for (i=0; i<6; i++) + { + if (*joysymbol == translate_joy[i].joysymbol) + { + *name = translate_joy[i].name; + break; + } + } + } + else if (mode == TRANSLATE_JOYNAME_TO_JOYSYMBOL) + { + *joysymbol = 0; + + for (i=0; i<6; i++) + { + if (strcmp(*name, translate_joy[i].name) == 0) + { + *joysymbol = translate_joy[i].joysymbol; + break; + } + } + } +} + +char *getJoyNameFromJoySymbol(int joysymbol) +{ + char *name; + + translate_joyname(&joysymbol, &name, TRANSLATE_JOYSYMBOL_TO_JOYNAME); + return name; +} + +int getJoySymbolFromJoyName(char *name) +{ + int joysymbol; + + translate_joyname(&joysymbol, &name, TRANSLATE_JOYNAME_TO_JOYSYMBOL); + return joysymbol; +} + +int getJoystickNrFromDeviceName(char *device_name) +{ + char c; + int joystick_nr = 0; + + if (device_name == NULL || device_name[0] == '\0') + return 0; + + c = device_name[strlen(device_name) - 1]; + + if (c >= '0' && c <= '9') + joystick_nr = (int)(c - '0'); + + if (joystick_nr < 0 || joystick_nr >= MAX_PLAYERS) + joystick_nr = 0; + + return joystick_nr; +} + #if !defined(PLATFORM_MSDOS) static int JoystickPosition(int middle, int margin, int actual) { diff --git a/src/libgame/joystick_TMP.h b/src/libgame/joystick_TMP.h deleted file mode 100644 index ccf728aa..00000000 --- a/src/libgame/joystick_TMP.h +++ /dev/null @@ -1,90 +0,0 @@ -/*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * -*----------------------------------------------------------* -* (c) 1995-98 Artsoft Entertainment * -* Holger Schemel * -* Oststrasse 11a * -* 33604 Bielefeld * -* phone: ++49 +521 290471 * -* email: aeglos@valinor.owl.de * -*----------------------------------------------------------* -* joystick.h * -***********************************************************/ - -#ifndef JOYSTICK_H -#define JOYSTICK_H - -/* values for the joystick */ -#define JOYSTICK_OFF 0 -#define JOYSTICK_AVAILABLE 1 - -#ifdef __FreeBSD__ -#include -#define DEV_JOYSTICK_0 "/dev/joy0" -#define DEV_JOYSTICK_1 "/dev/joy1" -#define DEV_JOYSTICK_2 "/dev/joy2" -#define DEV_JOYSTICK_3 "/dev/joy3" -#else -#define DEV_JOYSTICK_0 "/dev/js0" -#define DEV_JOYSTICK_1 "/dev/js1" -#define DEV_JOYSTICK_2 "/dev/js2" -#define DEV_JOYSTICK_3 "/dev/js3" -#endif - -/* get these values from the program 'js' from the joystick package, */ -/* set JOYSTICK_PERCENT to a threshold appropriate for your joystick */ - -#ifdef TARGET_SDL -#define JOYSTICK_XLEFT -32767 -#define JOYSTICK_XMIDDLE 0 -#define JOYSTICK_XRIGHT 32767 -#define JOYSTICK_YUPPER -32767 -#define JOYSTICK_YMIDDLE 0 -#define JOYSTICK_YLOWER 32767 -#else -#define JOYSTICK_XLEFT 30 -#define JOYSTICK_XMIDDLE 530 -#define JOYSTICK_XRIGHT 1250 -#define JOYSTICK_YUPPER 40 -#define JOYSTICK_YMIDDLE 680 -#define JOYSTICK_YLOWER 1440 -#endif - -#define JOYSTICK_PERCENT 25 - -#define JOY_LEFT MV_LEFT -#define JOY_RIGHT MV_RIGHT -#define JOY_UP MV_UP -#define JOY_DOWN MV_DOWN -#define JOY_BUTTON_1 (1<<4) -#define JOY_BUTTON_2 (1<<5) -#define JOY_BUTTON (JOY_BUTTON_1 | JOY_BUTTON_2) - -#define JOY_BUTTON_NOT_PRESSED 0 -#define JOY_BUTTON_PRESSED 1 -#define JOY_BUTTON_NEW_PRESSED 2 -#define JOY_BUTTON_NEW_RELEASED 3 - -#ifdef NO_JOYSTICK -#define JOYSTICK_STATUS JOYSTICK_OFF -#else -#define JOYSTICK_STATUS JOYSTICK_AVAILABLE -#endif - - -#if defined(TARGET_SDL) -SDL_Joystick *Get_SDL_Joystick(int); -boolean Open_SDL_Joystick(int); -void Close_SDL_Joystick(int); -boolean Check_SDL_JoystickOpened(int); -void HandleJoystickEvent(Event *); -int Get_SDL_Joystick_Axis(int, int); -#endif - -void CheckJoystickData(void); -int Joystick(int); -int JoystickButton(int); -int AnyJoystick(void); -int AnyJoystickButton(void); - -#endif /* JOYSTICK_H */ diff --git a/src/libgame/misc.c b/src/libgame/misc.c index bfc6d454..29e23929 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -28,7 +28,9 @@ #include "misc.h" +#if 0 #include "joystick_TMP.h" +#endif #if defined(PLATFORM_MSDOS) volatile unsigned long counter = 0; @@ -1056,90 +1058,6 @@ char getCharFromKey(Key key) return letter; } -#define TRANSLATE_JOYSYMBOL_TO_JOYNAME 0 -#define TRANSLATE_JOYNAME_TO_JOYSYMBOL 1 - -void translate_joyname(int *joysymbol, char **name, int mode) -{ - static struct - { - int joysymbol; - char *name; - } translate_joy[] = - { - { JOY_LEFT, "joystick_left" }, - { JOY_RIGHT, "joystick_right" }, - { JOY_UP, "joystick_up" }, - { JOY_DOWN, "joystick_down" }, - { JOY_BUTTON_1, "joystick_button_1" }, - { JOY_BUTTON_2, "joystick_button_2" }, - }; - - int i; - - if (mode == TRANSLATE_JOYSYMBOL_TO_JOYNAME) - { - *name = "[undefined]"; - - for (i=0; i<6; i++) - { - if (*joysymbol == translate_joy[i].joysymbol) - { - *name = translate_joy[i].name; - break; - } - } - } - else if (mode == TRANSLATE_JOYNAME_TO_JOYSYMBOL) - { - *joysymbol = 0; - - for (i=0; i<6; i++) - { - if (strcmp(*name, translate_joy[i].name) == 0) - { - *joysymbol = translate_joy[i].joysymbol; - break; - } - } - } -} - -char *getJoyNameFromJoySymbol(int joysymbol) -{ - char *name; - - translate_joyname(&joysymbol, &name, TRANSLATE_JOYSYMBOL_TO_JOYNAME); - return name; -} - -int getJoySymbolFromJoyName(char *name) -{ - int joysymbol; - - translate_joyname(&joysymbol, &name, TRANSLATE_JOYNAME_TO_JOYSYMBOL); - return joysymbol; -} - -int getJoystickNrFromDeviceName(char *device_name) -{ - char c; - int joystick_nr = 0; - - if (device_name == NULL || device_name[0] == '\0') - return 0; - - c = device_name[strlen(device_name) - 1]; - - if (c >= '0' && c <= '9') - joystick_nr = (int)(c - '0'); - - if (joystick_nr < 0 || joystick_nr >= MAX_PLAYERS) - joystick_nr = 0; - - return joystick_nr; -} - /* ------------------------------------------------------------------------- */ /* some functions to handle lists of level directories */ /* ------------------------------------------------------------------------- */ diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 8e2ec948..edb861d9 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -16,24 +16,28 @@ #ifdef TARGET_SDL -inline void SDLInitBufferedDisplay(DrawBuffer *backbuffer, DrawWindow *window) +inline void SDLInitVideoDisplay(void) { /* initialize SDL video */ if (SDL_Init(SDL_INIT_VIDEO) < 0) Error(ERR_EXIT, "SDL_Init() failed: %s", SDL_GetError()); - /* automatically cleanup SDL stuff after exit() */ + /* set default SDL depth */ + video.default_depth = SDL_GetVideoInfo()->vfmt->BitsPerPixel; + + /* set exit function to automatically cleanup SDL stuff after exit() */ atexit(SDL_Quit); +} +inline void SDLInitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, + boolean fullscreen) +{ /* open SDL video output device (window or fullscreen mode) */ - if (!SDLSetVideoMode(backbuffer)) + if (!SDLSetVideoMode(backbuffer, fullscreen)) Error(ERR_EXIT, "setting video mode failed"); /* set window and icon title */ - SDL_WM_SetCaption(WINDOW_TITLE_STRING, WINDOW_TITLE_STRING); - - /* create additional buffer for double-buffering */ - pix[PIX_DB_BACK] = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH); + SDL_WM_SetCaption(program.window_title, program.window_title); /* SDL cannot directly draw to the visible video framebuffer like X11, but always uses a backbuffer, which is then blitted to the visible @@ -48,13 +52,14 @@ inline void SDLInitBufferedDisplay(DrawBuffer *backbuffer, DrawWindow *window) buffer 'window' at the same size as the SDL backbuffer. Although it should never be drawn to directly, it would do no harm nevertheless. */ - *window = pix[PIX_DB_BACK]; /* 'window' is only symbolic buffer */ - pix[PIX_DB_BACK] = *backbuffer; /* 'backbuffer' is SDL screen buffer */ + /* create additional (symbolic) buffer for double-buffering */ + *window = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH); } inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) { boolean success = TRUE; + int surface_flags = SDL_HWSURFACE | (fullscreen ? SDL_FULLSCREEN : 0); if (fullscreen && !video.fullscreen_enabled && video.fullscreen_available) { @@ -62,9 +67,8 @@ inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) DrawWindow window_old = *backbuffer; DrawWindow window_new; - if ((window_new = SDL_SetVideoMode(WIN_XSIZE, WIN_YSIZE, WIN_SDL_DEPTH, - SDL_HWSURFACE|SDL_FULLSCREEN)) - == NULL) + if ((window_new = SDL_SetVideoMode(video.width, video.height, video.depth, + surface_flags)) == NULL) { /* switching display to fullscreen mode failed */ Error(ERR_WARN, "SDL_SetVideoMode() failed: %s", SDL_GetError()); @@ -90,9 +94,8 @@ inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) DrawWindow window_old = *backbuffer; DrawWindow window_new; - if ((window_new = SDL_SetVideoMode(WIN_XSIZE, WIN_YSIZE, WIN_SDL_DEPTH, - SDL_HWSURFACE)) - == NULL) + if ((window_new = SDL_SetVideoMode(video.width, video.height, video.depth, + surface_flags)) == NULL) { /* switching display to window mode failed -- should not happen */ Error(ERR_WARN, "SDL_SetVideoMode() failed: %s", SDL_GetError()); diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index f150e7df..a7147130 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -296,7 +296,8 @@ typedef int Colormap; /* SDL function definitions */ -inline void SDLInitBufferedDisplay(DrawBuffer *, DrawWindow *); +inline void SDLInitVideoDisplay(void); +inline void SDLInitVideoBuffer(DrawBuffer *, DrawWindow *); inline boolean SDLSetVideoMode(DrawBuffer *, boolean); inline void SDLCopyArea(SDL_Surface *, SDL_Surface *, int, int, int, int, int, int); diff --git a/src/libgame/system.c b/src/libgame/system.c index 5a55f1c2..ee5e87ce 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -34,6 +34,7 @@ int FrameCounter; /* exported variables */ /* ========================================================================= */ +struct ProgramInfo program; struct VideoSystemInfo video; struct AudioSystemInfo audio; struct OptionInfo options; @@ -43,30 +44,53 @@ struct OptionInfo options; /* video functions */ /* ========================================================================= */ -inline void InitBufferedDisplay(DrawBuffer *backbuffer, DrawWindow *window) +inline static int GetRealDepth(int depth) { - video.fullscreen_available = FULLSCREEN_STATUS; - video.fullscreen_enabled = FALSE; + return (depth == DEFAULT_DEPTH ? video.default_depth : depth); +} + +inline void InitProgramInfo(char *command_name, char *program_title, + char *window_title, char *icon_title, + char *x11_icon_filename, + char *x11_iconmask_filename) +{ + program.command_name = command_name; + program.program_title = program_title; + program.window_title = window_title; + program.icon_title = icon_title; + program.x11_icon_filename = x11_icon_filename; + program.x11_iconmask_filename = x11_iconmask_filename; +} +inline void InitVideoDisplay(void) +{ #ifdef TARGET_SDL - SDLInitBufferedDisplay(backbuffer, window); + SDLInitVideoDisplay(); #else - X11InitBufferedDisplay(backbuffer, window); + X11InitVideoDisplay(); #endif } -inline int GetDisplayDepth(void) +inline void InitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, + int width, int height, int depth, + boolean fullscreen) { + video.width = width; + video.height = height; + video.depth = GetRealDepth(depth); + video.fullscreen_available = FULLSCREEN_STATUS; + video.fullscreen_enabled = FALSE; + #ifdef TARGET_SDL - return SDL_GetVideoSurface()->format->BitsPerPixel; + SDLInitVideoBuffer(backbuffer, window, fullscreen); #else - return XDefaultDepth(display, screen); + X11InitVideoBuffer(backbuffer, window); #endif } inline Bitmap CreateBitmap(int width, int height, int depth) { - int real_depth = (depth == DEFAULT_DEPTH ? GetDisplayDepth() : depth); + int real_depth = GetRealDepth(depth); #ifdef TARGET_SDL SDL_Surface *surface_tmp, *surface_native; diff --git a/src/libgame/system.h b/src/libgame/system.h index fe805c8a..5b9a1ef5 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -43,8 +43,20 @@ typedef int (*EventFilter)(const Event *); /* structure definitions */ +struct ProgramInfo +{ + char *command_name; + char *program_title; + char *window_title; + char *icon_title; + char *x11_icon_filename; + char *x11_iconmask_filename; +}; + struct VideoSystemInfo { + int default_depth; + int width, height, depth; boolean fullscreen_available; boolean fullscreen_enabled; }; @@ -78,6 +90,7 @@ struct OptionInfo /* exported variables */ /* ========================================================================= */ +extern struct ProgramInfo program; extern struct VideoSystemInfo video; extern struct AudioSystemInfo audio; extern struct OptionInfo options; @@ -98,8 +111,9 @@ extern int FrameCounter; /* function definitions */ -inline void InitBufferedDisplay(DrawBuffer *, DrawWindow *); -inline int GetDisplayDepth(void); +inline void InitProgramInfo(char *, char *, char *, char *, char *, char *); +inline void InitVideoDisplay(void); +inline void InitVideoBuffer(DrawBuffer *,DrawWindow *, int, int, int, boolean); inline Bitmap CreateBitmap(int, int, int); inline void FreeBitmap(Bitmap); inline void ClearRectangle(Bitmap, int, int, int, int); diff --git a/src/libgame/x11.c b/src/libgame/x11.c index 9de89c95..5d77d49d 100644 --- a/src/libgame/x11.c +++ b/src/libgame/x11.c @@ -16,13 +16,40 @@ #if defined(TARGET_X11) +#if 0 #include "main_TMP.h" +#endif +#if 0 struct IconFileInfo { char *picture_filename; char *picturemask_filename; }; +#endif + +static void X11InitDisplay(); +static DrawWindow X11InitWindow(); + +inline void X11InitVideoDisplay(void) +{ + /* initialize X11 video */ + X11InitDisplay(); + + /* set default X11 depth */ + video.default_depth = XDefaultDepth(display, screen); +} + +inline void X11InitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window) +{ + *window = X11InitWindow(); + + XMapWindow(display, *window); + FlushDisplay(); + + /* create additional (off-screen) buffer for double-buffering */ + *backbuffer = CreateBitmap(video.width, video.height, video.depth); +} static void X11InitDisplay() { @@ -85,23 +112,25 @@ static DrawWindow X11InitWindow() XSizeHints size_hints; XWMHints wm_hints; XClassHint class_hints; - char *window_name = WINDOW_TITLE_STRING; - char *icon_name = WINDOW_TITLE_STRING; + char *window_name = program.window_title; + char *icon_name = program.window_title; long window_event_mask; Atom proto_atom = None, delete_atom = None; #endif int screen_width, screen_height; - int win_xpos = WIN_XPOS, win_ypos = WIN_YPOS; + int win_xpos, win_ypos; unsigned long pen_fg = WhitePixel(display,screen); unsigned long pen_bg = BlackPixel(display,screen); - const int width = WIN_XSIZE, height = WIN_YSIZE; + const int width = video.width, height = video.height; +#if 0 #if !defined(PLATFORM_MSDOS) static struct IconFileInfo icon_pic = { "rocks_icon.xbm", "rocks_iconmask.xbm" }; +#endif #endif screen_width = XDisplayWidth(display, screen); @@ -121,21 +150,25 @@ static DrawWindow X11InitWindow() XChangeProperty(display, window, proto_atom, XA_ATOM, 32, PropModePrepend, (unsigned char *) &delete_atom, 1); +#if 0 sprintf(icon_filename, "%s/%s/%s", options.ro_base_directory, GRAPHICS_DIRECTORY, icon_pic.picture_filename); - XReadBitmapFile(display,window,icon_filename, - &icon_width,&icon_height, - &icon_pixmap,&icon_hot_x,&icon_hot_y); +#endif + XReadBitmapFile(display, window, program.x11_icon_filename, + &icon_width, &icon_height, + &icon_pixmap, &icon_hot_x, &icon_hot_y); if (!icon_pixmap) Error(ERR_EXIT, "cannot read icon bitmap file '%s'", icon_filename); +#if 0 sprintf(icon_filename, "%s/%s/%s", options.ro_base_directory, GRAPHICS_DIRECTORY, icon_pic.picturemask_filename); - XReadBitmapFile(display,window,icon_filename, - &icon_width,&icon_height, - &iconmask_pixmap,&icon_hot_x,&icon_hot_y); +#endif + XReadBitmapFile(display, window, program.x11_iconmask_filename, + &icon_width, &icon_height, + &iconmask_pixmap, &icon_hot_x, &icon_hot_y); if (!iconmask_pixmap) Error(ERR_EXIT, "cannot read icon bitmap file '%s'", icon_filename); @@ -162,8 +195,8 @@ static DrawWindow X11InitWindow() wm_hints.icon_mask = iconmask_pixmap; wm_hints.flags = StateHint | IconPixmapHint | IconMaskHint | InputHint; - class_hints.res_name = program_name; - class_hints.res_class = "Rocks'n'Diamonds"; + class_hints.res_name = program.command_name; + class_hints.res_class = program.program_title; XSetWMProperties(display, window, &windowName, &iconName, NULL, 0, &size_hints, &wm_hints, @@ -191,17 +224,4 @@ static DrawWindow X11InitWindow() return window; } -inline void X11InitBufferedDisplay(DrawBuffer *backbuffer, DrawWindow *window) -{ - X11InitDisplay(); - *window = X11InitWindow(); - - XMapWindow(display, *window); - FlushDisplay(); - - /* create additional buffer for double-buffering */ - *backbuffer = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH); - pix[PIX_DB_BACK] = *backbuffer; /* 'backbuffer' is off-screen buffer */ -} - #endif /* TARGET_X11 */ diff --git a/src/libgame/x11.h b/src/libgame/x11.h index ca1247c5..783deb3e 100644 --- a/src/libgame/x11.h +++ b/src/libgame/x11.h @@ -268,6 +268,7 @@ typedef XClientMessageEvent ClientMessageEvent; /* X11 function definitions */ -inline void X11InitBufferedDisplay(DrawBuffer *, DrawWindow *); +inline void X11InitVideoDisplay(void); +inline void X11InitVideoBuffer(DrawBuffer *, DrawWindow *); #endif /* X11_H */ diff --git a/src/main.h b/src/main.h index c53408b2..9eb316c2 100644 --- a/src/main.h +++ b/src/main.h @@ -200,12 +200,11 @@ #define PIX_SMALLFONT 8 #define PIX_MEDIUMFONT 9 /* Bitmaps without graphic file */ -#define PIX_DB_BACK 10 -#define PIX_DB_DOOR 11 -#define PIX_DB_FIELD 12 +#define PIX_DB_DOOR 10 +#define PIX_DB_FIELD 11 #define NUM_PICTURES 10 -#define NUM_BITMAPS 13 +#define NUM_BITMAPS 12 /* boundaries of arrays etc. */ #define MAX_PLAYER_NAME_LEN 10 @@ -1666,6 +1665,7 @@ extern int num_element_info; #define PROGRAM_IDENT_STRING PROGRAM_VERSION_STRING " " TARGET_STRING #define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING #define WINDOW_SUBTITLE_STRING PROGRAM_RIGHTS_STRING " " PROGRAM_AUTHOR_STRING +#define ICON_TITLE_STRING PROGRAM_TITLE_STRING /* default name for empty highscore entry */ #define EMPTY_PLAYER_NAME "no name" -- 2.34.1