Exemplo n.º 1
0
void PrintGpsText()
{
	if (*g_TimeMs < gGpsTextTimer + GPS_TEXT_TIME)
	{
		std::wstring text;

		if (gCurrentGpsMode == III_RADAR_SPRITE_CENTRE)
		{
			text = L"GPS Mode: Disabled";
		}
		else
		{
			short legendtext[128];
			AsciiToUnicode((char*)BlipsGxtTableIII[gCurrentGpsMode], legendtext); //GetText(TheText, );
			text = L"GPS Mode: ";
			text += (wchar_t*)legendtext;
		}

		unsigned int color = 0xFFFFFFFF;
		SetFontStyle(0);
		SetScale(0.7f, 1.0f);
		SetColor(&color);
		SetJustifyOn();
		SetDropShadowPosition(1);
		SetPropOn();
		CVector2D point;
		point.x = -1.0;
		point.y = -1.0;
		TransformRadarPointToScreenSpaceIII(point, point);
		PrintString(point.x, point.y + 10.0f, (short*)text.c_str());
		SetDropShadowPosition(0);
		SetFontStyle(0);
	}
}
Exemplo n.º 2
0
void PrintGpsText()
{
	unsigned int color;
	CVector2D point;
	short text[128];
	if(*g_TimeMs < gGpsTextTimer + GPS_TEXT_TIME)
	{
		switch(gCurrentGpsMode)
		{
		case GPS_MODE_DISABLED:
			AsciiToUnicode("GPS Mode: Disabled", text);
			break;
		case GPS_MODE_DEFAULT:
			AsciiToUnicode("GPS Mode: Default", text);
			break;
		case GPS_MODE_AMMUNATION:
			if(*gCurrLevel != LEVEL_SHORESIDE)
				AsciiToUnicode("GPS Mode: Ammu-Nation", text);
			else
				AsciiToUnicode("GPS Error: can't find Ammu-Nation", text);
			break;
		case GPS_MODE_BOMBSHOP:
			AsciiToUnicode("GPS Mode: Bomb Shop", text);
			break;
		case GPS_MODE_FIRESTATION:
			AsciiToUnicode("GPS Mode: Fire Station", text);
			break;
		case GPS_MODE_HOSPITAL:
			AsciiToUnicode("GPS Mode: Hospital", text);
			break;
		case GPS_MODE_PAYNSPRAY:
			AsciiToUnicode("GPS Mode: Pay'N'Spray", text);
			break;
		case GPS_MODE_POLICE:
			AsciiToUnicode("GPS Mode: Police", text);
			break;
		case GPS_MODE_SAFEHOUSE:
			AsciiToUnicode("GPS Mode: Safehouse", text);
			break;
		default:
			AsciiToUnicode("GPS Error: Unknown command", text);
		}
		color = 0xFFFFFFFF;
		SetFontStyle(0);
		SetScale(0.7f, 1.0f);
		SetColor(&color);
		SetJustifyOn();
		SetDropShadowPosition(1);
		SetPropOn();
		point.x = -1.0f;
		point.y = -1.0f;
		TransformRadarPointToScreenSpace(point, point);
		PrintString(point.x, point.y + 10.0f, text);
		SetDropShadowPosition(0);
		SetFontStyle(0);
	}
}