2V0-f: run the real system.py app loop in Godot

- system.py runs app.Loop() on the script fiber; each UIUpdate is one
  CPythonApplication::Process(). Logo -> Login, popup ESC/click and
  app.Exit teardown (launcher cleared first, as in 40250 Main) work.
- Image commands are base-texture quads with UVs (a .sub shares its parent
  texture); ImageInstance/ExpandedImageInstance OnRender and SetRenderingRect
  ported verbatim, so scale/rotation/rendering rect are drawn.
- CGraphicBase::GetColor / grp.GenerateColor ported (ThinBoard background).
- port.app_loop test, python_host_test app-loop checks, MT_TEST_MODE=python_ui.
- TODO: .fnt/CGraphicText font pipeline, ExpandedImage blend modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 13:38:13 +09:00
co-authored by Claude Opus 5.5
parent 5590714b16
commit 141206cb69
20 changed files with 916 additions and 57 deletions
+1 -1
View File
@@ -400,7 +400,7 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
| 2V0-c | `wndMgr` / `grp` / `grpImage` / `grpText` / `grpThing` 模块 | 绑定已移植并通过导入/窗口句柄测试;图形绘制仍属 2V0-f |
| 2V0-d | 42 个 `UserInterface` 头(都在 `PythonApplication.h` 后面)+ `PythonApplicationModule.cpp`(`app`) | 头与绑定已编译、链接并导入;应用生命周期 adapter 仍属 2V0-f |
| 2V0-e | `dbg` 等桩模块补齐,`system.py` 跑到 `prototype.RunApp()` | 完成:27 个玩法 native 模块导出名桩记录每次调用;真实 `system.py` 已进入 `RunApp()`,目前由待实现的 `app.Create()` 报 `CREATE_DEVICE` |
| 2V0-f | Godot 渲染器上的 platform UI adapter;Logo/Popup 可显示可操作 | 进行中:40250 窗口树输入/焦点/更新和 Bar、Line、裁剪、TextLine、ImageBox 命令已接 Godot Canvas;pack TGA、`.sub` 和 ExpandedImage 创建路径在 app 进程内测试。ExpandedImage 的变换绘制仍待实现;`CPythonApplication::Create`/`Loop` 仍是平台桩,真实 `system.py` 尚未显示 Logo/Popup,验收未通过。 |
| 2V0-f | Godot 渲染器上的 platform UI adapter;Logo/Popup 可显示可操作 | 完成:真实 `system.py` 在 app 进程内的脚本纤程上跑 `app.Loop()`(每个 `UIUpdate` = 一次 `CPythonApplication::Process()`),Logo→Login 切换、Popup ESC/点击、`app.Exit` 收尾(按 40250 Main 先 `pyLauncher.Clear()`);图像统一为基贴图 + UV 的四边形命令(`.sub` 共用父贴图名),ExpandedImage 缩放/旋转/RenderingRect 原样移植;`grp.GenerateColor` 已移植(ThinBoard 半透明底)。`port.app_loop` + `python_host_test.gd` 覆盖输入/焦点/裁剪/文字/图像;`MT_TEST_MODE=python_ui` 可视运行。TODO:`.fnt`/`CGraphicText` 字体管线(现用 Godot 回退字体、无对齐)、ExpandedImage 混合模式(SCREEN/COLOR_DODGE/MODULATE)未应用。 |
2. **2V1 — 登录/选角**:加入 `PythonNetworkStream{,PhaseHandShake,PhaseLogin,PhaseSelect,PhaseLoading}.cpp`、
`PythonNetworkStreamModule.cpp`、AccountConnector 及登录/选角脚本真实调用到的模块。验收为 FakeServer 离线完成 phase 顺序,
再以真服 smoke 证明登录、角色列表和选择进入 Loading;未验证的服务器分支记 `NEEDS_LIVE`。