diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 24762a540..cb1d7b063 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10009,8 +10009,8 @@ int32_t app_main(int32_t argc,const char **argv) int32_t i; for (fg = foundgrps; fg; fg=fg->next) { - for (i = 0; icrcval == grpfiles[i].crcval) break; - if (i == numgrpfiles) continue; // unrecognised grp file + for (i = 0; icrcval == grpfiles[i].crcval) break; + if (i == NUMGRPFILES) continue; // unrecognised grp file fg->game = grpfiles[i].game; if (!first) first = fg; if (!Bstrcasecmp(fg->name, defaultduke3dgrp)) diff --git a/polymer/eduke32/source/grpscan.c b/polymer/eduke32/source/grpscan.c index 4c7b87a84..1410be3e7 100644 --- a/polymer/eduke32/source/grpscan.c +++ b/polymer/eduke32/source/grpscan.c @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "duke3d.h" #include "grpscan.h" -struct grpfile grpfiles[numgrpfiles] = +struct grpfile grpfiles[NUMGRPFILES] = { { "Duke Nukem 3D", 0xBBC9CE44, 26524524, GAME_DUKE, NULL }, { "Duke Nukem 3D: Atomic Edition", 0xF514A6AC, 44348015, GAME_DUKE, NULL }, diff --git a/polymer/eduke32/source/grpscan.h b/polymer/eduke32/source/grpscan.h index 574cce643..e993258df 100644 --- a/polymer/eduke32/source/grpscan.h +++ b/polymer/eduke32/source/grpscan.h @@ -24,14 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __grpscan_h__ // List of internally-known GRP files -#define numgrpfiles 8 +#define NUMGRPFILES 8 struct grpfile { const char *name; int32_t crcval; int32_t size; int32_t game; struct grpfile *next; -} grpfiles[numgrpfiles], *foundgrps; +} grpfiles[NUMGRPFILES], *foundgrps; int32_t ScanGroups(void); void FreeGroups(void); diff --git a/polymer/eduke32/source/startgtk.game.c b/polymer/eduke32/source/startgtk.game.c index 65548ba36..31dcaadc7 100644 --- a/polymer/eduke32/source/startgtk.game.c +++ b/polymer/eduke32/source/startgtk.game.c @@ -447,9 +447,9 @@ static void PopulateForm(unsigned char pgs) for (fg = foundgrps; fg; fg=fg->next) { - for (i = 0; icrcval == grpfiles[i].crcval) break; - if (i == numgrpfiles) continue; // unrecognised grp file + if (i == NUMGRPFILES) continue; // unrecognised grp file gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, 0, grpfiles[i].name, 1, fg->name, 2, (gpointer)fg, -1); @@ -918,8 +918,8 @@ int32_t startwin_run(void) if (settings.autoload) ud.config.NoAutoLoad = FALSE; else ud.config.NoAutoLoad = TRUE; - for (i = 0; inext) { - for (i = 0; icrcval == grpfiles[i].crcval) break; - if (i == numgrpfiles) continue; // unrecognised grp file + for (i = 0; icrcval == grpfiles[i].crcval) break; + if (i == NUMGRPFILES) continue; // unrecognised grp file Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name); j = ListBox_AddString(hwnd, buf); (void)ListBox_SetItemData(hwnd, j, (LPARAM)fg); @@ -782,8 +782,8 @@ int32_t startwin_run(void) Bstrcpy(g_modDir,settings.gamedir); else Bsprintf(g_modDir,"/"); - for (i = 0; i