Fix a lot of stuff related to the version automation
This commit is contained in:
parent
1757002ddb
commit
99e0c48f7b
|
@ -2336,8 +2336,8 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room)
|
||||||
if (server_list)
|
if (server_list)
|
||||||
{
|
{
|
||||||
char version[8] = "";
|
char version[8] = "";
|
||||||
#if VERSION > 0 || SUBVERSION > 0
|
#ifndef DEVELOP
|
||||||
snprintf(version, sizeof (version), "%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION);
|
strcpy(version, SRB2VERSION);
|
||||||
#else
|
#else
|
||||||
strcpy(version, GetRevisionString());
|
strcpy(version, GetRevisionString());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -93,6 +93,10 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
||||||
|
|
||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
|
|
||||||
|
// Version numbers for netplay :upside_down_face:
|
||||||
|
int VERSION;
|
||||||
|
int SUBVERSION;
|
||||||
|
|
||||||
// platform independant focus loss
|
// platform independant focus loss
|
||||||
UINT8 window_notinfocus = false;
|
UINT8 window_notinfocus = false;
|
||||||
|
|
||||||
|
|
|
@ -9484,8 +9484,6 @@ struct {
|
||||||
{"PUSHACCEL",PUSHACCEL},
|
{"PUSHACCEL",PUSHACCEL},
|
||||||
{"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into.
|
{"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into.
|
||||||
{"CODEBASE",CODEBASE}, // or what release of SRB2 this is.
|
{"CODEBASE",CODEBASE}, // or what release of SRB2 this is.
|
||||||
{"VERSION",VERSION}, // Grab the game's version!
|
|
||||||
{"SUBVERSION",SUBVERSION}, // more precise version number
|
|
||||||
{"NEWTICRATE",NEWTICRATE}, // TICRATE*NEWTICRATERATIO
|
{"NEWTICRATE",NEWTICRATE}, // TICRATE*NEWTICRATERATIO
|
||||||
{"NEWTICRATERATIO",NEWTICRATERATIO},
|
{"NEWTICRATERATIO",NEWTICRATERATIO},
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,8 @@ extern char logfilename[1024];
|
||||||
// Otherwise we can't force updates!
|
// Otherwise we can't force updates!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define VERSIONSTRINGW WSTRING (VERSIONSTRING)
|
||||||
|
|
||||||
/* A custom URL protocol for server links. */
|
/* A custom URL protocol for server links. */
|
||||||
#define SERVER_URL_PROTOCOL "srb2://"
|
#define SERVER_URL_PROTOCOL "srb2://"
|
||||||
|
|
||||||
|
@ -487,6 +489,8 @@ char *sizeu4(size_t num);
|
||||||
char *sizeu5(size_t num);
|
char *sizeu5(size_t num);
|
||||||
|
|
||||||
// d_main.c
|
// d_main.c
|
||||||
|
extern int VERSION;
|
||||||
|
extern int SUBVERSION;
|
||||||
extern boolean devparm; // development mode (-debug)
|
extern boolean devparm; // development mode (-debug)
|
||||||
// d_netcmd.c
|
// d_netcmd.c
|
||||||
extern INT32 cv_debug;
|
extern INT32 cv_debug;
|
||||||
|
|
|
@ -367,4 +367,8 @@ typedef UINT32 tic_t;
|
||||||
#define UINT2RGBA(a) (UINT32)((a&0xff)<<24)|((a&0xff00)<<8)|((a&0xff0000)>>8)|(((UINT32)a&0xff000000)>>24)
|
#define UINT2RGBA(a) (UINT32)((a&0xff)<<24)|((a&0xff00)<<8)|((a&0xff0000)>>8)|(((UINT32)a&0xff000000)>>24)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* preprocessor dumb and needs second macro to expand input */
|
||||||
|
#define WSTRING2(s) L ## s
|
||||||
|
#define WSTRING(s) WSTRING2 (s)
|
||||||
|
|
||||||
#endif //__DOOMTYPE__
|
#endif //__DOOMTYPE__
|
||||||
|
|
|
@ -344,6 +344,12 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
||||||
} else if (fastcmp(word,"gravity")) {
|
} else if (fastcmp(word,"gravity")) {
|
||||||
lua_pushinteger(L, gravity);
|
lua_pushinteger(L, gravity);
|
||||||
return 1;
|
return 1;
|
||||||
|
} else if (fastcmp(word,"VERSION")) {
|
||||||
|
lua_pushinteger(L, VERSION);
|
||||||
|
return 1;
|
||||||
|
} else if (fastcmp(word,"SUBVERSION")) {
|
||||||
|
lua_pushinteger(L, SUBVERSION);
|
||||||
|
return 1;
|
||||||
} else if (fastcmp(word,"VERSIONSTRING")) {
|
} else if (fastcmp(word,"VERSIONSTRING")) {
|
||||||
lua_pushstring(L, VERSIONSTRING);
|
lua_pushstring(L, VERSIONSTRING);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -754,8 +754,8 @@ static INT32 AddToMasterServer(boolean firstadd)
|
||||||
strcpy(info->port, int2str(current_port));
|
strcpy(info->port, int2str(current_port));
|
||||||
strcpy(info->name, cv_servername.string);
|
strcpy(info->name, cv_servername.string);
|
||||||
M_Memcpy(&info->room, & room, sizeof (INT32));
|
M_Memcpy(&info->room, & room, sizeof (INT32));
|
||||||
#if VERSION > 0 || SUBVERSION > 0
|
#ifndef DEVELOP
|
||||||
sprintf(info->version, "%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION);
|
strcpy(info->version, SRB2VERSION);
|
||||||
#else // Trunk build, send revision info
|
#else // Trunk build, send revision info
|
||||||
strcpy(info->version, GetRevisionString());
|
strcpy(info->version, GetRevisionString());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue