{ "reference": "EterPythonLib/PythonGraphic.cpp", "reference_sha256": "82fc01bd616637f92fcbc17e1eb2c7dd8ab78615695dc2aaabe9e5bf2f204632", "priority": "P4", "contracts": [], "functions": { "CPythonGraphic::Destroy": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::Destroy" ], "note": "Empty in 40250 as well." }, "CPythonGraphic::GetD3D": { "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", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::GetOrthoDepth" ] }, "CPythonGraphic::SetInterfaceRenderState": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetInterfaceRenderState" ] }, "CPythonGraphic::SetGameRenderState": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetGameRenderState" ] }, "CPythonGraphic::SetCursorPosition": { "status": "ADAPTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetCursorPosition" ], "test": "tests/port/port_login_flow_test.cpp", "note": "40250 body verbatim in the platform layer (pick ray through the cursor)." }, "CPythonGraphic::SetOmniLight": { "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", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetViewport" ], "test": "tests/port/port_app_loop_test.cpp", "note": "40250 device viewport set/backup kept (guarded for the device-less boot). The UI is drawn from UIRenderCommands, not the device, so the same rectangle is also pushed as the UI clip (UIRenderSetClip)." }, "CPythonGraphic::RestoreViewport": { "status": "ADAPTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::RestoreViewport" ], "test": "tests/port/port_app_loop_test.cpp", "note": "Restores the backup viewport as 40250 does and pops the UI clip pushed by SetViewport." }, "CPythonGraphic::SetGamma": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SetGamma" ], "note": "Verbatim 40250. The recording device reports no D3DCAPS2_FULLSCREENGAMMA (windowed output, where D3D8 ignores the ramp as well), so it returns at the caps check; IDirect3DDevice8::SetGammaRamp added to the D3D8 shim." }, "GenScreenShotTag": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:GenScreenShotTag" ], "note": "Verbatim 40250; only reached when g_isScreenShotKey (false, never set)." }, "CPythonGraphic::SaveJPEG": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SaveJPEG" ], "test": [ "tests/port/port_screenshot_test.cpp" ] }, "CPythonGraphic::SaveScreenShot": { "status": "ADAPTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::SaveScreenShot", "src/platform/EterPythonLib/PythonGraphic.cpp:ScreenShotHost::WriteScreenShot", "src/host/live_client.cpp" ], "test": [ "tests/port/port_screenshot_test.cpp" ], "note": "40250 locks the D3D8 back buffer and writes the JPEG before returning. The script thread and the SDL host alternate, so the call queues a readback of the next presented frame (ScreenShotHost::SetRequest -> VulkanWindow::request_frame) and returns true; ScreenShotHost::WriteScreenShot runs the rest verbatim one frame later (X8R8G8B8 row loop, SaveJPEG, TraceError on failure, g_isScreenShotKey EXIF block). No host -> TraceError + false (40250's GetBackBuffer failure). Only the X8R8G8B8 branch exists: the swapchain is read back as BGRA. Checked on desktop: grp.SaveScreenShot() wrote ~/Documents/METIN2/.jpg with correct colours (SHGetSpecialFolderPath shim = $HOME/Documents, else cwd)." }, "CPythonGraphic::PushState": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::PushState" ] }, "CPythonGraphic::PopState": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::PopState" ] }, "CPythonGraphic::RenderImage": { "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": "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", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::RenderCoolTimeBox" ], "test": "tests/port/port_app_loop_test.cpp", "note": "Fan vertex build verbatim. 40250's D3DPT_TRIANGLEFAN (untextured, SELECTARG1 DIFFUSE colour/alpha, 0x80000000) is emitted as one untextured quad UIRenderCommand per fan triangle (centre, j, j+1, j+1); src/host and python_ui_surface.gd draw Bar+quad as a polygon. On-screen look NEEDS_LIVE against a skill cooldown." }, "CPythonGraphic::GenerateColor": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::GenerateColor" ] }, "CPythonGraphic::RenderDownButton": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::RenderDownButton" ] }, "CPythonGraphic::RenderUpButton": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::RenderUpButton" ] }, "CPythonGraphic::GetAvailableMemory": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::GetAvailableMemory" ] }, "CPythonGraphic::CPythonGraphic": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::CPythonGraphic" ] }, "CPythonGraphic::~CPythonGraphic": { "status": "PORTED", "impl": [ "src/platform/EterPythonLib/PythonGraphic.cpp:CPythonGraphic::~CPythonGraphic" ] } } }