diff --git a/polymer/build/src/osd.c b/polymer/build/src/osd.c index 2f2b4d22f..1daf84486 100644 --- a/polymer/build/src/osd.c +++ b/polymer/build/src/osd.c @@ -597,7 +597,7 @@ static int _internal_osdfunc_history(const osdfuncparm_t *parm) { int i, j = 0; UNREFERENCED_PARAMETER(parm); - OSD_Printf("%s\n",parm->raw); + OSD_Printf(OSDTEXT_RED "Command history:\n"); for (i=HISTORYDEPTH-1; i>=0;i--) if (osdhistorybuf[i][0]) OSD_Printf("%4d \"%s\"\n",osdhistorytotal-osdhistorysize+(++j),osdhistorybuf[i]); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index b872fd4e7..3265ae8e8 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -113,7 +113,7 @@ char *duke3dgrpstring = NULL; static char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"}; static char *confilename = defaultconfilename; char *duke3ddef = "duke3d.def"; -char mod_dir[BMAX_PATH] = ""; +char mod_dir[BMAX_PATH] = "/"; extern int lastvisinc; @@ -7432,8 +7432,6 @@ PALONLY: #pragma optimize("",on) #endif -static char terminx[64] = { "Undead TC still sucks." }; - char cheatstrings[][MAXCHEATLEN] = { "cornholio", // 0 @@ -7780,7 +7778,6 @@ FOUNDCHEAT: hittype[g_player[myconnectindex].ps->i].extra = 0; g_player[myconnectindex].ps->cheat_phase = 0; KB_FlushKeyBoardQueue(); - Bstrcpy(terminx,terminx); return; case CHEAT_STUFF: @@ -9272,6 +9269,7 @@ static void checkcommandline(int argc, const char **argv) { if (argc > i+1) { + Bstrcpy(mod_dir,argv[i+1]); addgamepath(argv[i+1]); i++; } @@ -10770,15 +10768,18 @@ void app_main(int argc,const char **argv) autoloadgrps(duke3dgrp); } - Bsprintf(tempbuf,"%s/",mod_dir); - getfilenames(tempbuf,"*.grp"); - while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } - Bsprintf(tempbuf,"%s/",mod_dir); - getfilenames(tempbuf,"*.zip"); - while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } - Bsprintf(tempbuf,"%s/",mod_dir); - getfilenames(tempbuf,"*.pk3"); - while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } + if (mod_dir[0] != '/') + { + Bsprintf(tempbuf,"%s/",mod_dir); + getfilenames(tempbuf,"*.grp"); + while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } + Bsprintf(tempbuf,"%s/",mod_dir); + getfilenames(tempbuf,"*.zip"); + while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } + Bsprintf(tempbuf,"%s/",mod_dir); + getfilenames(tempbuf,"*.pk3"); + while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; } + } loaddefinitions_game(duke3ddef, TRUE); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index a80525a89..726025dcf 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4622,9 +4622,11 @@ repeatcase: if (Bstrcmp(setupfilename,"duke3d.cfg") == 0) // not set to something else via -cfg { char temp[BMAX_PATH]; + extern char mod_dir[]; Bstrcpy(temp,tempbuf); CONFIG_WriteSetup(); - Bstrcpy(setupfilename,temp); + Bsprintf(setupfilename,"%s/",mod_dir); + Bstrcat(setupfilename,temp); CONFIG_ReadSetup(); } initprintf("Using config file '%s'.\n",setupfilename); diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index 9400ca216..39308a2dd 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -187,8 +187,7 @@ static void PopulateForm(int pgs) for (dirs=finddirs,i=1; dirs != NULL; dirs=dirs->next,i++) { if (Bstrcmp(TEXCACHEDIR,dirs->name) == 0) continue; - Bsprintf(buf, "%s", dirs->name); - j = ComboBox_AddString(hwnd, buf); + j = ComboBox_AddString(hwnd, dirs->name); (void)ComboBox_SetItemData(hwnd, j, i); if (Bstrcmp(dirs->name,settings.gamedir) == 0) (void)ComboBox_SetCurSel(hwnd, j); @@ -699,7 +698,7 @@ int startwin_run(void) addsearchpath(settings.gamedir); Bstrcpy(mod_dir,settings.gamedir); } - else Bsprintf(mod_dir,"None"); + else Bsprintf(mod_dir,"/"); for (i = 0; i