X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=c3c14af2e682f984e3034b7a011c12c363f24e59;hb=e3a53d28634c52a0b1de6d0609de911e5d01c344;hp=ea5ec18de985d667f2fccda3b504cdbc3f7c1fc5;hpb=ade0034b74cb1213bfe0a73213f459081e10b85a;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index ea5ec18d..c3c14af2 100644 --- a/src/init.c +++ b/src/init.c @@ -329,6 +329,14 @@ void SetBitmaps_EM(Bitmap **em_bitmap) } #endif +#if 1 +/* !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! */ +void SetBitmaps_SP(Bitmap **sp_bitmap) +{ + *sp_bitmap = graphic_info[IMG_SP_OBJECTS].bitmap; +} +#endif + static int getFontBitmapID(int font_nr) { int special = -1; @@ -5124,7 +5132,7 @@ void Execute_Command(char *command) exit(0); } - else if (strncmp(command, "dump level ", 11) == 0) + else if (strPrefix(command, "dump level ")) { char *filename = &command[11]; @@ -5136,7 +5144,7 @@ void Execute_Command(char *command) exit(0); } - else if (strncmp(command, "dump tape ", 10) == 0) + else if (strPrefix(command, "dump tape ")) { char *filename = &command[10]; @@ -5148,7 +5156,7 @@ void Execute_Command(char *command) exit(0); } - else if (strncmp(command, "autoplay ", 9) == 0) + else if (strPrefix(command, "autoplay ")) { char *str_ptr = getStringCopy(&command[9]); /* read command parameters */ @@ -5184,13 +5192,15 @@ void Execute_Command(char *command) str_ptr++; } } - else if (strncmp(command, "convert ", 8) == 0) + else if (strPrefix(command, "convert ") || + strPrefix(command, "convert_special_1 ")) { char *str_copy = getStringCopy(&command[8]); char *str_ptr = strchr(str_copy, ' '); global.convert_leveldir = str_copy; global.convert_level_nr = -1; + global.convert_mode_special_1 = strPrefix(command, "convert_special_1 "); if (str_ptr != NULL) /* level number follows */ { @@ -5198,7 +5208,7 @@ void Execute_Command(char *command) global.convert_level_nr = atoi(str_ptr); /* get level_nr value */ } } - else if (strncmp(command, "create images ", 14) == 0) + else if (strPrefix(command, "create images ")) { #if defined(TARGET_SDL) global.create_images_dir = getStringCopy(&command[14]); @@ -6223,6 +6233,10 @@ void OpenAll() em_open_all(); #endif +#if 1 + sp_open_all(); +#endif + if (global.autoplay_leveldir) { AutoPlayTape(); @@ -6270,6 +6284,10 @@ void CloseAllAndExit(int exit_value) em_close_all(); #endif +#if 1 + sp_close_all(); +#endif + FreeAllImages(); #if defined(TARGET_SDL)