2 Commits

Author SHA1 Message Date
Ayush Thoren
bb8ffee0d3 Fix mouse being pulled to the bottom right (#1156)
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
2026-03-12 01:44:32 -05:00
ModMaker101
44fc8a4db2 Fix quiet in-game audio after engine update #897 (#1171) 2026-03-12 01:43:12 -05:00
3 changed files with 17 additions and 10 deletions

View File

@@ -260,9 +260,9 @@ void SoundEngine::updateMiniAudio()
continue;
}
float finalVolume = s->info.volume * m_MasterEffectsVolume;
if (finalVolume > 1.0f)
finalVolume = 1.0f;
float finalVolume = s->info.volume * m_MasterEffectsVolume * SFX_VOLUME_MULTIPLIER;
if (finalVolume > SFX_MAX_GAIN)
finalVolume = SFX_MAX_GAIN;
ma_sound_set_volume(&s->sound, finalVolume);
ma_sound_set_pitch(&s->sound, s->info.pitch);
@@ -557,10 +557,13 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
}
ma_sound_set_spatialization_enabled(&s->sound, MA_TRUE);
ma_sound_set_min_distance(&s->sound, SFX_3D_MIN_DISTANCE);
ma_sound_set_max_distance(&s->sound, SFX_3D_MAX_DISTANCE);
ma_sound_set_rolloff(&s->sound, SFX_3D_ROLLOFF);
float finalVolume = volume * m_MasterEffectsVolume;
if (finalVolume > 1.0f)
finalVolume = 1.0f;
float finalVolume = volume * m_MasterEffectsVolume * SFX_VOLUME_MULTIPLIER;
if (finalVolume > SFX_MAX_GAIN)
finalVolume = SFX_MAX_GAIN;
ma_sound_set_volume(&s->sound, finalVolume);
ma_sound_set_pitch(&s->sound, pitch);

View File

@@ -6,6 +6,12 @@ using namespace std;
#include "miniaudio.h"
constexpr float SFX_3D_MIN_DISTANCE = 1.0f;
constexpr float SFX_3D_MAX_DISTANCE = 16.0f;
constexpr float SFX_3D_ROLLOFF = 0.5f;
constexpr float SFX_VOLUME_MULTIPLIER = 1.5f;
constexpr float SFX_MAX_GAIN = 1.5f;
enum eMUSICFILES
{
eStream_Overworld_Calm1 = 0,

View File

@@ -1298,10 +1298,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
}
}
vPointerPos.x = floor(vPointerPos.x);
vPointerPos.x += ( static_cast<int>(vPointerPos.x)%2);
vPointerPos.y = floor(vPointerPos.y);
vPointerPos.y += ( static_cast<int>(vPointerPos.y)%2);
vPointerPos.x = static_cast<float>(floor(vPointerPos.x + 0.5f));
vPointerPos.y = static_cast<float>(floor(vPointerPos.y + 0.5f));
m_pointerPos = vPointerPos;
adjustPointerForSafeZone();