2V2-e.5b: feed native map height and light into game render

This commit is contained in:
shenlei
2026-09-23 22:10:29 +09:00
parent 702fef7b47
commit 5a1df57e69
13 changed files with 678 additions and 76 deletions
+2
View File
@@ -522,3 +522,5 @@
{"time": "2026-09-23T11:40:26Z", "event": "port_round", "unit": "PORT-PLAN 2V2-e.3: live smoke of the Godot render adapter", "ported": [], "adapted": ["python_3d_surface.gd material key: bools as ints (formatting error made every draw share the first material)", "python_game_render_test.gd: one texture per texture name check"], "divergent": [], "needs_live": [], "tests": ["script/python_game_render_test.sh offline: pass (3 textures, character dressed)", "script/python_game_render_test.sh --live against 192.168.21.203: pass (246 draws, 10 textures, main character + mobs)", "script/port_gate.sh macos: PASS"], "todo": ["environment port (CMapManager::LoadMap / SetCharacterDirLight) removes the unlit stand-in", "terrain/map rendering", "SphereLib frustum culling", "PythonPlayerEventHandler"]}
{"time":"2026-09-23T12:08:00Z","event":"port_round","unit":"PORT-PLAN 2V2-e.4: 40250 pack terrain and .msenv lighting in Python 3D surface","ported":[],"adapted":["Metin2World pack:// path for Setting.txt, height.raw, tile.raw, textureset DDS and .msenv","AssetResolver virtual pack root preserving d:/ paths","environment_builder decodes pack TGA/PNG/JPG from bytes","python_3d_surface maps terrain into recorded D3D camera frame and lights character from map .msenv"],"divergent":["CMapManager::LoadMap/GetHeight and CPythonBackground::SetCharacterDirLight remain native stubs; terrain is aligned once to the actor's initial height in the render adapter"],"needs_live":["2026-09-23 live smoke not rerun: MT_LIVE_* credentials unavailable in this environment"],"tests":["script/python_game_render_test.sh offline: pass (9/9 terrain chunks splatted, 4/4 character materials lit, screenshot textured ground)","build/formats/formats_map_test: pass","godot --headless --path project --script res://environment_test.gd: pass"],"todo":["native CMapManager/CPythonBackground environment and height chain","cross-map warp rebuild of the 3D terrain scene"]}
{"time":"2026-09-23T12:14:00Z","event":"test_run","id":"PORT-PLAN 2V2-e.4","result":"PASS","tests":["script/port_gate.sh macos: PASS (11 port tests, port.login_live skipped without MT_LIVE_*; loopback-enabled run)","script/python_game_render_test.sh: PASS (9 terrain chunks, 9 splats, 4 lit character surfaces, textured ground screenshot)","build/formats/formats_map_test: PASS","godot --headless --path project --script res://environment_test.gd: PASS","git diff --check: PASS"],"reason":"The first sandboxed port gate run denied loopback sockets (port.net and port.login_flow); rerunning with local socket access passed. Live smoke remains unrun because credentials are unavailable."}
{"time":"2026-09-23T12:54:00Z","event":"port_round","unit":"PORT-PLAN 2V2-e.5: native map height and character light transition adapter","ported":[],"adapted":["CMapManager Warp-facing AtlasInfo/Setting.txt/height.raw/.msenv loader and 40250 triangle height interpolation","CPythonBackground native map selection/local coordinates/character and background SetLight","Python 3D surface consumes native map name/local frame, removes initial terrain elevation shift and rebuilds on map change","EterBase/Utils MIN/MAX/MINMAX and fMIN/fMAX/fMINMAX exact 40250 pure functions"],"divergent":["CMapOutdoor and placed-object height, attributes, fog, minimap and portal lifecycle remain unported; native map functions are marked ADAPTED/TODO rather than PORTED"],"needs_live":["MT_LIVE_* credentials absent; real-server terrain and cross-map warp screenshots pending"],"tests":["script/python_game_render_test.sh offline: PASS (4/4 native light0, finite view, native map, actor foot-ground delta 0.1 cm, textured ground screenshot)","extension/tests/port_utils_test.cpp: PASS","port_map.py check: 0 errors"],"todo":["full CMapOutdoor/MapManager/PythonBackground unit port","real-server and cross-map visual smoke","2V3 player/input/event/movement chain"]}
{"time":"2026-09-23T13:09:00Z","event":"test_run","id":"PORT-PLAN 2V2-e.5","result":"PASS","tests":["script/port_gate.sh macos: PASS (12 port tests; port.login_live skipped without MT_LIVE_*)","script/python_game_render_test.sh: PASS (4/4 native light0, finite camera matrix, 0.1 cm foot-ground difference, 559 terrain texture contrasts)","port_map.py check: 0 errors","git diff --check: PASS"],"reason":"The first sandboxed port gate run denied localhost sockets; loopback-enabled rerun passed. Full CMapOutdoor and live/cross-map evidence remain outstanding."}
+185
View File
@@ -0,0 +1,185 @@
{
"reference": "GameLib/MapManager.cpp",
"reference_sha256": "6e20512dcbe73aeb9d49300667ce460bbd21bf4697a75a0d96fa1b57e7c8a4ff",
"priority": "P4",
"contracts": [],
"functions": {
"CMapManager::IsMapOutdoor": {
"status": "TODO"
},
"CMapManager::GetMapOutdoorRef": {
"status": "TODO"
},
"CMapManager::CMapManager": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::CMapManager"],
"note": "Constructor matches 40250; kept in pending file until CMapOutdoor is ported.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::~CMapManager": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::~CMapManager"],
"note": "Calls transition adapter Destroy, which frees pack-backed map state.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::IsSoftwareTilingEnable": {
"status": "TODO"
},
"CMapManager::ReserveSoftwareTilingEnable": {
"status": "TODO"
},
"CMapManager::Initialize": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::Initialize"],
"note": "40250 AtlasInfo loading order; pack text parsed in transition adapter.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::Create": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::Create"],
"note": "No CMapOutdoor allocation yet; Metin2World renders terrain.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::Destroy": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::Destroy"],
"note": "Frees transition map and environment data; CMapOutdoor cleanup remains TODO.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::Clear": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::Clear"],
"note": "Clears pack-backed terrain state, not CMapOutdoor.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::AllocMap": {
"status": "TODO"
},
"CMapManager::LoadProperty": {
"status": "TODO"
},
"CMapManager::LoadMap": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::LoadMap"],
"note": "Loads Setting.txt, initial height tile and .msenv from 40250 packs for reachable Warp chain; outdoor scene lifecycle remains TODO.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::IsMapReady": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::IsMapReady"],
"note": "Reports pack-backed transition map readiness instead of CMapOutdoor::IsReady.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::UnloadMap": {
"status": "TODO"
},
"CMapManager::UpdateMap": {
"status": "TODO"
},
"CMapManager::UpdateAroundAmbience": {
"status": "TODO"
},
"CMapManager::GetHeight": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::GetHeight"],
"note": "Uses the 40250 terrain triangle interpolation on packed height.raw; placed-object height remains TODO.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::GetTerrainHeight": {
"status": "TODO"
},
"CMapManager::GetWaterHeight": {
"status": "TODO"
},
"CMapManager::BeginEnvironment": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::BeginEnvironment"],
"note": "Applies .msenv material/background light through RecordingDevice; fog and full CMapOutdoor environment remain TODO.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::EndEnvironment": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::EndEnvironment"],
"note": "Restores recorded lighting state; full environment state restoration remains TODO.",
"test": "project/python_game_render_test.gd"
},
"CMapManager::SetEnvironmentData": {
"status": "TODO"
},
"CMapManager::SetEnvironmentDataPtr": {
"status": "TODO"
},
"CMapManager::ResetEnvironmentDataPtr": {
"status": "TODO"
},
"CMapManager::BlendEnvironmentData": {
"status": "TODO"
},
"CMapManager::RegisterEnvironmentData": {
"status": "TODO"
},
"CMapManager::GetCurrentEnvironmentData": {
"status": "TODO"
},
"CMapManager::GetEnvironmentData": {
"status": "TODO"
},
"CMapManager::RefreshPortal": {
"status": "TODO"
},
"CMapManager::ClearPortal": {
"status": "TODO"
},
"CMapManager::AddShowingPortalID": {
"status": "TODO"
},
"CMapManager::AllocEnvironmentData": {
"status": "TODO"
},
"CMapManager::DeleteEnvironmentData": {
"status": "TODO"
},
"CMapManager::LoadEnvironmentData": {
"status": "TODO"
},
"CMapManager::GetShadowMapColor": {
"status": "TODO"
},
"CMapManager::GetRenderedSplatNum": {
"status": "TODO"
},
"CMapManager::GetRenderedGraphicThingInstanceNum": {
"status": "TODO"
},
"CMapManager::GetNormal": {
"status": "TODO"
},
"CMapManager::isPhysicalCollision": {
"status": "TODO"
},
"CMapManager::isAttrOn": {
"status": "TODO"
},
"CMapManager::GetAttr": {
"status": "TODO"
},
"CMapManager::SetTerrainRenderSort": {
"status": "TODO"
},
"CMapManager::SetTransparentTree": {
"status": "TODO"
},
"CMapManager::GetTerrainRenderSort": {
"status": "TODO"
},
"CMapManager::GetBaseXY": {
"status": "TODO"
},
"CMapManager::__LoadMapInfoVector": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::__LoadMapInfoVector"],
"note": "Reads packed AtlasInfo bounds with 40250 terrain tile size; parser is transitional.",
"test": "project/python_game_render_test.gd"
}
}
}
@@ -0,0 +1,209 @@
{
"reference": "UserInterface/PythonBackground.cpp",
"reference_sha256": "810ed94a182af71973ce3fa41f77173506db71f5c6bb1f3c6b56879bfcea4f0e",
"priority": "P4",
"contracts": [],
"functions": {
"CPythonBackground::GetRenderShadowTime": {
"status": "TODO"
},
"CPythonBackground::SetVisiblePart": {
"status": "TODO"
},
"CPythonBackground::EnableTerrainOnlyForHeight": {
"status": "TODO"
},
"CPythonBackground::SetSplatLimit": {
"status": "TODO"
},
"CPythonBackground::CreateCharacterShadowTexture": {
"status": "TODO"
},
"CPythonBackground::ReleaseCharacterShadowTexture": {
"status": "TODO"
},
"CPythonBackground::RefreshShadowLevel": {
"status": "TODO"
},
"CPythonBackground::SetShadowLevel": {
"status": "TODO"
},
"CPythonBackground::SelectViewDistanceNum": {
"status": "TODO"
},
"CPythonBackground::SetViewDistanceSet": {
"status": "TODO"
},
"CPythonBackground::GetFarClip": {
"status": "TODO"
},
"CPythonBackground::GetDistanceSetInfo": {
"status": "TODO"
},
"CPythonBackground::CPythonBackground": {
"status": "TODO"
},
"CPythonBackground::~CPythonBackground": {
"status": "TODO"
},
"CPythonBackground::Initialize": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::Initialize"],
"note": "40250 locale AtlasInfo setup, backed by transitional MapManager loader.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::__CreateProperty": {
"status": "TODO"
},
"CPythonBackground::GetPickingPoint": {
"status": "TODO"
},
"CPythonBackground::GetPickingPointWithRay": {
"status": "TODO"
},
"CPythonBackground::GetPickingPointWithRayOnlyTerrain": {
"status": "TODO"
},
"CPythonBackground::GetLightDirection": {
"status": "TODO"
},
"CPythonBackground::Destroy": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::Destroy"],
"note": "Native map state cleanup; SnowEnvironment destruction remains TODO.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::Create": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::Create"],
"note": "Calls transition MapManager::Create; property and snow initialization remain TODO.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::Update": {
"status": "TODO"
},
"CPythonBackground::__IsSame": {
"status": "TODO"
},
"CPythonBackground::Render": {
"status": "TODO"
},
"CPythonBackground::RenderSnow": {
"status": "TODO"
},
"CPythonBackground::RenderPCBlocker": {
"status": "TODO"
},
"CPythonBackground::RenderCollision": {
"status": "TODO"
},
"CPythonBackground::RenderCharacterShadowToTexture": {
"status": "TODO"
},
"Interpolate": {
"status": "TODO"
},
"CPythonBackground::CheckAdvancing": {
"status": "TODO"
},
"CPythonBackground::RenderSky": {
"status": "TODO"
},
"CPythonBackground::RenderCloud": {
"status": "TODO"
},
"CPythonBackground::RenderWater": {
"status": "TODO"
},
"CPythonBackground::RenderEffect": {
"status": "TODO"
},
"CPythonBackground::RenderBeforeLensFlare": {
"status": "TODO"
},
"CPythonBackground::RenderAfterLensFlare": {
"status": "TODO"
},
"CPythonBackground::ClearGuildArea": {
"status": "TODO"
},
"CPythonBackground::RegisterGuildArea": {
"status": "TODO"
},
"CPythonBackground::SetCharacterDirLight": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::SetCharacterDirLight"],
"note": "Statement-equivalent 40250 function, kept in pending translation unit until the whole unit is ported; reachable RenderGame draws carry native light0.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::SetBackgroundDirLight": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::SetBackgroundDirLight"],
"note": "Statement-equivalent 40250 light setter, still in transitional pending translation unit.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::GlobalPositionToLocalPosition": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::GlobalPositionToLocalPosition"],
"note": "40250 base subtraction, kept in transitional pending translation unit.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::LocalPositionToGlobalPosition": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::LocalPositionToGlobalPosition"],
"note": "40250 base addition, kept in transitional pending translation unit.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::RegisterDungeonMapName": {
"status": "TODO"
},
"CPythonBackground::GlobalPositionToMapInfo": {
"status": "TODO"
},
"CPythonBackground::Warp": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::Warp"],
"note": "Native AtlasInfo map selection and local coordinates reach pack-backed map; minimap, dungeon portals, target effects and full CMapOutdoor lifecycle remain TODO.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::VisibleGuildArea": {
"status": "TODO"
},
"CPythonBackground::DisableGuildArea": {
"status": "TODO"
},
"CPythonBackground::GetWarpMapName": {
"status": "ADAPTED",
"impl": ["extension/src/platform/pending/UserInterface/PythonBackground.cpp:CPythonBackground::GetWarpMapName"],
"note": "Returns current native Warp map name; still in pending translation unit.",
"test": "project/python_game_render_test.gd"
},
"CPythonBackground::ChangeToDay": {
"status": "TODO"
},
"CPythonBackground::ChangeToNight": {
"status": "TODO"
},
"CPythonBackground::EnableSnowEnvironment": {
"status": "TODO"
},
"CPythonBackground::DisableSnowEnvironment": {
"status": "TODO"
},
"CPythonBackground::SetXMaxTree": {
"status": "TODO"
},
"CPythonBackground::CreateTargetEffect": {
"status": "TODO"
},
"CPythonBackground::DeleteTargetEffect": {
"status": "TODO"
},
"CPythonBackground::CreateSpecialEffect": {
"status": "TODO"
},
"CPythonBackground::DeleteSpecialEffect": {
"status": "TODO"
}
}
}