Esempio n. 1
0
void CG_AdjustAutomapZoom(int zoomIn)
{
	float automapZoom = cg_automapZoom.value;

	if (zoomIn)
	{
		automapZoom *= 1.2f;
		if (automapZoom > 7.43f)  // approximately 1.2^11
		{
			automapZoom = 7.43f;
		}
	}
	else
	{
		automapZoom /= 1.2f;
		// zoom value of 1 corresponds to the most zoomed out view. The whole map is displayed
		// in the automap
		if (automapZoom < 1)
		{
			automapZoom = 1;
		}
	}

	trap_Cvar_Set("cg_automapZoom", va("%f", automapZoom));

	// recalculate the screen coordinates since the zoom changed
	CG_TransformAutomapEntity();
}
Esempio n. 2
0
/*
=======================
CG_ParseMapEntityInfo
=======================
*/
void CG_ParseMapEntityInfo(int axis_number, int allied_number)
{
	int i, offset = 3;

	mapEntityCount = 0;

	for (i = 0; i < axis_number; i++)
	{
		CG_ParseMapEntity(&mapEntityCount, &offset, TEAM_AXIS);
	}

	for (i = 0; i < allied_number; i++)
	{
		CG_ParseMapEntity(&mapEntityCount, &offset, TEAM_ALLIES);
	}

	CG_TransformAutomapEntity();
}
Esempio n. 3
0
void CG_AdjustAutomapZoom(int zoomIn)
{
	if (zoomIn)
	{
		automapZoom *= 1.2;
		if (automapZoom > 7.43)     // approximately 1.2^11
		{
			automapZoom = 7.43;
		}
	}
	else
	{
		automapZoom /= 1.2;
		// zoom value of 1 corresponds to the most zoomed out view. The whole map is displayed
		// in the automap
		if (automapZoom < 1)
		{
			automapZoom = 1;
		}
	}
	// recalculate the screen coordinates since the zoom changed
	CG_TransformAutomapEntity();
}