rnd-20020528-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 28 May 2002 00:26:26 +0000 (02:26 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:37:50 +0000 (10:37 +0200)
src/events.c
src/game.c
src/init.c
src/libgame/setup.c
src/libgame/setup.h
src/main.c
src/main.h
src/screens.c
src/timestamp.h

index 66e5ec642fd6fa4c88453257e7a22fd5fbe4f430..dd94b75fcbf2d85c2ef929387281245eb08c2d2e 100644 (file)
@@ -584,11 +584,15 @@ void HandleKey(Key key, int key_status)
         case KSYM_Page_Up:
           if (game_status == CHOOSELEVEL)
             HandleChooseLevel(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
+         else if (game_status == SETUP)
+           HandleSetupScreen(0,0, 0,-SCR_FIELDY, MB_MENU_MARK);
          break;
 
         case KSYM_Page_Down:
           if (game_status == CHOOSELEVEL)
             HandleChooseLevel(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
+         else if (game_status == SETUP)
+           HandleSetupScreen(0,0, 0,SCR_FIELDY, MB_MENU_MARK);
          break;
 
 #ifdef DEBUG
@@ -850,11 +854,11 @@ void HandleJoystick()
          !DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
        newbutton = dx = dy = 0;
 
-      if (game_status==MAINMENU)
+      if (game_status == MAINMENU)
        HandleMainMenu(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
-      else if (game_status==CHOOSELEVEL)
+      else if (game_status == CHOOSELEVEL)
         HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
-      else if (game_status==SETUP)
+      else if (game_status == SETUP)
        HandleSetupScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
       break;
     }
index cda2f48694df03de750c8c7ea841eb95045bcae1..020cdc8910375e5e1271d8f6c561cb41c685b48a 100644 (file)
@@ -102,7 +102,7 @@ static void KillHeroUnlessProtected(int, int);
 
 void PlaySoundLevel(int, int, int);
 void PlaySoundLevelAction(int, int, int);
-void PlaySoundLevelActionElement(int, int, int, int);
+void PlaySoundLevelElementAction(int, int, int, int);
 
 static void MapGameButtons();
 static void HandleGameButtons(struct GadgetInfo *);
@@ -2162,7 +2162,7 @@ void Impact(int x, int y)
 
   /* play sound of object that hits the ground */
   if (lastline || object_hit)
-    PlaySoundLevelActionElement(x, y, SND_ACTION_IMPACT, element);
+    PlaySoundLevelElementAction(x, y, element, SND_ACTION_IMPACT);
 }
 
 void TurnRound(int x, int y)
@@ -3444,9 +3444,9 @@ void AmoebeWaechst(int x, int y)
     if (DelayReached(&sound_delay, sound_delay_value))
     {
       if (Store[x][y] == EL_AMOEBE_BD)
-       PlaySoundLevel(x, y, SND_BD_AMOEBA_GROWING);
+       PlaySoundLevel(x, y, SND_BD_AMOEBA_CREATING);
       else
-       PlaySoundLevel(x, y, SND_AMOEBA_GROWING);
+       PlaySoundLevel(x, y, SND_AMOEBA_CREATING);
       sound_delay_value = 30;
     }
   }
@@ -3711,8 +3711,8 @@ void Life(int ax, int ay)
   }
 
   if (changed)
-    PlaySoundLevel(ax, ay, element == EL_LIFE ? SND_GAMEOFLIFE_GROWING :
-                  SND_BIOMAZE_GROWING);
+    PlaySoundLevel(ax, ay, element == EL_LIFE ? SND_GAMEOFLIFE_CREATING :
+                  SND_BIOMAZE_CREATING);
 }
 
 void RobotWheel(int x, int y)
