{
-1, -1,
TYPE_ELEMENT, CONF_VALUE_16_BIT(5),
- &xx_change.trigger_element, EL_EMPTY_SPACE
+ &xx_change.initial_trigger_element, EL_EMPTY_SPACE
},
{
ei->change->delay_random = getFile16BitBE(file);
ei->change->delay_frames = getFile16BitBE(file);
- ei->change->trigger_element = getMappedElement(getFile16BitBE(file));
+ ei->change->initial_trigger_element= getMappedElement(getFile16BitBE(file));
ei->change->explode = getFile8Bit(file);
ei->change->use_target_content = getFile8Bit(file);
change->delay_random = getFile16BitBE(file);
change->delay_frames = getFile16BitBE(file);
- change->trigger_element = getMappedElement(getFile16BitBE(file));
+ change->initial_trigger_element = getMappedElement(getFile16BitBE(file));
change->explode = getFile8Bit(file);
change->use_target_content = getFile8Bit(file);
putFile16BitBE(file, ei->change->delay_random);
putFile16BitBE(file, ei->change->delay_frames);
- putFile16BitBE(file, ei->change->trigger_element);
+ putFile16BitBE(file, ei->change->initial_trigger_element);
putFile8Bit(file, ei->change->explode);
putFile8Bit(file, ei->change->use_target_content);
putFile16BitBE(file, change->delay_random);
putFile16BitBE(file, change->delay_frames);
- putFile16BitBE(file, change->trigger_element);
+ putFile16BitBE(file, change->initial_trigger_element);
putFile8Bit(file, change->explode);
putFile8Bit(file, change->use_target_content);
#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS 28
#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS 29
#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC 30
-#define SETUP_TOKEN_AUTO_OVERRIDE_ARTWORK 31
-#define NUM_GLOBAL_SETUP_TOKENS 32
+#define NUM_GLOBAL_SETUP_TOKENS 31
/* editor setup */
#define SETUP_TOKEN_EDITOR_EL_BOULDERDASH 0
{ TYPE_STRING, &si.graphics_set, "graphics_set" },
{ TYPE_STRING, &si.sounds_set, "sounds_set" },
{ TYPE_STRING, &si.music_set, "music_set" },
- { TYPE_SWITCH, &si.override_level_graphics, "override_level_graphics" },
- { TYPE_SWITCH, &si.override_level_sounds, "override_level_sounds" },
- { TYPE_SWITCH, &si.override_level_music, "override_level_music" },
- { TYPE_SWITCH, &si.auto_override_artwork, "auto_override_artwork" },
+ { TYPE_SWITCH3,&si.override_level_graphics, "override_level_graphics" },
+ { TYPE_SWITCH3,&si.override_level_sounds, "override_level_sounds" },
+ { TYPE_SWITCH3,&si.override_level_music, "override_level_music" },
};
static boolean not_used = FALSE;
si->prefer_aga_graphics = TRUE;
si->game_frame_delay = GAME_FRAME_DELAY;
- si->graphics_set = getStringCopy(GFX_CLASSIC_SUBDIR);
- si->sounds_set = getStringCopy(SND_CLASSIC_SUBDIR);
- si->music_set = getStringCopy(MUS_CLASSIC_SUBDIR);
+ si->graphics_set = getStringCopy(GFX_DEFAULT_SUBDIR);
+ si->sounds_set = getStringCopy(SND_DEFAULT_SUBDIR);
+ si->music_set = getStringCopy(MUS_DEFAULT_SUBDIR);
si->override_level_graphics = FALSE;
si->override_level_sounds = FALSE;
si->override_level_music = FALSE;
- si->auto_override_artwork = FALSE;
si->editor.el_boulderdash = TRUE;
si->editor.el_emerald_mine = TRUE;
si->system.audio_fragment_size = DEFAULT_AUDIO_FRAGMENT_SIZE;
si->options.verbose = FALSE;
+
+#if defined(CREATE_SPECIAL_EDITION_RND_JUE)
+ si->handicap = FALSE;
+ si->fullscreen = TRUE;
+ si->override_level_graphics = AUTO;
+ si->override_level_sounds = AUTO;
+ si->override_level_music = AUTO;
+#endif
}
static void setSetupInfoToDefaults_EditorCascade(struct SetupInfo *si)
}
-/* ------------------------------------------------------------------------- *
- * convert levels
- * ------------------------------------------------------------------------- */
+/* ------------------------------------------------------------------------- */
+/* convert levels */
+/* ------------------------------------------------------------------------- */
#define MAX_NUM_CONVERT_LEVELS 1000
CloseAllAndExit(0);
}
+
+
+/* ------------------------------------------------------------------------- */
+/* create and save images for use in level sketches (raw BMP format) */
+/* ------------------------------------------------------------------------- */
+
+void CreateLevelSketchImages()
+{
+#if defined(TARGET_SDL)
+ Bitmap *bitmap1;
+ Bitmap *bitmap2;
+ int i;
+
+ bitmap1 = CreateBitmap(TILEX, TILEY, DEFAULT_DEPTH);
+ bitmap2 = CreateBitmap(MINI_TILEX, MINI_TILEY, DEFAULT_DEPTH);
+
+ for (i = 0; i < NUM_FILE_ELEMENTS; i++)
+ {
+ Bitmap *src_bitmap;
+ int src_x, src_y;
+ int graphic = el2edimg(i);
+ char basename1[16];
+ char basename2[16];
+ char *filename1;
+ char *filename2;
+
+ sprintf(basename1, "%03d.bmp", i);
+ sprintf(basename2, "%03ds.bmp", i);
+
+ filename1 = getPath2(global.create_images_dir, basename1);
+ filename2 = getPath2(global.create_images_dir, basename2);
+
+ getGraphicSource(graphic, 0, &src_bitmap, &src_x, &src_y);
+ BlitBitmap(src_bitmap, bitmap1, src_x, src_y, TILEX, TILEY, 0, 0);
+
+ if (SDL_SaveBMP(bitmap1->surface, filename1) != 0)
+ Error(ERR_EXIT, "cannot save level sketch image file '%s'", filename1);
+
+ getMiniGraphicSource(graphic, &src_bitmap, &src_x, &src_y);
+ BlitBitmap(src_bitmap, bitmap2, src_x, src_y, MINI_TILEX, MINI_TILEY, 0, 0);
+
+ if (SDL_SaveBMP(bitmap2->surface, filename2) != 0)
+ Error(ERR_EXIT, "cannot save level sketch image file '%s'", filename2);
+
+ free(filename1);
+ free(filename2);
+
+ if (options.debug)
+ printf("%03d `%03d%c", i, i, (i % 10 < 9 ? ' ' : '\n'));
+ }
+
+ FreeBitmap(bitmap1);
+ FreeBitmap(bitmap2);
+
+ if (options.debug)
+ printf("\n");
+
+ Error(ERR_INFO, "%d normal and small images created", NUM_FILE_ELEMENTS);
+
+ CloseAllAndExit(0);
+#endif
+}
+
+
+/* ------------------------------------------------------------------------- */
+/* create and save images for custom and group elements (raw BMP format) */
+/* ------------------------------------------------------------------------- */
+
+void CreateCustomElementImages()
+{
+#if defined(TARGET_SDL)
+ char *filename = "graphics.classic/RocksCE.bmp";
+ Bitmap *bitmap;
+ Bitmap *src_bitmap;
+ int dummy_graphic = IMG_CUSTOM_99;
+ int yoffset_ce = 0;
+ int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
+ int src_x, src_y;
+ int i;
+
+ bitmap = CreateBitmap(TILEX * 16 * 2,
+ TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
+ DEFAULT_DEPTH);
+
+ getGraphicSource(dummy_graphic, 0, &src_bitmap, &src_x, &src_y);
+
+ for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
+ {
+ int x = i % 16;
+ int y = i / 16;
+ int ii = i + 1;
+ int j;
+
+ BlitBitmap(src_bitmap, bitmap, 0, 0, TILEX, TILEY,
+ TILEX * x, TILEY * y + yoffset_ce);
+
+ BlitBitmap(src_bitmap, bitmap, 0, TILEY, TILEX, TILEY,
+ TILEX * x + TILEX * 16, TILEY * y + yoffset_ce);
+
+ for (j = 2; j >= 0; j--)
+ {
+ int c = ii % 10;
+
+ BlitBitmap(src_bitmap, bitmap, TILEX + c * 7, 0, 6, 10,
+ TILEX * x + 6 + j * 7,
+ TILEY * y + 11 + yoffset_ce);
+
+ BlitBitmap(src_bitmap, bitmap, TILEX + c * 8, TILEY, 6, 10,
+ TILEX * 16 + TILEX * x + 6 + j * 8,
+ TILEY * y + 10 + yoffset_ce);
+
+ ii /= 10;
+ }
+ }
+
+ for (i = 0; i < NUM_GROUP_ELEMENTS; i++)
+ {
+ int x = i % 16;
+ int y = i / 16;
+ int ii = i + 1;
+ int j;
+
+ BlitBitmap(src_bitmap, bitmap, 0, 0, TILEX, TILEY,
+ TILEX * x, TILEY * y + yoffset_ge);
+
+ BlitBitmap(src_bitmap, bitmap, 0, TILEY, TILEX, TILEY,
+ TILEX * x + TILEX * 16, TILEY * y + yoffset_ge);
+
+ for (j = 1; j >= 0; j--)
+ {
+ int c = ii % 10;
+
+ BlitBitmap(src_bitmap, bitmap, TILEX + c * 10, 11, 10, 10,
+ TILEX * x + 6 + j * 10,
+ TILEY * y + 11 + yoffset_ge);
+
+ BlitBitmap(src_bitmap, bitmap, TILEX + c * 8, TILEY + 12, 6, 10,
+ TILEX * 16 + TILEX * x + 10 + j * 8,
+ TILEY * y + 10 + yoffset_ge);
+
+ ii /= 10;
+ }
+ }
+
+ if (SDL_SaveBMP(bitmap->surface, filename) != 0)
+ Error(ERR_EXIT, "cannot save CE graphics file '%s'", filename);
+
+ FreeBitmap(bitmap);
+
+ CloseAllAndExit(0);
+#endif
+}
+
+#if 0
+void CreateLevelSketchImages_TEST()
+{
+ void CreateCustomElementImages()
+}
+#endif