X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=dfec496c843bb5491109a66fa61c187e2f4faa77;hb=8eee8a56a5aae567522998ccddf929e38aed6872;hp=b3783268654a4a5fe329dc8107dcf0cccd4d612d;hpb=40864847307c459d5998dfd639e7a014890d72fa;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index b3783268..dfec496c 100644 --- a/src/main.h +++ b/src/main.h @@ -17,28 +17,12 @@ #include #include #include +#include #include #include #include - -#ifndef MSDOS -#define XK_MISCELLANY -#define XK_LATIN1 - -#include -#include -#include -#include -#include -#include - -#ifdef XPM_INCLUDE_FILE -#define USE_XPM_LIBRARY -#include XPM_INCLUDE_FILE -#endif -#else /* MSDOS */ -#include "msdos.h" -#endif /* MSDOS */ +#include +#include #ifdef DEBUG #define DEBUG_TIMING 0 @@ -47,6 +31,8 @@ typedef unsigned char boolean; typedef unsigned char byte; +#include "system.h" + #ifndef FALSE #define FALSE 0 #define TRUE (!FALSE) @@ -54,6 +40,7 @@ typedef unsigned char byte; #define WIN_XSIZE 672 #define WIN_YSIZE 560 +#define WIN_SDL_DEPTH 16 /* !!! change this !!! */ #ifndef MSDOS #define WIN_XPOS 0 #define WIN_YPOS 0 @@ -200,7 +187,7 @@ typedef unsigned char byte; #define PLAYER_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \ PROTECTED_FIELD(x, y)) -/* Pixmaps with graphic file */ +/* Bitmaps with graphic file */ #define PIX_BACK 0 #define PIX_DOOR 1 #define PIX_HEROES 2 @@ -211,13 +198,13 @@ typedef unsigned char byte; #define PIX_BIGFONT 7 #define PIX_SMALLFONT 8 #define PIX_MEDIUMFONT 9 -/* Pixmaps without graphic file */ +/* Bitmaps without graphic file */ #define PIX_DB_BACK 10 #define PIX_DB_DOOR 11 #define PIX_DB_FIELD 12 #define NUM_PICTURES 10 -#define NUM_PIXMAPS 13 +#define NUM_BITMAPS 13 /* boundaries of arrays etc. */ #define MAX_PLAYER_NAME_LEN 10 @@ -260,6 +247,7 @@ struct OptionInfo boolean serveronly; boolean network; boolean verbose; + boolean debug; }; struct SetupJoystickInfo @@ -273,12 +261,12 @@ struct SetupJoystickInfo struct SetupKeyboardInfo { - KeySym left; - KeySym right; - KeySym up; - KeySym down; - KeySym snap; - KeySym bomb; + Key left; + Key right; + Key up; + Key down; + Key snap; + Key bomb; }; struct SetupInputInfo @@ -307,6 +295,7 @@ struct SetupInfo boolean team_mode; boolean handicap; boolean time_limit; + boolean fullscreen; struct SetupInputInfo input[MAX_PLAYERS]; }; @@ -455,21 +444,23 @@ struct GameInfo struct GlobalInfo { + float frames_per_second; }; extern Display *display; extern Visual *visual; extern int screen; -extern Window window; +extern DrawWindow window; extern GC gc, clip_gc[], tile_clip_gc; -extern Pixmap pix[]; +extern Bitmap pix[]; +extern Bitmap pix_masked[], tile_masked[]; extern Pixmap clipmask[], tile_clipmask[]; #ifdef USE_XPM_LIBRARY extern XpmAttributes xpm_att[]; #endif -extern Drawable drawto, drawto_field, backbuffer, fieldbuffer; +extern DrawBuffer drawto, drawto_field, backbuffer, fieldbuffer; extern Colormap cmap; extern int sound_pipe[2]; @@ -489,6 +480,8 @@ extern int key_joystick_mapping; extern int global_joystick_status, joystick_status; extern int sound_status; extern boolean sound_loops_allowed; +extern boolean fullscreen_available; +extern boolean fullscreen_enabled; extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; extern int redraw_x1, redraw_y1; @@ -1601,15 +1594,14 @@ extern char *element_info[]; #define NUM_SOUNDS 62 /* default input keys */ -#define KEY_UNDEFINDED XK_VoidSymbol -#define DEFAULT_KEY_LEFT XK_Left -#define DEFAULT_KEY_RIGHT XK_Right -#define DEFAULT_KEY_UP XK_Up -#define DEFAULT_KEY_DOWN XK_Down -#define DEFAULT_KEY_SNAP XK_Shift_L -#define DEFAULT_KEY_BOMB XK_Shift_R -#define DEFAULT_KEY_OKAY XK_Return -#define DEFAULT_KEY_CANCEL XK_Escape +#define DEFAULT_KEY_LEFT KEY_Left +#define DEFAULT_KEY_RIGHT KEY_Right +#define DEFAULT_KEY_UP KEY_Up +#define DEFAULT_KEY_DOWN KEY_Down +#define DEFAULT_KEY_SNAP KEY_Shift_L +#define DEFAULT_KEY_BOMB KEY_Shift_R +#define DEFAULT_KEY_OKAY KEY_Return +#define DEFAULT_KEY_CANCEL KEY_Escape /* directions for moving */ #define MV_NO_MOVING 0 @@ -1661,11 +1653,14 @@ extern char *element_info[]; #define TAPES_DIRECTORY "tapes" #define SCORES_DIRECTORY "scores" -#define PROGRAM_VERSION_STRING "1.3.5" +#define PROGRAM_VERSION_STRING "1.5.0" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -#define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_VERSION_STRING -#define COPYRIGHT_STRING "Copyright ^1995-99 by " PROGRAM_AUTHOR_STRING +#define PROGRAM_RIGHTS_STRING "Copyright ^1995-2000 by" +#define PROGRAM_DOS_PORT_STRING "DOS port done by Guido Schulz" +#define PROGRAM_IDENT_STRING PROGRAM_VERSION_STRING " " PLATFORM_STRING +#define WINDOW_TITLE_STRING PROGRAM_TITLE_STRING " " PROGRAM_IDENT_STRING +#define WINDOW_SUBTITLE_STRING PROGRAM_RIGHTS_STRING " " PROGRAM_AUTHOR_STRING /* default name for empty highscore entry */ #define EMPTY_PLAYER_NAME "no name" @@ -1683,9 +1678,9 @@ extern char *element_info[]; #define MB_MENU_CHOICE FALSE #define MB_MENU_MARK TRUE #define MB_MENU_INITIALIZE (-1) -#define MB_LEFT 1 -#define MB_MIDDLE 2 -#define MB_RIGHT 3 +#define MB_LEFTBUTTON 1 +#define MB_MIDDLEBUTTON 2 +#define MB_RIGHTBUTTON 3 /* values for redraw_mask */ #define REDRAW_ALL (1 << 0) @@ -1707,9 +1702,10 @@ extern char *element_info[]; #define REDRAW_MAIN (REDRAW_FIELD | \ REDRAW_TILES | \ REDRAW_MICROLEVEL) +#define REDRAW_FPS (1 << 10) #define REDRAWTILES_THRESHOLD (SCR_FIELDX * SCR_FIELDY / 2) -/* areas in pixmap PIX_DOOR */ +/* areas in bitmap PIX_DOOR */ /* meaning in PIX_DB_DOOR: (3 PAGEs) PAGEX1: 1. buffer for DOOR_1 PAGEX2: 2. buffer for DOOR_1