changed names of constants for different drawing targets
[rocksndiamonds.git] / src / libgame / system.h
index 1fe8d9f40ff4467aed94010d1bda5c3d390c76c4..b7da38b53adcd21081a749a56c6609c8d36ddf37 100644 (file)
@@ -47,9 +47,9 @@
 #define WINDOW_SCALING_NOT_AVAILABLE   FALSE
 #define WINDOW_SCALING_AVAILABLE       TRUE
 
-#define MIN_WINDOW_SCALING_PERCENT     50
+#define MIN_WINDOW_SCALING_PERCENT     30
 #define STD_WINDOW_SCALING_PERCENT     100
-#define MAX_WINDOW_SCALING_PERCENT     300
+#define MAX_WINDOW_SCALING_PERCENT     400
 #define STEP_WINDOW_SCALING_PERCENT    10
 
 /* values for window scaling quality */
 
 #define SCALING_QUALITY_DEFAULT                SCALING_QUALITY_LINEAR
 
+/* values for screen rendering mode */
+#define STR_SPECIAL_RENDERING_OFF      "stream_texture_only"
+#define STR_SPECIAL_RENDERING_BITMAP   "bitmap_and_stream_texture"
+#define STR_SPECIAL_RENDERING_TARGET   "target_texture_only"
+#define STR_SPECIAL_RENDERING_DOUBLE   "stream_and_target_texture"
+
+#if defined(TARGET_SDL2)
+#define STR_SPECIAL_RENDERING_DEFAULT  STR_SPECIAL_RENDERING_DOUBLE
+#else
+#define STR_SPECIAL_RENDERING_DEFAULT  STR_SPECIAL_RENDERING_BITMAP
+#endif
+
+#define SPECIAL_RENDERING_OFF          0
+#define SPECIAL_RENDERING_BITMAP       1
+#define SPECIAL_RENDERING_TARGET       2
+#define SPECIAL_RENDERING_DOUBLE       3
+
+#if defined(TARGET_SDL2)
+#define SPECIAL_RENDERING_DEFAULT      SPECIAL_RENDERING_DOUBLE
+#else
+#define SPECIAL_RENDERING_DEFAULT      SPECIAL_RENDERING_BITMAP
+#endif
+
 /* values for touch control */
 #define TOUCH_CONTROL_VIRTUAL_BUTTONS  "virtual_buttons"
 #define TOUCH_CONTROL_WIPE_GESTURES    "wipe_gestures"
 #define DRAW_GLOBAL_ANIM_STAGE_1       1
 #define DRAW_GLOBAL_ANIM_STAGE_2       2
 
+/* values for drawing target (various functions) */
+#define DRAW_TO_BACKBUFFER             0
+#define DRAW_TO_FIELDBUFFER            1
+#define DRAW_TO_SCREEN                 2
+#define DRAW_TO_FADE_SOURCE            3
+#define DRAW_TO_FADE_TARGET            4
+
 /* values for move directions and special "button" key bitmasks */
 #define MV_NONE                        0
 #define MV_LEFT                        (1 << MV_BIT_LEFT)
                                 MV_NONE)
 
 /* values for animation mode (frame order and direction) */
+/* (stored in level files -- never change existing values) */
 #define ANIM_NONE              0
 #define ANIM_LOOP              (1 << 0)
 #define ANIM_LINEAR            (1 << 1)
 #define ANIM_OPAQUE_PLAYER     (1 << 9)
 
 /* values for special (non game element) animation modes */
+/* (not stored in level files -- can be changed, if needed) */
 #define ANIM_HORIZONTAL                (1 << 10)
 #define ANIM_VERTICAL          (1 << 11)
 #define ANIM_CENTERED          (1 << 12)
 #define ANIM_STATIC_PANEL      (1 << 13)
 #define ANIM_ALL               (1 << 14)
+#define ANIM_ONCE              (1 << 15)
 
 #define ANIM_DEFAULT           ANIM_LOOP
 
@@ -700,7 +733,6 @@ struct ProgramInfo
 
 struct OptionInfo
 {
-  char *display_name;
   char *server_host;
   int server_port;
 
@@ -722,11 +754,6 @@ struct OptionInfo
   boolean debug;
 };
 
-struct ScreenModeInfo
-{
-  int width, height;
-};
-
 struct VideoSystemInfo
 {
   int default_depth;
@@ -736,12 +763,14 @@ struct VideoSystemInfo
   boolean fullscreen_available;
   boolean fullscreen_enabled;
   boolean fullscreen_initial;
-  struct ScreenModeInfo *fullscreen_modes;
-  char *fullscreen_mode_current;
 
   boolean window_scaling_available;
   int window_scaling_percent;
   char *window_scaling_quality;
+  int screen_rendering_mode;
+
+  unsigned int frame_delay;
+  unsigned int frame_delay_value;
 
   boolean initialized;
 };
@@ -808,9 +837,15 @@ struct GfxInfo
   Bitmap *background_bitmap;
   int background_bitmap_mask;
 
-#if USE_FINAL_SCREEN_BITMAP
+  Bitmap *fade_bitmap_source;
+  Bitmap *fade_bitmap_target;
+  Bitmap *fade_bitmap_black;
+
+  int fade_border_source_status;
+  int fade_border_target_status;
+  Bitmap *masked_border_bitmap_ptr;
+
   Bitmap *final_screen_bitmap;
-#endif
 
   boolean clipping_enabled;
   int clip_x, clip_y;
@@ -968,6 +1003,9 @@ struct SetupInternalInfo
 
   char *default_level_series;
 
+  int default_window_width;
+  int default_window_height;
+
   boolean choose_from_top_leveldir;
 };
 
@@ -992,9 +1030,9 @@ struct SetupInfo
   boolean skip_levels;
   boolean time_limit;
   boolean fullscreen;
-  char *fullscreen_mode;
   int window_scaling_percent;
   char *window_scaling_quality;
+  char *screen_rendering_mode;
   boolean ask_on_escape;
   boolean ask_on_escape_editor;
   boolean quick_switch;
@@ -1373,6 +1411,8 @@ Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int);
 void KeyboardAutoRepeatOn(void);
 void KeyboardAutoRepeatOff(void);
 boolean SetVideoMode(boolean);
+void SetVideoFrameDelay(unsigned int);
+unsigned int GetVideoFrameDelay();
 boolean ChangeVideoModeIfNeeded(boolean);
 
 Bitmap *LoadImage(char *);