Exemple #1
0
/*
================
Draw_ConsoleBackground -- johnfitz -- rewritten
================
*/
void Draw_ConsoleBackground (void)
{
	qpic_t *pic;
	float alpha;

	pic = Draw_CachePic ("gfx/conback.lmp");
	pic->width = vid.conwidth;
	pic->height = vid.conheight;

	alpha = (con_forcedup) ? 1.0 : scr_conalpha.value;

	GL_SetCanvas (CANVAS_CONSOLE); //in case this is called from weird places

	if (alpha > 0.0)
	{
		if (alpha < 1.0)
		{
			glEnable (GL_BLEND);
			glColor4f (1,1,1,alpha);
			glDisable (GL_ALPHA_TEST);
			glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
		}

		Draw_Pic (0, 0, pic);

		if (alpha < 1.0)
		{
			glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
			glEnable (GL_ALPHA_TEST);
			glDisable (GL_BLEND);
			glColor4f (1,1,1,1);
		}
	}
}
Exemple #2
0
void SCR_DrawLoading(void) {
	qpic_t *pic;

	if (!scr_drawloading)
		return;

	pic = Draw_CachePic("gfx/loading.lmp");
	Draw_AlphaPic((vid.conwidth - pic->width) / 2, (vid.conheight - 48 - pic->height) / 2, pic, 1);
}
Exemple #3
0
/*
==================
Sbar_FinaleOverlay

==================
*/
void
Sbar_FinaleOverlay(void)
{
    const qpic_t *pic;

    scr_copyeverything = 1;

    pic = Draw_CachePic("gfx/finale.lmp");
    Draw_TransPic((vid.width - pic->width) / 2, 16, pic);
}
Exemple #4
0
/*
==============
SCR_DrawLoading
==============
*/
void SCR_DrawLoading (void)
{
	quake::sprite pic;

	if (!scr_drawloading)
		return;
		
	pic = Draw_CachePic ("gfx/loading.lmp");
	Draw_Pic ( (vid.width - pic.width)/2, 
		(vid.height - 48 - pic.height)/2, pic);
}
Exemple #5
0
void SCR_DrawPause(void) {
	qpic_t *pic;

	if (!scr_showpause.getBool()) // turn off for screenshots
		return;

	if (!cl.paused)
		return;

	pic = Draw_CachePic("gfx/pause.lmp");
	Draw_AlphaPic((vid.conwidth - pic->width) / 2, (vid.conheight - 48 - pic->height) / 2, pic, 1);
}
void VID_MenuDraw( void )
{
	qpic_t		*p;
    char		*ptr;
    int			i, j, column, row, dup;
    char		temp[100];

    p = Draw_CachePic ("gfx/vidmodes.lmp");
    M_DrawPic ( (320-p->width)/2, 4, p);
	M_Print (4*8, 36 + MAX_COLUMN_SIZE * 8 + 8, "Video mode switching unavailable");
	M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6, "Press any key...");
}
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
	qpic_t	*pic;

	if (!scr_showpause.value)		// turn off for screenshots
		return;

	if (!cl.paused)
		return;

	pic = Draw_CachePic ("gfx/pause.lmp");
	Draw_Pic ( (vid.width - pic->width)/2, (vid.height - 48 - pic->height)/2, pic);
}
Exemple #8
0
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
	quake::sprite pic;

	if (!scr_showpause.to_bool())		// turn off for screenshots
		return;

	if (!cl.paused)
		return;

	pic = Draw_CachePic ("gfx/pause.lmp");
	Draw_Pic ( (vid.width - pic.width)/2, 
		(vid.height - 48 - pic.height)/2, pic);
}
Exemple #9
0
/*
==============
SCR_DrawLoading
==============
*/
void SCR_DrawLoading (void)
{
	qpic_t	*pic;

	if (!scr_drawloading)
		return;

	GL_SetCanvas (CANVAS_MENU); //johnfitz

	pic = Draw_CachePic ("gfx/loading.lmp");
	Draw_Pic ( (320 - pic->width)/2, (240 - 48 - pic->height)/2, pic); //johnfitz -- stretched menus

	scr_tileclear_updates = 0; //johnfitz
}
Exemple #10
0
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
	qpic_t	*pic;

	if (!cl.paused)
		return;

	if (!scr_showpause.value)		// turn off for screenshots
		return;

	GL_SetCanvas (CANVAS_MENU); //johnfitz

	pic = Draw_CachePic ("gfx/pause.lmp");
	Draw_Pic ( (320 - pic->width)/2, (240 - 48 - pic->height)/2, pic); //johnfitz -- stretched menus

	scr_tileclear_updates = 0; //johnfitz
}
Exemple #11
0
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
	qpic_t	*pic;
	float delta;
	static qboolean newdraw = false;
	int finaly;
	static float LogoPercent,LogoTargetPercent;

	if (!scr_showpause.value)		// turn off for screenshots
		return;

	if (!cl.paused)
	{
		newdraw = false;
		return;
	}

	if (!newdraw)
	{
		newdraw = true;
		LogoTargetPercent= 1;
		LogoPercent = 0;
	}

	pic = Draw_CachePic ("gfx/menu/paused.lmp");
