Ejemplo n.º 1
0
void CStatusBar::ClearBombCount (int bgColor)
{
CCanvas::Push ();
CCanvas::SetCurrent (CurrentGameScreen ());
CCanvas::Current ()->SetColorRGBi (bgColor);
if (!gameStates.video.nDisplayMode) {
	Rect (169, 189, 189, 196);
	CCanvas::Current ()->SetColorRGBi (RGB_PAL (128, 128, 128));
	OglDrawLine (ScaleX (168), ScaleY (189), ScaleX (189), ScaleY (189));
	}
else {
	OglDrawFilledRect (ScaleX (338), ScaleY (453), ScaleX (378), ScaleY (470));
	CCanvas::Current ()->SetColorRGBi (RGB_PAL (128, 128, 128));
	OglDrawLine (ScaleX (336), ScaleY (453), ScaleX (378), ScaleY (453));
	}
CCanvas::Pop ();
}
Ejemplo n.º 2
0
void PrintVersionInfo (void)
{
if (gameStates.app.bGameRunning || gameStates.app.bBetweenLevels)
	return;

	static int bVertigo = -1;

	int y, w, ws, h, hs, aw;
	float grAlpha = gameStates.render.grAlpha;

gameStates.render.grAlpha = 1.0f;
if (gameStates.menus.bHires) {
	if (gameOpts->menus.altBg.bHave > 0)
		y = 8; //102
	else {
		y = (88 * (gameStates.render.vr.nScreenSize % 65536)) / 480;
		if (y < 88)
			y = 88;
		}
	}
else
	y = 37;

gameStates.menus.bDrawCopyright = 0;
CCanvas::Push ();
CCanvas::SetCurrent (NULL);
fontManager.SetCurrent (GAME_FONT);
fontManager.Current ()->StringSize ("V2.2", w, h, aw);
fontManager.SetColorRGBi (RGB_PAL (63, 47, 0), 1, 0, 0);
h += 2;
GrPrintF (NULL, 0x8000, CCanvas::Current ()->Height () - h, "visit www.descent2.de");
fontManager.SetColorRGBi (RGB_PAL (51, 34, 0), 1, 0, 0);
fontManager.SetColorRGBi (D2BLUE_RGBA, 1, 0, 0);
GrPrintF (NULL, 0x8000, CCanvas::Current ()->Height () - 3 * h - 6, "Press F1 for help in menus");
fontManager.SetColorRGBi (RGB_PAL (31, 31, 31), 1, 0, 0);
CCanvas::Current ()->SetColor (CCanvas::Current ()->FontColor (0));
OglDrawLine (CCanvas::Current ()->Width () / 2 - 275,
				 CCanvas::Current ()->Height () - 2 * h - 5,
				 CCanvas::Current ()->Width () / 2 + 275,
				 CCanvas::Current ()->Height () - 2 * h - 5,
				 NULL);
#if 0
OglDrawLine (2, //CCanvas::Current ()->Width () / 2 - 200,
		CCanvas::Current ()->Height () - h - 2,
		CCanvas::Current ()->Width () - 2, // / 2 + 200,
		CCanvas::Current ()->Height () - h - 2,
		NULL);
#endif
GrPrintF (NULL, 0x8000, CCanvas::Current ()->Height () - 2 * h - 2, TXT_COPYRIGHT);
GrPrintF (NULL, CCanvas::Current ()->Width () - w - 2, CCanvas::Current ()->Height () - 2 * h - 2, "V%d.%d", D2X_MAJOR, D2X_MINOR);
if (bVertigo < 0)
	bVertigo = CFile::Exist ("d2x.hog", gameFolders.szMissionDir, 0);
if (bVertigo) {
	fontManager.SetCurrent (MEDIUM2_FONT);
	fontManager.Current ()->StringSize (TXT_VERTIGO, w, h, aw);
	GrPrintF (NULL, CCanvas::Current ()->Width () - w - SUBVER_XOFFS,
				 y + (gameOpts->menus.altBg.bHave ? h + 2 : 0), TXT_VERTIGO);
	}
fontManager.SetCurrent (MEDIUM2_FONT);
fontManager.Current ()->StringSize (D2X_NAME, w, h, aw);
GrPrintF (NULL, CCanvas::Current ()->Width () - w - SUBVER_XOFFS,
			 y + ((bVertigo && !gameOpts->menus.altBg.bHave) ? h + 2 : 0), D2X_NAME);
fontManager.SetCurrent (NORMAL_FONT);
fontManager.SetCurrent (SMALL_FONT);
fontManager.Current ()->StringSize (VERSION, ws, hs, aw);
fontManager.SetColorRGBi (D2BLUE_RGBA, 1, 0, 0);
GrPrintF (NULL, CCanvas::Current ()->Width () - ws - 1,
			 y + ((bVertigo && !gameOpts->menus.altBg.bHave) ? h + 2 : 0) + (h - hs) / 2, VERSION);
#if 0
if (!ogl.m_states.bShadersOk) {
	fontManager.SetColorRGBi (RGB_PAL (63, 0, 0), 1, 0, 0);
	GrPrintF (NULL, 0x8000, CCanvas::Current ()->Height () - 5 * (fontManager.Current ()->Height () + 2), "due to insufficient graphics hardware,");
	GrPrintF (NULL, 0x8000, CCanvas::Current ()->Height () - 4 * (fontManager.Current ()->Height () + 2), "D2X-XL will run at reduced settings.");
	}
#endif
fontManager.SetColorRGBi (RGB_PAL (6, 6, 6), 1, 0, 0);
CCanvas::Pop ();
gameStates.render.grAlpha = grAlpha;
}