projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated special function to generate custom element graphics
[rocksndiamonds.git]
/
src
/
files.c
diff --git
a/src/files.c
b/src/files.c
index d79e5f55ca3587531794809b82adad7e8f155b85..21b2472d4a41babf18cd7f9508607daa715ce573 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-9772,24
+9772,24
@@
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()
+void CreateCustomElementImages(
char *filename
)
{
#if defined(TARGET_SDL)
{
#if defined(TARGET_SDL)
- char *
filename = "graphics.classic/RocksCE.bmp
";
+ char *
src_basename = "RocksCE.tmpl.ilbm
";
Bitmap *bitmap;
Bitmap *src_bitmap;
Bitmap *bitmap;
Bitmap *src_bitmap;
- int dummy_graphic = IMG_CUSTOM_99;
int yoffset_ce = 0;
int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
int yoffset_ce = 0;
int yoffset_ge = (TILEY * NUM_CUSTOM_ELEMENTS / 16);
- int src_x, src_y;
int i;
int i;
+ SDLInitVideoDisplay();
+
+ src_bitmap = LoadCustomImage(src_basename);
+
bitmap = CreateBitmap(TILEX * 16 * 2,
TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
DEFAULT_DEPTH);
bitmap = CreateBitmap(TILEX * 16 * 2,
TILEY * (NUM_CUSTOM_ELEMENTS + NUM_GROUP_ELEMENTS) / 16,
DEFAULT_DEPTH);
- getFixedGraphicSource(dummy_graphic, 0, &src_bitmap, &src_x, &src_y);
-
for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
{
int x = i % 16;
for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++)
{
int x = i % 16;