git-svn-id: https://svn.eduke32.com/eduke32@840 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-07-07 06:44:41 +00:00
parent 852190d512
commit 2e82277d65
3 changed files with 27 additions and 50 deletions

View file

@ -71,7 +71,7 @@ static int osdeditwinend=60-1-3;
#define editlinewidth (osdcols-1-3)
// command processing
#define HISTORYDEPTH 16
#define HISTORYDEPTH 32
static int osdhistorypos=-1; // position we are at in the history buffer
static int osdhistorybuf[HISTORYDEPTH][EDITLENGTH+1]; // history strings
static int osdhistorysize=0; // number of entries in history
@ -531,7 +531,7 @@ void OSD_Init(void)
osdinited=1;
OSD_RegisterFunction("listsymbols","listsymbols: lists all the recognized symbols",_internal_osdfunc_listsymbols);
OSD_RegisterFunction("help","help: displays help for the specified cvar or command",_internal_osdfunc_help);
OSD_RegisterFunction("help","help: displays help for the specified cvar or command; \"listsymbols\" to show all commands",_internal_osdfunc_help);
OSD_RegisterFunction("osdrows","osdrows: sets the number of visible lines of the OSD",_internal_osdfunc_vars);
OSD_RegisterFunction("logcutoff","logcutoff: sets the maximal line count of the log file",_internal_osdfunc_vars);
OSD_RegisterFunction("clear","clear: clears the console text buffer",_internal_osdfunc_clear);
@ -718,7 +718,7 @@ int OSD_HandleChar(char ch)
lastmatch = symb;
symb=findsymbol(osdedittmp, lastmatch->next);
}
OSD_Printf("Found %d completions for '%s':\n",num,osdedittmp);
OSD_Printf("Found %d possible completions for '%s':\n",num,osdedittmp);
maxwidth += 3;
symb = tabc;
OSD_Printf(" ");

View file

@ -374,48 +374,6 @@ void CONFIG_ReadKeys(void)
}
ud.config.KeyboardKeys[function][0] = key1;
ud.config.KeyboardKeys[function][1] = key2;
/*
if (key1 != 0xff && keyname1[0])
{
boundkeys[key1].repeat = 1;
for (j=0;keynames[j].name;j++)
if (key1 == keynames[j].id)
break;
if (keynames[j].name)
boundkeys[key1].key=Bstrdup(keynames[j].name);
else boundkeys[key1].key=Bstrdup(keyname1);
Bsprintf(tempbuf,"gamefunc_%s;",CONFIG_FunctionNumToName(function));
if (!boundkeys[key1].cmd[0] || !Bstrcasecmp(tempbuf,boundkeys[key1].cmd))
{
Bstrncpy(boundkeys[key1].cmd,tempbuf, MAXBINDSTRINGLENGTH-1);
}
else
{
Bsprintf(tempbuf,"gamefunc_%s;",CONFIG_FunctionNumToName(function));
Bstrncat(boundkeys[key1].cmd,tempbuf, MAXBINDSTRINGLENGTH-1);
}
}
if (key2 != 0xff && keyname2[0])
{
boundkeys[key2].repeat = 1;
for (j=0;keynames[j].name;j++)
if (key2 == keynames[j].id)
break;
if (keynames[j].name)
boundkeys[key2].key=Bstrdup(keynames[j].name);
else boundkeys[key2].key=Bstrdup(keyname2);
Bsprintf(tempbuf,"gamefunc_%s;",CONFIG_FunctionNumToName(function));
if (!boundkeys[key2].cmd[0] || !Bstrcasecmp(tempbuf,boundkeys[key2].cmd))
{
Bstrncpy(boundkeys[key2].cmd,tempbuf, MAXBINDSTRINGLENGTH-1);
}
else
{
Bsprintf(tempbuf,"gamefunc_%s;",CONFIG_FunctionNumToName(function));
Bstrncat(boundkeys[key2].cmd,tempbuf, MAXBINDSTRINGLENGTH-1);
}
}
*/
}
}
@ -433,7 +391,7 @@ void MapKey(int32 which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2
{
int i, j, k;
int ii[] = { key1, key2, oldkey1, oldkey2 };
char buf[128];
char buf[64];
CONTROL_MapKey(which, key1, key2);

View file

@ -275,7 +275,7 @@ void setgamepalette(player_struct *player, char *pal, int set)
player->palette = pal;
}
#define TEXTWRAPLEN (scale(35,ud.config.ScreenWidth,320))
#define TEXTWRAPLEN (scale(39,ud.config.ScreenWidth,320))
int gametext_(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,int x1, int y1, int x2, int y2)
{
@ -347,7 +347,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
}
if (*t == 32)
{
x+=5*z/65536;
x+=8*z/65536;
t++;
continue;
}
@ -357,9 +357,10 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
break;
rotatesprite(x<<16,(y<<16)+(small?ud.config.ScreenHeight<<15:0),z,0,ac,s,p,small?(8|16):(2|orientation),x1,y1,x2,y2);
if ((*t >= '0' && *t <= '9'))
// if ((*t >= '0' && *t <= '9'))
x += 8*z/65536;
else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
// else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = (char *)t, x = oldx, y+=8*z/65536;
t++;
}
@ -8837,6 +8838,7 @@ static void checkcommandline(int argc, const char **argv)
short i, j;
char *c;
int firstnet = 0;
char *k;
i = 1;
@ -9029,6 +9031,23 @@ static void checkcommandline(int argc, const char **argv)
#endif
}
k = Bstrchr(c,'.');
if (k)
{
if (!Bstrcasecmp(k,".grp") || !Bstrcasecmp(k,".zip"))
{
addgroup(argv[i++]);
continue;
}
if (!Bstrcasecmp(k,".con"))
{
confilename = (char *)argv[i++];
userconfiles = 1;
initprintf("Using CON file '%s'.\n",confilename);
continue;
}
}
if (firstnet > 0)
{
if (*c == '-' || *c == '/')