$(COMMON_DIR)/defines.h:
@echo "Generating $@"
@echo "#define VERSION \"$(VERSION)\"" > $@
+ @echo "#define VERSION_MAJOR \"$(MAJOR)\"" >> $@
+ @echo "#define VERSION_MINOR \"$(MINOR)\"" >> $@
@echo "#define BUILD_DATE_TIME \"$(BUILD_DATE_TIME)\"" >> $@
$(CURSES_DIR)/defines.h:
#include "../common/frotz.h"
#include "../blorb/blorb.h"
-// version info
-#define SFROTZ_MAJOR 0
-#define SFROTZ_MINOR 2
-
// typedef unsigned char byte;
// typedef unsigned short word;
// typedef unsigned long ulong;
#include <io.h>
#endif
+#include "../common/defines.h"
#include "sf_frotz.h"
f_setup_t f_setup;
static char *info1 =
"\n"
- "SDL Frotz V%d.%02d build %s - interpreter for z-code games.\n"
+ "SDL Frotz V%s build %s - interpreter for z-code games.\n"
"Complies with Standard 1.0; supports Blorb resources and Quetzal save files.\n"
"Based on Frotz 2.40 by Stefan Jokisch and WindowsFrotz2000 by David Kinder.\n"
"\n"
"-Z # error checking (see below)",
NULL};
-static char *info2 =
+static char *info2 =
"\nError checking: 0 none, 1 first only (default), 2 all, 3 exit after any error.\n"
"For more options and explanations, please read the HTML manual.\n";
-static char * getbuilddatetime( int tf);
-
#define WIDCOL 40
static void usage()
{
char **p = infos; int i=0,len=0;
- printf(info1,SFROTZ_MAJOR,SFROTZ_MINOR,getbuilddatetime(1));
+ printf(info1,VERSION,BUILD_DATE_TIME);
while (*p)
{
if (i)
#define _stat stat
#endif
-static char * getbuilddatetime( int tf){
- time_t t; struct tm *tm;
- struct _stat sta;
- static char buf[263];
-
- getexepath(buf);
- _stat(buf,&sta);
- t = sta.st_mtime;
- tm = localtime(&t);
- buf[0] = 0;
- sprintf(buf,"%04d%02d%02d",
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
- if (tf){
- strcat(buf,".");
- sprintf(buf+strlen(buf),"%02d%02d%02d",
- tm->tm_hour, tm->tm_min, tm->tm_sec);
- }
- return buf;
- }
-
-
\r
#include "generic.h"\r
\r
+#include "../common/defines.h"\r
#include "sf_frotz.h"\r
\r
static SDL_Rect blitrect = {0,0,0,0};\r
Uint32 initflags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE | SDL_INIT_TIMER |\r
SDL_INIT_AUDIO;\r
\r
- sprintf(banner,"SDL Frotz v%d.%02d - %s (z%d)",SFROTZ_MAJOR,SFROTZ_MINOR,\r
- stripped_story_name,h_version);\r
+ sprintf(banner,"SDL Frotz v%s - %s (z%d)",VERSION,\r
+ f_setup.story_name,h_version);\r
desired_bpp = 32;\r
video_flags = 0;\r
\r