{
char *player_name_new;
- checkSetupFileHashIdentifier(setup_file_hash, filename,getCookie("SETUP"));
decodeSetupFileHash(setup_file_hash);
freeSetupFileHash(setup_file_hash);
if (setup_file_hash)
{
- checkSetupFileHashIdentifier(setup_file_hash, filename,getCookie("SETUP"));
decodeSetupFileHash_EditorCascade(setup_file_hash);
freeSetupFileHash(setup_file_hash);
return;
}
- fprintf(file, "%s\n", getFormattedSetupEntry(TOKEN_STR_FILE_IDENTIFIER,
- getCookie("SETUP")));
- fprintf(file, "\n");
+ fprintFileHeader(file, SETUP_FILENAME);
/* global setup */
si = setup;
return;
}
- fprintf(file, "%s\n", getFormattedSetupEntry(TOKEN_STR_FILE_IDENTIFIER,
- getCookie("SETUP")));
- fprintf(file, "\n");
+ fprintFileHeader(file, EDITORCASCADE_FILENAME);
seci = setup.editor_cascade;
- fprintf(file, "\n");
for (i = 0; i < NUM_EDITOR_CASCADE_SETUP_TOKENS; i++)
fprintf(file, "%s\n", getSetupLine(editor_cascade_setup_tokens, "", i));
/* create and save images for custom and group elements (raw BMP format) */
/* ------------------------------------------------------------------------- */
-void CreateCustomElementImages(char *filename)
+void CreateCustomElementImages(char *directory)
{
#if defined(TARGET_SDL)
- char *src_basename = "RocksCE.tmpl.ilbm";
- Bitmap *bitmap;
+ char *src_basename = "RocksCE-template.ilbm";
+ char *dst_basename = "RocksCE.bmp";
+ char *src_filename = getPath2(directory, src_basename);
+ char *dst_filename = getPath2(directory, dst_basename);
Bitmap *src_bitmap;
+ Bitmap *bitmap;
int yoffset_ce = 0;
int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
int i;
SDLInitVideoDisplay();
- src_bitmap = LoadCustomImage(src_basename);
+ src_bitmap = LoadImage(src_filename);
bitmap = CreateBitmap(TILEX * 16 * 2,
TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
}
}
- if (SDL_SaveBMP(bitmap->surface, filename) != 0)
- Error(ERR_EXIT, "cannot save CE graphics file '%s'", filename);
+ if (SDL_SaveBMP(bitmap->surface, dst_filename) != 0)
+ Error(ERR_EXIT, "cannot save CE graphics file '%s'", dst_filename);
FreeBitmap(bitmap);