mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Invert Z axis for OpenGL system
This commit is contained in:
parent
ed7b7ae2fe
commit
2c4d6b0ab7
@ -46,7 +46,7 @@ MxResult Lego3DSound::Create(ma_sound* p_sound, const char* p_name, MxS32 p_volu
|
||||
|
||||
ma_sound_set_min_distance(m_sound, 15.0f);
|
||||
ma_sound_set_max_distance(m_sound, 100.0f);
|
||||
ma_sound_set_position(m_sound, 0.0f, 0.0f, -40.0f);
|
||||
ma_sound_set_position(m_sound, 0.0f, 0.0f, 40.0f);
|
||||
|
||||
// [library:audio] Which rolloff?
|
||||
ma_sound_set_rolloff(m_sound, 1.0f);
|
||||
@ -88,7 +88,7 @@ MxResult Lego3DSound::Create(ma_sound* p_sound, const char* p_name, MxS32 p_volu
|
||||
|
||||
if (MxOmni::IsSound3D()) {
|
||||
const float* position = m_positionROI->GetWorldPosition();
|
||||
ma_sound_set_position(m_sound, position[0], position[1], position[2]);
|
||||
ma_sound_set_position(m_sound, position[0], position[1], -position[2]);
|
||||
}
|
||||
|
||||
LegoEntity* entity = m_roi->GetEntity();
|
||||
@ -144,7 +144,7 @@ MxU32 Lego3DSound::UpdatePosition(ma_sound* p_sound)
|
||||
}
|
||||
|
||||
if (m_sound != NULL) {
|
||||
ma_sound_set_position(m_sound, position[0], position[1], position[2]);
|
||||
ma_sound_set_position(m_sound, position[0], position[1], -position[2]);
|
||||
}
|
||||
else {
|
||||
MxS32 newVolume = m_volume;
|
||||
@ -221,7 +221,7 @@ void Lego3DSound::FUN_10011a60(ma_sound* p_sound, const char* p_name)
|
||||
if (m_sound != NULL) {
|
||||
ma_sound_set_spatialization_enabled(m_sound, MA_TRUE);
|
||||
const float* position = m_positionROI->GetWorldPosition();
|
||||
ma_sound_set_position(m_sound, position[0], position[1], position[2]);
|
||||
ma_sound_set_position(m_sound, position[0], position[1], -position[2]);
|
||||
}
|
||||
else {
|
||||
const float* position = m_positionROI->GetWorldPosition();
|
||||
|
||||
@ -90,16 +90,16 @@ void LegoSoundManager::UpdateListener(
|
||||
// uses DirectX' left-handed system? Figure out the proper conversions
|
||||
|
||||
if (p_position != NULL) {
|
||||
ma_engine_listener_set_position(&m_engine, 0, p_position[0], p_position[1], p_position[2]);
|
||||
ma_engine_listener_set_position(&m_engine, 0, p_position[0], p_position[1], -p_position[2]);
|
||||
}
|
||||
|
||||
if (p_direction != NULL && p_up != NULL) {
|
||||
ma_engine_listener_set_direction(&m_engine, 0, p_direction[0], p_direction[1], p_direction[2]);
|
||||
ma_engine_listener_set_world_up(&m_engine, 0, p_up[0], p_up[1], p_up[2]);
|
||||
ma_engine_listener_set_direction(&m_engine, 0, p_direction[0], p_direction[1], -p_direction[2]);
|
||||
ma_engine_listener_set_world_up(&m_engine, 0, p_up[0], p_up[1], -p_up[2]);
|
||||
}
|
||||
|
||||
if (p_velocity != NULL) {
|
||||
ma_engine_listener_set_velocity(&m_engine, 0, p_velocity[0], p_velocity[1], p_velocity[2]);
|
||||
ma_engine_listener_set_velocity(&m_engine, 0, p_velocity[0], p_velocity[1], -p_velocity[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user