diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index b3ce1ee3b..330f1ce04 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -97,10 +97,6 @@ int32 ScreenBPP = 8; #endif int32 ForceSetup = 1; -static char setupfilename[BMAX_PATH]= - { - SETUPFILENAME - }; int32 scripthandle = -1; static int32 setupread=0; @@ -635,6 +631,8 @@ int32 CONFIG_ReadSetup(void) if (SafeFileExists(setupfilename) && scripthandle < 0) // JBF 20031211 scripthandle = SCRIPT_Load(setupfilename); + initprintf("Using config file %s.\n",setupfilename); + if (scripthandle < 0) return -1; if (scripthandle >= 0) diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 36dd0205a..4455fecdc 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -880,6 +880,8 @@ extern short weapon_sprites[MAX_WEAPONS]; extern int redefined_quote_count; +extern char setupfilename[BMAX_PATH]; + #ifdef __cplusplus } #endif diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ca97fb3ec..243bae107 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8304,9 +8304,9 @@ int loadgroupfiles(char *fn) int j = initgroupfile(fn); if (j == -1) - initprintf("Could not find GRP file %s.\n",fn); + initprintf("Warning: could not find group file %s.\n",fn); else - initprintf("Using GRP file %s.\n",fn); + initprintf("Using group file %s.\n",fn); } } break; @@ -8359,6 +8359,16 @@ void checkcommandline(int argc,char **argv) c = argv[i]; if (((*c == '/') || (*c == '-')) && (!firstnet)) { + if (!Bstrcasecmp(c+1,"cfg")) + { + if (argc > i+1) + { + Bstrcpy(setupfilename,argv[i+1]); + i++; + } + i++; + continue; + } if (!Bstrcasecmp(c+1,"nam")) { strcpy(defaultduke3dgrp, "nam.grp"); @@ -9660,6 +9670,8 @@ void app_main(int argc,char **argv) kclose(i); } + loadgroupfiles(duke3ddef); + { struct strllist *s; while (CommandGrps) @@ -9679,8 +9691,6 @@ void app_main(int argc,char **argv) } } - loadgroupfiles(duke3ddef); - copyprotect(); if (cp) return; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 3e862a7cb..6620c02b4 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -6910,7 +6910,7 @@ good: } default: - OSD_Printf("fatal error: default processing: %ld, %ld\ncurrent actor: %d (%d)\n",*insptr,*(insptr-1),g_i,g_sp->picnum); + OSD_Printf("fatal error: default processing: prev inst: %ld, curr inst: %ld, next inst: %ld\ncurrent actor: %d (%d)\n",*(insptr-1),*insptr,*(insptr+1),g_i,g_sp->picnum); gameexit("An error has occurred in the EDuke32 CON executor.\n\nPlease mail all of your CON files along with the file eduke32.log\nto terminx@gmail.com.\n\nThank you."); break; } diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 2633d6727..82c3f83b2 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -179,3 +179,4 @@ int spriteflags[MAXTILES], actorspriteflags[MAXSPRITES]; proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES]; char cheatkey[2] = { sc_D, sc_N }; +char setupfilename[BMAX_PATH]= "duke3d.cfg";