2V2-e.2: Godot consumer of the 3D draw commands, offline screenshot

python_3d_surface.gd turns RenderGame's recorded draws into meshes under a
camera read back from SetPerspective; textures come from the 40250 packs.
GetFarClip and the CMapManager ctor ported verbatim. Until the environment
is ported, lit draws with no light/ambient are shown unshaded (stand-in).
script/python_game_render_test.sh runs system.py login -> select -> game
against port_fake_login_server (or --live via MT_LIVE_*) and screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 20:35:36 +09:00
co-authored by Claude Opus 5.5
parent 5bfa13c5cc
commit 1fe8a4b643
12 changed files with 630 additions and 6 deletions
@@ -76,6 +76,9 @@ auto CPythonBackground::GetWarpMapName() -> const char *
CPythonBackground::CPythonBackground()
{
MT_PLATFORM_STUB();
// PORT: the one member the stand-in's ported GetFarClip reads (PythonBackground.cpp:210); the
// view distance sets and Initialize() come with the unit.
m_eViewDistanceNum=0;
}
CPythonBackground::~CPythonBackground()
@@ -95,10 +98,20 @@ auto CPythonBackground::GetPickingPointWithRayOnlyTerrain(const CRay &, D3DXVECT
return mt_platform_stub_return<bool>();
}
auto CPythonBackground::GetFarClip() -> float
// 40250 PythonBackground.cpp:173 (CPythonApplication::RenderGame's SetPerspective); m_pkMap stays null
// until the map is ported, so this is the 50000 far clip.
float CPythonBackground::GetFarClip()
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<float>();
if (!m_pkMap)
return 50000.0f;
if (m_ViewDistanceSet[m_eViewDistanceNum].m_fFarClip==0.0f)
{
TraceError("CPythonBackground::GetFarClip m_eViewDistanceNum=%d", m_eViewDistanceNum);
m_ViewDistanceSet[m_eViewDistanceNum].m_fFarClip=25600.0f;
}
return m_ViewDistanceSet[m_eViewDistanceNum].m_fFarClip;
}
auto CPythonBackground::Render() -> void