console line scrolling fix, MDL/MD2/MD3/ZYM/DPM loading will no longer Sys_Error (still need bounds checking)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2095 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-03-12 08:01:48 +00:00
parent 3b73a69432
commit 2df1c6674b
5 changed files with 293 additions and 101 deletions

View file

@ -519,6 +519,7 @@ Interactive line editing and console scrollback
void Key_Console (int key)
{
char *clipText;
int upperconbound;
if (con_current->redirect)
{
@ -693,15 +694,21 @@ void Key_Console (int key)
return;
}
upperconbound = con_current->current - con_current->totallines + 1;
if (key == K_PGUP || key==K_MWHEELUP)
{
con_current->display -= 2;
if (con_current->display < upperconbound)
con_current->display = upperconbound;
return;
}
if (key == K_PGDN || key==K_MWHEELDOWN)
{
con_current->display += 2;
if (con_current->display < upperconbound)
con_current->display = upperconbound;
if (con_current->display > con_current->current)
con_current->display = con_current->current;
return;
@ -710,7 +717,7 @@ void Key_Console (int key)
if (key == K_HOME)
{
if (keydown[K_CTRL])
con_current->display = con_current->current - con_current->totallines + 10;
con_current->display = upperconbound;
else
key_linepos = 1;
return;