2V1-b/c: PythonNetworkStream phases, AccountConnector and the net module

Port PythonNetworkStream with its HandShake/Login/Select/Loading/Offline
phases, AccountConnector and PythonNetworkStreamModule verbatim; the net
stub goes. PythonBoot creates the network stream, account connector,
player, flying manager and effect manager like CPythonApplication, and
app.Create/Process drive CNetworkDevice and both connectors.

Packet.h long fields become 32-bit LONG; port.packet checks 38
login/select/loading packet sizes against wire_classic.h. Unported units
in the link closure live under platform/pending/ as stand-ins. The macOS
gate now builds all and finds iconv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 15:02:14 +09:00
co-authored by Claude Opus 5.5
parent cd3b8b506f
commit 4d9b800efb
44 changed files with 8292 additions and 324 deletions
+49
View File
@@ -0,0 +1,49 @@
// The classic wire sizes for port_packet_test.cpp, in the same order as its kPortSizes.
#include "../src/net/classic/wire_classic.h"
#include <cstddef>
struct WireSize { const char* name; std::size_t size; };
namespace w = mtnet::classic;
extern const WireSize kWireSizes[] = {
{"Handshake", sizeof(w::Handshake)},
{"Phase_", sizeof(w::Phase_)},
{"BindUDP", sizeof(w::BindUDP)},
{"KeyAgreement", sizeof(w::KeyAgreement)},
{"KeyAgreementCompleted", sizeof(w::KeyAgreementCompleted)},
{"Blank", sizeof(w::Blank)},
{"Blank", sizeof(w::Blank)},
{"CGLogin", sizeof(w::CGLogin)},
{"CGLogin2", sizeof(w::CGLogin2)},
{"CGLogin3", sizeof(w::CGLogin3)},
{"GCLoginKey", sizeof(w::GCLoginKey)},
{"GCAuthSuccess", sizeof(w::GCAuthSuccess)},
{"SimplePlayer", sizeof(w::SimplePlayer)},
{"GCLoginSuccess3", sizeof(w::GCLoginSuccess3)},
{"GCLoginSuccess", sizeof(w::GCLoginSuccess)},
{"GCLoginFailure", sizeof(w::GCLoginFailure)},
{"GCEmpire", sizeof(w::GCEmpire)},
{"CGEmpire", sizeof(w::CGEmpire)},
{"CGPlayerSelect", sizeof(w::CGPlayerSelect)},
{"CGPlayerCreate", sizeof(w::CGPlayerCreate)},
{"CGPlayerDelete", sizeof(w::CGPlayerDelete)},
{"CGChangeName", sizeof(w::CGChangeName)},
{"GCPlayerCreateSuccess", sizeof(w::GCPlayerCreateSuccess)},
{"GCPlayerCreateFailure", sizeof(w::GCPlayerCreateFailure)},
{"GCPlayerDeleteSuccess", sizeof(w::GCPlayerDeleteSuccess)},
{"GCChangeName", sizeof(w::GCChangeName)},
{"GCMainCharacterOld", sizeof(w::GCMainCharacterOld)},
{"GCMainCharacter", sizeof(w::GCMainCharacter)},
{"GCMainCharacter3BGM", sizeof(w::GCMainCharacter3BGM)},
{"GCMainCharacter4BGM", sizeof(w::GCMainCharacter4BGM)},
{"GCPoints", sizeof(w::GCPoints)},
{"GCPointChange", sizeof(w::GCPointChange)},
{"GCItemSet", sizeof(w::GCItemSet)},
{"GCQuickSlotAdd", sizeof(w::GCQuickSlotAdd)},
{"GCCharacterUpdate", sizeof(w::GCCharacterUpdate)},
{"CGClientVersion2", sizeof(w::CGClientVersion2)},
{"CGEnterGame", sizeof(w::CGEnterGame)},
{nullptr, 0},
};