@@ -5742,7 +5742,7 @@ int DigField(struct PlayerInfo *player,
     case EL_SP_BASE:
     case EL_SP_BUG:
       RemoveField(x, y);
-      PlaySoundLevelActionElement(x, y, SND_ACTION_DIGGING, element);
+      PlaySoundLevelElementAction(x, y, element, SND_ACTION_DIGGING);
       break;
 
     case EL_EDELSTEIN:
@@ -5764,7 +5764,7 @@ int DigField(struct PlayerInfo *player,
       DrawText(DX_EMERALDS, DY_EMERALDS,
               int2str(local_player->gems_still_needed, 3),
               FS_SMALL, FC_YELLOW);
-      PlaySoundLevelActionElement(x, y, SND_ACTION_COLLECTING, element);
+      PlaySoundLevelElementAction(x, y, element, SND_ACTION_COLLECTING);
       break;
 
     case EL_SPEED_PILL:
@@ -5809,7 +5809,7 @@ int DigField(struct PlayerInfo *player,
       DrawText(DX_DYNAMITE, DY_DYNAMITE,
               int2str(local_player->dynamite, 3),
               FS_SMALL, FC_YELLOW);
-      PlaySoundLevelActionElement(x, y, SND_ACTION_COLLECTING, element);
+      PlaySoundLevelElementAction(x, y, element, SND_ACTION_COLLECTING);
       break;
 
     case EL_DYNABOMB_NR:
@@ -6039,7 +6039,7 @@ int DigField(struct PlayerInfo *player,
       player->push_delay_value = (element == EL_SPRING ? 0 : 2 + RND(8));
 
       DrawLevelField(x+dx, y+dy);
-      PlaySoundLevelActionElement(x, y, SND_ACTION_PUSHING, element);
+      PlaySoundLevelElementAction(x, y, element, SND_ACTION_PUSHING);
       break;
 
     case EL_PFORTE1:
@@ -6099,7 +6099,7 @@ int DigField(struct PlayerInfo *player,
       player->programmed_action = move_direction;
       DOUBLE_PLAYER_SPEED(player);
 
-      PlaySoundLevelActionElement(x, y, SND_ACTION_PASSING, element);
+      PlaySoundLevelElementAction(x, y, element, SND_ACTION_PASSING);
       break;
 
     case EL_SP_PORT1_LEFT:
@@ -6293,7 +6293,7 @@ int DigField(struct PlayerInfo *player,
       {
        RemoveField(x, y);
        Feld[x+dx][y+dy] = element;
-       PlaySoundLevelActionElement(x, y, SND_ACTION_PUSHING, element);
+       PlaySoundLevelElementAction(x, y, element, SND_ACTION_PUSHING);
       }
 
       player->push_delay_value = (element == EL_BALLOON ? 0 : 2);
@@ -6460,10 +6460,10 @@ void PlaySoundLevel(int x, int y, int nr)
 
 void PlaySoundLevelAction(int x, int y, int sound_action)
 {
-  PlaySoundLevelActionElement(x, y, sound_action, Feld[x][y]);
+  PlaySoundLevelElementAction(x, y, Feld[x][y], sound_action);
 }
 
-void PlaySoundLevelActionElement(int x, int y, int sound_action, int element)
+void PlaySoundLevelElementAction(int x, int y, int element, int sound_action)
 {
   int sound_effect = element_action_sound[element][sound_action];
 
index b6fc272567efff3c9dc960d4c706278e73b6bcdd..763ed518dd35ff6d894eef70f03c31a40a5f23a4 100644 (file)
@@ -44,6 +44,7 @@ static void InitSetup(void);
 static void InitPlayerInfo(void);
 static void InitLevelInfo(void);
 static void InitArtworkInfo(void);
+static void InitLevelArtworkInfo(void);
 static void InitNetworkServer(void);
 static void InitMixer(void);
 static void InitSound(void);
@@ -97,6 +98,7 @@ void OpenAll(void)
   InitElementProperties();     /* initializes IS_CHAR() for el2gfx() */
 
   InitLevelInfo();
+  InitLevelArtworkInfo();
   InitGadgets();               /* needs to know number of level series */
   InitSound();                 /* needs to know current level directory */
 
@@ -140,6 +142,11 @@ void InitArtworkInfo()
   LoadArtworkInfo();
 }
 
+void InitLevelArtworkInfo()
+{
+  LoadLevelArtworkInfo();
+}
+
 void InitNetworkServer()
 {
 #if defined(PLATFORM_UNIX)
index cc66a554d37a928471da13ca22c29b8d9d47b372..57ba732a18e2dcdeecbd253e9b46540add7ed35c 100644 (file)
@@ -395,15 +395,19 @@ char *getCustomSoundFilename(char *basename)
   if (filename != NULL)
     free(filename);
 
+#if 0
   /* 1st try: look for special artwork in current level series directory */
   filename = getPath3(getCurrentLevelDir(), SOUNDS_DIRECTORY, basename);
   if (fileExists(filename))
     return filename;
+#endif
 
+#if 0
   /* 2nd try: look for special artwork in private artwork directory */
   filename = getPath2(getUserSoundsDir(), basename);
   if (fileExists(filename))
     return filename;
+#endif
 
   /* 3rd try: look for special artwork in configured artwork directory */
   filename = getPath2(getSetupArtworkDir(artwork.snd_current), basename);
@@ -691,7 +695,8 @@ void dumpTreeInfo(TreeInfo *node, int depth)
     for (i=0; i<(depth + 1) * 3; i++)
       printf(" ");
 
-    printf("filename == '%s' [%s]\n", node->filename, node->name);
+    printf("filename == '%s' (%s) [%s]\n",
+          node->filename, node->name, node->name_short);
 
     if (node->node_group != NULL)
       dumpTreeInfo(node->node_group, depth + 1);
@@ -1407,7 +1412,7 @@ static boolean LoadLevelInfoFromLevelConf(TreeInfo **node_first,
 
   if (setup_file_list == NULL)
   {
-    Error(ERR_WARN, "ignoring level directory '%s'", level_directory);
+    Error(ERR_WARN, "ignoring level directory '%s'", directory_path);
 
     free(directory_path);
     free(filename);
@@ -1431,6 +1436,12 @@ static boolean LoadLevelInfoFromLevelConf(TreeInfo **node_first,
                 getTokenValue(setup_file_list, levelinfo_tokens[i].text));
   *leveldir_new = ldi;
 
+  if (strcmp(leveldir_new->name, ANONYMOUS_NAME) == 0)
+  {
+    free(leveldir_new->name);
+    leveldir_new->name = getStringCopy(leveldir_new->filename);
+  }
+
   DrawInitText(leveldir_new->name, 150, FC_YELLOW);
 
   if (leveldir_new->name_short == NULL)
@@ -1527,6 +1538,11 @@ static void LoadLevelInfoFromLevelDir(TreeInfo **node_first,
 
     free(directory_path);
 
+    if (strcmp(directory_name, GRAPHICS_DIRECTORY) == 0 ||
+       strcmp(directory_name, SOUNDS_DIRECTORY) == 0 ||
+       strcmp(directory_name, MUSIC_DIRECTORY) == 0)
+      continue;
+
     valid_entry_found |= LoadLevelInfoFromLevelConf(node_first, node_parent,
                                                    level_directory,
                                                    directory_name);
@@ -1585,7 +1601,7 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first,
   int i;
 
   if (access(filename, F_OK) == 0)             /* file exists */
-    loadSetupFileList(filename);
+    setup_file_list = loadSetupFileList(filename);
 
   if (setup_file_list == NULL) /* no config file -- look for artwork files */
   {
@@ -1613,8 +1629,8 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first,
 
     if (!valid_file_found)
     {
-      if (options.debug)
-       Error(ERR_WARN, "ignoring artwork directory '%s'", base_directory);
+      if (strcmp(directory_name, ".") != 0)
+       Error(ERR_WARN, "ignoring artwork directory '%s'", directory_path);
 
       free(directory_path);
       free(filename);
@@ -1645,6 +1661,12 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first,
                   getTokenValue(setup_file_list, levelinfo_tokens[i].text));
     *artwork_new = ldi;
 
+    if (strcmp(artwork_new->name, ANONYMOUS_NAME) == 0)
+    {
+      free(artwork_new->name);
+      artwork_new->name = getStringCopy(artwork_new->filename);
+    }
+
     DrawInitText(artwork_new->name, 150, FC_YELLOW);
 
     if (artwork_new->name_short == NULL)
@@ -1683,9 +1705,18 @@ static boolean LoadArtworkInfoFromArtworkConf(TreeInfo **node_first,
     if (strcmp(artwork_new->filename, ".") == 0)
     {
       if (artwork_new->user_defined)
+      {
        artwork_new->name = getStringCopy("private");
+       artwork_new->sort_priority = LEVELCLASS_USER;
+      }
       else
-       artwork_new->name = getStringCopy("default");
+      {
+       artwork_new->name = getStringCopy("classic");
+       artwork_new->sort_priority = LEVELCLASS_CLASSICS;
+      }
+
+      artwork_new->color = LEVELCOLOR(artwork_new);
+      artwork_new->class_desc = getLevelClassDescription(artwork_new);
     }
     else
       artwork_new->name = getStringCopy(artwork_new->filename);
@@ -1827,6 +1858,69 @@ void LoadArtworkInfo()
 #endif
 }
 
+void LoadArtworkInfoFromLevelInfo(TreeInfo *node)
+{
+  while (node)
+  {
+    char *path = getPath3((node->user_defined ?
+                          getUserLevelDir(NULL) : options.level_directory),
+                         node->fullpath, SOUNDS_DIRECTORY);
+
+#if 0
+    if (!node->parent_link)
+      printf("CHECKING '%s' ['%s', '%s'] ...\n", path,
+            node->filename, node->name);
+#endif
+
+    if (!node->parent_link)
+    {
+      TreeInfo *topnode_last = artwork.snd_first;
+
+      LoadArtworkInfoFromArtworkDir(&artwork.snd_first, NULL,
+                                   path,
+                                   TREE_TYPE_SOUNDS_DIR);
+
+      if (topnode_last != artwork.snd_first)
+      {
+#if 0
+       printf("NEW NODE: '%s'\n", artwork.snd_first->name);
+#endif
+
+       free(artwork.snd_first->name);
+       free(artwork.snd_first->name_sorting);
+       free(artwork.snd_first->name_short);
+
+       artwork.snd_first->name         = getStringCopy(node->name);
+       artwork.snd_first->name_sorting = getStringCopy(node->name);
+       artwork.snd_first->name_short   = getStringCopy(node->filename);
+
+       artwork.snd_first->sort_priority = node->sort_priority;
+       artwork.snd_first->color = LEVELCOLOR(artwork.snd_first);
+      }
+    }
+
+    free(path);
+
+    if (node->node_group != NULL)
+      LoadArtworkInfoFromLevelInfo(node->node_group);
+
+    node = node->next;
+  }
+}
+
+void LoadLevelArtworkInfo()
+{
+  DrawInitText("Looking for custom level artwork:", 120, FC_GREEN);
+
+  LoadArtworkInfoFromLevelInfo(leveldir_first);
+
+  sortTreeInfo(&artwork.snd_first, compareTreeInfoEntries);
+
+#if 1
+  dumpTreeInfo(artwork.snd_first, 0);
+#endif
+}
+
 static void SaveUserLevelInfo()
 {
   char *filename;
index 2252aa6bdc6dc955cb368a2962f5b5c02f20d4fe..24cb6580ef8f3b404a8316ad56ad3b96df4f76bc 100644 (file)
@@ -188,6 +188,8 @@ char *getSetupLine(struct TokenInfo *, char *, int);
 
 void LoadLevelInfo(void);
 void LoadArtworkInfo(void);
+void LoadLevelArtworkInfo(void);
+
 void LoadLevelSetup_LastSeries(void);
 void SaveLevelSetup_LastSeries(void);
 void LoadLevelSetup_SeriesInfo(void);
index 54d1d6b7da565c5a467703cd6d8aaa7a068f9904..2ab68cdf7d506798a6be9ac49c1dfe467406571f 100644 (file)
@@ -150,7 +150,6 @@ struct SoundEffectInfo sound_effects[] =
   { "bd_magic_wall.running",           "miep.wav"              },
   { "bd_amoeba.waiting",               SND_FILE_UNDEFINED      },
   { "bd_amoeba.creating",              "amoebe.wav"            },
-  { "bd_amoeba.growing",               SND_FILE_UNDEFINED      },
   { "bd_amoeba.turning_to_gem",                "pling.wav"             },
   { "bd_amoeba.turning_to_rock",       "klopf.wav"             },
   { "bd_butterfly.moving",             "klapper.wav"           },
@@ -221,7 +220,6 @@ struct SoundEffectInfo sound_effects[] =
   { "magic_wall.running",              "miep.wav"              },
   { "amoeba.waiting",                  SND_FILE_UNDEFINED      },
   { "amoeba.creating",                 "amoebe.wav"            },
-  { "amoeba.growing",                  SND_FILE_UNDEFINED      },
   { "amoeba.dropping",                 SND_FILE_UNDEFINED      },
   { "acid.splashing",                  "blurb.wav"             },
   { "quicksand.filling",               SND_FILE_UNDEFINED      },
@@ -296,10 +294,8 @@ struct SoundEffectInfo sound_effects[] =
   { "time_orb_empty.impact",           "deng.wav"              },
   { "gameoflife.waiting",              SND_FILE_UNDEFINED      },
   { "gameoflife.creating",             "amoebe.wav"            },
-  { "gameoflife.growing",              SND_FILE_UNDEFINED      },
   { "biomaze.waiting",                 SND_FILE_UNDEFINED      },
   { "biomaze.creating",                        "amoebe.wav"            },
-  { "biomaze.growing",                 SND_FILE_UNDEFINED      },
   { "pacman.moving",                   SND_FILE_UNDEFINED      },
   { "pacman.waiting",                  SND_FILE_UNDEFINED      },
   { "pacman.eating_amoeba",            SND_FILE_UNDEFINED      },
index e51f115752395cde726553c1de75a0e2a9c737ae..a4d392c6e85f942f8d4271e744d744c079a6c8a0 100644 (file)
@@ -1450,170 +1450,166 @@ extern struct SoundEffectInfo sound_effects[];
 #define SND_BD_MAGIC_WALL_RUNNING              8
 #define SND_BD_AMOEBA_WAITING                  9
 #define SND_BD_AMOEBA_CREATING                 10
-#define SND_BD_AMOEBA_GROWING                  11
-#define SND_BD_AMOEBA_TURNING_TO_GEM           12
-#define SND_BD_AMOEBA_TURNING_TO_ROCK          13
-#define SND_BD_BUTTERFLY_MOVING                        14
-#define SND_BD_BUTTERFLY_WAITING               15
-#define SND_BD_FIREFLY_MOVING                  16
-#define SND_BD_FIREFLY_WAITING                 17
-#define SND_BD_EXIT_ENTERING                   18
-#define SND_SP_EMPTY_SPACE_DIGGING             19
-#define SND_SP_BASE_DIGGING                    20
-#define SND_SP_BUGGY_BASE_DIGGING              21
-#define SND_SP_BUGGY_BASE_ACTIVATING           22
-#define SND_SP_INFOTRON_COLLECTING             23
-#define SND_SP_INFOTRON_IMPACT                 24
-#define SND_SP_ZONK_PUSHING                    25
-#define SND_SP_ZONK_IMPACT                     26
-#define SND_SP_DISK_RED_COLLECTING             27
-#define SND_SP_DISK_ORANGE_PUSHING             28
-#define SND_SP_DISK_YELLOW_PUSHING             29
-#define SND_SP_PORT_PASSING                    30
-#define SND_SP_EXIT_ENTERING                   31
-#define SND_SP_ELEMENT_EXPLODING               32
-#define SND_SP_SNIKSNAK_MOVING                 33
-#define SND_SP_SNIKSNAK_WAITING                        34
-#define SND_SP_ELECTRON_MOVING                 35
-#define SND_SP_ELECTRON_WAITING                        36
-#define SND_SP_TERMINAL_ACTIVATING             37
-#define SND_SOKOBAN_OBJECT_PUSHING             38
-#define SND_SOKOBAN_FIELD_FILLING              39
-#define SND_SOKOBAN_FIELD_CLEARING             40
-#define SND_SOKOBAN_GAME_SOLVING               41
-#define SND_EMPTY_SPACE_DIGGING                        42
-#define SND_SAND_DIGGING                       43
-#define SND_EMERALD_COLLECTING                 44
-#define SND_EMERALD_IMPACT                     45
-#define SND_DIAMOND_COLLECTING                 46
-#define SND_DIAMOND_IMPACT                     47
-#define SND_DIAMOND_BREAKING                   48
-#define SND_ROCK_PUSHING                       49
-#define SND_ROCK_IMPACT                                50
-#define SND_BOMB_PUSHING                       51
-#define SND_NUT_PUSHING                                52
-#define SND_NUT_CRACKING                       53
-#define SND_NUT_IMPACT                         54
-#define SND_DYNAMITE_COLLECTING                        55
-#define SND_DYNAMITE_PLACING                   56
-#define SND_DYNAMITE_BURNING                   57
-#define SND_KEY_COLLECTING                     58
-#define SND_GATE_PASSING                       59
-#define SND_BUG_MOVING                         60
-#define SND_BUG_WAITING                                61
-#define SND_SPACESHIP_MOVING                   62
-#define SND_SPACESHIP_WAITING                  63
-#define SND_YAMYAM_MOVING                      64
-#define SND_YAMYAM_WAITING                     65
-#define SND_YAMYAM_EATING_DIAMOND              66
-#define SND_ROBOT_STEPPING                     67
-#define SND_ROBOT_WAITING                      68
-#define SND_ROBOT_WHEEL_ACTIVATING             69
-#define SND_ROBOT_WHEEL_RUNNING                        70
-#define SND_MAGIC_WALL_ACTIVATING              71
-#define SND_MAGIC_WALL_CHANGING                        72
-#define SND_MAGIC_WALL_RUNNING                 73
-#define SND_AMOEBA_WAITING                     74
-#define SND_AMOEBA_CREATING                    75
-#define SND_AMOEBA_GROWING                     76
-#define SND_AMOEBA_DROPPING                    77
-#define SND_ACID_SPLASHING                     78
-#define SND_QUICKSAND_FILLING                  79
-#define SND_QUICKSAND_SLIPPING_THROUGH         80
-#define SND_QUICKSAND_EMPTYING                 81
-#define SND_EXIT_OPENING                       82
-#define SND_EXIT_ENTERING                      83
-#define SND_BALLOON_MOVING                     84
-#define SND_BALLOON_WAITING                    85
-#define SND_BALLOON_PUSHING                    86
-#define SND_BALLOON_SWITCH_ACTIVATING          87
-#define SND_SPRING_MOVING                      88
-#define SND_SPRING_PUSHING                     89
-#define SND_SPRING_IMPACT                      90
-#define SND_WALL_GROWING                       91
-#define SND_PEARL_COLLECTING                   92
-#define SND_PEARL_BREAKING                     93
-#define SND_PEARL_IMPACT                       94
-#define SND_CRYSTAL_COLLECTING                 95
-#define SND_CRYSTAL_IMPACT                     96
-#define SND_ENVELOPE_COLLECTING                        97
-#define SND_SAND_INVISIBLE_DIGGING             98
-#define SND_SHIELD_PASSIVE_COLLECTING          99
-#define SND_SHIELD_PASSIVE_ACTIVATED           100
-#define SND_SHIELD_ACTIVE_COLLECTING           101
-#define SND_SHIELD_ACTIVE_ACTIVATED            102
-#define SND_EXTRA_TIME_COLLECTING              103
-#define SND_MOLE_MOVING                                104
-#define SND_MOLE_WAITING                       105
-#define SND_MOLE_EATING_AMOEBA                 106
-#define SND_SWITCHGATE_SWITCH_ACTIVATING       107
-#define SND_SWITCHGATE_OPENING                 108
-#define SND_SWITCHGATE_CLOSING                 109
-#define SND_SWITCHGATE_PASSING                 110
-#define SND_TIMEGATE_WHEEL_ACTIVATING          111
-#define SND_TIMEGATE_WHEEL_RUNNING             112
-#define SND_TIMEGATE_OPENING                   113
-#define SND_TIMEGATE_CLOSING                   114
-#define SND_TIMEGATE_PASSING                   115
-#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING    116
-#define SND_CONVEYOR_BELT_RUNNING              117
-#define SND_LIGHT_SWITCH_ACTIVATING            118
-#define SND_LIGHT_SWITCH_DEACTIVATING          119
-#define SND_DX_BOMB_PUSHING                    120
-#define SND_TRAP_INACTIVE_DIGGING              121
-#define SND_TRAP_ACTIVATING                    122
-#define SND_TUBE_PASSING                       123
-#define SND_AMOEBA_TURNING_TO_GEM              124
-#define SND_AMOEBA_TURNING_TO_ROCK             125
-#define SND_SPEED_PILL_COLLECTING              126
-#define SND_DYNABOMB_NR_COLLECTING             127
-#define SND_DYNABOMB_SZ_COLLECTING             128
-#define SND_DYNABOMB_XL_COLLECTING             129
-#define SND_DYNABOMB_PLACING                   130
-#define SND_DYNABOMB_BURNING                   131
-#define SND_SATELLITE_MOVING                   132
-#define SND_SATELLITE_WAITING                  133
-#define SND_SATELLITE_PUSHING                  134
-#define SND_LAMP_ACTIVATING                    135
-#define SND_LAMP_DEACTIVATING                  136
-#define SND_TIME_ORB_FULL_COLLECTING           137
-#define SND_TIME_ORB_FULL_IMPACT               138
-#define SND_TIME_ORB_EMPTY_PUSHING             139
-#define SND_TIME_ORB_EMPTY_IMPACT              140
-#define SND_GAMEOFLIFE_WAITING                 141
-#define SND_GAMEOFLIFE_CREATING                        142
-#define SND_GAMEOFLIFE_GROWING                 143
-#define SND_BIOMAZE_WAITING                    144
-#define SND_BIOMAZE_CREATING                   145
-#define SND_BIOMAZE_GROWING                    146
-#define SND_PACMAN_MOVING                      147
-#define SND_PACMAN_WAITING                     148
-#define SND_PACMAN_EATING_AMOEBA               149
-#define SND_DARK_YAMYAM_MOVING                 150
-#define SND_DARK_YAMYAM_WAITING                        151
-#define SND_DARK_YAMYAM_EATING_ANY             152
-#define SND_PENGUIN_MOVING                     153
-#define SND_PENGUIN_WAITING                    154
-#define SND_PENGUIN_ENTERING_EXIT              155
-#define SND_PIG_MOVING                         156
-#define SND_PIG_WAITING                                157
-#define SND_PIG_EATING_GEM                     158
-#define SND_DRAGON_MOVING                      159
-#define SND_DRAGON_WAITING                     160
-#define SND_DRAGON_ATTACKING                   161
-#define SND_PLAYER_DYING                       162
-#define SND_ELEMENT_EXPLODING                  163
-#define SND_GAME_STARTING                      164
-#define SND_GAME_RUNNING_OUT_OF_TIME           165
-#define SND_GAME_LEVELTIME_BONUS               166
-#define SND_GAME_LOSING                                167
-#define SND_GAME_WINNING                       168
-#define SND_MENU_DOOR_OPENING                  169
-#define SND_MENU_DOOR_CLOSING                  170
-#define SND_MENU_HALL_OF_FAME                  171
-#define SND_MENU_INFO_SCREEN                   172
-
-#define NUM_SOUND_EFFECTS                      173
+#define SND_BD_AMOEBA_TURNING_TO_GEM           11
+#define SND_BD_AMOEBA_TURNING_TO_ROCK          12
+#define SND_BD_BUTTERFLY_MOVING                        13
+#define SND_BD_BUTTERFLY_WAITING               14
+#define SND_BD_FIREFLY_MOVING                  15
+#define SND_BD_FIREFLY_WAITING                 16
+#define SND_BD_EXIT_ENTERING                   17
+#define SND_SP_EMPTY_SPACE_DIGGING             18
+#define SND_SP_BASE_DIGGING                    19
+#define SND_SP_BUGGY_BASE_DIGGING              20
+#define SND_SP_BUGGY_BASE_ACTIVATING           21
+#define SND_SP_INFOTRON_COLLECTING             22
+#define SND_SP_INFOTRON_IMPACT                 23
+#define SND_SP_ZONK_PUSHING                    24
+#define SND_SP_ZONK_IMPACT                     25
+#define SND_SP_DISK_RED_COLLECTING             26
+#define SND_SP_DISK_ORANGE_PUSHING             27
+#define SND_SP_DISK_YELLOW_PUSHING             28
+#define SND_SP_PORT_PASSING                    29
+#define SND_SP_EXIT_ENTERING                   30
+#define SND_SP_ELEMENT_EXPLODING               31
+#define SND_SP_SNIKSNAK_MOVING                 32
+#define SND_SP_SNIKSNAK_WAITING                        33
+#define SND_SP_ELECTRON_MOVING                 34
+#define SND_SP_ELECTRON_WAITING                        35
+#define SND_SP_TERMINAL_ACTIVATING             36
+#define SND_SOKOBAN_OBJECT_PUSHING             37
+#define SND_SOKOBAN_FIELD_FILLING              38
+#define SND_SOKOBAN_FIELD_CLEARING             39
+#define SND_SOKOBAN_GAME_SOLVING               40
+#define SND_EMPTY_SPACE_DIGGING                        41
+#define SND_SAND_DIGGING                       42
+#define SND_EMERALD_COLLECTING                 43
+#define SND_EMERALD_IMPACT                     44
+#define SND_DIAMOND_COLLECTING                 45
+#define SND_DIAMOND_IMPACT                     46
+#define SND_DIAMOND_BREAKING                   47
+#define SND_ROCK_PUSHING                       48
+#define SND_ROCK_IMPACT                                49
+#define SND_BOMB_PUSHING                       50
+#define SND_NUT_PUSHING                                51
+#define SND_NUT_CRACKING                       52
+#define SND_NUT_IMPACT                         53
+#define SND_DYNAMITE_COLLECTING                        54
+#define SND_DYNAMITE_PLACING                   55
+#define SND_DYNAMITE_BURNING                   56
+#define SND_KEY_COLLECTING                     57
+#define SND_GATE_PASSING                       58
+#define SND_BUG_MOVING                         59
+#define SND_BUG_WAITING                                60
+#define SND_SPACESHIP_MOVING                   61
+#define SND_SPACESHIP_WAITING                  62
+#define SND_YAMYAM_MOVING                      63
+#define SND_YAMYAM_WAITING                     64
+#define SND_YAMYAM_EATING_DIAMOND              65
+#define SND_ROBOT_STEPPING                     66
+#define SND_ROBOT_WAITING                      67
+#define SND_ROBOT_WHEEL_ACTIVATING             68
+#define SND_ROBOT_WHEEL_RUNNING                        69
+#define SND_MAGIC_WALL_ACTIVATING              70
+#define SND_MAGIC_WALL_CHANGING                        71
+#define SND_MAGIC_WALL_RUNNING                 72
+#define SND_AMOEBA_WAITING                     73
+#define SND_AMOEBA_CREATING                    74
+#define SND_AMOEBA_DROPPING                    75
+#define SND_ACID_SPLASHING                     76
+#define SND_QUICKSAND_FILLING                  77
+#define SND_QUICKSAND_SLIPPING_THROUGH         78
+#define SND_QUICKSAND_EMPTYING                 79
+#define SND_EXIT_OPENING                       80
+#define SND_EXIT_ENTERING                      81
+#define SND_BALLOON_MOVING                     82
+#define SND_BALLOON_WAITING                    83
+#define SND_BALLOON_PUSHING                    84
+#define SND_BALLOON_SWITCH_ACTIVATING          85
+#define SND_SPRING_MOVING                      86
+#define SND_SPRING_PUSHING                     87
+#define SND_SPRING_IMPACT                      88
+#define SND_WALL_GROWING                       89
+#define SND_PEARL_COLLECTING                   90
+#define SND_PEARL_BREAKING                     91
+#define SND_PEARL_IMPACT                       92
+#define SND_CRYSTAL_COLLECTING                 93
+#define SND_CRYSTAL_IMPACT                     94
+#define SND_ENVELOPE_COLLECTING                        95
+#define SND_SAND_INVISIBLE_DIGGING             96
+#define SND_SHIELD_PASSIVE_COLLECTING          97
+#define SND_SHIELD_PASSIVE_ACTIVATED           98
+#define SND_SHIELD_ACTIVE_COLLECTING           99
+#define SND_SHIELD_ACTIVE_ACTIVATED            100
+#define SND_EXTRA_TIME_COLLECTING              101
+#define SND_MOLE_MOVING                                102
+#define SND_MOLE_WAITING                       103
+#define SND_MOLE_EATING_AMOEBA                 104
+#define SND_SWITCHGATE_SWITCH_ACTIVATING       105
+#define SND_SWITCHGATE_OPENING                 106
+#define SND_SWITCHGATE_CLOSING                 107
+#define SND_SWITCHGATE_PASSING                 108
+#define SND_TIMEGATE_WHEEL_ACTIVATING          109
+#define SND_TIMEGATE_WHEEL_RUNNING             110
+#define SND_TIMEGATE_OPENING                   111
+#define SND_TIMEGATE_CLOSING                   112
+#define SND_TIMEGATE_PASSING                   113
+#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING    114
+#define SND_CONVEYOR_BELT_RUNNING              115
+#define SND_LIGHT_SWITCH_ACTIVATING            116
+#define SND_LIGHT_SWITCH_DEACTIVATING          117
+#define SND_DX_BOMB_PUSHING                    118
+#define SND_TRAP_INACTIVE_DIGGING              119
+#define SND_TRAP_ACTIVATING                    120
+#define SND_TUBE_PASSING                       121
+#define SND_AMOEBA_TURNING_TO_GEM              122
+#define SND_AMOEBA_TURNING_TO_ROCK             123
+#define SND_SPEED_PILL_COLLECTING              124
+#define SND_DYNABOMB_NR_COLLECTING             125
+#define SND_DYNABOMB_SZ_COLLECTING             126
+#define SND_DYNABOMB_XL_COLLECTING             127
+#define SND_DYNABOMB_PLACING                   128
+#define SND_DYNABOMB_BURNING                   129
+#define SND_SATELLITE_MOVING                   130
+#define SND_SATELLITE_WAITING                  131
+#define SND_SATELLITE_PUSHING                  132
+#define SND_LAMP_ACTIVATING                    133
+#define SND_LAMP_DEACTIVATING                  134
+#define SND_TIME_ORB_FULL_COLLECTING           135
+#define SND_TIME_ORB_FULL_IMPACT               136
+#define SND_TIME_ORB_EMPTY_PUSHING             137
+#define SND_TIME_ORB_EMPTY_IMPACT              138
+#define SND_GAMEOFLIFE_WAITING                 139
+#define SND_GAMEOFLIFE_CREATING                        140
+#define SND_BIOMAZE_WAITING                    141
+#define SND_BIOMAZE_CREATING                   142
+#define SND_PACMAN_MOVING                      143
+#define SND_PACMAN_WAITING                     144
+#define SND_PACMAN_EATING_AMOEBA               145
+#define SND_DARK_YAMYAM_MOVING                 146
+#define SND_DARK_YAMYAM_WAITING                        147
+#define SND_DARK_YAMYAM_EATING_ANY             148
+#define SND_PENGUIN_MOVING                     149
+#define SND_PENGUIN_WAITING                    150
+#define SND_PENGUIN_ENTERING_EXIT              151
+#define SND_PIG_MOVING                         152
+#define SND_PIG_WAITING                                153
+#define SND_PIG_EATING_GEM                     154
+#define SND_DRAGON_MOVING                      155
+#define SND_DRAGON_WAITING                     156
+#define SND_DRAGON_ATTACKING                   157
+#define SND_PLAYER_DYING                       158
+#define SND_ELEMENT_EXPLODING                  159
+#define SND_GAME_STARTING                      160
+#define SND_GAME_RUNNING_OUT_OF_TIME           161
+#define SND_GAME_LEVELTIME_BONUS               162
+#define SND_GAME_LOSING                                163
+#define SND_GAME_WINNING                       164
+#define SND_MENU_DOOR_OPENING                  165
+#define SND_MENU_DOOR_CLOSING                  166
+#define SND_MENU_HALL_OF_FAME                  167
+#define SND_MENU_INFO_SCREEN                   168
+
+#define NUM_SOUND_EFFECTS                      169
 
 
 /* values for game_status */
index e097c57d41072fdceb4d6c0cb686e0c963386439..1e3f941f834fda863a21888781ed5f8e96e8a9d0 100644 (file)
@@ -2430,13 +2430,13 @@ static struct
     SC_SCROLLBUTTON_XPOS + 0 * SC_SCROLLBUTTON_XSIZE,   SC_SCROLLBUTTON_YPOS,
     SC_SCROLL_UP_XPOS,                                 SC_SCROLL_UP_YPOS,
     SCREEN_CTRL_ID_SCROLL_UP,
-    "scroll level series up"
+    "scroll up"
   },
   {
     SC_SCROLLBUTTON_XPOS + 1 * SC_SCROLLBUTTON_XSIZE,   SC_SCROLLBUTTON_YPOS,
     SC_SCROLL_DOWN_XPOS,                               SC_SCROLL_DOWN_YPOS,
     SCREEN_CTRL_ID_SCROLL_DOWN,
-    "scroll level series down"
+    "scroll down"
   }
 };
 
@@ -2601,21 +2601,30 @@ static void HandleScreenGadgets(struct GadgetInfo *gi)
 {
   int id = gi->custom_id;
 
-  if (game_status != CHOOSELEVEL)
+  if (game_status != CHOOSELEVEL && game_status != SETUP)
     return;
 
   switch (id)
   {
     case SCREEN_CTRL_ID_SCROLL_UP:
-      HandleChooseLevel(SX,SY + 32, 0,0, MB_MENU_MARK);
+      if (game_status == CHOOSELEVEL)
+       HandleChooseLevel(SX,SY + 32, 0,0, MB_MENU_MARK);
+      else if (game_status == SETUP)
+       HandleSetupScreen(SX,SY + 32, 0,0, MB_MENU_MARK);
       break;
 
     case SCREEN_CTRL_ID_SCROLL_DOWN:
-      HandleChooseLevel(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
+      if (game_status == CHOOSELEVEL)
+       HandleChooseLevel(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
+      else if (game_status == SETUP)
+       HandleSetupScreen(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
       break;
 
     case SCREEN_CTRL_ID_SCROLL_VERTICAL:
-      HandleChooseLevel(0,0, 999,gi->event.item_position, MB_MENU_INITIALIZE);
+      if (game_status == CHOOSELEVEL)
+       HandleChooseLevel(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
+      else if (game_status == SETUP)
+       HandleSetupScreen(0,0, 999,gi->event.item_position,MB_MENU_INITIALIZE);
       break;
 
     default:
index cd21b26b529c75b4d477a5fcd8f61f4bb1aa2df3..3dd66bf70c29fe25864a86a9c419877a0a62b2f4 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-05-27 02:05]"
+#define COMPILE_DATE_STRING "[2002-05-27 23:07]"