Add the svn revision to the version string in Mapster32

git-svn-id: https://svn.eduke32.com/eduke32@1824 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2011-03-04 18:47:06 +00:00
parent cdd800890f
commit ec88a5269f
3 changed files with 20 additions and 10 deletions

View file

@ -25,6 +25,7 @@
static int32_t crctable[256]; static int32_t crctable[256];
static char kensig[64]; static char kensig[64];
extern const char *ExtGetVer(void);
extern int32_t ExtInit(void); extern int32_t ExtInit(void);
extern int32_t ExtPreInit(int32_t argc,const char **argv); extern int32_t ExtPreInit(int32_t argc,const char **argv);
extern void ExtUnInit(void); extern void ExtUnInit(void);
@ -5728,7 +5729,8 @@ void clearmidstatbar16(void)
static void clearministatbar16(void) static void clearministatbar16(void)
{ {
int32_t i, col = whitecol - 21; int32_t i, col = whitecol - 21;
static const char *tempbuf = "Mapster32" VERSION; // static const char *tempbuf = "Mapster32" " " VERSION;
char tempbuf[16];
begindrawing(); begindrawing();
@ -5743,6 +5745,7 @@ static void clearministatbar16(void)
CLEARLINES2D(i, ydim-i, 0); CLEARLINES2D(i, ydim-i, 0);
Bsprintf(tempbuf, "Mapster32 %s", ExtGetVer());
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3, ydim2d-STATUS2DSIZ2+10, editorcolors[4],-1, tempbuf, 0); printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3, ydim2d-STATUS2DSIZ2+10, editorcolors[4],-1, tempbuf, 0);
printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2, ydim2d-STATUS2DSIZ2+9, editorcolors[12],-1, tempbuf, 0); printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2, ydim2d-STATUS2DSIZ2+9, editorcolors[12],-1, tempbuf, 0);

View file

@ -46,6 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m32script.h" #include "m32script.h"
#include "m32def.h" #include "m32def.h"
#include "rev.h"
#ifdef _WIN32 #ifdef _WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -54,8 +56,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <signal.h> #include <signal.h>
#define BUILDDATE " 20100521"
static int32_t floor_over_floor; static int32_t floor_over_floor;
// static char *startwin_labeltext = "Starting Mapster32..."; // static char *startwin_labeltext = "Starting Mapster32...";
@ -585,6 +585,11 @@ static int32_t getfilenames(const char *path, const char *kind)
return(0); return(0);
} }
const char *ExtGetVer(void)
{
return s_buildRev;
}
void ExtLoadMap(const char *mapname) void ExtLoadMap(const char *mapname)
{ {
int32_t i; int32_t i;
@ -2500,14 +2505,14 @@ static void ReadPaletteTable()
// initprintf("success.\n"); // initprintf("success.\n");
}// end ReadPaletteTable }// end ReadPaletteTable
static void ReadGamePalette() static void ReadGamePalette(void)
{ {
int32_t fp; int32_t fp;
if ((fp=kopen4load("palette.dat",0)) == -1) if ((fp=kopen4load("palette.dat",0)) == -1)
if ((fp=kopen4load("palette.dat",1)) == -1) if ((fp=kopen4load("palette.dat",1)) == -1)
{ {
initprintf("!!! PALETTE.DAT NOT FOUND !!!\n"); initprintf("!!! PALETTE.DAT NOT FOUND !!!\n");
Bstrcpy(tempbuf, "Mapster32"VERSION BUILDDATE); Bsprintf(tempbuf, "Mapster32 %s %s", VERSION, s_buildRev);
wm_msgbox(tempbuf,"palette.dat not found"); wm_msgbox(tempbuf,"palette.dat not found");
exit(0); exit(0);
} }
@ -7316,7 +7321,8 @@ static void G_ShowParameterHelp(void)
#endif #endif
"\n-?, -help, --help\tDisplay this help message and exit" "\n-?, -help, --help\tDisplay this help message and exit"
; ;
wm_msgbox("Mapster32"VERSION BUILDDATE,"%s",s); Bsprintf(tempbuf, "Mapster32 %s %s", VERSION, s_buildRev);
wm_msgbox(tempbuf, "%s", s);
} }
static void AddGamePath(const char *buffer) static void AddGamePath(const char *buffer)
@ -7602,8 +7608,9 @@ int32_t ExtPreInit(int32_t argc,const char **argv)
#endif #endif
OSD_SetLogFile("mapster32.log"); OSD_SetLogFile("mapster32.log");
OSD_SetVersion("Mapster32"VERSION,0,2); OSD_SetVersion("Mapster32" " " VERSION,0,2);
initprintf("Mapster32"VERSION BUILDDATE"\n"); initprintf("Mapster32 %s %s\n", VERSION, s_buildRev);
initprintf("Compiled %s\n", __DATE__" "__TIME__);
// initprintf("Copyright (c) 2008 EDuke32 team\n"); // initprintf("Copyright (c) 2008 EDuke32 team\n");
G_CheckCommandLine(argc,argv); G_CheckCommandLine(argc,argv);
@ -9189,7 +9196,7 @@ int32_t ExtInit(void)
getmessageleng = 0; getmessageleng = 0;
getmessagetimeoff = 0; getmessagetimeoff = 0;
Bstrcpy(apptitle, "Mapster32"VERSION BUILDDATE); Bsprintf(apptitle, "Mapster32 %s %s", VERSION, s_buildRev);
autosavetimer = totalclock+120*autosave; autosavetimer = totalclock+120*autosave;
#if defined(DUKEOSD) #if defined(DUKEOSD)