diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 71306bd33..18b5e1b31 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -176,7 +176,7 @@ int r_glowmapping = 1; int r_vertexarrays = 1; // Vertex Buffer Objects model drawing cvars -int r_vbos = 0; +int r_vbos = 1; int r_vbocount = 64; // model animation smoothing cvar @@ -339,7 +339,7 @@ void drawline2d(float x0, float y0, float x1, float y1, char col) int cachefilehandle = -1; // texture cache file handle FILE *cacheindexptr = NULL; -struct HASH_table cacheH = { MAXTILES<<2, NULL }; +struct HASH_table cacheH = { 1024, NULL }; char TEXCACHEFILE[BMAX_PATH] = "textures"; diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 5dbfea1c8..1b3835c87 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. =================== */ -struct HASH_table gamefuncH = { NUMGAMEFUNCTIONS<<2, NULL }; +struct HASH_table gamefuncH = { NUMGAMEFUNCTIONS<<1, NULL }; int32 CONFIG_FunctionNameToNum(char * func) { diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 8d838f137..2168933fd 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -935,20 +935,20 @@ const memberlabel_t InputLabels[]= char *bitptr; // pointer to bitmap of which bytecode positions contain pointers #define BITPTR_POINTER 1 -struct HASH_table gamevarH = { MAXGAMEVARS<<2, NULL }; -struct HASH_table arrayH = { MAXGAMEARRAYS<<2, NULL }; -struct HASH_table labelH = { 11264<<2, NULL }; -struct HASH_table keywH = { CON_END<<2, NULL }; +struct HASH_table gamevarH = { MAXGAMEVARS>>1, NULL }; +struct HASH_table arrayH = { MAXGAMEARRAYS>>1, NULL }; +struct HASH_table labelH = { 11264>>1, NULL }; +struct HASH_table keywH = { CON_END>>1, NULL }; -struct HASH_table sectorH = { SECTOR_END<<2, NULL }; -struct HASH_table wallH = { WALL_END<<2, NULL }; -struct HASH_table userdefH = { USERDEFS_END<<2, NULL }; +struct HASH_table sectorH = { SECTOR_END>>1, NULL }; +struct HASH_table wallH = { WALL_END>>1, NULL }; +struct HASH_table userdefH = { USERDEFS_END>>1, NULL }; -struct HASH_table projectileH = { PROJ_END<<2, NULL }; -struct HASH_table playerH = { PLAYER_END<<2, NULL }; -struct HASH_table inputH = { INPUT_END<<2, NULL }; -struct HASH_table actorH = { ACTOR_END<<2, NULL }; -struct HASH_table tspriteH = { ACTOR_END<<2, NULL }; +struct HASH_table projectileH = { PROJ_END>>1, NULL }; +struct HASH_table playerH = { PLAYER_END>>1, NULL }; +struct HASH_table inputH = { INPUT_END>>1, NULL }; +struct HASH_table actorH = { ACTOR_END>>1, NULL }; +struct HASH_table tspriteH = { ACTOR_END>>1, NULL }; void inithashnames(); void freehashnames(); @@ -4621,9 +4621,16 @@ repeatcase: g_numCompilerErrors++; C_ReportError(ERROR_SYNTAXERROR); } + if (C_GetKeyword() == CON_NULLOP) + { + initprintf("%s:%d: warning: 'nullop' statement has no effect\n",g_szScriptFileName,g_lineNumber); + C_GetNextKeyword(); + g_scriptPtr--; + } if (C_GetKeyword() == CON_RIGHTBRACE) // optimize "{ }" into "nullop" { -// initprintf("%s:%d: optimizing \"{ }\" -> nullop\n",g_szScriptFileName,g_lineNumber); + if (g_scriptDebug) + initprintf("%s:%d: rewriting empty braces '{ }' as 'nullop'\n",g_szScriptFileName,g_lineNumber); *(--g_scriptPtr) = CON_NULLOP; C_GetNextKeyword(); g_scriptPtr--; @@ -5263,6 +5270,11 @@ repeatcase: g_numCompilerWarnings++; } case CON_NULLOP: + if (tw == CON_NULLOP) + { + if (C_GetKeyword() != CON_ELSE) + initprintf("%s:%d: warning: found 'nullop' without 'else'\n",g_szScriptFileName,g_lineNumber); + } case CON_STOPALLSOUNDS: return 0; case CON_GAMESTARTUP: diff --git a/polymer/eduke32/source/namesdyn.c b/polymer/eduke32/source/namesdyn.c index eabc6d8bf..93661b06c 100644 --- a/polymer/eduke32/source/namesdyn.c +++ b/polymer/eduke32/source/namesdyn.c @@ -35,7 +35,7 @@ struct dynitem short vstat; short val; }; -struct HASH_table dynnamesH = {4096<<2, NULL}; +struct HASH_table dynnamesH = {512, NULL}; struct dynitem list[]= {