示例#1
0
文件: aud.c 项目: blezek/warzone2100
/**
 * Get QSound axial position from world (x,y)
@FIXME we don't need to do this, since we are not using qsound.
 */
void audio_GetStaticPos(SDWORD iWorldX, SDWORD iWorldY, SDWORD *piX, SDWORD *piY, SDWORD *piZ)
{
	*piX = iWorldX;
	*piZ = map_TileHeight(map_coord(iWorldX), map_coord(iWorldY));
	/* invert y to match QSOUND axes */
	*piY = world_coord(GetHeightOfMap()) - iWorldY;
}
示例#2
0
// @FIXME we don't need to do this, since we are not using qsound.
void audio_GetObjectPos(SIMPLE_OBJECT *psBaseObj, SDWORD *piX, SDWORD *piY, SDWORD *piZ)
{
	/* check is valid pointer */
	ASSERT( psBaseObj != NULL,
			"audio_GetObjectPos: game object pointer invalid" );

	*piX = psBaseObj->pos.x;
	*piZ = map_TileHeight(map_coord(psBaseObj->pos.x), map_coord(psBaseObj->pos.y));

	/* invert y to match QSOUND axes */
	*piY = world_coord(GetHeightOfMap()) - psBaseObj->pos.y;
}
示例#3
0
Vector3f audio_GetPlayerPos(void)
{
	Vector3f pos;

	pos.x = player.p.x;
	pos.y = player.p.z;
	pos.z = player.p.y;

	// Invert Y to match QSOUND axes
	// @NOTE What is QSOUND? Why invert the Y axis?
	pos.y = world_coord(GetHeightOfMap()) - pos.y;

	return pos;
}
示例#4
0
文件: aud.c 项目: blezek/warzone2100
Vector3f audio_GetPlayerPos(void)
{
	Vector3f pos;
	// Player's Y and Z interchanged
	// @NOTE Why?
	pos.x = player.p.x + world_coord(visibleTiles.x / 2);
	pos.y = player.p.z + world_coord(visibleTiles.x / 2);
	pos.z = player.p.y;

	// Invert Y to match QSOUND axes
	// @NOTE What is QSOUND? Why invert the Y axis?
	pos.y = world_coord(GetHeightOfMap()) - pos.y;

	return pos;
}