port 2V2-b: GamePhase dispatch consumes the Entergame burst
PythonNetworkStreamPhaseGame/PhaseGameActor/PhaseGameItem/Command, NetworkActorManager and PythonChat/PythonChatModule are ported verbatim and dispatched at runtime; the 2V0 chat stub module is removed and initChat() runs before initnet() as in 40250. InstanceBase, PythonCharacterManager and GameLib ActorInstance/RaceData/RaceManager compile but stay TODO until 2V2-c/d wire them. Units not ported yet get their singletons from PythonBoot's GameSingletons (CPythonApplication member order) and platform/pending stand-ins generated by platform_stub.py pending; const char* stand-ins return "". port.login_flow's fake server now sends the CInputLogin::Entergame order (actor insert, NPC positions, PHASE_GAME, land list, time, channel, greet notice, ping) and a TraceError observer asserts no unknown packet header. port.login_live passes against the real server for 10 s of game phase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d16fabf61c
commit
62b6e23bfc
+3
-3
@@ -420,9 +420,9 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
| 子步骤 | 内容 | 状态 |
|
||||
| --- | --- | --- |
|
||||
| 2V2-a | Loading 结束后打开 `game.GameWindow`,发 `CG_ENTERGAME` | 完成:2V0 桩模块的常量与返回值形状改为按 40250 生成(`scripts/stub_constants.py`:常量逐行抄各模块 init 的 `PyModule_Add*Constant` 及其预处理行/枚举/`extern const` 定义,写到 `platform/ScriptLib/GameplayModuleConstants.cpp`;桩函数返回参考函数最后一个 `return` 的 `Py_BuildValue` 格式的零值或 None,而不是一律 `int 0`),`uiSafebox.SetTableSize` 的除零和 `uiTaskBar` 解包失败随之消失,`interfaceModule.MakeInterface` 走完。修正:`UserInterface/StdAfx.h` 按 40250 PCH 顺序先 `Locale.h` 后 `GameType.h`(之前反了,`GameType.h` 里 `ENABLE_NEW_EQUIPMENT_SYSTEM` 分支全被丢掉)。`port.login_flow` 假服在 `CG_CLIENT_VERSION` 后收 `CG_ENTERGAME`(校验序列字节),测试等到 `GameWindow` 显示;`port.login_live` 2026-09-23 对 192.168.21.203 同样走到 `GameWindow`。`GamePhase`/`SetGamePhase` 仍是替身:服务器的 PHASE_GAME 及 Loading 阶段落到 `GamePhase()` 的包会卡住读流 |
|
||||
| 2V2-b | `PythonNetworkStreamPhaseGame*.cpp` 分派闭包:`SetGamePhase`/`GamePhase`,PHASE_GAME 后的 Entergame 包洪流(`GC_TIME`/`GC_CHANNEL`/`GC_CHARACTER_ADD`/`GC_CHAR_ADDITIONAL_INFO`/`GC_CHARACTER_UPDATE`/技能/物品/快捷栏…)读流不断 | TODO |
|
||||
| 2V2-c | `PythonCharacterManager` + `chrmgr`/`chr` 模块:`playerSettingModule` 的种族/动作/特效注册走真实实现 | TODO |
|
||||
| 2V2-d | `InstanceBase` + `ActorInstance` + `CGraphicThingInstance` adapter:`GC_CHARACTER_ADD` 创建主角实例(msm 模型 + 待机动作) | TODO |
|
||||
| 2V2-b | `PythonNetworkStreamPhaseGame*.cpp` 分派闭包:`SetGamePhase`/`GamePhase`,PHASE_GAME 后的 Entergame 包洪流(`GC_TIME`/`GC_CHANNEL`/`GC_CHARACTER_ADD`/`GC_CHAR_ADDITIONAL_INFO`/`GC_CHARACTER_UPDATE`/技能/物品/快捷栏…)读流不断 | 完成:`PythonNetworkStreamPhaseGame`/`PhaseGameActor`/`PhaseGameItem`/`Command`、`NetworkActorManager` 原样移植并在运行时分派(port-map 标 PORTED);`GC_CHAT` 需要的 `PythonChat.cpp`/`PythonChatModule.cpp` 一并原样移植,`GameplayModules.cpp` 的 `chat` 桩删除,`initChat()` 按 40250 顺序在 `initnet()` 前调用。未移植单元的单例在 `PythonBoot` 的 `GameSingletons` 里按 `CPythonApplication` 成员顺序创建(calloc 存储:替身构造函数不初始化标量);替身由 `platform_stub.py pending <header> <符号...> [--ctor]` 按链接缺失符号生成到 `platform/pending/<Lib>/`,返回 `const char*` 的替身返回 `""`(`RecvGuild` 里 `strcmp(…, CPythonPlayer::GetName())`)。`port.login_flow` 假服按 `CInputLogin::Entergame` 顺序发:Loading 阶段 `CHARACTER_ADD`+`CHAR_ADDITIONAL_INFO`+`CHARACTER_UPDATE`、`NPC_POSITION` → `PHASE_GAME` → `LAND_LIST`、`TIME`、`CHANNEL`、问候 `CHAT` → `PING`,客户端回 `PONG`,公告进 `CPythonChat`,`TraceError` 观察钩子(`EterBase/TraceErrorObserver.h`)断言无 `Unknown packet header`。`port.login_live` 2026-09-23 对 192.168.21.203 读 10 s 真实游戏阶段:连接保持、GameWindow 显示、无未知包;剩下的 SYSERR 只有 `CreateInstance` 失败(2V2-d 的 `SetRace` 占位) |
|
||||
| 2V2-c | `PythonCharacterManager` + `chrmgr`/`chr` 模块:`playerSettingModule` 的种族/动作/特效注册走真实实现 | 进行中:PythonCharacterManager 原版逻辑已编译;`chrmgr`/`chr` 仍是 2V0 桩,注册链未接通 |
|
||||
| 2V2-d | `InstanceBase` + `ActorInstance` + `CGraphicThingInstance` adapter:`GC_CHARACTER_ADD` 创建主角实例(msm 模型 + 待机动作) | 进行中:InstanceBase、InstanceBaseMovement、ActorInstance 已编译;ActorInstanceData/RaceManager/RaceData 已照抄但未接通。主角创建测试明确失败于尚为占位的 `CActorInstance::SetRace`,继续接通仍需 RaceDataFile、RaceMotionData、AttributeInstance、角色注册和模型 adapter |
|
||||
| 2V2-e | Godot 显示主角(渲染 adapter),离线 + 真服 smoke:进游戏看到可辨认的静止角色 | TODO |
|
||||
4. **2V3 — 本地移动**:加入 `PythonPlayer`、`PythonPlayerInput*`、`PythonPlayerEventHandler`、
|
||||
`InstanceBaseMovement`、`ActorInstance{Motion,Event,Position,Rotation,CollisionDetection}` 的实际依赖闭包。验收为输入经过新路径
|
||||
|
||||
Reference in New Issue
Block a user