2V3-a: walk with the keyboard through the ported player chain

PythonPlayer, PythonPlayerInput{,Keyboard,Mouse}, PythonPlayerEventHandler,
PythonPlayerSkill, PythonPlayerModule and GameType are verbatim copies; the
`player` stub module and the pending PythonPlayer/GameType stand-ins are gone.
Unported callees (CPythonSkill, CItemData, CItemManager, CPythonItem, ...) are
pending stubs. 64-bit fixes: emotion icon handles use Py_BuildPointer, and
PyDict_Next takes Py_ssize_t.

The actor did not move because GrannyUpdateModelMatrix passed the model matrix
through. Walk/run motions use constant root-motion extraction
(AccumulationFlags=AccumulationExtracted, LoopTranslation e.g. (0,-300,0) for
the warrior run, same as the .msa Accumulation). libgr2 now reads both fields
from TrackGroups[0], and the runtime moves by LoopTranslation over each
control's local-clock span, blended by control weight. VDA extraction is not
implemented.

port.login_flow presses DIK_UP; the actor walks more than 100 cm, and the fake
server parses CG packets and sees CG_MOVE FUNC_MOVE, then FUNC_WAIT at the new
position. port.login_live against the real server walked 132 cm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 23:41:31 +09:00
co-authored by Claude Opus 5.5
parent 157f7c3bb4
commit ff0983d3c8
39 changed files with 10170 additions and 2039 deletions
@@ -1,10 +0,0 @@
// Pending GameType.cpp dependency of InstanceBase; the full unit is not ported yet.
#include "UserInterface/StdAfx.h"
#include "UserInterface/GameType.h"
std::string g_strGuildSymbolPathName = "mark/10/";
const char* GetGuildSymbolFileName(DWORD dwGuildID)
{
return _getf("%s%03d.jpg", g_strGuildSymbolPathName.c_str(), dwGuildID);
}
@@ -0,0 +1,13 @@
// Stand-in for the 40250 logic unit UserInterface/Locale.cpp, not ported yet: the members the ported units
// reference, as platform_stub.py stubs. Delete this file in the commit that ports the unit into port/
// (docs/PORT-PLAN.md).
#include "UserInterface/StdAfx.h"
#include "UserInterface/Locale.h"
#include "../../PlatformStub.h"
auto LocaleService_GetSkillPower(unsigned int) -> int
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<int>();
}
@@ -206,3 +206,9 @@ void CPythonBackground::Initialize()
SetAtlasInfoFileName(atlas.c_str());
CMapManager::Initialize();
}
auto CPythonBackground::GetPickingPoint(D3DXVECTOR3 *) -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
@@ -131,3 +131,9 @@ CPythonGuild::~CPythonGuild()
{
MT_PLATFORM_STUB();
}
auto CPythonGuild::IsDoingGuildWar() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
@@ -65,3 +65,39 @@ auto CPythonItem::Update(const POINT &) -> void
{
MT_PLATFORM_STUB();
}
auto CPythonItem::GetOwnership(DWORD, const char **) -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
auto CPythonItem::GetGroundItemPosition(DWORD, TPixelPosition *) -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonItem::GetPickedItemID(DWORD *) -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
auto CPythonItem::GetCloseItem(const TPixelPosition &, DWORD *, DWORD) -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
auto CPythonItem::GetCloseMoney(const TPixelPosition &, DWORD *, DWORD) -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
auto CPythonItem::GetVirtualNumberOfGroundItem(DWORD) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
@@ -70,3 +70,9 @@ auto CPythonMiniMap::DeleteTarget(int) -> void
{
MT_PLATFORM_STUB();
}
auto CPythonMiniMap::GetGuildAreaID(DWORD, DWORD) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,193 @@
// Stand-in for the 40250 logic unit UserInterface/PythonSkill.cpp, not ported yet: the members the ported units
// reference, as platform_stub.py stubs. Delete this file in the commit that ports the unit into port/
// (docs/PORT-PLAN.md).
#include "UserInterface/StdAfx.h"
#include "UserInterface/PythonSkill.h"
#include "../../PlatformStub.h"
auto CPythonSkill::SSkillData::IsNeedCorpse() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsToggleSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsChargeSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::GetSkillData(DWORD, TSkillData **) -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::GetTargetRange() const -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
auto CPythonSkill::SSkillData::CanChangeDirection() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsFanRange() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsCircleRange() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsAutoSearchTarget() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsNeedTarget() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsUseHPSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsStandingSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::CanUseWeaponType(DWORD) -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsOnlyForAlliance() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::CanUseForMe() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::CanUseIfNotEnough() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsNeedEmptyBottle() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsNeedPoisonBottle() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsNeedBow() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsAttackSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsHorseSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsMovingSkill() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::IsOnlyForGuildWar() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::GetSkillCoolTime(float) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
auto CPythonSkill::SSkillData::GetNeedSP(float) -> int
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<int>();
}
auto CPythonSkill::SSkillData::GetMotionLoopCount(float) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
auto CPythonSkill::SSkillData::GetTargetCount(float) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
auto CPythonSkill::SSkillData::GetSkillMotionIndex(int) -> DWORD
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<DWORD>();
}
auto CPythonSkill::SSkillData::IsCanUseSkill() -> bool
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<bool>();
}
auto CPythonSkill::SSkillData::IsNoMotion() -> BOOL
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BOOL>();
}
auto CPythonSkill::SSkillData::GetType() const -> BYTE
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<BYTE>();
}