-#define COMPILE_DATE_STRING "2007-04-20 20:09"
+#define COMPILE_DATE_STRING "2007-04-24 02:01"
extern void PlayLevelSound_EM(int, int, int, int);
extern void InitGraphicInfo_EM(void);
+void SetGfxAnimation_EM(int, int, int, int);
void getGraphicSourceObjectExt_EM(int, int, Bitmap **, int *, int *, int, int);
void getGraphicSourcePlayerExt_EM(int, int, int, Bitmap **, int *, int *);
(8 - frame) * ply[p].y) * TILEY / 8 \
- ((SCR_FIELDY - 1) * TILEY) / 2)
-#define USE_EXTENDED_GRAPHICS_ENGINE 0
+#define USE_EXTENDED_GRAPHICS_ENGINE 1
int frame; /* current screen frame */
int screen_x; /* current scroll position */
{
int tile = Draw[y][x];
struct GraphicInfo_EM *g = &graphic_info_em_object[tile][frame];
+
+#if USE_EXTENDED_GRAPHICS_ENGINE
+ getGraphicSourceObjectExt_EM(tile, frame, &g->bitmap, &g->src_x, &g->src_y,
+ x - 2, y - 2);
+#endif
+
int left = screen_x / TILEX;
int top = screen_y / TILEY;
int i;
{ 0, +1 }
};
+#if USE_EXTENDED_GRAPHICS_ENGINE
+ for (y = 2; y < EM_MAX_CAVE_HEIGHT - 2; y++)
+ for (x = 2; x < EM_MAX_CAVE_WIDTH - 2; x++)
+ SetGfxAnimation_EM(Draw[y][x], frame, x - 2, y - 2);
+#endif
+
for (y = top; y < top + MAX_BUF_YSIZE; y++)
{
for (x = left; x < left + MAX_BUF_XSIZE; x++)
inline void InitElementSmallImagesScaledUp(int graphic)
{
+#if 0
+ struct FileInfo *fi = getImageListEntryFromImageID(graphic);
+
+ printf("::: '%s' -> '%s'\n", fi->token, fi->filename);
+#endif
+
CreateImageWithSmallImages(graphic, graphic_info[graphic].scale_up_factor);
}
if (fileExists(filename))
return filename;
+#if CREATE_SPECIAL_EDITION
+ free(filename);
+
+ /* 6th try: look for fallback artwork in old default artwork directory */
+ filename = getPath2(options.graphics_directory, GFX_FALLBACK_FILENAME);
+ if (fileExists(filename))
+ return filename;
+#endif
+
return NULL; /* cannot find specified artwork file anywhere */
}
if (fileExists(filename))
return filename;
+#if CREATE_SPECIAL_EDITION
+ free(filename);
+
+ /* 6th try: look for fallback artwork in old default artwork directory */
+ filename = getPath2(options.sounds_directory, SND_FALLBACK_FILENAME);
+ if (fileExists(filename))
+ return filename;
+#endif
+
return NULL; /* cannot find specified artwork file anywhere */
}
if (fileExists(filename))
return filename;
+#if CREATE_SPECIAL_EDITION
+ free(filename);
+
+ /* 6th try: look for fallback artwork in old default artwork directory */
+ filename = getPath2(options.music_directory, MUS_FALLBACK_FILENAME);
+ if (fileExists(filename))
+ return filename;
+#endif
+
return NULL; /* cannot find specified artwork file anywhere */
}
#define FULLSCREEN_NOT_AVAILABLE FALSE
#define FULLSCREEN_AVAILABLE TRUE
+#define CREATE_SPECIAL_EDITION FALSE
+#define CREATE_SPECIAL_EDITION_RND_JUE FALSE
+
/* default input keys */
#define DEFAULT_KEY_LEFT KSYM_Left
#define DEFAULT_KEY_RIGHT KSYM_Right
#define CACHE_DIRECTORY "cache"
#if !defined(PLATFORM_MSDOS)
+#if CREATE_SPECIAL_EDITION_RND_JUE
+#define GFX_CLASSIC_SUBDIR "jue0"
+#define SND_CLASSIC_SUBDIR "jue0"
+#define MUS_CLASSIC_SUBDIR "jue0"
+#else
#define GFX_CLASSIC_SUBDIR "gfx_classic"
#define SND_CLASSIC_SUBDIR "snd_classic"
#define MUS_CLASSIC_SUBDIR "mus_classic"
+#endif
#else
#define GFX_CLASSIC_SUBDIR "gfx_orig"
#define SND_CLASSIC_SUBDIR "snd_orig"
#define MUS_CLASSIC_SUBDIR "mus_orig"
#endif
+#if CREATE_SPECIAL_EDITION
+#define GFX_FALLBACK_FILENAME "fallback.pcx"
+#define SND_FALLBACK_FILENAME "fallback.wav"
+#define MUS_FALLBACK_FILENAME "fallback.wav"
+#endif
+
/* file names and filename extensions */
#if !defined(PLATFORM_MSDOS)
#define LEVELSETUP_DIRECTORY "levelsetup"
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
-#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2006 by Holger Schemel"
+#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2007 by Holger Schemel"
#define PROGRAM_EMAIL_STRING "info@artsoft.org"
#define PROGRAM_WEBSITE_STRING "http://www.artsoft.org/"
#define PROGRAM_GAME_BY_STRING "A Game by Artsoft Entertainment"
+#define PROGRAM_UNIX_DATADIR_STRING ".rocksndiamonds"
+
+#if CREATE_SPECIAL_EDITION_RND_JUE
+#undef PROGRAM_TITLE_STRING
+#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds - Version Jue"
+#undef PROGRAM_UNIX_DATADIR_STRING
+#define PROGRAM_UNIX_DATADIR_STRING ".rocksndiamonds-jue"
+#endif
#define ICON_TITLE_STRING PROGRAM_TITLE_STRING
#define COOKIE_PREFIX "ROCKSNDIAMONDS"
#define USERDATA_DIRECTORY_WIN32 PROGRAM_TITLE_STRING
#define USERDATA_DIRECTORY_MACOSX PROGRAM_TITLE_STRING
-#define USERDATA_DIRECTORY_UNIX ".rocksndiamonds"
+#define USERDATA_DIRECTORY_UNIX PROGRAM_UNIX_DATADIR_STRING
#define USERDATA_DIRECTORY_DOS "userdata"
#if defined(PLATFORM_WIN32)
MapTapeButtons();
MapScreenMenuGadgets(SCREEN_MASK_MAIN);
-#if 0
+#if 1
DrawMaskedBorder(REDRAW_ALL);
#endif
GfxFrame[x][y] = 0;
}
+void SetGfxAnimation_EM(int tile, int frame_em, int x, int y)
+{
+ int element = object_mapping[tile].element_rnd;
+ int action = object_mapping[tile].action;
+ int direction = object_mapping[tile].direction;
+ boolean is_backside = object_mapping[tile].is_backside;
+ boolean action_removing = (action == ACTION_DIGGING ||
+ action == ACTION_SNAPPING ||
+ action == ACTION_COLLECTING);
+
+#if 0
+ printf("::: SET: %d, %d: '%s'\n", x, y, EL_NAME(element));
+#endif
+
+#if 1
+ if (action_removing)
+ {
+#if 0
+ printf("::: %d, %d: action_removing [%s]\n", x, y, EL_NAME(element));
+#endif
+
+ GfxFrame[x][y] = 7 - frame_em;
+ }
+ else if (action == ACTION_FALLING ||
+ action == ACTION_MOVING ||
+ action == ACTION_PUSHING ||
+ action == ACTION_EATING ||
+ action == ACTION_FILLING ||
+ action == ACTION_EMPTYING)
+ {
+ int move_dir =
+ (action == ACTION_FALLING ||
+ action == ACTION_FILLING ||
+ action == ACTION_EMPTYING ? MV_DOWN : direction);
+
+ if (is_backside)
+ {
+ GfxFrame[x][y]++;
+
+ if (move_dir == MV_LEFT)
+ GfxFrame[x - 1][y] = GfxFrame[x][y];
+ else if (move_dir == MV_RIGHT)
+ GfxFrame[x + 1][y] = GfxFrame[x][y];
+ else if (move_dir == MV_UP)
+ GfxFrame[x][y - 1] = GfxFrame[x][y];
+ else if (move_dir == MV_DOWN)
+ GfxFrame[x][y + 1] = GfxFrame[x][y];
+ }
+
+#if 0
+ printf("::: %d, %d: %s, %d, %d [%d]\n", x, y, EL_NAME(element), is_backside,
+ move_dir, GfxFrame[x][y]);
+#endif
+ }
+ else
+ GfxFrame[x][y]++;
+#else
+ GfxFrame[x][y] = 7 - frame_em;
+#endif
+}
+
void getGraphicSourceObjectExt_EM(int tile, int frame_em,
Bitmap **src_bitmap, int *src_x, int *src_y,
int x, int y)
struct GraphicInfo *g = &graphic_info[graphic];
int sync_frame;
+#if 0
+ printf("::: GET: %d, %d: '%s'\n", x, y, EL_NAME(element));
+#endif
+
+#if 0
+ if (GfxFrame[x][y] < 8)
+ printf("::: %d, %d: %d [%s]\n", x, y, GfxFrame[x][y], EL_NAME(element));
+#endif
+
+#if 1
+ if (graphic_info[graphic].anim_global_sync)
+ sync_frame = FrameCounter;
+ else if (IN_FIELD(x, y, MAX_LEV_FIELDX, MAX_LEV_FIELDY))
+ sync_frame = GfxFrame[x][y];
+ else
+ sync_frame = 0; /* steel border */
+#else
if (graphic_info[graphic].anim_global_sync)
sync_frame = FrameCounter;
else
sync_frame = 7 - frame_em;
+#endif
SetRandomAnimationValue(x, y);