rnd-20040125-1-src
[rocksndiamonds.git] / src / libgame / system.h
index 0449fcae0d11f8195fa6b20b004a3c156726e8a6..af6b95a259e841b9775811103dd640ad1317be01 100644 (file)
 #define DEFAULT_KEY_DOWN       KSYM_Down
 #if defined(PLATFORM_MACOSX)
 #define DEFAULT_KEY_SNAP       KSYM_Control_L
-#define DEFAULT_KEY_BOMB       KSYM_KP_Enter
+#define DEFAULT_KEY_DROP       KSYM_KP_Enter
 #else
-#define DEFAULT_KEY_SNAP       KSYM_Shift_L
-#define DEFAULT_KEY_BOMB       KSYM_Shift_R
+#define DEFAULT_KEY_SNAP       KSYM_Control_L
+#define DEFAULT_KEY_DROP       KSYM_Control_R
 #endif
 #define DEFAULT_KEY_OKAY       KSYM_Return
 #define DEFAULT_KEY_CANCEL     KSYM_Escape
 #define REDRAW_FPS             (1 << 11)
 #define REDRAWTILES_THRESHOLD  (SCR_FIELDX * SCR_FIELDY / 2)
 
+#define IN_GFX_SCREEN(x, y)    (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
+                                y >= gfx.sy && y < gfx.sy + gfx.sysize)
+#define IN_GFX_DOOR(x, y)      (x >= gfx.dx && x < gfx.dx + gfx.dxsize && \
+                                y >= gfx.dy && y < gfx.dy + gfx.dysize)
+#define IN_GFX_VIDEO(x, y)     (x >= gfx.vx && x < gfx.vx + gfx.vxsize && \
+                                y >= gfx.vy && y < gfx.vy + gfx.vysize)
 
 /* values for mouse cursor */
 #define CURSOR_DEFAULT         0
 /* default name for unknown player names */
 #define ANONYMOUS_NAME         "anonymous"
 
+/* default for other unknown names */
+#define UNKNOWN_NAME           "unknown"
+
 /* default name for new levels */
 #define NAMELESS_LEVEL_NAME    "nameless level"
 
 #define SETUP_FILENAME         "setup.conf"
 #define LEVELSETUP_FILENAME    "levelsetup.conf"
 #define EDITORSETUP_FILENAME   "editorsetup.conf"
-#define DEMOANIMINFO_FILENAME  "demoaniminfo.conf"
-#define DEMOANIMTEXT_FILENAME  "demoanimtext.conf"
+#define HELPANIM_FILENAME      "helpanim.conf"
+#define HELPTEXT_FILENAME      "helptext.conf"
 #define LEVELINFO_FILENAME     "levelinfo.conf"
 #define GRAPHICSINFO_FILENAME  "graphicsinfo.conf"
 #define SOUNDSINFO_FILENAME    "soundsinfo.conf"
 #define SETUP_FILENAME         "setup.cnf"
 #define LEVELSETUP_FILENAME    "lvlsetup.cnf"
 #define EDITORSETUP_FILENAME   "edsetup.cnf"
-#define DEMOANIMINFO_FILENAME  "demoainf.cnf"
-#define DEMOANIMTEXT_FILENAME  "demoatxt.cnf"
+#define HELPANIM_FILENAME      "helpanim.conf"
+#define HELPTEXT_FILENAME      "helptext.conf"
 #define LEVELINFO_FILENAME     "lvlinfo.cnf"
 #define GRAPHICSINFO_FILENAME  "gfxinfo.cnf"
 #define SOUNDSINFO_FILENAME    "sndinfo.cnf"
@@ -512,18 +521,13 @@ struct SetupJoystickInfo
 
   int xleft, xmiddle, xright;
   int yupper, ymiddle, ylower;
-  int snap;
-  int bomb;
+  int snap, drop;
 };
 
 struct SetupKeyboardInfo
 {
-  Key left;
-  Key right;
-  Key up;
-  Key down;
-  Key snap;
-  Key bomb;
+  Key left, right, up, down;
+  Key snap, drop;
 };
 
 struct SetupInputInfo
@@ -613,7 +617,7 @@ struct TreeInfo
 
   /* fields for "type == TREE_TYPE_LEVEL_DIR" */
 
-  char *filename;      /* tree info sub-directory basename (may be ".") */
+  char *subdir;                /* tree info sub-directory basename (may be ".") */
   char *fullpath;      /* complete path relative to tree base directory */
   char *basepath;      /* absolute base path of tree base directory */
   char *identifier;    /* identifier string for configuration files */
@@ -629,6 +633,9 @@ struct TreeInfo
   char *sounds_path;   /* path to optional custom sounds set (level only) */
   char *music_path;    /* path to optional custom music set (level only) */
 
+  char *level_filename;        /* filename of level file (for packed level file) */
+  char *level_filetype;        /* type of levels in level directory or level file */
+
   int levels;          /* number of levels in level series */
   int first_level;     /* first level number (to allow start with 0 or 1) */
   int last_level;      /* last level number (automatically calculated) */