OK, die erste Fassung des Screenhandlers

This commit is contained in:
Yamagi Burmeister 2009-03-02 20:09:10 +00:00
parent 3ef53c4e6b
commit 15eb33d9d4

View file

@ -74,12 +74,6 @@ extern cvar_t *cl_drawfps; // FPS hack
void SCR_TimeRefresh_f (void);
void SCR_Loading_f (void);
#ifdef QMAX
char crosshair_pic[MAX_QPATH];
int crosshair_width, crosshair_height;
#endif
/*
===============================================================================
@ -284,11 +278,7 @@ void SCR_DrawCenterString (void)
SCR_AddDirtyPoint (x, y);
for (j=0 ; j<l ; j++, x+=8)
{
#ifdef QMAX
re.DrawChar (x, y, start[j], 256);
#else
re.DrawChar (x, y, start[j]);
#endif
if (!remaining--)
return;
}
@ -432,9 +422,9 @@ void SCR_Init (void)
scr_graphshift = Cvar_Get ("graphshift", "0", 0);
scr_drawall = Cvar_Get ("scr_drawall", "0", 0);
//
// register our commands
//
//
// register our commands
//
Cmd_AddCommand ("timerefresh",SCR_TimeRefresh_f);
Cmd_AddCommand ("loading",SCR_Loading_f);
Cmd_AddCommand ("sizeup",SCR_SizeUp_f);
@ -506,7 +496,7 @@ Scroll it up or down
*/
void SCR_RunConsole (void)
{
// decide on the height of the console
// decide on the height of the console
if (cls.key_dest == key_console)
scr_conlines = 0.5; // half screen
else
@ -858,11 +848,7 @@ void DrawHUDString (char *string, int x, int y, int centerwidth, int xor)
x = margin;
for (i=0 ; i<width ; i++)
{
#ifdef QMAX
re.DrawChar (x, y, line[i]^xor, 256);
#else
re.DrawChar (x, y, line[i]^xor);
#endif
x += 8;
}
if (*string)
@ -935,13 +921,8 @@ void SCR_TouchPics (void)
if (crosshair->value)
{
#ifdef QMAX
if (crosshair->value > 9)
crosshair->value = 9;
#else
if (crosshair->value > 3 || crosshair->value < 0)
crosshair->value = 3;
#endif
Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "ch%i", (int)(crosshair->value));
re.DrawGetPicSize (&crosshair_width, &crosshair_height, crosshair_pic);
if (!crosshair_width)
@ -1307,24 +1288,11 @@ void SCR_UpdateScreen (void)
** range check cl_camera_separation so we don't inadvertently fry someone's
** brain
*/
#ifdef REDBLUE
if ( cl_stereo_separation->value > 10.0 )
Cvar_SetValue( "cl_stereo_separation", 10.0 );
#else
if ( cl_stereo_separation->value > 1.0 )
Cvar_SetValue( "cl_stereo_separation", 1.0 );
#endif
else if ( cl_stereo_separation->value < 0 )
Cvar_SetValue( "cl_stereo_separation", 0.0 );
#ifdef REDBLUE
if ( !cl_stereo->value )
Cvar_SetValue( "cl_stereo", 1 );
numframes = 2;
separation[0] = -cl_stereo_separation->value / 2.0;
separation[1] = cl_stereo_separation->value / 2.0;
#else
if ( cl_stereo->value )
{
numframes = 2;
@ -1337,7 +1305,6 @@ void SCR_UpdateScreen (void)
separation[1] = 0;
numframes = 1;
}
#endif
for ( i = 0; i < numframes; i++ )
{
re.BeginFrame( separation[i] );