mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
more centerprint cleanup.
This commit is contained in:
parent
d3dfb0ebd1
commit
39fc0fe721
4 changed files with 49 additions and 33 deletions
|
@ -55,8 +55,7 @@ void SCR_DrawFPS (void);
|
|||
void SCR_DrawTime (void);
|
||||
void SCR_DrawTurtle (void);
|
||||
void SCR_DrawPause (void);
|
||||
void SCR_DrawCenterString (struct view_s *view);
|
||||
void SCR_CheckDrawCenterString (struct view_s *view);
|
||||
void SCR_DrawCenterString (struct view_s *view, int remaining);
|
||||
|
||||
struct tex_s *SCR_ScreenShot (int width, int height);
|
||||
void SCR_DrawStringToSnap (const char *s, struct tex_s *tex, int x, int y);
|
||||
|
@ -65,7 +64,10 @@ int SCR_ModalMessage (const char *text);
|
|||
|
||||
extern float scr_con_current;
|
||||
extern float scr_centertime_off;
|
||||
extern float scr_conlines; // lines of console to display
|
||||
extern float scr_conlines; // lines of console to display
|
||||
extern float scr_centertime_start; // for slow victory printing
|
||||
extern int scr_center_lines;
|
||||
extern int scr_erase_lines;
|
||||
|
||||
extern int scr_fullupdate; // set to 0 to force full redraw
|
||||
extern int sb_lines;
|
||||
|
|
|
@ -216,17 +216,10 @@ SCR_CenterPrint (const char *str)
|
|||
}
|
||||
|
||||
void
|
||||
SCR_DrawCenterString (view_t *view)
|
||||
SCR_DrawCenterString (view_t *view, int remaining)
|
||||
{
|
||||
char *start;
|
||||
int remaining, j, l, x, y;
|
||||
|
||||
// the finale prints the characters one at a time
|
||||
if (r_force_fullscreen /* FIXME: better test */)
|
||||
remaining = scr_printspeed->value * (r_realtime -
|
||||
scr_centertime_start);
|
||||
else
|
||||
remaining = 9999;
|
||||
int j, l, x, y;
|
||||
|
||||
scr_erase_center = 0;
|
||||
start = scr_centerstring;
|
||||
|
@ -259,23 +252,6 @@ SCR_DrawCenterString (view_t *view)
|
|||
} while (1);
|
||||
}
|
||||
|
||||
void
|
||||
SCR_CheckDrawCenterString (view_t *view)
|
||||
{
|
||||
scr_copytop = 1;
|
||||
if (scr_center_lines > scr_erase_lines)
|
||||
scr_erase_lines = scr_center_lines;
|
||||
|
||||
scr_centertime_off -= r_frametime;
|
||||
|
||||
if (scr_centertime_off <= 0 && !r_force_fullscreen /*FIXME: better test*/)
|
||||
return;
|
||||
if (key_dest != key_game)
|
||||
return;
|
||||
|
||||
SCR_DrawCenterString (view);
|
||||
}
|
||||
|
||||
float
|
||||
CalcFov (float fov_x, float width, float height)
|
||||
{
|
||||
|
|
|
@ -48,6 +48,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
#include "client.h"
|
||||
#include "compat.h"
|
||||
#include "game.h"
|
||||
#include "r_cvar.h" // for scr_printspeed
|
||||
#include "sbar.h"
|
||||
#include "server.h"
|
||||
|
||||
|
@ -1185,16 +1186,34 @@ Sbar_IntermissionOverlay (void)
|
|||
void
|
||||
Sbar_FinaleOverlay (void)
|
||||
{
|
||||
int remaining;
|
||||
|
||||
if (key_dest != key_game)
|
||||
return;
|
||||
|
||||
scr_copyeverything = 1;
|
||||
|
||||
draw_cachepic (overlay_view, 0, 16, "gfx/finale.lmp", 1);
|
||||
SCR_CheckDrawCenterString (overlay_view);
|
||||
// the finale prints the characters one at a time
|
||||
remaining = scr_printspeed->value * (realtime - scr_centertime_start);
|
||||
SCR_DrawCenterString (overlay_view, remaining);
|
||||
}
|
||||
|
||||
void
|
||||
Sbar_DrawCenterPrint (void)
|
||||
{
|
||||
SCR_CheckDrawCenterString (overlay_view);
|
||||
scr_copytop = 1;
|
||||
if (scr_center_lines > scr_erase_lines)
|
||||
scr_erase_lines = scr_center_lines;
|
||||
|
||||
scr_centertime_off -= r_frametime;
|
||||
if (scr_centertime_off <= 0)
|
||||
return;
|
||||
|
||||
if (key_dest != key_game)
|
||||
return;
|
||||
|
||||
SCR_DrawCenterString (overlay_view, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -60,6 +60,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
#include "cl_parse.h"
|
||||
#include "client.h"
|
||||
#include "compat.h"
|
||||
#include "r_cvar.h" // for scr_printspeed
|
||||
#include "sbar.h"
|
||||
|
||||
int sb_updates; // if >= vid.numpages, no update needed
|
||||
|
@ -1677,16 +1678,34 @@ Sbar_IntermissionOverlay (void)
|
|||
void
|
||||
Sbar_FinaleOverlay (void)
|
||||
{
|
||||
int remaining;
|
||||
|
||||
if (key_dest != key_game)
|
||||
return;
|
||||
|
||||
scr_copyeverything = 1;
|
||||
|
||||
draw_cachepic (overlay_view, 0, 16, "gfx/finale.lmp");
|
||||
SCR_CheckDrawCenterString (overlay_view);
|
||||
// the finale prints the characters one at a time
|
||||
remaining = scr_printspeed->value * (realtime - scr_centertime_start);
|
||||
SCR_DrawCenterString (overlay_view, remaining);
|
||||
}
|
||||
|
||||
void
|
||||
Sbar_DrawCenterPrint (void)
|
||||
{
|
||||
SCR_CheckDrawCenterString (overlay_view);
|
||||
scr_copytop = 1;
|
||||
if (scr_center_lines > scr_erase_lines)
|
||||
scr_erase_lines = scr_center_lines;
|
||||
|
||||
scr_centertime_off -= r_frametime;
|
||||
if (scr_centertime_off <= 0)
|
||||
return;
|
||||
|
||||
if (key_dest != key_game)
|
||||
return;
|
||||
|
||||
SCR_DrawCenterString (overlay_view, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue