diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index eb266ace0..3f404c4aa 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -6165,12 +6165,10 @@ static void C_AddDefinition(const char *lLabel,int32_t lValue,int32_t lType) // KEEPINSYNC lunatic/con_lang.lua static void C_AddDefaultDefinitions(void) { - int32_t i; - - for (i=0; i=0; i--) + for (i=MAXQUOTES-1, j=g_numXStrings; i>=0; i--) { if (apStrings[i]) j++; } - if (j) initprintf("%d quotes, ", j); + if (j) initprintf("%d strings, ", j); for (i=MAXGAMEEVENTS-1, j=0; i>=0; i--) { @@ -6377,12 +6381,10 @@ void C_PrintStats(void) void C_Compile(const char *fileName) { - int32_t i; - Bmemset(apScriptEvents, 0, sizeof(apScriptEvents)); Bmemset(apScriptGameEventEnd, 0, sizeof(apScriptGameEventEnd)); - for (i=MAXTILES-1; i>=0; i--) + for (int i=MAXTILES-1; i>=0; i--) Bmemset(&g_tile[i], 0, sizeof(tiledata_t)); C_InitHashes(); @@ -6450,7 +6452,7 @@ void C_Compile(const char *fileName) C_ParseCommand(1); - for (i=0; i < g_scriptModulesNum; ++i) + for (int i=0; i < g_scriptModulesNum; ++i) { C_Include(g_scriptModules[i]); Bfree(g_scriptModules[i]); @@ -6476,7 +6478,7 @@ void C_Compile(const char *fileName) G_GameExit(buf); } - for (i = 0; i < MAXEVENTS; ++i) + for (int i = 0; i < MAXEVENTS; ++i) { intptr_t *eventEnd = apScript + apScriptGameEventEnd[i]; if (eventEnd) @@ -6499,7 +6501,7 @@ void C_Compile(const char *fileName) initprintf("Script compiled in %dms, %ld bytes%s\n", getticks() - startcompiletime, (unsigned long)(g_scriptPtr-apScript), C_ScriptVersionString(g_scriptVersion)); - for (i=0; (unsigned)i < ARRAY_SIZE(tables_free); i++) + for (unsigned i=0; i < ARRAY_SIZE(tables_free); i++) hash_free(tables_free[i]); freehashnames();