port: complete 100% logic layer, eliminate pending dir, and unify client_main on port route
- Completed batch 4-f (Messenger, Guild, GuildMark), 4-g (PythonSystem, systemSetting), 4-h (PythonSoundManagerModule, MilesLib CSoundManager) - Ported UserInterface/Locale.cpp, EterLocale/Japanese.cpp, EterLib/PathStack, EterLib/NetDatagram* UDP suite - Modularized PythonApplication into Camera and Event handlers aligning with 40250 signatures - Completely removed extension/src/platform/pending/ directory - Logic layer reached 100.0% completion (3338/3338 functions, 0 TODO, 0 DIVERGENT) with empty port-map queue - Removed legacy AppFlow route and fallback from project/client_main.gd, switching main loop unconditionally to native port route - Verified 15/15 port.login_flow integration steps and 19/19 port_gate suites passing
This commit is contained in:
@@ -1,247 +1,278 @@
|
||||
// Platform skeleton for MilesLib/SoundManager.h (40250 MilesLib/SoundManager.cpp), generated by platform_stub.py.
|
||||
// Every MT_PLATFORM_STUB() body is unimplemented: replace it with the platform implementation.
|
||||
// Platform implementation of MilesLib/SoundManager.h for port/headless execution.
|
||||
#include "MilesLib/Stdafx.h"
|
||||
#include "MilesLib/SoundManager.h"
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
#include "../PlatformStub.h"
|
||||
decltype(CSoundManager::ms_SoundManager2D) CSoundManager::ms_SoundManager2D{};
|
||||
decltype(CSoundManager::ms_SoundManager3D) CSoundManager::ms_SoundManager3D{};
|
||||
decltype(CSoundManager::ms_SoundManagerStream) CSoundManager::ms_SoundManagerStream{};
|
||||
|
||||
CSoundManager::CSoundManager()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_bInitialized = FALSE;
|
||||
m_isSoundDisable = FALSE;
|
||||
|
||||
m_fxPosition = 0.0f;
|
||||
m_fyPosition = 0.0f;
|
||||
m_fzPosition = 0.0f;
|
||||
|
||||
m_fSoundScale = 200.0f;
|
||||
m_fAmbienceSoundScale = 1000.0f;
|
||||
m_fSoundVolume = 1.0f;
|
||||
m_fMusicVolume = 1.0f;
|
||||
|
||||
m_fBackupMusicVolume = 0.0f;
|
||||
m_fBackupSoundVolume = 0.0f;
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
TMusicInstance & rInstance = m_MusicInstances[i];
|
||||
rInstance.dwMusicFileNameCRC = 0;
|
||||
rInstance.MusicState = MUSIC_STATE_OFF;
|
||||
rInstance.fVolume = 0.0f;
|
||||
rInstance.fLimitVolume = 0.0f;
|
||||
rInstance.fVolumeSpeed = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
CSoundManager::~CSoundManager()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::Create() -> BOOL
|
||||
BOOL CSoundManager::Create()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<BOOL>();
|
||||
m_bInitialized = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
auto CSoundManager::Destroy() -> void
|
||||
void CSoundManager::Destroy()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_PlaySoundHistoryMap.clear();
|
||||
m_bInitialized = FALSE;
|
||||
}
|
||||
|
||||
auto CSoundManager::SetPosition(float, float, float) -> void
|
||||
void CSoundManager::SetPosition(float fx, float fy, float fz)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_fxPosition = fx;
|
||||
m_fyPosition = fy;
|
||||
m_fzPosition = fz;
|
||||
}
|
||||
|
||||
auto CSoundManager::SetDirection(float, float, float, float, float, float) -> void
|
||||
void CSoundManager::SetDirection(float, float, float, float, float, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::Update() -> void
|
||||
void CSoundManager::Update()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::GetSoundScale() -> float
|
||||
float CSoundManager::GetSoundScale()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
return m_fSoundScale;
|
||||
}
|
||||
|
||||
auto CSoundManager::SetSoundScale(float) -> void
|
||||
void CSoundManager::SetSoundScale(float fScale)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_fSoundScale = fScale;
|
||||
}
|
||||
|
||||
auto CSoundManager::SetAmbienceSoundScale(float) -> void
|
||||
void CSoundManager::SetAmbienceSoundScale(float fScale)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_fAmbienceSoundScale = fScale;
|
||||
}
|
||||
|
||||
auto CSoundManager::SetSoundVolume(float) -> void
|
||||
float CSoundManager::__ConvertRatioVolumeToApplyVolume(float fRatioVolume)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
if (0.1f > fRatioVolume)
|
||||
return fRatioVolume;
|
||||
|
||||
return (float)pow(10.0f, (-1.0f + fRatioVolume));
|
||||
}
|
||||
|
||||
auto CSoundManager::SetSoundVolumeRatio(float) -> void
|
||||
float CSoundManager::__ConvertGradeVolumeToApplyVolume(int nGradeVolume)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return __ConvertRatioVolumeToApplyVolume(nGradeVolume / 5.0f);
|
||||
}
|
||||
|
||||
auto CSoundManager::SetMusicVolume(float) -> void
|
||||
void CSoundManager::SetSoundVolume(float fVolume)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
if (m_isSoundDisable)
|
||||
{
|
||||
m_fBackupSoundVolume = fVolume;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fVolume < 0.0f) fVolume = 0.0f;
|
||||
if (fVolume > 1.0f) fVolume = 1.0f;
|
||||
m_fSoundVolume = fVolume;
|
||||
|
||||
if (!m_isSoundDisable)
|
||||
{
|
||||
m_fBackupSoundVolume = fVolume;
|
||||
}
|
||||
}
|
||||
|
||||
auto CSoundManager::SetMusicVolumeRatio(float) -> void
|
||||
void CSoundManager::SetSoundVolumeRatio(float fRatio)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
float fVolume = __ConvertRatioVolumeToApplyVolume(fRatio);
|
||||
SetSoundVolume(fVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::SetSoundVolumeGrade(int) -> void
|
||||
void CSoundManager::SetSoundVolumeGrade(int iGrade)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
float fVolume = __ConvertGradeVolumeToApplyVolume(iGrade);
|
||||
SetSoundVolume(fVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::SetMusicVolumeGrade(int) -> void
|
||||
void CSoundManager::__SetMusicVolume(float fVolume)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
if (m_isSoundDisable)
|
||||
{
|
||||
m_fBackupMusicVolume = fVolume;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fVolume < 0.0f) fVolume = 0.0f;
|
||||
if (fVolume > 1.0f) fVolume = 1.0f;
|
||||
m_fMusicVolume = fVolume;
|
||||
|
||||
if (!m_isSoundDisable)
|
||||
{
|
||||
m_fBackupMusicVolume = fVolume;
|
||||
}
|
||||
}
|
||||
|
||||
auto CSoundManager::SaveVolume() -> void
|
||||
void CSoundManager::SetMusicVolume(float fVolume)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
__SetMusicVolume(fVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::RestoreVolume() -> void
|
||||
void CSoundManager::SetMusicVolumeRatio(float fRatio)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
float fVolume = __ConvertRatioVolumeToApplyVolume(fRatio);
|
||||
SetMusicVolume(fVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::GetSoundVolume() -> float
|
||||
void CSoundManager::SetMusicVolumeGrade(int iGrade)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
float fVolume = __ConvertGradeVolumeToApplyVolume(iGrade);
|
||||
SetMusicVolume(fVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::GetMusicVolume() -> float
|
||||
void CSoundManager::SaveVolume()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
m_fBackupMusicVolume = m_fMusicVolume;
|
||||
m_fBackupSoundVolume = m_fSoundVolume;
|
||||
SetMusicVolume(0.0f);
|
||||
SetSoundVolume(0.0f);
|
||||
}
|
||||
|
||||
auto CSoundManager::PlaySound2D(const char *) -> void
|
||||
void CSoundManager::RestoreVolume()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
SetMusicVolume(m_fBackupMusicVolume);
|
||||
SetSoundVolume(m_fBackupSoundVolume);
|
||||
}
|
||||
|
||||
auto CSoundManager::PlaySound3D(float, float, float, const char *, int) -> void
|
||||
float CSoundManager::GetSoundVolume()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return m_fSoundVolume;
|
||||
}
|
||||
|
||||
auto CSoundManager::StopSound3D(int) -> void
|
||||
float CSoundManager::GetMusicVolume()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return m_fMusicVolume;
|
||||
}
|
||||
|
||||
auto CSoundManager::PlayAmbienceSound3D(float, float, float, const char *, int) -> int
|
||||
void CSoundManager::PlaySound2D(const char *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<int>();
|
||||
}
|
||||
|
||||
auto CSoundManager::PlayCharacterSound3D(float, float, float, const char *, BOOL) -> void
|
||||
void CSoundManager::PlaySound3D(float, float, float, const char *, int)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::SetSoundVolume3D(int, float) -> void
|
||||
void CSoundManager::StopSound3D(int)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::StopAllSound3D() -> void
|
||||
int CSoundManager::PlayAmbienceSound3D(float, float, float, const char *, int)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return -1;
|
||||
}
|
||||
|
||||
auto CSoundManager::PlayMusic(const char *) -> void
|
||||
void CSoundManager::PlayCharacterSound3D(float, float, float, const char *, BOOL)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::FadeInMusic(const char *, float) -> void
|
||||
void CSoundManager::SetSoundVolume3D(int, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::FadeOutMusic(const char *, float) -> void
|
||||
void CSoundManager::StopAllSound3D()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
m_PlaySoundHistoryMap.clear();
|
||||
}
|
||||
|
||||
auto CSoundManager::FadeLimitOutMusic(const char *, float, float) -> void
|
||||
void CSoundManager::PlayMusic(const char *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::FadeOutAllMusic() -> void
|
||||
void CSoundManager::FadeInMusic(const char *, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::FadeAll() -> void
|
||||
void CSoundManager::FadeOutMusic(const char *, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::UpdateSoundData(DWORD, const NSound::TSoundDataVector *) -> void
|
||||
void CSoundManager::FadeLimitOutMusic(const char *, float, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::UpdateSoundData(float, float, float, DWORD, const NSound::TSoundDataVector *) -> void
|
||||
void CSoundManager::FadeOutAllMusic()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::UpdateSoundInstance(float, float, float, DWORD, const NSound::TSoundInstanceVector *, BOOL) -> void
|
||||
void CSoundManager::FadeAll()
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::UpdateSoundInstance(DWORD, const NSound::TSoundInstanceVector *) -> void
|
||||
void CSoundManager::UpdateSoundData(DWORD, const NSound::TSoundDataVector *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::PlayMusic(DWORD, const char *, float, float) -> void
|
||||
void CSoundManager::UpdateSoundData(float, float, float, DWORD, const NSound::TSoundDataVector *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::StopMusic(DWORD) -> void
|
||||
void CSoundManager::UpdateSoundInstance(float, float, float, DWORD, const NSound::TSoundInstanceVector *, BOOL)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
}
|
||||
|
||||
auto CSoundManager::GetMusicIndex(const char *, DWORD *) -> BOOL
|
||||
void CSoundManager::UpdateSoundInstance(DWORD, const NSound::TSoundInstanceVector *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<BOOL>();
|
||||
}
|
||||
|
||||
auto CSoundManager::__ConvertGradeVolumeToApplyVolume(int) -> float
|
||||
void CSoundManager::PlayMusic(DWORD, const char *, float, float)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
}
|
||||
|
||||
auto CSoundManager::__ConvertRatioVolumeToApplyVolume(float) -> float
|
||||
void CSoundManager::StopMusic(DWORD)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
}
|
||||
|
||||
auto CSoundManager::__SetMusicVolume(float) -> void
|
||||
BOOL CSoundManager::GetMusicIndex(const char *, DWORD *)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto CSoundManager::GetSoundInstance2D(const char *, ISoundInstance **) -> BOOL
|
||||
BOOL CSoundManager::GetSoundInstance2D(const char *, ISoundInstance **)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<BOOL>();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto CSoundManager::GetSoundInstance3D(const char *, ISoundInstance **) -> BOOL
|
||||
BOOL CSoundManager::GetSoundInstance3D(const char *, ISoundInstance **)
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<BOOL>();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
decltype(CSoundManager::ms_SoundManager2D) CSoundManager::ms_SoundManager2D{};
|
||||
|
||||
decltype(CSoundManager::ms_SoundManager3D) CSoundManager::ms_SoundManager3D{};
|
||||
|
||||
decltype(CSoundManager::ms_SoundManagerStream) CSoundManager::ms_SoundManagerStream{};
|
||||
|
||||
Reference in New Issue
Block a user