diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 967898939..9b62ff8d9 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //------------------------------------------------------------------------- // this is checked against http://eduke32.com/VERSION -#define BUILDDATE " 20080825" +#define BUILDDATE " 20080826" #define APPNAME "EDuke32" #define VERSION " 1.5.0devel" #define HEAD2 APPNAME VERSION BUILDDATE diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 9897f4580..7237d1355 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10178,6 +10178,8 @@ static void Startup(void) { int i; + inittimer(TICRATE); + compilecons(); CONFIG_ReadKeys(); // we re-read the keys after compiling the CONs @@ -10306,8 +10308,6 @@ static void Startup(void) for (i=0;i 1) @@ -1494,10 +1482,7 @@ static int keyword(void) i = 0; while (isaltok(*temptextptr)) - { - tempbuf[i] = *(temptextptr++); - i++; - } + tempbuf[i++] = *(temptextptr++); tempbuf[i] = 0; return HASH_find(&keywH,tempbuf); } @@ -1578,7 +1563,7 @@ static void transvartype(int type) getlabel(); return; } - else if ((*textptr == '-') && !isdigit(*(textptr+1))) + else if ((*textptr == '-')/* && !isdigit(*(textptr+1))*/) { if (!type) { @@ -2069,20 +2054,6 @@ static int parsecommand(void) ReportError(ERROR_ISAKEYWORD); return 0; } -#if 0 - for (i=0;i= 0 && !aGameVars[i].bReset) { - if (aGameVars[i].szLabel != NULL && !aGameVars[i].bReset) + // found it... + if (aGameVars[i].dwFlags & (GAMEVAR_FLAG_INTPTR|GAMEVAR_FLAG_SHORTPTR|GAMEVAR_FLAG_CHARPTR)) { - if (Bstrcmp(pszLabel,aGameVars[i].szLabel) == 0) - { - // found it... - if (aGameVars[i].dwFlags & (GAMEVAR_FLAG_INTPTR|GAMEVAR_FLAG_SHORTPTR|GAMEVAR_FLAG_CHARPTR)) - { - // warning++; - // initprintf("%s:%d: warning: Internal gamevar '%s' cannot be redefined.\n",compilefile,line_number,label+(labelcnt<<6)); - ReportError(-1); - initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",compilefile,line_number,label+(labelcnt<<6)); - return 0; - } - else if ((aGameVars[i].dwFlags & GAMEVAR_FLAG_DEFAULT) || (aGameVars[i].dwFlags & GAMEVAR_FLAG_SYSTEM)) - { - //Bsprintf(g_szBuf,"Replacing %s at %d",pszLabel,i); - //AddLog(g_szBuf); - //b=1; - // it's OK to replace - break; - } - else - { - // it's a duplicate in error - warning++; - ReportError(WARNING_DUPLICATEDEFINITION); - return 0; - } - } + // warning++; + // initprintf("%s:%d: warning: Internal gamevar '%s' cannot be redefined.\n",compilefile,line_number,label+(labelcnt<<6)); + ReportError(-1); + initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",compilefile,line_number,label+(labelcnt<<6)); + return 0; + } + else if (!(aGameVars[i].dwFlags & GAMEVAR_FLAG_DEFAULT) && !(aGameVars[i].dwFlags & GAMEVAR_FLAG_SYSTEM)) + { + // it's a duplicate in error + warning++; + ReportError(WARNING_DUPLICATEDEFINITION); + return 0; } } + if (i == -1) + i = iGameVarCount; + if (i < MAXGAMEVARS) { // Set values diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 97bc094b2..d93779021 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -455,7 +455,7 @@ static void modval(int min, int max,int *p,int dainc,int damodify) #define UNSELMENUSHADE 10 #define DISABLEDMENUSHADE 20 -#define MENUHIGHLIGHT(x) probey==x?-(sintable[(totalclock<<4)&2047]>>12):UNSELMENUSHADE +#define MENUHIGHLIGHT(x) probey==x?(sintable[(totalclock<<5)&2047]>>12):UNSELMENUSHADE // #define MENUHIGHLIGHT(x) probey==x?-(sintable[(totalclock<<4)&2047]>>12):probey-x>=0?(probey-x)<<2:-((probey-x)<<2) #define SHX(X) 0