rnd-20070330-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 30 Mar 2007 11:58:55 +0000 (13:58 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:55:13 +0000 (10:55 +0200)
* added (currently invisible) setup option to define scroll delay value
* fixed small bug in priority handling when auto-detecting level start
  position in levels without player element (but player from CE etc.)

ChangeLog
src/conftime.h
src/files.c
src/game.c
src/game_em/graphics.c
src/libgame/system.h

index 8c5aafdbf1c92905b59442806e632ac898dd4c7e..de283ca87e0a3358b5e11e6daa18189c59d9dfaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-30
+       * added (currently invisible) setup option to define scroll delay value
+       * fixed small bug in priority handling when auto-detecting level start
+         position in levels without player element (but player from CE etc.)
+
 2007-03-28
        * added displaying of most game panel control elements (not animated)
 
index b19271da6f541d11cce8ba2cacf9ce4021878a97..aa9026974be45b6afd55ad3be1755579e953bf53 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-03-29 01:00"
+#define COMPILE_DATE_STRING "2007-03-30 13:31"
index 88ca1817e8096b7c5b07fcb9cfb9a33707237395..be1bd3c7fc3395550c1928bd6bed78cf837c3e58 100644 (file)
@@ -7684,31 +7684,32 @@ void SaveScore(int nr)
 #define SETUP_TOKEN_SOUND_SIMPLE               4
 #define SETUP_TOKEN_TOONS                      5
 #define SETUP_TOKEN_SCROLL_DELAY               6
-#define SETUP_TOKEN_SOFT_SCROLLING             7
-#define SETUP_TOKEN_FADE_SCREENS               8
-#define SETUP_TOKEN_AUTORECORD                 9
-#define SETUP_TOKEN_SHOW_TITLESCREEN           10
-#define SETUP_TOKEN_QUICK_DOORS                        11
-#define SETUP_TOKEN_TEAM_MODE                  12
-#define SETUP_TOKEN_HANDICAP                   13
-#define SETUP_TOKEN_SKIP_LEVELS                        14
-#define SETUP_TOKEN_TIME_LIMIT                 15
-#define SETUP_TOKEN_FULLSCREEN                 16
-#define SETUP_TOKEN_FULLSCREEN_MODE            17
-#define SETUP_TOKEN_ASK_ON_ESCAPE              18
-#define SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR       19
-#define SETUP_TOKEN_QUICK_SWITCH               20
-#define SETUP_TOKEN_INPUT_ON_FOCUS             21
-#define SETUP_TOKEN_PREFER_AGA_GRAPHICS                22
-#define SETUP_TOKEN_GAME_FRAME_DELAY           23
-#define SETUP_TOKEN_GRAPHICS_SET               24
-#define SETUP_TOKEN_SOUNDS_SET                 25
-#define SETUP_TOKEN_MUSIC_SET                  26
-#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS    27
-#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS      28
-#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC       29
-
-#define NUM_GLOBAL_SETUP_TOKENS                        30
+#define SETUP_TOKEN_SCROLL_DELAY_VALUE         7
+#define SETUP_TOKEN_SOFT_SCROLLING             8
+#define SETUP_TOKEN_FADE_SCREENS               9
+#define SETUP_TOKEN_AUTORECORD                 10
+#define SETUP_TOKEN_SHOW_TITLESCREEN           11
+#define SETUP_TOKEN_QUICK_DOORS                        12
+#define SETUP_TOKEN_TEAM_MODE                  13
+#define SETUP_TOKEN_HANDICAP                   14
+#define SETUP_TOKEN_SKIP_LEVELS                        15
+#define SETUP_TOKEN_TIME_LIMIT                 16
+#define SETUP_TOKEN_FULLSCREEN                 17
+#define SETUP_TOKEN_FULLSCREEN_MODE            18
+#define SETUP_TOKEN_ASK_ON_ESCAPE              19
+#define SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR       20
+#define SETUP_TOKEN_QUICK_SWITCH               21
+#define SETUP_TOKEN_INPUT_ON_FOCUS             22
+#define SETUP_TOKEN_PREFER_AGA_GRAPHICS                23
+#define SETUP_TOKEN_GAME_FRAME_DELAY           24
+#define SETUP_TOKEN_GRAPHICS_SET               25
+#define SETUP_TOKEN_SOUNDS_SET                 26
+#define SETUP_TOKEN_MUSIC_SET                  27
+#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS    28
+#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS      29
+#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC       30
+
+#define NUM_GLOBAL_SETUP_TOKENS                        31
 
 /* editor setup */
 #define SETUP_TOKEN_EDITOR_EL_BOULDERDASH      0
@@ -7812,6 +7813,7 @@ static struct TokenInfo global_setup_tokens[] =
   { TYPE_SWITCH, &si.sound_simple,     "simple_sound_effects"          },
   { TYPE_SWITCH, &si.toons,            "toons"                         },
   { TYPE_SWITCH, &si.scroll_delay,     "scroll_delay"                  },
+  { TYPE_INTEGER,&si.scroll_delay_value,"scroll_delay_value"           },
   { TYPE_SWITCH, &si.soft_scrolling,   "soft_scrolling"                },
   { TYPE_SWITCH, &si.fade_screens,     "fade_screens"                  },
   { TYPE_SWITCH, &si.autorecord,       "automatic_tape_recording"      },
@@ -7966,6 +7968,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->double_buffering = TRUE;
   si->direct_draw = !si->double_buffering;
   si->scroll_delay = TRUE;
+  si->scroll_delay_value = 9;
   si->soft_scrolling = TRUE;
   si->fade_screens = TRUE;
   si->autorecord = TRUE;
index 2540719756174cfe22a6558eca9b6df9d0c55a3f..6826707146c02d55be3f7bfbd9aba33ea0fe7b7f 100644 (file)
@@ -3403,7 +3403,8 @@ void InitGame()
          content = element_info[element].change_page[i].target_element;
          is_player = ELEM_IS_PLAYER(content);
 
-         if (is_player && (found_rating < 3 || element < found_element))
+         if (is_player && (found_rating < 3 ||
+                           (found_rating == 3 && element < found_element)))
          {
            start_x = x;
            start_y = y;
@@ -3420,7 +3421,8 @@ void InitGame()
        content = element_info[element].content.e[xx][yy];
        is_player = ELEM_IS_PLAYER(content);
 
-       if (is_player && (found_rating < 2 || element < found_element))
+       if (is_player && (found_rating < 2 ||
+                         (found_rating == 2 && element < found_element)))
        {
          start_x = x + xx - 1;
          start_y = y + yy - 1;
@@ -3440,7 +3442,8 @@ void InitGame()
 
          is_player = ELEM_IS_PLAYER(content);
 
-         if (is_player && (found_rating < 1 || element < found_element))
+         if (is_player && (found_rating < 1 ||
+                           (found_rating == 1 && element < found_element)))
          {
            start_x = x + xx - 1;
            start_y = y + yy - 1;
@@ -4520,7 +4523,7 @@ void DrawRelocateScreen(int old_x, int old_y, int x, int y, int move_dir,
 
   if (quick_relocation)
   {
-    int offset = (setup.scroll_delay ? 3 : 0);
+    int offset = (setup.scroll_delay ? setup.scroll_delay_value : 0);
 
     if (!IN_VIS_FIELD(SCREENX(x), SCREENY(y)) || center_screen)
     {
@@ -12143,7 +12146,7 @@ boolean MovePlayer(struct PlayerInfo *player, int dx, int dy)
 #endif
   {
     int old_scroll_x = scroll_x, old_scroll_y = scroll_y;
-    int offset = (setup.scroll_delay ? 3 : 0);
+    int offset = (setup.scroll_delay ? setup.scroll_delay_value : 0);
 
     if (!IN_VIS_FIELD(SCREENX(jx), SCREENY(jy)))
     {
index b443991d9e726d4e34cc38cbea9bbad15fe1631a..a55909afc7540958beaf1909c03a9932f39bf513 100644 (file)
@@ -522,7 +522,7 @@ void DrawRelocatePlayer(struct PlayerInfo *player, boolean quick_relocation)
 
   if (quick_relocation)
   {
-    int offset = (setup.scroll_delay ? 3 : 0);
+    int offset = (setup.scroll_delay ? setup.scroll_delay_value : 0);
 
     if (!IN_VIS_FIELD(SCREENX(jx), SCREENY(jy)))
     {
@@ -726,7 +726,7 @@ void RedrawPlayfield_EM(boolean force_redraw)
   int player_nr = game_em.last_moving_player;
 #endif
   int stepsize = TILEX / 8;
-  int offset = (setup.scroll_delay ? 3 : 0) * TILEX;
+  int offset = (setup.scroll_delay ? setup.scroll_delay_value : 0) * TILEX;
   int offset_x = offset;
   int offset_y = offset;
   int screen_x_old = screen_x;
index 12fea19b2f905e96e2735a810fc03a0f4a28deeb..8de710719aabd8b454a36c222150ee8a1013e88e 100644 (file)
@@ -812,6 +812,7 @@ struct SetupInfo
   boolean double_buffering;
   boolean direct_draw;         /* !double_buffering (redundant!) */
   boolean scroll_delay;
+  boolean scroll_delay_value;
   boolean soft_scrolling;
   boolean fade_screens;
   boolean autorecord;