Esempio n. 1
0
/*
================
Draw_TextBox
================
*/
void Draw_TextBox (int x, int y, int width, int lines)
{
	mpic_t	*p;
	int		cx, cy;
	int		n;

	// draw left side
	cx = x;
	cy = y;
	p = R_CachePic ("gfx/box_tl.lmp");
	R_DrawPic (cx, cy, p);
	p = R_CachePic ("gfx/box_ml.lmp");
	for (n = 0; n < lines; n++)
	{
		cy += 8;
		R_DrawPic (cx, cy, p);
	}
	p = R_CachePic ("gfx/box_bl.lmp");
	R_DrawPic (cx, cy+8, p);

	// draw middle
	cx += 8;
	while (width > 0)
	{
		cy = y;
		p = R_CachePic ("gfx/box_tm.lmp");
		R_DrawPic (cx, cy, p);
		p = R_CachePic ("gfx/box_mm.lmp");
		for (n = 0; n < lines; n++)
		{
			cy += 8;
			if (n == 1)
				p = R_CachePic ("gfx/box_mm2.lmp");
			R_DrawPic (cx, cy, p);
		}
		p = R_CachePic ("gfx/box_bm.lmp");
		R_DrawPic (cx, cy+8, p);
		width -= 2;
		cx += 16;
	}

	// draw right side
	cy = y;
	p = R_CachePic ("gfx/box_tr.lmp");
	R_DrawPic (cx, cy, p);
	p = R_CachePic ("gfx/box_mr.lmp");
	for (n = 0; n < lines; n++)
	{
		cy += 8;
		R_DrawPic (cx, cy, p);
	}
	p = R_CachePic ("gfx/box_br.lmp");
	R_DrawPic (cx, cy+8, p);
}
Esempio n. 2
0
/*
==============
SCR_DrawNet
==============
*/
void SCR_DrawNet (void)
{
	if (cls.netchan.outgoing_sequence - cls.netchan.incoming_acknowledged < UPDATE_BACKUP-1)
		return;
	if (cls.demoplayback)
		return;

	RB_SetCanvas (CANVAS_DEFAULT);

	R_DrawPic (scr_vrect.x+64, scr_vrect.y, scr_net);
}
Esempio n. 3
0
/*
==============
SCR_DrawTurtle
==============
*/
void SCR_DrawTurtle (void)
{
	static int	count;
	
	if (!scr_showturtle.value)
		return;

	if (cls.frametime < 0.1)
	{
		count = 0;
		return;
	}

	count++;
	if (count < 3)
		return;

	RB_SetCanvas (CANVAS_DEFAULT);

	R_DrawPic (scr_vrect.x, scr_vrect.y, scr_turtle);
}