projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed special function to generate custom element graphics
[rocksndiamonds.git]
/
src
/
files.c
diff --git
a/src/files.c
b/src/files.c
index 94817cddef85e653cb3c5d8a15c7c63887148baf..ff600579fd8150761456211a422276cb30120137 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-9772,19
+9772,22
@@
void CreateLevelSketchImages()
/* create and save images for custom and group elements (raw BMP format) */
/* ------------------------------------------------------------------------- */
/* 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-template.ilbm";
{
#if defined(TARGET_SDL)
char *src_basename = "RocksCE-template.ilbm";
- Bitmap *bitmap;
+ char *dst_basename = "RocksCE.bmp";
+ char *src_filename = getPath2(directory, src_basename);
+ char *dst_filename = getPath2(directory, dst_basename);
Bitmap *src_bitmap;
Bitmap *src_bitmap;
+ Bitmap *bitmap;
int yoffset_ce = 0;
int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
int i;
SDLInitVideoDisplay();
int yoffset_ce = 0;
int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
int i;
SDLInitVideoDisplay();
- src_bitmap = Load
CustomImage(src_bas
ename);
+ src_bitmap = Load
Image(src_fil
ename);
bitmap = CreateBitmap(TILEX * 16 * 2,
TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
bitmap = CreateBitmap(TILEX * 16 * 2,
TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
@@
-9855,8
+9858,8
@@
void CreateCustomElementImages(char *filename)
}
}
}
}
- 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);
FreeBitmap(bitmap);