From 6ae2e2d140080b49641b554ea58d02337d325afb Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 18 Oct 2008 12:37:26 +0000 Subject: [PATCH] Misc shit git-svn-id: https://svn.eduke32.com/eduke32@1101 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/Makefile | 49 +++++++-- polymer/build/Makefile.shared | 10 ++ polymer/build/src/build.c | 2 +- polymer/build/src/config.c | 16 ++- polymer/build/src/dynamicgtk.c | 2 +- polymer/build/src/osd.c | 8 +- polymer/build/src/sdlayer.c | 15 ++- polymer/build/src/winlayer.c | 26 ++++- polymer/eduke32/Makefile | 97 ++++++++++++++--- polymer/eduke32/source/_functio.h | 10 +- polymer/eduke32/source/astub.c | 170 +++++++++++++++--------------- polymer/eduke32/source/duke3d.h | 4 +- polymer/eduke32/source/game.c | 54 +++++----- polymer/eduke32/source/gameexec.c | 3 +- polymer/eduke32/source/global.c | 1 + polymer/eduke32/source/osdcmds.c | 4 + 16 files changed, 319 insertions(+), 152 deletions(-) diff --git a/polymer/build/Makefile b/polymer/build/Makefile index f57d57305..5a4a3bb98 100644 --- a/polymer/build/Makefile +++ b/polymer/build/Makefile @@ -227,25 +227,60 @@ include Makefile.deps # RULES $(OBJ)/%.$o: $(SRC)/%.nasm - $(AS) $(ASFLAGS) $< -o $@ + ${COMPILE_STATUS} + if $(AS) $(ASFLAGS) $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(SRC)/%.c - $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ + ${COMPILE_STATUS} + if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(SRC)/%.m - $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ + ${COMPILE_STATUS} + if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(SRC)/%.cpp - $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@ + ${COMPILE_STATUS} + if $(CXX) $(CXXFLAGS) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(SRC)/misc/%.rc - $(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC) + ${COMPILE_STATUS} + if $(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC); then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(SRC)/util/%.c - $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ + ${COMPILE_STATUS} + if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/%.$o: $(RSRC)/%.c - $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@ + ${COMPILE_STATUS} + if $(CC) $(CFLAGS) $(OURCFLAGS) -c $< -o $@; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi $(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c echo "#include " > $@ diff --git a/polymer/build/Makefile.shared b/polymer/build/Makefile.shared index ccb260d97..1cb339dfa 100644 --- a/polymer/build/Makefile.shared +++ b/polymer/build/Makefile.shared @@ -176,3 +176,13 @@ ifneq (0,$(POLYMER)) endif endif endif + +BUILD_STARTED = printf "\033[K\033[1;36mBuild started with $($OURCFLAGS)\033[0m\n" +BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful.\033[0m\n" +COMPILE_STATUS = printf "\033[K\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r" +COMPILE_OK = printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n" +COMPILE_FAILED = printf "\033[K\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1 +LINK_STATUS = printf "\033[K\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r" +LINK_OK = printf "\033[K\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n" +LINK_FAILED = printf "\033[K\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1 + diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index bd9fff68a..021bad0ad 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -24,7 +24,7 @@ #define updatecrc16(crc,dat) (crc = (((crc<<8)&65535)^crctable[((((unsigned short)crc)>>8)&65535)^dat])) static int crctable[256]; -static char kensig[32]; +static char kensig[64]; extern int ExtInit(void); extern int ExtPreInit(int argc,const char **argv); diff --git a/polymer/build/src/config.c b/polymer/build/src/config.c index f2f5f9a5b..57313c563 100644 --- a/polymer/build/src/config.c +++ b/polymer/build/src/config.c @@ -228,7 +228,17 @@ int loadsetup(const char *fn) if (readconfig(fp, "showheightindicators", val, VL) > 0) showheightindicators = min(max(Batoi(val),0),2); - for (i=0;i<256;i++)remap[i]=i; +#ifdef _WIN32 + { + extern char map_dik_code(int); + for (i=0;i<256;i++) + remap[i]=map_dik_code(i); + } +#else + for (i=0;i<256;i++) + remap[i]=i; +#endif + remapinit=1; if (readconfig(fp, "remap", val, VL) > 0) { @@ -434,8 +444,8 @@ int writesetup(const char *fn) keys[19] ); - - for (i=0;i<256;i++)if (remap[i]!=i) + for (i=0;i<256;i++) + if (remap[i]!=i) { Bfprintf(fp,first?"%02X-%02X":",%02X-%02X",i,remap[i]); first=0; diff --git a/polymer/build/src/dynamicgtk.c b/polymer/build/src/dynamicgtk.c index 060c87fe4..8228b279c 100644 --- a/polymer/build/src/dynamicgtk.c +++ b/polymer/build/src/dynamicgtk.c @@ -20,7 +20,7 @@ int dynamicgtk_init(void) if (handle) return 1; - handle = dlopen("libgtk-x11-2.0.so", RTLD_NOW|RTLD_GLOBAL); + handle = dlopen("libgtk-x11-2.0.so.0", RTLD_NOW|RTLD_GLOBAL); if (!handle) return -1; memset(&dynamicgtksyms, 0, sizeof(dynamicgtksyms)); diff --git a/polymer/build/src/osd.c b/polymer/build/src/osd.c index dae40c763..1ee5fada6 100644 --- a/polymer/build/src/osd.c +++ b/polymer/build/src/osd.c @@ -1849,15 +1849,21 @@ static symbol_t *findsymbol(const char *name, symbol_t *startingat) static symbol_t *findexactsymbol(const char *name) { int i; + char *lname = Bstrdup(name); if (!symbols) return NULL; - i = HASH_findcase(&osdsymbolsH,name); + for (i=Bstrlen(lname);i>=0;i--) + lname[i] = Btolower(lname[i]); + + i = HASH_findcase(&osdsymbolsH,lname); if (i > -1) { // if ((symbol_t *)osdsymbptrs[i]->func == (void *)OSD_UNALIASED) // return NULL; + Bfree(lname); return osdsymbptrs[i]; } + Bfree(lname); return NULL; } diff --git a/polymer/build/src/sdlayer.c b/polymer/build/src/sdlayer.c index ac75eec24..cc266899a 100644 --- a/polymer/build/src/sdlayer.c +++ b/polymer/build/src/sdlayer.c @@ -1477,14 +1477,14 @@ int handleevents(void) { SetKey(code, 1); if (keypresscallback) - keypresscallback(code, 1); + keypresscallback(remap[code], 1); } } else { SetKey(code, 0); if (keypresscallback) - keypresscallback(code, 0); + keypresscallback(remap[code], 0); } break; @@ -1515,13 +1515,19 @@ int handleevents(void) case SDL_MOUSEBUTTONUP: switch (ev.button.button) { + // some of these get reordered to match winlayer case SDL_BUTTON_LEFT: j = 0; break; case SDL_BUTTON_RIGHT: j = 1; break; case SDL_BUTTON_MIDDLE: j = 2; break; - default: + case SDL_BUTTON_X1: + j = 3; break; + case SDL_BUTTON_X2: + j = 6; break; + case SDL_BUTTON_WHEELUP: + case SDL_BUTTON_WHEELDOWN: j = ev.button.button; break; } if (j<0) break; @@ -1540,7 +1546,8 @@ int handleevents(void) } else { - if (j < 4) mouseb &= ~(1< #endif -#define BUILDDATE " 20081011" +#define BUILDDATE " 20081017" #define VERSION " 1.2.0devel" static int floor_over_floor; @@ -1942,7 +1942,7 @@ static void PrintStatus(char *string,int num,char x,char y,char color) static inline void SpriteName(short spritenum, char *lo2) { - Bsprintf(lo2,names[sprite[spritenum].picnum]); + Bstrcpy(lo2,names[sprite[spritenum].picnum]); }// end SpriteName static void ReadPaletteTable() @@ -7534,7 +7534,7 @@ static void checkcommandline(int argc, const char **argv) if (j > 0) { testplay_addparam[j-1] = 0; - Brealloc(testplay_addparam, j*sizeof(char)); + testplay_addparam = Brealloc(testplay_addparam, j*sizeof(char)); } else { @@ -8955,95 +8955,95 @@ static void Keys2d3d(void) if ((!eitherALT && cursectnum >= 0) || (eitherALT && startsectnum >= 0)) { - char *param = " -map autosave.map -noinstancechecking"; - char *fullparam; - char current_cwd[BMAX_PATH]; - int slen = 0; - BFILE *fp; + char *param = " -map autosave.map -noinstancechecking"; + char *fullparam; + char current_cwd[BMAX_PATH]; + int slen = 0; + BFILE *fp; - if ((program_origcwd[0] == '\0') || !getcwd(current_cwd, BMAX_PATH)) - current_cwd[0] = '\0'; - else // Before we check if file exists, for the case there's no absolute path. - chdir(program_origcwd); + if ((program_origcwd[0] == '\0') || !getcwd(current_cwd, BMAX_PATH)) + current_cwd[0] = '\0'; + else // Before we check if file exists, for the case there's no absolute path. + chdir(program_origcwd); - fp = fopen(game_executable, "rb"); // File exists? - if (fp != NULL) - fclose(fp); - else - { + fp = fopen(game_executable, "rb"); // File exists? + if (fp != NULL) + fclose(fp); + else + { #ifdef _WIN32 - fullparam = Bstrrchr(mapster32_fullpath, '\\'); + fullparam = Bstrrchr(mapster32_fullpath, '\\'); #else - fullparam = Bstrrchr(mapster32_fullpath, '/'); + fullparam = Bstrrchr(mapster32_fullpath, '/'); #endif - if (fullparam) - { - slen = fullparam-mapster32_fullpath+1; - Bstrncpy(game_executable, mapster32_fullpath, slen); - // game_executable is now expected to not be NULL-terminated! - Bstrcpy(game_executable+slen, DEFAULT_GAME_EXEC); - } - else - Bstrcpy(game_executable, DEFAULT_GAME_LOCAL_EXEC); - } - - if (current_cwd[0] != '\0') // Temporarily changing back, - chdir(current_cwd); // after checking if file exists. - - if (testplay_addparam) - slen = Bstrlen(testplay_addparam); - - // Considering the NULL character, quatation marks - // and a possible extra space not in testplay_addparam, - // the length should be Bstrlen(game_executable)+Bstrlen(param)+(slen+1)+2+1. - - fullparam = Bmalloc(Bstrlen(game_executable)+Bstrlen(param)+slen+4); - Bsprintf(fullparam,"\"%s\"",game_executable); - - if (testplay_addparam) + if (fullparam) { - Bstrcat(fullparam, " "); - Bstrcat(fullparam, testplay_addparam); + slen = fullparam-mapster32_fullpath+1; + Bstrncpy(game_executable, mapster32_fullpath, slen); + // game_executable is now expected to not be NULL-terminated! + Bstrcpy(game_executable+slen, DEFAULT_GAME_EXEC); } - Bstrcat(fullparam, param); - - fixspritesectors(); //Do this before saving! - ExtPreSaveMap(); - if (eitherALT) - saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum); else - saveboard("autosave.map",&posx,&posy,&posz,&ang,&cursectnum); - message("Board saved to AUTOSAVE.MAP. Starting the game..."); + Bstrcpy(game_executable, DEFAULT_GAME_LOCAL_EXEC); + } - uninitmouse(); + if (current_cwd[0] != '\0') // Temporarily changing back, + chdir(current_cwd); // after checking if file exists. + + if (testplay_addparam) + slen = Bstrlen(testplay_addparam); + + // Considering the NULL character, quatation marks + // and a possible extra space not in testplay_addparam, + // the length should be Bstrlen(game_executable)+Bstrlen(param)+(slen+1)+2+1. + + fullparam = Bmalloc(Bstrlen(game_executable)+Bstrlen(param)+slen+4); + Bsprintf(fullparam,"\"%s\"",game_executable); + + if (testplay_addparam) + { + Bstrcat(fullparam, " "); + Bstrcat(fullparam, testplay_addparam); + } + Bstrcat(fullparam, param); + + fixspritesectors(); //Do this before saving! + ExtPreSaveMap(); + if (eitherALT) + saveboard("autosave.map",&startposx,&startposy,&startposz,&startang,&startsectnum); + else + saveboard("autosave.map",&posx,&posy,&posz,&ang,&cursectnum); + message("Board saved to AUTOSAVE.MAP. Starting the game..."); + + uninitmouse(); #ifdef _WIN32 - { - STARTUPINFO si; - PROCESS_INFORMATION pi; + { + STARTUPINFO si; + PROCESS_INFORMATION pi; - ZeroMemory(&si,sizeof(si)); - ZeroMemory(&pi,sizeof(pi)); - si.cb = sizeof(si); + ZeroMemory(&si,sizeof(si)); + ZeroMemory(&pi,sizeof(pi)); + si.cb = sizeof(si); - if (!CreateProcess(NULL,fullparam,NULL,NULL,0,0,NULL,NULL,&si,&pi)) - message("Error launching the game!"); - else WaitForSingleObject(pi.hProcess,INFINITE); - } + if (!CreateProcess(NULL,fullparam,NULL,NULL,0,0,NULL,NULL,&si,&pi)) + message("Error launching the game!"); + else WaitForSingleObject(pi.hProcess,INFINITE); + } #else - if (current_cwd[0] != '\0') - { - chdir(program_origcwd); - system(fullparam); - // message("Error launching the game!"); - chdir(current_cwd); - } - else system(fullparam); -#endif + if (current_cwd[0] != '\0') + { + chdir(program_origcwd); + system(fullparam); // message("Error launching the game!"); - message("Game process exited"); - initmouse(); + chdir(current_cwd); + } + else system(fullparam); +#endif + // message("Error launching the game!"); + message("Game process exited"); + initmouse(); - Bfree(fullparam); + Bfree(fullparam); } else message("Position must be in valid player space to test map!"); @@ -10430,7 +10430,7 @@ static void FuncMenu(void) { case 0: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j = 0; @@ -10460,7 +10460,7 @@ static void FuncMenu(void) break; case 1: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { Bsprintf(tempbuf,"Delete all sprites of tile #: "); @@ -10480,7 +10480,7 @@ static void FuncMenu(void) break; case 2: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Set map sky shade: ",0,128,1); @@ -10496,7 +10496,7 @@ static void FuncMenu(void) break; case 3: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Set map sky height: ",0,16777216,1); @@ -10515,7 +10515,7 @@ static void FuncMenu(void) break; case 4: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Z offset: ",0,16777216,1); @@ -10536,7 +10536,7 @@ static void FuncMenu(void) break; case 5: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Percentage of original: ",100,1000,0); @@ -10577,7 +10577,7 @@ static void FuncMenu(void) break; case 6: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Shade divisor: ",1,128,1); @@ -10600,7 +10600,7 @@ static void FuncMenu(void) break; case 7: { - for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,"%s",FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j=getnumber16("Visibility divisor: ",1,128,0); diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 27a39a089..c870db769 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20081011" -#define HEAD2 APPNAME VERSION BUILDDATE +extern char *s_builddate; +#define HEAD2 APPNAME VERSION #ifdef __cplusplus extern "C" { diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ab0ef16c6..23bb77184 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -844,7 +844,7 @@ void getpackets(void) for (i=connectpoint2[connecthead];i>=0;i=connectpoint2[i]) if (i != other) sendpacket(i,packbuf,packbufleng); - if (packbuf[2] != (char)atoi(BUILDDATE)) + if (packbuf[2] != (char)atoi(s_builddate)) gameexit("\nYou cannot play Duke with different versions."); other = packbuf[1]; @@ -2952,7 +2952,8 @@ void gameexit(const char *t) //printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); if (!(t[0] == ' ' && t[1] == 0)) { - wm_msgbox(HEAD2, (char *)t); + Bsprintf(tempbuf,HEAD2 " %s",s_builddate); + wm_msgbox(tempbuf, (char *)t); } } @@ -7600,7 +7601,7 @@ PALONLY: if (tsprite[j].owner < MAXSPRITES && tsprite[j].owner > 0 && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS) { OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1); - spriteext[tsprite[j].owner].tspr = NULL; +// spriteext[tsprite[j].owner].tspr = NULL; } } while (j--); @@ -7611,7 +7612,7 @@ PALONLY: if (tsprite[j].owner > 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS) { OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1); - spriteext[tsprite[j].owner].tspr = NULL; +// spriteext[tsprite[j].owner].tspr = NULL; } } #ifdef _MSC_VER @@ -8842,7 +8843,8 @@ static void comlinehelp(void) "\n-?, -help, --help\tDisplay this help message and exit" ; #if defined RENDERTYPEWIN - wm_msgbox(HEAD2,s); + Bsprintf(tempbuf,HEAD2 " %s",s_builddate); + wm_msgbox(tempbuf,s); #else initprintf("%s\n",s); #endif @@ -10534,7 +10536,7 @@ static void sendplayerupdate(void) buf[0] = 6; buf[1] = myconnectindex; - buf[2] = (char)atoi(BUILDDATE); + buf[2] = (char)atoi(s_builddate); l = 3; //null terminated player name to send @@ -10761,7 +10763,8 @@ void app_main(int argc,const char **argv) (int(*)(void))GetTime, GAME_onshowosd ); - wm_setapptitle(HEAD2); + Bsprintf(tempbuf,HEAD2 " %s",s_builddate); + wm_setapptitle(tempbuf); initprintf("%s\n",apptitle); // initprintf("Compiled %s\n",datetimestring); @@ -10892,7 +10895,7 @@ void app_main(int argc,const char **argv) initprintf("Current version is %d",atoi(tempbuf)); ud.config.LastUpdateCheck = time(NULL); - if (atoi(tempbuf) > atoi(BUILDDATE)) + if (atoi(tempbuf) > atoi(s_builddate)) { if (wm_ynbox("EDuke32","A new version of EDuke32 is available. " "Browse to http://eduke32.sourceforge.net now?")) @@ -11186,9 +11189,26 @@ void app_main(int argc,const char **argv) initprintf("Initializing OSD...\n"); - OSD_SetVersionString(HEAD2, 10,0); + Bsprintf(tempbuf,HEAD2 " %s",s_builddate); + OSD_SetVersionString(tempbuf, 10,0); registerosdcommands(); + if (CONTROL_Startup(1, &GetTime, TICRATE)) + { + uninitengine(); + exit(1); + } + SetupGameButtons(); + CONFIG_SetupMouse(); + CONFIG_SetupJoystick(); + + CONTROL_JoystickEnabled = (ud.config.UseJoystick && CONTROL_JoyPresent); + CONTROL_MouseEnabled = (ud.config.UseMouse && CONTROL_MousePresent); + + // JBF 20040215: evil and nasty place to do this, but joysticks are evil and nasty too + for (i=0;i>2,&g_player[myconnectindex].ps->palette[0],0); // if(KB_KeyPressed( sc_Escape ) ) gameexit(" "); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index e11ca9fce..0f064805e 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -1592,7 +1592,8 @@ static int parse(void) Bstrcpy(fta_quotes[i],g_player[g_p].user_name); break; case STR_VERSION: - Bstrcpy(fta_quotes[i],HEAD2); + Bsprintf(tempbuf,HEAD2 " %s",s_builddate); + Bstrcpy(fta_quotes[i],tempbuf); break; case STR_GAMETYPE: Bstrcpy(fta_quotes[i],gametype_names[ud.coop]); diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 9ac9cfc7f..d99cc8c2f 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //------------------------------------------------------------------------- #include "duke3d.h" +char *s_builddate = "20081018"; char *MusicPtr = NULL; int Musicsize; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index af434c915..249242a57 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1468,8 +1468,12 @@ int registerosdcommands(void) for (i=0;i=0;j--) + t[j] = Btolower(t[j]); Bstrcat(tempbuf,": game button"); OSD_RegisterFunction(t,Bstrdup(tempbuf),osdcmd_button); }