Fix reached macOS UI primitives and audio fade behavior

This commit is contained in:
shen
2026-09-24 00:31:51 -07:00
parent 330ec9745b
commit 400973da11
14 changed files with 439 additions and 66 deletions
+1
View File
@@ -554,3 +554,4 @@
{"time": "2026-09-25T02:30:00Z", "event": "port", "unit": "EterLib/NetDatagram.cpp, NetDatagramReceiver.cpp, NetDatagramSender.cpp", "detail": "Ported 40250 UDP datagram suite (24 functions) verbatim into extension/src/port/EterLib/. Added mt_winsock_recvfrom wrapper in winsock.h shim handling POSIX socklen_t* to int* conversion. Updated LAYER_PATTERNS in port_map.py for MapOutdoorCharacterShadow.cpp. Logic layer reached 100.0% completion (3338/3338 functions done, 0 TODO, 0 DIVERGENT). Queue empty.", "tests": ["port.login_flow (15/15 PASS, 26.55s)", "script/port_gate.sh macos PASS (19/19 suites)", "port_map.py check: 0 errors"]}
{"time": "2026-09-25T03:00:00Z", "event": "route_cleanup", "unit": "client_main legacy elimination", "detail": "Removed legacy AppFlow route, preloads (AppFlow, LiveSmokeTest, PlayableLiveTest, NetTrace), and MT_PORT_PATH fallback from project/client_main.gd. client_main.tscn now unconditionally boots the native 40250 port route (PythonUISurface + Python3DSurface -> system.py). Passing MT_PORT_PATH=legacy emits a deprecation warning and continues on port route.", "tests": ["client_main.tscn verified on port route and legacy warning", "script/port_gate.sh macos PASS (19/19 suites)", "port_map.py check: 0 errors"]}
{"time": "2026-09-24T07:07:19Z", "event": "port_verification_fix", "unit": "Client/root/*.py + UserInterface/PythonApplication platform adapter + MilesLib/SoundManager platform adapter", "detail": "Corrected 74 RUN_AS_IS mappings from unrelated assets/root to 40250 root.epk, added per-script byte/hash verification and stricter port-map validation. Restored GC_TIME server clock semantics and routed packed sound bytes to Godot without applying volume twice; replaced deleted legacy asset-gate tests with active host/audio tests. Qualified MT_PLATFORM_STUB_TRACE exposed 93 called stubs in offline login_flow; SetGlobalCenterPosition was implemented from the original call order, and remaining reached groups were recorded in audit/reports/platform-runtime-trace.md. Android port-only gate exposed the pre-existing Win32Crt.cpp glob/iconv API-24 build blocker after a missing <ctype.h> PCH dependency in Japanese.cpp was repaired.", "tests": ["script/verify_root_pack.py PASS (74/74)", "port_map.py check: 0 errors", "script/port_gate.sh macos PASS", "script/run_40250_asset_gate.sh PASS", "script/python_game_render_test.sh PASS", "MT_PLATFORM_STUB_TRACE=1 port.login_flow PASS (93 called stubs identified)", "android port_gate FAIL: Win32Crt.cpp glob/iconv declarations under NDK API 24"]}
{"time": "2026-09-24T07:31:08Z", "event": "platform_adapter_fix", "unit": "EterLib/GrpScreen.cpp + MilesLib/SoundManager.cpp", "detail": "Implemented reached 40250 UI box and vertical gradient command bridge; audio bridge now preserves named three-slot music fades, frame-step fade speed and limit, indexed 3D volume, 3D play counts, and SaveVolume/RestoreVolume mute state. Remaining sky/water/shadow/culling/IME adapters stay TODO.", "evidence": ["./script/port_gate.sh macos", "./script/python_game_render_test.sh", "godot --headless --path project -s res://audio_driver_test.gd", "port_map.py check"]}
+12 -2
View File
@@ -26,13 +26,23 @@
"status": "TODO"
},
"CScreen::RenderBox2d": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"extension/src/platform/EterLib/GrpScreen.cpp:CScreen::RenderBox2d"
],
"test": "extension/tests/port_app_loop_test.cpp",
"note": "40250 four edge line pairs, including the bottom edge extending one pixel, are recorded into the Godot UI command stream."
},
"CScreen::RenderBar2d": {
"status": "TODO"
},
"CScreen::RenderGradationBar2d": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"extension/src/platform/EterLib/GrpScreen.cpp:CScreen::RenderGradationBar2d"
],
"test": "extension/tests/port_app_loop_test.cpp",
"note": "40250 top and bottom vertex colours are serialized as a vertically interpolated Godot canvas polygon; zero-width and zero-height guards match the source."
},
"CScreen::RenderCircle2d": {
"status": "TODO"
@@ -0,0 +1,163 @@
{
"reference": "MilesLib/SoundManager.cpp",
"reference_sha256": "6602fcd22004c2335634a4a4041c33409174ef11c583f4e257dda676f5b9229e",
"priority": "P4",
"contracts": [],
"functions": {
"CSoundManager::CSoundManager": {
"status": "TODO"
},
"CSoundManager::~CSoundManager": {
"status": "TODO"
},
"CSoundManager::Create": {
"status": "TODO"
},
"CSoundManager::Destroy": {
"status": "TODO"
},
"CSoundManager::SetPosition": {
"status": "TODO"
},
"CSoundManager::SetDirection": {
"status": "TODO"
},
"CSoundManager::Update": {
"status": "TODO"
},
"CSoundManager::UpdateSoundData": {
"status": "TODO"
},
"CSoundManager::UpdateSoundInstance": {
"status": "TODO"
},
"CSoundManager::GetSoundScale": {
"status": "TODO"
},
"CSoundManager::SetSoundScale": {
"status": "TODO"
},
"CSoundManager::SetAmbienceSoundScale": {
"status": "TODO"
},
"CSoundManager::SetSoundVolume": {
"status": "TODO"
},
"CSoundManager::__SetMusicVolume": {
"status": "TODO"
},
"CSoundManager::__ConvertRatioVolumeToApplyVolume": {
"status": "TODO"
},
"CSoundManager::__ConvertGradeVolumeToApplyVolume": {
"status": "TODO"
},
"CSoundManager::SetSoundVolumeGrade": {
"status": "TODO"
},
"CSoundManager::SetSoundVolumeRatio": {
"status": "TODO"
},
"CSoundManager::SetMusicVolume": {
"status": "TODO"
},
"CSoundManager::GetSoundVolume": {
"status": "TODO"
},
"CSoundManager::GetMusicVolume": {
"status": "TODO"
},
"CSoundManager::GetSoundInstance2D": {
"status": "TODO"
},
"CSoundManager::GetSoundInstance3D": {
"status": "TODO"
},
"CSoundManager::PlaySound2D": {
"status": "TODO"
},
"CSoundManager::PlaySound3D": {
"status": "TODO"
},
"CSoundManager::PlayAmbienceSound3D": {
"status": "TODO"
},
"CSoundManager::PlayCharacterSound3D": {
"status": "TODO"
},
"CSoundManager::StopSound3D": {
"status": "TODO"
},
"CSoundManager::SetSoundVolume3D": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::SetSoundVolume3D"
],
"test": "project/audio_driver_test.gd",
"note": "40250 indexed instance volume is forwarded to the active Godot 3D sound player."
},
"CSoundManager::StopAllSound3D": {
"status": "TODO"
},
"CSoundManager::PlayMusic": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::PlayMusic"
],
"test": "project/audio_driver_test.gd",
"note": "40250 direct PlayMusic uses stream slot 0; the Godot driver now replaces slot 0."
},
"CSoundManager::FadeInMusic": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::FadeInMusic"
],
"test": "project/audio_driver_test.gd",
"note": "40250 named stream fade-in advances by fVolumeSpeed per update; Godot uses three slots and the same per-frame volume step."
},
"CSoundManager::FadeLimitOutMusic": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::FadeLimitOutMusic"
],
"test": "project/audio_driver_test.gd",
"note": "40250 ratio limit is converted by the original volume formula and the named stream fades to that limit."
},
"CSoundManager::FadeOutMusic": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::FadeOutMusic"
],
"test": "project/audio_driver_test.gd",
"note": "40250 fade-out targets only the named active stream and stops it at volume zero."
},
"CSoundManager::FadeOutAllMusic": {
"status": "TODO"
},
"CSoundManager::SaveVolume": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::SaveVolume"
],
"test": "extension/tests/port_login_flow_test.cpp",
"note": "40250 backup and mute sequence is preserved, including the repeated-save guard."
},
"CSoundManager::RestoreVolume": {
"status": "ADAPTED",
"impl": [
"extension/src/platform/MilesLib/SoundManager.cpp:CSoundManager::RestoreVolume"
],
"test": "extension/tests/port_login_flow_test.cpp",
"note": "40250 clears the disabled flag before restoring backed-up music and sound volumes."
},
"CSoundManager::StopMusic": {
"status": "TODO"
},
"CSoundManager::GetMusicIndex": {
"status": "TODO"
},
"CSoundManager::FadeAll": {
"status": "TODO"
}
}
}
+3 -1
View File
@@ -12,8 +12,10 @@ The first-call trace reported **93 distinct stub signatures**. `PlatformStub.h`
| Runtime group | Reached stubs to address first | Observable gap |
| --- | --- | --- |
| World and sky | `CSkyBox::Update/Render/RenderCloud`, `CScreenFilter::Set*`, `CLensFlare::Draw*`, `CSpeedTreeForest::CreateInstance/UpdateSystem/Render` | Sky, weather, foliage and postprocessing do not follow the original path. |
| Culling and drawing | `CCullingManager::Register/Update`, `Frustum::ViewVolumeTest`, `CScreen::BuildViewFrustum/RenderBox2d/RenderGradationBar2d`, `CGraphicImageInstance::OnSetImagePointer` | Visibility and several UI/render primitives still depend on default-return stubs. |
| Culling and drawing | `CCullingManager::Register/Update`, `Frustum::ViewVolumeTest`, `CScreen::BuildViewFrustum`, `CGraphicImageInstance::OnSetImagePointer` | Visibility and remaining UI/render primitives still depend on default-return stubs. |
| Audio internals | `NSound::LoadSoundInformationPiece`, `CSoundBase`, `CSoundManager2D/3D/Stream` constructors | The new Godot command bridge plays common sounds, but the original Miles object model is not implemented. |
| Platform services | `CFileLoaderThread::Fetch`, `CInputKeyboard::IsPressed`, `BuildProcessCRC`, `GetProcessCRCMagicCubePiece`, `CMSWindow::GetWindowHandle` | Resource scheduling, input polling and the CRC path need focused verification. |
`CPythonApplication::SetGlobalCenterPosition` appeared in the first trace and was implemented from the 40250 `GlobalPositionToLocalPosition → GetHeight → SetCenterPosition` sequence in this round. The other groups remain open in the platform queue; do not mark them verified from this smoke test.
2026-09-24 follow-up: `CScreen::RenderBox2d` and `RenderGradationBar2d` now emit Godot canvas commands with the source's edge and colour semantics. `CSoundManager` now forwards named music fade speed/limit, 3D loop counts and indexed volume; its SaveVolume/RestoreVolume sequence preserves the backup. These changes passed the macOS port gate, audio driver test and game render test. The sky, foliage, water, shadows, sphere-pack culling and IME gaps remain open.