X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=5969bfc4508e7cafa1ba5a01f0ae5cdb5f3e5be9;hb=4b0f1eb4220d2dbe4cffb288f745661b32c96a5b;hp=92de9f7972e52bf06eda9dc1b8f200f5d480a1d2;hpb=19e3dfa321d39a822bda8fa489fb76f25f9f9165;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 92de9f79..5969bfc4 100644 --- a/src/main.h +++ b/src/main.h @@ -15,11 +15,13 @@ #ifndef MAIN_H #define MAIN_H +#ifndef MSDOS #define XK_MISCELLANY #define XK_LATIN1 #include #include +#include #include #include #include @@ -27,6 +29,9 @@ #ifdef XPM_INCLUDE_FILE #include XPM_INCLUDE_FILE #endif +#else +#include "msdos.h" +#endif // von #ifndef MSDOS #include #include @@ -37,13 +42,20 @@ typedef int BOOL; -#define TRUE 1 -#define FALSE 0 +#ifndef FALSE +#define FALSE 0 +#define TRUE (!FALSE) +#endif -#define WIN_XPOS 0 -#define WIN_YPOS 0 #define WIN_XSIZE 672 #define WIN_YSIZE 560 +#ifndef MSDOS +#define WIN_XPOS 0 +#define WIN_YPOS 0 +#else +#define WIN_XPOS (XRES-WIN_XSIZE)/2 +#define WIN_YPOS (YRES-WIN_YSIZE)/2 +#endif #define SCR_FIELDX 17 #define SCR_FIELDY 17 #define MAX_BUF_XSIZE (SCR_FIELDX + 2) @@ -56,10 +68,18 @@ typedef int BOOL; #define MAX_LEV_FIELDX 128 #define MAX_LEV_FIELDY 128 +#ifndef MIN #define MIN(a,b) ((a)<(b) ? (a) : (b)) +#endif +#ifndef MAX #define MAX(a,b) ((a)>(b) ? (a) : (b)) +#endif +#ifndef ABS #define ABS(a) ((a)<0 ? -(a) : (a)) +#endif +#ifndef SIGN #define SIGN(a) ((a)<0 ? -1 : ((a)>0 ? 1 : 0)) +#endif #define SCROLLX(a) ((a)-scroll_x) #define SCROLLY(a) ((a)-scroll_y) #define UNSCROLLX(a) ((a)+scroll_x) @@ -250,6 +270,13 @@ extern XImage *image[]; extern Pixmap clipmask[]; extern Pixmap pix[]; + +extern Pixmap test_pix[]; +extern Pixmap test_clipmask[]; +extern int test_picture_count; + + + #ifdef XPM_INCLUDE_FILE extern XpmAttributes xpm_att[]; #endif @@ -306,7 +333,7 @@ extern long Elementeigenschaften[MAX_ELEMENTS]; extern int level_nr, leveldir_nr, num_leveldirs; extern int lev_fieldx,lev_fieldy, scroll_x,scroll_y; -extern int FX,FY, ScreenMovPos, ScrollSteps; +extern int FX,FY, ScreenMovPos, ScrollStepSize; extern int BX1,BY1, BX2,BY2; extern int JX,JY, lastJX,lastJY, ZX,ZY, ExitX,ExitY; extern int PlayerMovDir, PlayerMovPos, PlayerPushing; @@ -935,10 +962,17 @@ extern char *progname; #define JOYDAT_PATH GAME_DIR #endif +#ifndef MSDOS #define SCORE_FILENAME "ROCKS.score" #define NAMES_FILENAME "ROCKS.names" #define LEVDIR_FILENAME "ROCKS.levelinfo" #define JOYDAT_FILENAME "ROCKS.joystick" +#else +#define SCORE_FILENAME "ROCKS.sco" +#define NAMES_FILENAME "ROCKS.nam" +#define LEVDIR_FILENAME "ROCKS.lev" +#define JOYDAT_FILENAME "ROCKS.joy" +#endif #define JOYDAT_FILE JOYDAT_PATH "/" JOYDAT_FILENAME @@ -982,8 +1016,13 @@ extern char *progname; #define MB_MENU_MARK TRUE #define MB_MENU_INITIALIZE (-1) #define MB_LEFT 1 +#ifdef MSDOS +#define MB_MIDDLE 4 +#define MB_RIGHT 2 +#else #define MB_MIDDLE 2 #define MB_RIGHT 3 +#endif /* values for key_status */ #define KEY_NOT_PRESSED FALSE @@ -1052,5 +1091,6 @@ extern char *progname; /* für DrawGraphicAnimation (tools.c) und AnimateToon (cartoons.c) */ #define ANIM_NORMAL 0 #define ANIM_OSCILLATE 1 +#define ANIM_REVERSE 2 #endif