rnd-20131113-1-src
[rocksndiamonds.git] / src / libgame / system.h
index df95c9d336ff7ed064fb095c09572b5149b947b0..b6c2ad3b465f74274944449c2886183a3b737731 100644 (file)
                                 REDRAW_TILES | \
                                 REDRAW_MICROLEVEL)
 #define REDRAW_FPS             (1 << 11)
+
+#if defined(TARGET_X11)
+/* on old-style, classic and potentially slow graphics systems, redraw single
+   tiles instead of the whole playfield unless a certain threshold is reached;
+   when using the X11 target, this method should still be fast on all systems */
 #define REDRAWTILES_THRESHOLD  (SCR_FIELDX * SCR_FIELDY / 2)
+#else
+/* on modern graphics systems and when using the SDL target, this tile redraw
+   optimization can slow things down a lot due to many small blits compared to
+   one single playfield-sized blit (especially observed on Mac OS X with SDL) */
+#define REDRAWTILES_THRESHOLD  0
+#endif
 
 #define IN_GFX_SCREEN(x, y)    (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
                                 y >= gfx.sy && y < gfx.sy + gfx.sysize)
@@ -640,9 +651,11 @@ typedef int (*EventFilter)(const Event *);
 
 struct ProgramInfo
 {
-  char *command_basepath;      /* directory that contains the program */
+  char *command_basepath;      /* path to the program binary */
   char *command_basename;      /* base filename of the program binary */
 
+  char *maindata_path;         /* main game data (installation) directory */
+
   char *userdata_subdir;       /* personal user game data directory */
   char *userdata_subdir_unix;  /* personal user game data directory (Unix) */
   char *userdata_path;         /* resulting full path to game data directory */
@@ -933,6 +946,10 @@ struct SetupInfo
   int override_level_sounds;           /* not boolean -- can also be "AUTO" */
   int override_level_music;            /* not boolean -- can also be "AUTO" */
 
+  int volume_simple;
+  int volume_loops;
+  int volume_music;
+
   struct SetupEditorInfo editor;
   struct SetupEditorCascadeInfo editor_cascade;
   struct SetupShortcutInfo shortcut;