//	Draw_Pic ( (vid.width - pic->width)/2, 
//		(vid.height - 48 - pic->height)/2, pic);

	if (LogoPercent < LogoTargetPercent)
	{
		delta = ((LogoTargetPercent-LogoPercent)/.5)*host_frametime;
		if (delta < 0.004)
		{
			delta = 0.004;
		}
		LogoPercent += delta;
		if (LogoPercent > LogoTargetPercent)
		{
			LogoPercent = LogoTargetPercent;
		}
	}

	finaly = ((float)pic->height * LogoPercent) - pic->height;
	Draw_TransPicCropped ( (vid.width - pic->width)/2, finaly, pic);
}
Exemple #12
0
/*
==============
SCR_DrawLoading
==============
*/
void SCR_DrawLoading (void)
{
	int		size, count, offset;
	qpic_t	*pic;

	if (!scr_drawloading && loading_stage == 0)
		return;
		
	pic = Draw_CachePic ("gfx/menu/loading.lmp");
	offset = (vid.width - pic->width)/2;
	Draw_TransPic (offset , 0, pic);

	if (loading_stage == 0)
		return;

	if (total_loading_size)
		size = current_loading_size * 106 / total_loading_size;
	else
		size = 0;

	if (loading_stage == 1)
		count = size;
	else
		count = 106;

	Draw_Fill (offset+42, 87, count, 1, 136);
	Draw_Fill (offset+42, 87+1, count, 4, 138);
	Draw_Fill (offset+42, 87+5, count, 1, 136);

	if (loading_stage == 2)
		count = size;
	else
		count = 0;

	Draw_Fill (offset+42, 97, count, 1, 168);
	Draw_Fill (offset+42, 97+1, count, 4, 170);
	Draw_Fill (offset+42, 97+5, count, 1, 168);
}
Exemple #13
0
/*
==================
Sbar_IntermissionOverlay

==================
*/
void Sbar_IntermissionOverlay (void)
{
    int		num;
    int		y = 28; // mankrip

    scr_copyeverything = 1;
    scr_fullupdate = 0;

    if (cl.gametype == GAME_DEATHMATCH)
    {
        Sbar_DeathmatchOverlay ();
        return;
    }

    // mankrip - begin
    M_DrawPlaque ("gfx/complete.lmp", false);
    M_DrawTransPic (0, y, Draw_CachePic ("gfx/inter.lmp"), true);
    // mankrip - end

// time
// mankrip - edited - begin
    num = cl.completed_time/60;
    Sbar_IntermissionNumber (160, y+=8/*64*/, num, 3, 0);
    num = cl.completed_time - num*60;
    M_DrawTransPic (234, y/*64*/, sb_colon, true);
    M_DrawTransPic (246, y/*64*/, sb_nums[0][num/10], true);
    M_DrawTransPic (266, y/*64*/, sb_nums[0][num%10], true);

    Sbar_IntermissionNumber (160, y+=40/*104*/, cl.stats[STAT_SECRETS], 3, 0);
    M_DrawTransPic			(232, y/*104*/, sb_slash, true);
    Sbar_IntermissionNumber (240, y/*104*/, cl.stats[STAT_TOTALSECRETS], 3, 0);

    Sbar_IntermissionNumber (160, y+=40/*144*/, cl.stats[STAT_MONSTERS], 3, 0);
    M_DrawTransPic			(232, y/*144*/, sb_slash, true);
    Sbar_IntermissionNumber (240, y/*144*/, cl.stats[STAT_TOTALMONSTERS], 3, 0);
// mankrip - edited - end
}
Exemple #14
0
/*
==================
Sbar_DeathmatchOverlay

ping time frags name
==================
*/
void
Sbar_DeathmatchOverlay(int start)
{
    const qpic_t *pic;
    int i, k, l;
    int top, bottom;
    int x, y, f;
    char num[12];
    player_info_t *s;
    int total;
    int minutes;
    int p;
    int teamplay;
    char team[5];
    int skip = 10;

    if (largegame)
	skip = 8;

// request new ping times every two second
    if (realtime - cl.last_ping_request > 2) {
	cl.last_ping_request = realtime;
	MSG_WriteByte(&cls.netchan.message, clc_stringcmd);
	MSG_WriteString(&cls.netchan.message, "pings");
    }

    teamplay = atoi(Info_ValueForKey(cl.serverinfo, "teamplay"));

    scr_copyeverything = 1;
    scr_fullupdate = 0;

    if (!start) {
	pic = Draw_CachePic("gfx/ranking.lmp");
	Draw_Pic(160 - pic->width / 2, 0, pic);
    }
// scores
    Sbar_SortFrags(true);

// draw the text
    l = scoreboardlines;

    if (start)
	y = start;
    else
	y = 24;
    if (teamplay) {
	x = 4;
//                            0    40 64   104   152  192
	Draw_String(x, y, "ping pl time frags team name");
	y += 8;
//              Draw_String ( x , y, "---- -- ---- ----- ---- ----------------");
	Draw_String(x, y,
		    "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
	y += 8;
    } else {
	x = 16;
//                            0    40 64   104   152
	Draw_String(x, y, "ping pl time frags name");
	y += 8;
//              Draw_String ( x , y, "---- -- ---- ----- ----------------");
	Draw_String(x, y,
		    "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
	y += 8;
    }

    for (i = 0; i < l && y <= vid.height - 10; i++) {
	k = fragsort[i];
	s = &cl.players[k];
	if (!s->name[0])
	    continue;

	// draw ping
	p = s->ping;
	if (p < 0 || p > 999)
	    p = 999;
	sprintf(num, "%4i", p);
	Draw_String(x, y, num);

	// draw pl
	p = s->pl;
	sprintf(num, "%3i", p);
	if (p > 25)
	    Draw_Alt_String(x + 32, y, num);
	else
	    Draw_String(x + 32, y, num);

	if (s->spectator) {
	    Draw_String(x + 40, y, "(spectator)");
	    // draw name
	    if (teamplay)
		Draw_String(x + 152 + 40, y, s->name);
	    else
		Draw_String(x + 152, y, s->name);
	    y += skip;
	    continue;
	}
	// draw time
	if (cl.intermission)
	    total = cl.completed_time - s->entertime;
	else
	    total = realtime - s->entertime;
	minutes = (int)total / 60;
	sprintf(num, "%4i", minutes);
	Draw_String(x + 64, y, num);

	// draw background
	top = Sbar_ColorForMap(s->topcolor);
	bottom = Sbar_ColorForMap(s->bottomcolor);

	if (largegame)
	    Draw_Fill(x + 104, y + 1, 40, 3, top);
	else
	    Draw_Fill(x + 104, y, 40, 4, top);
	Draw_Fill(x + 104, y + 4, 40, 4, bottom);

	// draw number
	f = s->frags;
	sprintf(num, "%3i", f);

	Draw_Character(x + 112, y, num[0]);
	Draw_Character(x + 120, y, num[1]);
	Draw_Character(x + 128, y, num[2]);

	if (k == cl.playernum) {
	    Draw_Character(x + 104, y, 16);
	    Draw_Character(x + 136, y, 17);
	}
	// team
	if (teamplay) {
	    team[4] = 0;
	    strncpy(team, Info_ValueForKey(s->userinfo, "team"), 4);
	    Draw_String(x + 152, y, team);
	}
	// draw name
	if (teamplay)
	    Draw_String(x + 152 + 40, y, s->name);
	else
	    Draw_String(x + 152, y, s->name);

	y += skip;
    }

    if (y >= vid.height - 10)	// we ran over the screen size, squish
	largegame = true;
}
Exemple #15
0
/*
==================
Sbar_TeamOverlay

team frags
added by Zoid
==================
*/
void
Sbar_TeamOverlay(void)
{
    const qpic_t *pic;
    int i, k;
    int x, y;
    char num[12];
    int teamplay;
    char team[5];
    team_t *tm;
    int plow, phigh, pavg;

// request new ping times every two second
    teamplay = atoi(Info_ValueForKey(cl.serverinfo, "teamplay"));

    if (!teamplay) {
	Sbar_DeathmatchOverlay(0);
	return;
    }

    scr_copyeverything = 1;
    scr_fullupdate = 0;

    pic = Draw_CachePic("gfx/ranking.lmp");
    Draw_Pic(160 - pic->width / 2, 0, pic);

    y = 24;
    x = 36;
    Draw_String(x, y, "low/avg/high team total players");
    y += 8;
//      Draw_String(x, y, "------------ ---- ----- -------");
    Draw_String(x, y,
		"\x1d\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1e\x1e\x1e\x1f");
    y += 8;

// sort the teams
    Sbar_SortTeams();

// draw the text
    for (i = 0; i < scoreboardteams && y <= vid.height - 10; i++) {
	k = teamsort[i];
	tm = teams + k;

	// draw pings
	plow = tm->plow;
	if (plow < 0 || plow > 999)
	    plow = 999;
	phigh = tm->phigh;
	if (phigh < 0 || phigh > 999)
	    phigh = 999;
	if (!tm->players)
	    pavg = 999;
	else
	    pavg = tm->ptotal / tm->players;
	if (pavg < 0 || pavg > 999)
	    pavg = 999;

	sprintf(num, "%3i/%3i/%3i", plow, pavg, phigh);
	Draw_String(x, y, num);

	// draw team
	team[4] = 0;
	strncpy(team, tm->team, 4);
	Draw_String(x + 104, y, team);

	// draw total
	sprintf(num, "%5i", tm->frags);
	Draw_String(x + 104 + 40, y, num);

	// draw players
	sprintf(num, "%5i", tm->players);
	Draw_String(x + 104 + 88, y, num);

	if (!strncmp(Info_ValueForKey(cl.players[cl.playernum].userinfo,
				      "team"), tm->team, 16)) {
	    Draw_Character(x + 104 - 8, y, 16);
	    Draw_Character(x + 104 + 32, y, 17);
	}

	y += 8;
    }
    y += 8;
    Sbar_DeathmatchOverlay(y);
}
Exemple #16
0
static void VR_MenuDraw (void)
{
	int i, y;
	qpic_t *p;
	const char *title;

	y = 4;

	// plaque
	p = Draw_CachePic ("gfx/qplaque.lmp");
	M_DrawTransPic (16, y, p);


	// customize header
	p = Draw_CachePic ("gfx/ttl_cstm.lmp");
	M_DrawPic ( (320-p->width)/2, y, p);

	y += 28;

	// title
	title = "VR/HMD OPTIONS";
	M_PrintWhite ((320-8*strlen(title))/2, y, title);

	y += 16;

	for ( i = 0; i < VR_OPTION_MAX; i++ ) {
		switch ( i ) {
			case VR_OPTION_ENABLED:
				M_Print( 16, y, "            VR Enabled" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_PERFHUD:
				M_Print( 16, y, "             Debug HMD" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_AIMMODE:
				y += 4; // separation
				M_Print( 16, y, "              Aim Mode" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_DEADZONE:
				M_Print( 16, y, "              Deadzone" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_CROSSHAIR:
				M_Print( 16, y, "             Crosshair" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_CROSSHAIR_DEPTH:
				M_Print( 16, y, "       Crosshair Depth" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_CROSSHAIR_SIZE:
				M_Print( 16, y, "        Crosshair Size" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;
			case VR_OPTION_CROSSHAIR_ALPHA:
				M_Print( 16, y, "       Crosshair Alpha" );
				VR_MenuPrintOptionValue( 220, y, i );
				break;

			default: break;
		}

		// draw the blinking cursor
		if ( vr_options_cursor == i ) {
			M_DrawCharacter( 200, y, 12 + ((int)(realtime*4)&1) );
		}

		y += 8;
	}
}
Exemple #17
0
/*
================
VID_MenuDraw
================
*/
void VID_MenuDraw (void)
{
	qpic_t		*p;
	char		*ptr;
	int			nummodes, i, j, column, row, dup;
	char		temp[100];

	vid_wmodes = 0;
	nummodes = VID_NumModes ();

	p = Draw_CachePic ("gfx/vidmodes.lmp");
	M_DrawPic ( (320-p->width)/2, 4, p);

	for (i=0 ; i<nummodes ; i++)
	{
		if (vid_wmodes < MAX_MODEDESCS)
		{
			if (i != 1)
			{
				ptr = VID_GetModeDescription (i);

				if (ptr)
				{
					dup = 0;

					for (j=0 ; j<vid_wmodes ; j++)
					{
						if (!strcmp (modedescs[j].desc, ptr))
						{
							if (modedescs[j].modenum != 0)
							{
								modedescs[j].modenum = i;
								dup = 1;

								if (i == vid_modenum)
									modedescs[j].iscur = 1;
							}
							else
							{
								dup = 1;
							}

							break;
						}
					}

					if (!dup)
					{
						modedescs[vid_wmodes].modenum = i;
						modedescs[vid_wmodes].desc = ptr;
						modedescs[vid_wmodes].iscur = 0;

						if (i == vid_modenum)
							modedescs[vid_wmodes].iscur = 1;

						vid_wmodes++;
					}
				}
			}
		}
	}

	vid_column_size = (vid_wmodes + 2) / 3;

	column = 16;
	row = 36;

	for (i=0 ; i<vid_wmodes ; i++)
	{
		if (modedescs[i].iscur)
			M_PrintWhite (column, row, modedescs[i].desc);
		else
			M_Print (column, row, modedescs[i].desc);

		row += 8;

		if ((i % vid_column_size) == (vid_column_size - 1))
		{
			column += 13*8;
			row = 36;
		}
	}

// line cursor
	if (vid_testingmode)
	{
		sprintf (temp, "TESTING %s",
				modedescs[vid_line].desc);
		M_Print (13*8, 36 + MAX_COLUMN_SIZE * 8 + 8*4, temp);
		M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6,
				"Please wait 5 seconds...");
	}
	else
	{
		M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8,
				"Press Enter to set mode");
		M_Print (6*8, 36 + MAX_COLUMN_SIZE * 8 + 8*3,
				"T to test mode for 5 seconds");
		ptr = VID_GetModeDescription (vid_modenum);
		sprintf (temp, "D to make %s the default", ptr);
		M_Print (6*8, 36 + MAX_COLUMN_SIZE * 8 + 8*5, temp);
		ptr = VID_GetModeDescription ((int)_vid_default_mode->value);

		if (ptr)
		{
			sprintf (temp, "Current default is %s", ptr);
			M_Print (7*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6, temp);
		}

		M_Print (15*8, 36 + MAX_COLUMN_SIZE * 8 + 8*8,
				"Esc to exit");

		row = 36 + (vid_line % vid_column_size) * 8;
		column = 8 + (vid_line / vid_column_size) * 13*8;

		M_DrawCharacter (column, row, 12+((int)(realtime*4)&1));
	}
}
Exemple #18
0
/*
===============
R_AliasSetupSkin
===============
*/
static void R_AliasSetupSkin (void)
{
	int			i, numskins, skinnum;
	int			a_skinwidth;
	maliasskingroup_t	*paliasskingroup;
	float			*pskinintervals, fullskininterval;
	float			skintargettime, skintime;
	qpic_t			*stonepic;
	char			temp[40];

	skinnum = currententity->skinnum;
	if (skinnum >= 100)
		skinnum = 0;

	if ((skinnum >= pmdl->numskins) || (skinnum < 0))
	{
		Con_DPrintf ("%s: no such skin # %d\n", __thisfunc__, skinnum);
		skinnum = 0;
	}

	if ( (currententity->model->flags & EF_MIP_MAP) &&
			(currententity->model->flags & EF_MIP_MAP_FAR) &&
			skinnum+1 < pmdl->numskins )
		skinnum++;

	pskindesc = ((maliasskindesc_t *)((byte *)paliashdr + paliashdr->skindesc)) + skinnum;
	a_skinwidth = pmdl->skinwidth;

	if (pskindesc->type == ALIAS_SKIN_GROUP)
	{
		paliasskingroup = (maliasskingroup_t *)((byte *)paliashdr + pskindesc->skin);
		pskinintervals = (float *)((byte *)paliashdr + paliasskingroup->intervals);
		numskins = paliasskingroup->numskins;
		fullskininterval = pskinintervals[numskins-1];

		skintime = cl.time + currententity->syncbase;

	// when loading in Mod_LoadAliasSkinGroup, we guaranteed all interval
	// values are positive, so we don't have to worry about division by 0
		skintargettime = skintime -
				((int)(skintime / fullskininterval)) * fullskininterval;

		for (i = 0 ; i < (numskins-1) ; i++)
		{
			if (pskinintervals[i] > skintargettime)
				break;
		}

		pskindesc = &paliasskingroup->skindescs[i];
	}

	if (currententity->skinnum >= 100)
	{
		sprintf(temp,"gfx/skin%d.lmp",currententity->skinnum);
		stonepic = Draw_CachePic(temp);

		r_affinetridesc.pskindesc = pskindesc;
		r_affinetridesc.pskin = stonepic->data;
		r_affinetridesc.skinwidth = stonepic->width;
		r_affinetridesc.seamfixupX16 =  (stonepic->width >> 1) << 16;
		r_affinetridesc.skinheight = stonepic->height;
	}
Exemple #19
0
/*
================
VID_MenuDraw
================
*/
static void VID_MenuDraw (void)
{
	int i, y;
	qpic_t *p;
	const char *title;

	y = 4;

	// plaque
	p = Draw_CachePic ("gfx/qplaque.lmp");
	M_DrawTransPic (16, y, p);

	//p = Draw_CachePic ("gfx/vidmodes.lmp");
	p = Draw_CachePic ("gfx/p_option.lmp");
	M_DrawPic ( (320-p->width)/2, y, p);

	y += 28;

	// title
	title = "Video Options";
	M_PrintWhite ((320-8*strlen(title))/2, y, title);

	y += 16;

	// options
	for (i = 0; i < VIDEO_OPTIONS_ITEMS; i++)
	{
		switch (i)
		{
		case VID_OPT_MODE:
			M_Print (16, y, "        Video mode");
			M_Print (184, y, va("%ix%i", (int)vid_width.value, (int)vid_height.value));
			break;
		case VID_OPT_BPP:
			M_Print (16, y, "       Color depth");
			M_Print (184, y, va("%i", (int)vid_bpp.value));
			break;
		case VID_OPT_FULLSCREEN:
			M_Print (16, y, "        Fullscreen");
			M_DrawCheckbox (184, y, (int)vid_fullscreen.value);
			break;
		case VID_OPT_VSYNC:
			M_Print (16, y, "     Vertical sync");
			if (gl_swap_control)
				M_DrawCheckbox (184, y, (int)vid_vsync.value);
			else
				M_Print (184, y, "N/A");
			break;
		case VID_OPT_TEST:
			y += 8; //separate the test and apply items
			M_Print (16, y, "      Test changes");
			break;
		case VID_OPT_APPLY:
			M_Print (16, y, "     Apply changes");
			break;
		}

		if (video_options_cursor == i)
			M_DrawCharacter (168, y, 12+((int)(realtime*4)&1));

		y += 8;
	}
}
Exemple #20
0
/*
===============
Sbar_Init
===============
*/
void Sbar_Init (void)
{
    int		i;

    Cvar_RegisterVariableWithCallback(&sbar_scale, CheckSbarScale); //qb: added
    // mankrip - begin
    Cvar_RegisterVariable (&sbar_show_scores);
    Cvar_RegisterVariable (&sbar_show_ammolist);
    Cvar_RegisterVariable (&sbar_show_weaponlist);
    Cvar_RegisterVariable (&sbar_show_keys);
    Cvar_RegisterVariable (&sbar_show_runes);
    Cvar_RegisterVariable (&sbar_show_powerups);
    Cvar_RegisterVariable (&sbar_show_armor);
    Cvar_RegisterVariable (&sbar_show_health);
    Cvar_RegisterVariable (&sbar_show_ammo);
    Cvar_RegisterVariable (&sbar_show_bg);
    Cvar_RegisterVariable (&sbar);

    Cvar_RegisterVariable (&crosshair_color);
    Cvar_RegisterVariable (&crosshair_custom16); //qb: custom color
    Cvar_RegisterVariable (&crosshair_custom17); //qb: custom color

    Cvar_RegisterVariableWithCallback (&sbar, Sbar_SizeScreen);
    // mankrip - end

    for (i=0 ; i<10 ; i++)
    {
        sb_nums[0][i] = Draw_PicFromWad (va("num_%i",i));
        sb_nums[1][i] = Draw_PicFromWad (va("anum_%i",i));
    }

    sb_nums[0][10] = Draw_PicFromWad ("num_minus");
    sb_nums[1][10] = Draw_PicFromWad ("anum_minus");

    sb_colon = Draw_PicFromWad ("num_colon");
    sb_slash = Draw_PicFromWad ("num_slash");

    sb_weapons[0][0] = Draw_PicFromWad ("inv_shotgun");
    sb_weapons[0][1] = Draw_PicFromWad ("inv_sshotgun");
    sb_weapons[0][2] = Draw_PicFromWad ("inv_nailgun");
    sb_weapons[0][3] = Draw_PicFromWad ("inv_snailgun");
    sb_weapons[0][4] = Draw_PicFromWad ("inv_rlaunch");
    sb_weapons[0][5] = Draw_PicFromWad ("inv_srlaunch");
    sb_weapons[0][6] = Draw_PicFromWad ("inv_lightng");

    sb_weapons[1][0] = Draw_PicFromWad ("inv2_shotgun");
    sb_weapons[1][1] = Draw_PicFromWad ("inv2_sshotgun");
    sb_weapons[1][2] = Draw_PicFromWad ("inv2_nailgun");
    sb_weapons[1][3] = Draw_PicFromWad ("inv2_snailgun");
    sb_weapons[1][4] = Draw_PicFromWad ("inv2_rlaunch");
    sb_weapons[1][5] = Draw_PicFromWad ("inv2_srlaunch");
    sb_weapons[1][6] = Draw_PicFromWad ("inv2_lightng");

    for (i=0 ; i<5 ; i++)
    {
        sb_weapons[2+i][0] = Draw_PicFromWad (va("inva%i_shotgun",i+1));
        sb_weapons[2+i][1] = Draw_PicFromWad (va("inva%i_sshotgun",i+1));
        sb_weapons[2+i][2] = Draw_PicFromWad (va("inva%i_nailgun",i+1));
        sb_weapons[2+i][3] = Draw_PicFromWad (va("inva%i_snailgun",i+1));
        sb_weapons[2+i][4] = Draw_PicFromWad (va("inva%i_rlaunch",i+1));
        sb_weapons[2+i][5] = Draw_PicFromWad (va("inva%i_srlaunch",i+1));
        sb_weapons[2+i][6] = Draw_PicFromWad (va("inva%i_lightng",i+1));
    }

    sb_ammo[0] = Draw_PicFromWad ("sb_shells");
    sb_ammo[1] = Draw_PicFromWad ("sb_nails");
    sb_ammo[2] = Draw_PicFromWad ("sb_rocket");
    sb_ammo[3] = Draw_PicFromWad ("sb_cells");

    sb_armor[0] = Draw_PicFromWad ("sb_armor1");
    sb_armor[1] = Draw_PicFromWad ("sb_armor2");
    sb_armor[2] = Draw_PicFromWad ("sb_armor3");

    sb_items[0] = Draw_PicFromWad ("sb_key1");
    sb_items[1] = Draw_PicFromWad ("sb_key2");
    sb_items[2] = Draw_PicFromWad ("sb_invis");
    sb_items[3] = Draw_PicFromWad ("sb_invuln");
    sb_items[4] = Draw_PicFromWad ("sb_suit");
    sb_items[5] = Draw_PicFromWad ("sb_quad");

    sb_sigil[0] = Draw_PicFromWad ("sb_sigil1");
    sb_sigil[1] = Draw_PicFromWad ("sb_sigil2");
    sb_sigil[2] = Draw_PicFromWad ("sb_sigil3");
    sb_sigil[3] = Draw_PicFromWad ("sb_sigil4");

    sb_faces[4][0] = Draw_PicFromWad ("face1");
    sb_faces[4][1] = Draw_PicFromWad ("face_p1");
    sb_faces[3][0] = Draw_PicFromWad ("face2");
    sb_faces[3][1] = Draw_PicFromWad ("face_p2");
    sb_faces[2][0] = Draw_PicFromWad ("face3");
    sb_faces[2][1] = Draw_PicFromWad ("face_p3");
    sb_faces[1][0] = Draw_PicFromWad ("face4");
    sb_faces[1][1] = Draw_PicFromWad ("face_p4");
    sb_faces[0][0] = Draw_PicFromWad ("face5");
    sb_faces[0][1] = Draw_PicFromWad ("face_p5");

    sb_face_invis = Draw_PicFromWad ("face_invis");
    sb_face_invuln = Draw_PicFromWad ("face_invul2");
    sb_face_invis_invuln = Draw_PicFromWad ("face_inv2");
    sb_face_quad = Draw_PicFromWad ("face_quad");

    Cmd_AddCommand ("+showscores", Sbar_ShowScores);
    Cmd_AddCommand ("-showscores", Sbar_DontShowScores);

    sb_sbar = Draw_PicFromWad ("sbar");
    sb_ibar = Draw_PicFromWad ("ibar");
    sb_scorebar = Draw_PicFromWad ("scorebar");

//MED 01/04/97 added new hipnotic weapons
    if (hipnotic)
    {
        hsb_weapons[0][0] = Draw_PicFromWad ("inv_laser");
        hsb_weapons[0][1] = Draw_PicFromWad ("inv_mjolnir");
        hsb_weapons[0][2] = Draw_PicFromWad ("inv_gren_prox");
        hsb_weapons[0][3] = Draw_PicFromWad ("inv_prox_gren");
        hsb_weapons[0][4] = Draw_PicFromWad ("inv_prox");

        hsb_weapons[1][0] = Draw_PicFromWad ("inv2_laser");
        hsb_weapons[1][1] = Draw_PicFromWad ("inv2_mjolnir");
        hsb_weapons[1][2] = Draw_PicFromWad ("inv2_gren_prox");
        hsb_weapons[1][3] = Draw_PicFromWad ("inv2_prox_gren");
        hsb_weapons[1][4] = Draw_PicFromWad ("inv2_prox");

        for (i=0 ; i<5 ; i++)
        {
            hsb_weapons[2+i][0] = Draw_PicFromWad (va("inva%i_laser",i+1));
            hsb_weapons[2+i][1] = Draw_PicFromWad (va("inva%i_mjolnir",i+1));
            hsb_weapons[2+i][2] = Draw_PicFromWad (va("inva%i_gren_prox",i+1));
            hsb_weapons[2+i][3] = Draw_PicFromWad (va("inva%i_prox_gren",i+1));
            hsb_weapons[2+i][4] = Draw_PicFromWad (va("inva%i_prox",i+1));
        }

        hsb_items[0] = Draw_PicFromWad ("sb_wsuit");
        hsb_items[1] = Draw_PicFromWad ("sb_eshld");
    }

    if (rogue)
    {
        rsb_invbar[0] = Draw_PicFromWad ("r_invbar1");
        rsb_invbar[1] = Draw_PicFromWad ("r_invbar2");

        rsb_weapons[0] = Draw_PicFromWad ("r_lava");
        rsb_weapons[1] = Draw_PicFromWad ("r_superlava");
        rsb_weapons[2] = Draw_PicFromWad ("r_gren");
        rsb_weapons[3] = Draw_PicFromWad ("r_multirock");
        rsb_weapons[4] = Draw_PicFromWad ("r_plasma");

        rsb_items[0] = Draw_PicFromWad ("r_shield1");
        rsb_items[1] = Draw_PicFromWad ("r_agrav1");

// PGM 01/19/97 - team color border
        rsb_teambord = Draw_PicFromWad ("r_teambord");
// PGM 01/19/97 - team color border

        rsb_ammo[0] = Draw_PicFromWad ("r_ammolava");
        rsb_ammo[1] = Draw_PicFromWad ("r_ammomulti");
        rsb_ammo[2] = Draw_PicFromWad ("r_ammoplasma");
    }
    Draw_CachePic ("gfx/complete.lmp"); // mankrip
    Draw_CachePic ("gfx/inter.lmp"); // mankrip
}