/** * 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; }
// @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; }
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; }
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; }