minor changes

git-svn-id: https://svn.eduke32.com/eduke32@989 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-08-18 07:20:36 +00:00
parent 042915f221
commit 1a39458bb5
4 changed files with 20 additions and 18 deletions

View file

@ -597,7 +597,7 @@ static int _internal_osdfunc_history(const osdfuncparm_t *parm)
{ {
int i, j = 0; int i, j = 0;
UNREFERENCED_PARAMETER(parm); UNREFERENCED_PARAMETER(parm);
OSD_Printf("%s\n",parm->raw); OSD_Printf(OSDTEXT_RED "Command history:\n");
for (i=HISTORYDEPTH-1; i>=0;i--) for (i=HISTORYDEPTH-1; i>=0;i--)
if (osdhistorybuf[i][0]) if (osdhistorybuf[i][0])
OSD_Printf("%4d \"%s\"\n",osdhistorytotal-osdhistorysize+(++j),osdhistorybuf[i]); OSD_Printf("%4d \"%s\"\n",osdhistorytotal-osdhistorysize+(++j),osdhistorybuf[i]);

View file

@ -113,7 +113,7 @@ char *duke3dgrpstring = NULL;
static char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"}; static char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"};
static char *confilename = defaultconfilename; static char *confilename = defaultconfilename;
char *duke3ddef = "duke3d.def"; char *duke3ddef = "duke3d.def";
char mod_dir[BMAX_PATH] = ""; char mod_dir[BMAX_PATH] = "/";
extern int lastvisinc; extern int lastvisinc;
@ -7432,8 +7432,6 @@ PALONLY:
#pragma optimize("",on) #pragma optimize("",on)
#endif #endif
static char terminx[64] = { "Undead TC still sucks." };
char cheatstrings[][MAXCHEATLEN] = char cheatstrings[][MAXCHEATLEN] =
{ {
"cornholio", // 0 "cornholio", // 0
@ -7780,7 +7778,6 @@ FOUNDCHEAT:
hittype[g_player[myconnectindex].ps->i].extra = 0; hittype[g_player[myconnectindex].ps->i].extra = 0;
g_player[myconnectindex].ps->cheat_phase = 0; g_player[myconnectindex].ps->cheat_phase = 0;
KB_FlushKeyBoardQueue(); KB_FlushKeyBoardQueue();
Bstrcpy(terminx,terminx);
return; return;
case CHEAT_STUFF: case CHEAT_STUFF:
@ -9272,6 +9269,7 @@ static void checkcommandline(int argc, const char **argv)
{ {
if (argc > i+1) if (argc > i+1)
{ {
Bstrcpy(mod_dir,argv[i+1]);
addgamepath(argv[i+1]); addgamepath(argv[i+1]);
i++; i++;
} }
@ -10770,6 +10768,8 @@ void app_main(int argc,const char **argv)
autoloadgrps(duke3dgrp); autoloadgrps(duke3dgrp);
} }
if (mod_dir[0] != '/')
{
Bsprintf(tempbuf,"%s/",mod_dir); Bsprintf(tempbuf,"%s/",mod_dir);
getfilenames(tempbuf,"*.grp"); 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; } while (findfiles) { Bsprintf(tempbuf,"%s/%s",mod_dir,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
@ -10779,6 +10779,7 @@ void app_main(int argc,const char **argv)
Bsprintf(tempbuf,"%s/",mod_dir); Bsprintf(tempbuf,"%s/",mod_dir);
getfilenames(tempbuf,"*.pk3"); 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; } 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); loaddefinitions_game(duke3ddef, TRUE);

View file

@ -4622,9 +4622,11 @@ repeatcase:
if (Bstrcmp(setupfilename,"duke3d.cfg") == 0) // not set to something else via -cfg if (Bstrcmp(setupfilename,"duke3d.cfg") == 0) // not set to something else via -cfg
{ {
char temp[BMAX_PATH]; char temp[BMAX_PATH];
extern char mod_dir[];
Bstrcpy(temp,tempbuf); Bstrcpy(temp,tempbuf);
CONFIG_WriteSetup(); CONFIG_WriteSetup();
Bstrcpy(setupfilename,temp); Bsprintf(setupfilename,"%s/",mod_dir);
Bstrcat(setupfilename,temp);
CONFIG_ReadSetup(); CONFIG_ReadSetup();
} }
initprintf("Using config file '%s'.\n",setupfilename); initprintf("Using config file '%s'.\n",setupfilename);

View file

@ -187,8 +187,7 @@ static void PopulateForm(int pgs)
for (dirs=finddirs,i=1; dirs != NULL; dirs=dirs->next,i++) for (dirs=finddirs,i=1; dirs != NULL; dirs=dirs->next,i++)
{ {
if (Bstrcmp(TEXCACHEDIR,dirs->name) == 0) continue; if (Bstrcmp(TEXCACHEDIR,dirs->name) == 0) continue;
Bsprintf(buf, "%s", dirs->name); j = ComboBox_AddString(hwnd, dirs->name);
j = ComboBox_AddString(hwnd, buf);
(void)ComboBox_SetItemData(hwnd, j, i); (void)ComboBox_SetItemData(hwnd, j, i);
if (Bstrcmp(dirs->name,settings.gamedir) == 0) if (Bstrcmp(dirs->name,settings.gamedir) == 0)
(void)ComboBox_SetCurSel(hwnd, j); (void)ComboBox_SetCurSel(hwnd, j);
@ -699,7 +698,7 @@ int startwin_run(void)
addsearchpath(settings.gamedir); addsearchpath(settings.gamedir);
Bstrcpy(mod_dir,settings.gamedir); Bstrcpy(mod_dir,settings.gamedir);
} }
else Bsprintf(mod_dir,"None"); else Bsprintf(mod_dir,"/");
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break; for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles) if (i != numgrpfiles)