port: CPythonGraphic::Destroy; audit the last PythonGraphic units

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 12:44:41 +09:00
co-authored by Claude Opus 5.5
parent f96b339309
commit 290a331aef
3 changed files with 30 additions and 5 deletions
+1
View File
@@ -602,3 +602,4 @@
{"date": "2026-09-30", "unit": "EterLib/JpegFile.cpp", "action": "jpeg_save ADAPTED (stb_image_write), destination managers + unused load/save_to_mem N_A", "evidence": "tests/port/port_screenshot_test.cpp; only CPythonGraphic::SaveJPEG calls jpeg_save"}
{"date": "2026-09-30", "unit": "EterPythonLib/PythonGraphic.cpp", "action": "GenScreenShotTag/SaveJPEG PORTED, SaveScreenShot ADAPTED (next-frame readback via ScreenShotHost)", "evidence": "port.screenshot; desktop grp.SaveScreenShot() -> ~/Documents/METIN2/0930_124051.jpg, colours checked"}
{"date": "2026-09-30", "unit": "EterBase/error.cpp", "action": "N_A (Win32 SEH crash log)", "evidence": "no reader of ErrorLog.txt in source or root .py"}
{"date": "2026-09-30", "unit": "EterPythonLib/PythonGraphic.cpp", "action": "Destroy PORTED, GetD3D ADAPTED, SetOmniLight PORTED, RenderImage/RenderAlphaImage N_A", "evidence": "no callers of RenderImage/RenderAlphaImage; GetD3D covered by port.login_flow resolution check"}
@@ -5,10 +5,21 @@
"contracts": [],
"functions": {
"CPythonGraphic::Destroy": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::Destroy"
],
"note": "Empty in 40250 as well."
},
"CPythonGraphic::GetD3D": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::GetD3D"
],
"test": [
"tests/port/port_login_flow_test.cpp"
],
"note": "40250 returns the IDirect3D8 it created; the port has no D3D8 object, so a CDummyDirect3D8 answers the only caller (CPythonSystem::GetDisplaySettings) with adapter modes 800x600/1024x768/1280x1024 X8R8G8B8 @60. Invariant: systemSetting.GetResolutionCount() > 0 and every mode passes the >=800x600 filter."
},
"CPythonGraphic::GetOrthoDepth": {
"status": "PORTED",
@@ -37,7 +48,11 @@
"note": "40250 body verbatim in the platform layer (pick ray through the cursor)."
},
"CPythonGraphic::SetOmniLight": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetOmniLight"
],
"note": "Verbatim 40250 (introselect.py/introcreate.py via grp.SetOmniLight); the SetLight/LightEnable calls sit behind a null-device guard for headless tests."
},
"CPythonGraphic::SetViewport": {
"status": "ADAPTED",
@@ -103,10 +118,12 @@
]
},
"CPythonGraphic::RenderImage": {
"status": "TODO"
"status": "N_A",
"note": "No caller in 40250 (LC_ALL=C grep -a over ClientVS22/source; not exported to grp); declared in PythonGraphic.h only."
},
"CPythonGraphic::RenderAlphaImage": {
"status": "TODO"
"status": "N_A",
"note": "No caller in 40250 (LC_ALL=C grep -a over ClientVS22/source; not exported to grp); declared in PythonGraphic.h only."
},
"CPythonGraphic::RenderCoolTimeBox": {
"status": "ADAPTED",
@@ -74,6 +74,13 @@ public:
};
}
// 40250 PythonGraphic.cpp:8
void CPythonGraphic::Destroy()
{
}
// 40250 PythonGraphic.cpp:12. PORT: no IDirect3D8 exists; a stand-in reports the adapter modes CPythonSystem
// lists as resolutions.
LPDIRECT3D8 CPythonGraphic::GetD3D()
{
static CDummyDirect3D8 s_dummyD3D;