@$(MAKE) auto-conf
$(TIMESTAMP_FILE): $(SRCS) $(LIBGAME) $(GAME_EM)
- @date '+"[%Y-%m-%d %H:%M]"' \
+ @date '+"%Y-%m-%d %H:%M"' \
| sed -e 's/^/#define COMPILE_DATE_STRING /' \
> $(TIMESTAMP_FILE)
{ "background.INFO[MUSIC]", UNDEFINED_FILENAME },
{ "background.INFO[CREDITS]", UNDEFINED_FILENAME },
{ "background.INFO[PROGRAM]", UNDEFINED_FILENAME },
+ { "background.INFO[VERSION]", UNDEFINED_FILENAME },
{ "background.INFO[LEVELSET]", UNDEFINED_FILENAME },
{ "background.SETUP", UNDEFINED_FILENAME },
{ "background.DOOR", UNDEFINED_FILENAME },
{ "menu.draw_yoffset.INFO[CREDITS]", "0" },
{ "menu.draw_xoffset.INFO[PROGRAM]", "0" },
{ "menu.draw_yoffset.INFO[PROGRAM]", "0" },
+ { "menu.draw_xoffset.INFO[VERSION]", "0" },
+ { "menu.draw_yoffset.INFO[VERSION]", "0" },
{ "menu.draw_xoffset.INFO[LEVELSET]", "0" },
{ "menu.draw_yoffset.INFO[LEVELSET]", "0" },
{ "menu.draw_xoffset.SETUP", "0" },
#define IMG_BACKGROUND_INFO_MUSIC 1722
#define IMG_BACKGROUND_INFO_CREDITS 1723
#define IMG_BACKGROUND_INFO_PROGRAM 1724
-#define IMG_BACKGROUND_INFO_LEVELSET 1725
-#define IMG_BACKGROUND_SETUP 1726
-#define IMG_BACKGROUND_DOOR 1727
-#define IMG_TITLESCREEN_INITIAL_1 1728
-#define IMG_TITLESCREEN_INITIAL_2 1729
-#define IMG_TITLESCREEN_INITIAL_3 1730
-#define IMG_TITLESCREEN_INITIAL_4 1731
-#define IMG_TITLESCREEN_INITIAL_5 1732
-#define IMG_TITLESCREEN_1 1733
-#define IMG_TITLESCREEN_2 1734
-#define IMG_TITLESCREEN_3 1735
-#define IMG_TITLESCREEN_4 1736
-#define IMG_TITLESCREEN_5 1737
+#define IMG_BACKGROUND_INFO_VERSION 1725
+#define IMG_BACKGROUND_INFO_LEVELSET 1726
+#define IMG_BACKGROUND_SETUP 1727
+#define IMG_BACKGROUND_DOOR 1728
+#define IMG_TITLESCREEN_INITIAL_1 1729
+#define IMG_TITLESCREEN_INITIAL_2 1730
+#define IMG_TITLESCREEN_INITIAL_3 1731
+#define IMG_TITLESCREEN_INITIAL_4 1732
+#define IMG_TITLESCREEN_INITIAL_5 1733
+#define IMG_TITLESCREEN_1 1734
+#define IMG_TITLESCREEN_2 1735
+#define IMG_TITLESCREEN_3 1736
+#define IMG_TITLESCREEN_4 1737
+#define IMG_TITLESCREEN_5 1738
-#define NUM_IMAGE_FILES 1738
+#define NUM_IMAGE_FILES 1739
#endif /* CONF_GFX_H */
#include "conftime.h"
-char *getProgramVersionString()
+char *getCompileDateString()
+{
+ return COMPILE_DATE_STRING;
+}
+
+char *getProgramReleaseVersionString()
+{
+ static char program_version_string[32];
+
+ sprintf(program_version_string, "%d.%d.%d",
+ PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH);
+
+ return program_version_string;
+}
+
+char *getProgramFullVersionString()
{
static char program_version_string[32];
-#ifdef DEBUG
sprintf(program_version_string, "%d.%d.%d-%d",
PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH,
PROGRAM_VERSION_BUILD);
-#else
- sprintf(program_version_string, "%d.%d.%d",
- PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH);
-#endif
return program_version_string;
}
+char *getProgramVersionString()
+{
+#ifdef DEBUG
+ return getProgramFullVersionString();
+#else
+ return getProgramReleaseVersionString();
+#endif
+}
+
char *getProgramInitString()
{
static char *program_init_string = NULL;
if (window_title_string == NULL)
{
window_title_string = checked_malloc(strlen(getProgramInitString()) + 1 +
- strlen(COMPILE_DATE_STRING) + 1);
+ strlen(getCompileDateString()) + 2 +1);
- sprintf(window_title_string, "%s %s",
- getProgramInitString(), COMPILE_DATE_STRING);
+ sprintf(window_title_string, "%s [%s]",
+ getProgramInitString(), getCompileDateString());
}
return window_title_string;
#include "main.h"
+char *getCompileDateString(void);
+char *getProgramReleaseVersionString(void);
+char *getProgramFullVersionString(void);
char *getProgramVersionString(void);
char *getProgramInitString(void);
char *getWindowTitleString(void);
-#define COMPILE_DATE_STRING "[2007-01-24 22:14]"
+#define COMPILE_DATE_STRING "2007-01-25 03:07"
int softscroll_offset = (setup.soft_scrolling ? TILEX : 0);
int x, y;
+#if 1
+ BlitBitmap(drawto_field, bitmap_db_field2,
+ FX + TILEX * (dx == -1) - softscroll_offset,
+ FY + TILEY * (dy == -1) - softscroll_offset,
+ SXSIZE - TILEX * (dx != 0) + 2 * softscroll_offset,
+ SYSIZE - TILEY * (dy != 0) + 2 * softscroll_offset,
+ FX + TILEX * (dx == 1) - softscroll_offset,
+ FY + TILEY * (dy == 1) - softscroll_offset);
+ BlitBitmap(bitmap_db_field2, drawto_field,
+ FX + TILEX * (dx == 1) - softscroll_offset,
+ FY + TILEY * (dy == 1) - softscroll_offset,
+ SXSIZE - TILEX * (dx != 0) + 2 * softscroll_offset,
+ SYSIZE - TILEY * (dy != 0) + 2 * softscroll_offset,
+ FX + TILEX * (dx == 1) - softscroll_offset,
+ FY + TILEY * (dy == 1) - softscroll_offset);
+#else
BlitBitmap(drawto_field, drawto_field,
FX + TILEX * (dx == -1) - softscroll_offset,
FY + TILEY * (dy == -1) - softscroll_offset,
- SXSIZE - TILEX * (dx!=0) + 2 * softscroll_offset,
- SYSIZE - TILEY * (dy!=0) + 2 * softscroll_offset,
+ SXSIZE - TILEX * (dx != 0) + 2 * softscroll_offset,
+ SYSIZE - TILEY * (dy != 0) + 2 * softscroll_offset,
FX + TILEX * (dx == 1) - softscroll_offset,
FY + TILEY * (dy == 1) - softscroll_offset);
+#endif
if (dx)
{
/* create additional image buffers for double-buffering and cross-fading */
bitmap_db_cross = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH);
bitmap_db_field = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
+ bitmap_db_field2= CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
bitmap_db_panel = CreateBitmap(DXSIZE, DYSIZE, DEFAULT_DEPTH);
bitmap_db_door = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH);
#if defined(MSDOS)
#define PLATFORM_MSDOS
+#define PLATFORM_STRING "DOS"
#elif defined(WIN32)
#define PLATFORM_WIN32
+#define PLATFORM_STRING "Windows"
#else
#define PLATFORM_UNIX
+#define PLATFORM_STRING "Unix"
#endif
#if defined(linux)
#define PLATFORM_LINUX
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "Linux"
#endif
#if defined(__FreeBSD__)
#define PLATFORM_FREEBSD
#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "FreeBSD"
#endif
#if defined(__NetBSD__)
#define PLATFORM_NETBSD
#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "NetBSD"
#endif
#if defined(__bsdi__)
#define PLATFORM_BSDI
#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "BSDI"
#endif
#if defined(sparc) && defined(sun)
#define PLATFORM_SUNOS
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "Solaris"
#endif
#if defined(__APPLE__) && defined(__MACH__)
#define PLATFORM_MACOSX
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "Mac OS X"
#endif
#if defined(NeXT)
#define PLATFORM_NEXT
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "NeXT"
#endif
/* detecting HP-UX by the following compiler keyword definitions:
#if defined(__hpux__) || defined(__hpux) || defined(hpux)
#define PLATFORM_HPUX
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "HP-UX"
#endif
#define NETWORK_AVALIABLE
#endif
-
#endif /* PLATFORM_H */
Bitmap *bitmap_db_cross;
Bitmap *bitmap_db_field;
+Bitmap *bitmap_db_field2;
Bitmap *bitmap_db_panel;
Bitmap *bitmap_db_door;
DrawBuffer *fieldbuffer;
&menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
{ "menu.draw_yoffset.INFO[PROGRAM]",
&menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
+ { "menu.draw_xoffset.INFO[VERSION]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] },
+ { "menu.draw_yoffset.INFO[VERSION]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_VERSION] },
{ "menu.draw_xoffset.INFO[LEVELSET]",
&menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] },
{ "menu.draw_yoffset.INFO[LEVELSET]",
#define GFX_SPECIAL_ARG_INFO_MUSIC 3
#define GFX_SPECIAL_ARG_INFO_CREDITS 4
#define GFX_SPECIAL_ARG_INFO_PROGRAM 5
-#define GFX_SPECIAL_ARG_INFO_LEVELSET 6
+#define GFX_SPECIAL_ARG_INFO_VERSION 6
+#define GFX_SPECIAL_ARG_INFO_LEVELSET 7
-#define NUM_SPECIAL_GFX_INFO_ARGS 7
+#define NUM_SPECIAL_GFX_INFO_ARGS 8
/* values for image configuration suffixes */
extern Bitmap *bitmap_db_cross;
extern Bitmap *bitmap_db_field;
+extern Bitmap *bitmap_db_field2;
extern Bitmap *bitmap_db_panel;
extern Bitmap *bitmap_db_door;
extern Pixmap tile_clipmask[];
#include "cartoons.h"
#include "network.h"
#include "init.h"
+#include "config.h"
/* screens in the setup menu */
#define SETUP_MODE_MAIN 0
#define INFO_MODE_MUSIC 3
#define INFO_MODE_CREDITS 4
#define INFO_MODE_PROGRAM 5
-#define INFO_MODE_LEVELSET 6
+#define INFO_MODE_VERSION 6
+#define INFO_MODE_LEVELSET 7
-#define MAX_INFO_MODES 7
+#define MAX_INFO_MODES 8
/* for various menu stuff */
#define MENU_SCREEN_START_XPOS 1
static void HandleInfoScreen_Music(int);
static void HandleInfoScreen_Credits(int);
static void HandleInfoScreen_Program(int);
+static void HandleInfoScreen_Version(int);
static void MapScreenMenuGadgets(int);
static void MapScreenTreeGadgets(TreeInfo *);
/* needed if last screen (level choice) changed graphics, sounds or music */
ReloadCustomArtwork(0);
-#ifdef TARGET_SDL
+#if defined(TARGET_SDL)
SetDrawtoField(DRAW_BACKBUFFER);
#endif
DrawInfoScreen();
}
+static void execInfoVersion()
+{
+ info_mode = INFO_MODE_VERSION;
+ DrawInfoScreen();
+}
+
static void execInfoLevelSet()
{
info_mode = INFO_MODE_LEVELSET;
{ TYPE_ENTER_SCREEN, execInfoMusic, "Music Info" },
{ TYPE_ENTER_SCREEN, execInfoCredits, "Credits" },
{ TYPE_ENTER_SCREEN, execInfoProgram, "Program Info" },
+ { TYPE_ENTER_SCREEN, execInfoVersion, "Version Info" },
{ TYPE_ENTER_SCREEN, execInfoLevelSet, "Level Set Info" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execExitInfo, "Exit" },
}
}
+void DrawInfoScreen_Version()
+{
+ int font_header = FONT_TEXT_3;
+ int font_text = FONT_TEXT_2;
+ int xstep = getFontWidth(font_text);
+ int ystep = getFontHeight(font_text);
+ int xstart1 = SX + 2 * xstep;
+ int xstart2 = SX + 18 * xstep;
+ int xstart3 = SX + 28 * xstep;
+ int ystart = 150;
+ int ybottom = SYSIZE - 20;
+#if defined(TARGET_SDL)
+ SDL_version sdl_version_compiled;
+ const SDL_version *sdl_version_linked;
+#endif
+
+ SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_PROGRAM);
+
+ FadeOut(REDRAW_FIELD);
+
+ ClearWindow();
+ DrawHeadline();
+
+ DrawTextSCentered(100, FONT_TEXT_1, "Version Information:");
+
+ DrawTextF(xstart1, ystart, font_header, "Name");
+ DrawTextF(xstart2, ystart, font_text, PROGRAM_TITLE_STRING);
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_header, "Version");
+ DrawTextF(xstart2, ystart, font_text, getProgramFullVersionString());
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_header, "Platform");
+ DrawTextF(xstart2, ystart, font_text, PLATFORM_STRING);
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_header, "Target");
+ DrawTextF(xstart2, ystart, font_text, TARGET_STRING);
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_header, "Compile time");
+ DrawTextF(xstart2, ystart, font_text, getCompileDateString());
+
+#if defined(TARGET_SDL)
+ ystart += 3 * ystep;
+ DrawTextF(xstart1, ystart, font_header, "Library");
+ DrawTextF(xstart2, ystart, font_header, "compiled");
+ DrawTextF(xstart3, ystart, font_header, "linked");
+
+ SDL_VERSION(&sdl_version_compiled);
+ sdl_version_linked = SDL_Linked_Version();
+
+ ystart += 2 * ystep;
+ DrawTextF(xstart1, ystart, font_text, "SDL");
+ DrawTextF(xstart2, ystart, font_text, "%d.%d.%d",
+ sdl_version_compiled.major,
+ sdl_version_compiled.minor,
+ sdl_version_compiled.patch);
+ DrawTextF(xstart3, ystart, font_text, "%d.%d.%d",
+ sdl_version_linked->major,
+ sdl_version_linked->minor,
+ sdl_version_linked->patch);
+
+ SDL_IMAGE_VERSION(&sdl_version_compiled);
+#if 0
+ sdl_version_linked = IMG_Linked_Version();
+#else
+#endif
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_text, "SDL_image");
+ DrawTextF(xstart2, ystart, font_text, "%d.%d.%d",
+ sdl_version_compiled.major,
+ sdl_version_compiled.minor,
+ sdl_version_compiled.patch);
+#if 0
+ DrawTextF(xstart3, ystart, font_text, "%d.%d.%d",
+ sdl_version_linked->major,
+ sdl_version_linked->minor,
+ sdl_version_linked->patch);
+#else
+ DrawTextF(xstart3, ystart, font_text, "?.?.?");
+#endif
+
+ SDL_MIXER_VERSION(&sdl_version_compiled);
+ sdl_version_linked = Mix_Linked_Version();
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_text, "SDL_mixer");
+ DrawTextF(xstart2, ystart, font_text, "%d.%d.%d",
+ sdl_version_compiled.major,
+ sdl_version_compiled.minor,
+ sdl_version_compiled.patch);
+ DrawTextF(xstart3, ystart, font_text, "%d.%d.%d",
+ sdl_version_linked->major,
+ sdl_version_linked->minor,
+ sdl_version_linked->patch);
+
+ ystart += ystep;
+ DrawTextF(xstart1, ystart, font_text, "SDL_net");
+ DrawTextF(xstart2, ystart, font_text, "?.?.?");
+ DrawTextF(xstart3, ystart, font_text, "?.?.?");
+#endif
+
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
+ "Press any key or button for info menu");
+
+ FadeIn(REDRAW_FIELD);
+}
+
+void HandleInfoScreen_Version(int button)
+{
+ if (button == MB_MENU_LEAVE)
+ {
+ PlaySound(SND_MENU_ITEM_SELECTING);
+
+ info_mode = INFO_MODE_MAIN;
+ DrawInfoScreen();
+
+ return;
+ }
+ else if (button == MB_MENU_CHOICE)
+ {
+ PlaySound(SND_MENU_ITEM_SELECTING);
+
+ FadeSoundsAndMusic();
+ FadeOut(REDRAW_FIELD);
+
+ info_mode = INFO_MODE_MAIN;
+ DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ }
+ else
+ {
+ PlayMenuSoundIfLoop();
+ }
+}
+
void DrawInfoScreen_LevelSet()
{
int ystart = 150;
DrawInfoScreen_Credits();
else if (info_mode == INFO_MODE_PROGRAM)
DrawInfoScreen_Program();
+ else if (info_mode == INFO_MODE_VERSION)
+ DrawInfoScreen_Version();
else if (info_mode == INFO_MODE_LEVELSET)
DrawInfoScreen_LevelSet();
else
HandleInfoScreen_Credits(button);
else if (info_mode == INFO_MODE_PROGRAM)
HandleInfoScreen_Program(button);
+ else if (info_mode == INFO_MODE_VERSION)
+ HandleInfoScreen_Version(button);
else if (info_mode == INFO_MODE_LEVELSET)
HandleInfoScreen_LevelSet(button);
else