}
}
+#if 1
+ /* set hardcoded definitions for some runtime elements without graphic */
+ element_info[EL_AMOEBA_TO_DIAMOND].graphic[ACTION_DEFAULT] = IMG_AMOEBA_DEAD;
+#endif
+
#if 1
/* now set all undefined/invalid graphics to -1 to set to default after it */
for (i = 0; i < MAX_NUM_ELEMENTS; i++)
default_action_crumbled = element_info[EL_SB_DEFAULT].crumbled[act];
#if 1
+ /* !!! needed because EL_EMPTY_SPACE treated as IS_SP_ELEMENT !!! */
/* !!! make this better !!! */
if (i == EL_EMPTY_SPACE)
{
static void InitGlobal()
{
+ int i;
+
+ for (i = 0; i < MAX_NUM_ELEMENTS + 1; i++)
+ {
+ element_info[i].token_name = element_name_info[i].token_name;
+ element_info[i].class_name = element_name_info[i].class_name;
+ element_info[i].editor_description=element_name_info[i].editor_description;
+ }
+
global.autoplay_leveldir = NULL;
+ global.convert_leveldir = NULL;
global.frames_per_second = 0;
global.fps_slowdown = FALSE;
global.autoplay_level_nr = atoi(str_ptr); /* get level_nr value */
}
}
+ else if (strncmp(command, "convert ", 8) == 0)
+ {
+ char *str_copy = getStringCopy(&command[8]);
+ char *str_ptr = strchr(str_copy, ' ');
+
+ global.convert_leveldir = str_copy;
+ global.convert_level_nr = -1;
+
+ if (str_ptr != NULL)
+ {
+ *str_ptr++ = '\0'; /* terminate leveldir string */
+ global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
+ }
+ }
else
{
Error(ERR_EXIT_HELP, "unrecognized command '%s'", command);
AutoPlayTape();
return;
}
+ else if (global.convert_leveldir)
+ {
+ ConvertLevels();
+ return;
+ }
game_status = GAME_MODE_MAIN;
+#if 1
+ em_open_all();
+#endif
+
DrawMainMenu();
InitNetworkServer();
FreeAllMusic();
CloseAudio(); /* called after freeing sounds (needed for SDL) */
+#if 1
+ em_close_all();
+#endif
+
FreeAllImages();
FreeTileClipmasks();