port 2V2-c: chrmgr/chr modules + race registration chain

PythonCharacterManagerModule/PythonCharacterModule ported verbatim; the
2V0 chr/chrmgr stubs are gone and initchr/initchrmgr run in 40250 order.
The registration chain they need (RaceData/RaceDataFile/RaceManager/
RaceMotionData, GameType, AttributeData/AttributeInstance, TextFileLoader,
Util, Camera/CameraProcedure) is ported; CRaceManager is created in
PythonBoot. port.login_flow asserts race 0 has its wait motions and no
unhandled packet header; port.login_live 8/8 against 192.168.21.203.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 18:40:47 +09:00
co-authored by Claude Opus 5.5
parent 62b6e23bfc
commit 996d793f0c
39 changed files with 8270 additions and 625 deletions
+1
View File
@@ -514,3 +514,4 @@
{"time": "2026-09-23T07:40:54Z", "event": "port_round", "unit": "PORT-PLAN 2V1-e: live smoke against 192.168.21.203", "ported": [], "adapted": [], "divergent": [], "needs_live": ["the loading-phase packet burst after GC_MAIN_CHARACTER and CG_ENTERGAME (2V2 GameWindow)", "auth/login failure popups", "server handling of CG_CLIENT_VERSION with an empty filename (not observable client-side)"], "tests": ["port.login_live: pass x2 against 192.168.21.203 (auth handshake + key agreement + LOGIN3, game LOGIN2, character list, DirectEnter reconnect, CHARACTER_SELECT, GC_MAIN_CHARACTER -> LoadData + CG_CLIENT_VERSION; no unknown packets)", "port.login_flow: pass"], "todo": ["2V2", "port the platform/pending units"]}
{"time": "2026-09-23T07:52:21Z", "event": "port_round", "unit": "PORT-PLAN 2V2-a: game.GameWindow opens after Loading, CG_ENTERGAME", "ported": [], "adapted": ["2V0 stub modules: 40250 constants (verbatim init lines, stub_constants.py) and zero return values shaped like each reference function's last Py_BuildValue"], "divergent": [], "fixed": ["UserInterface/StdAfx.h included GameType.h before Locale.h, dropping GameType.h's ENABLE_NEW_EQUIPMENT_SYSTEM branches; 40250 PCH order restored"], "needs_live": ["PHASE_GAME and the Entergame burst: GamePhase/SetGamePhase still stand-ins (2V2-b)"], "tests": ["port.login_flow: pass (fake server receives CG_ENTERGAME with the right sequence byte, GameWindow shown)", "port.login_live: pass against 192.168.21.203 (GameWindow shown)", "port.packet: pass"], "todo": ["2V2-b PhaseGame dispatch", "2V2-c PythonCharacterManager", "2V2-d InstanceBase/ActorInstance", "2V2-e render"]}
{"time": "2026-09-23T09:19:19Z", "event": "port_round", "unit": "PORT-PLAN 2V2-b: PhaseGame dispatch + Entergame burst", "ported": ["UserInterface/PythonNetworkStreamPhaseGame.cpp", "UserInterface/PythonNetworkStreamPhaseGameActor.cpp", "UserInterface/PythonNetworkStreamPhaseGameItem.cpp", "UserInterface/PythonNetworkStreamCommand.cpp", "UserInterface/NetworkActorManager.cpp", "UserInterface/PythonChat.cpp", "UserInterface/PythonChatModule.cpp"], "adapted": ["GameSingletons in PythonBoot (CPythonApplication member order, calloc storage) for units still behind platform/pending stand-ins", "platform_stub.py pending: stand-ins generated from undefined symbols", "PlatformStub const char* stand-ins return \"\"", "EterBase TraceErrorObserver test hook"], "divergent": [], "needs_live": ["CreateInstance of every actor fails on the SetRace placeholder (2V2-d)"], "tests": ["port.login_flow: pass (fake server sends the CInputLogin::Entergame order: ADD/ADDITIONAL_INFO/UPDATE, NPC_POSITION, PHASE_GAME, LAND_LIST, TIME, CHANNEL, CHAT notice, PING -> PONG; notice reaches CPythonChat; no Unknown packet header)", "port.login_live: pass against 192.168.21.203 (10 s of the real game phase, connected, no unknown packet)", "script/port_gate.sh macos: PASS"], "todo": ["2V2-c chrmgr/chr modules", "2V2-d SetRace/RaceData", "2V2-e render"]}
{"time": "2026-09-23T09:39:22Z", "event": "port_round", "unit": "PORT-PLAN 2V2-c: chrmgr/chr modules + race registration chain", "ported": ["UserInterface/PythonCharacterManagerModule.cpp", "UserInterface/PythonCharacterModule.cpp", "GameLib/RaceData.cpp", "GameLib/RaceDataFile.cpp", "GameLib/RaceManager.cpp", "GameLib/RaceMotionData.cpp", "GameLib/GameType.cpp", "EterLib/AttributeData.cpp", "EterLib/AttributeInstance.cpp", "EterLib/TextFileLoader.cpp", "EterLib/Util.cpp (lines 1-141, 297-end)", "EterLib/Camera.cpp", "UserInterface/CameraProcedure.cpp"], "adapted": ["EterLib/Util.cpp code page / font face stays with the platform font backend", "CRaceManager created in PythonBoot in CPythonApplication member order", "D3DXVec2CCW / D3DXMatrixfDeterminant / D3DXMatrixLookAtRH"], "divergent": [], "needs_live": ["intermittent (about 1 in 11 live runs) unhandled header 7 in the Loading phase, suspected packet-size desync; the test now prints g_iLastPacket and fails; 8 later runs clean"], "tests": ["port.login_flow: pass (chr/chrmgr not stubs, race 0 MODE_GENERAL/NAME_WAIT registered, no unhandled packet header)", "port.login_live: 8/8 pass against 192.168.21.203", "script/port_gate.sh macos: PASS"], "todo": ["2V2-d gr2 loader + CGraphicThing adapter, InstanceBase/ActorInstance stand-ins", "2V2-e render", "Loading-phase header 7 desync"]}