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:
co-authored by
Claude Opus 5.5
parent
157f7c3bb4
commit
ff0983d3c8
@@ -55,6 +55,9 @@ void CPythonApplication::SetMinFog(float) { MT_PLATFORM_STUB(); }
|
||||
// this returns it. PORT: no member to hold it; the timer only advances in Process(), so reading it
|
||||
// here gives the same value.
|
||||
float CPythonApplication::GetGlobalTime() { return CTimer::Instance().GetCurrentSecond(); }
|
||||
// In 40250 Process() also copies CTimer::GetElapsedSecond() into m_fGlobalElapsedTime (PythonApplication.cpp:448).
|
||||
// PORT: read straight from the timer, as GetGlobalTime above.
|
||||
float CPythonApplication::GetGlobalElapsedTime() { return CTimer::Instance().GetElapsedSecond(); }
|
||||
void CPythonApplication::SetFrameSkip(bool) { MT_PLATFORM_STUB(); }
|
||||
// PORT: 40250 creates the Win32 window, the D3D8 device, cursors, sound, keyboard, the net device,
|
||||
// fonts and the IME here. The Godot window and its canvas already exist when the host starts the
|
||||
@@ -288,6 +291,9 @@ void CPythonApplication::SetCursorVisible(BOOL, bool) { MT_PLATFORM_STUB(); }
|
||||
BOOL CPythonApplication::GetCursorVisible() { MT_PLATFORM_STUB(); return FALSE; }
|
||||
bool CPythonApplication::GetLiarCursorOn() { MT_PLATFORM_STUB(); return false; }
|
||||
void CPythonApplication::SetCursorMode(int) { MT_PLATFORM_STUB(); }
|
||||
// 40250 returns m_iCursorMode, CURSOR_MODE_HARDWARE from the constructor until SetCursorMode (PythonApplicationCursor.cpp:92).
|
||||
// PORT: SetCursorMode is still a stub, so the mode stays the constructor's.
|
||||
int CPythonApplication::GetCursorMode() { return CURSOR_MODE_HARDWARE; }
|
||||
void CPythonApplication::SetMouseHandler(PyObject*) { MT_PLATFORM_STUB(); }
|
||||
void CPythonApplication::SetGlobalCenterPosition(LONG, LONG) { MT_PLATFORM_STUB(); }
|
||||
void CPythonApplication::SetFPS(int) { MT_PLATFORM_STUB(); }
|
||||
@@ -306,7 +312,6 @@ BOOL SKILL_EFFECT_UPGRADE_ENABLE = FALSE;
|
||||
double g_specularSpd = 0;
|
||||
|
||||
bool LoadLocaleData(const char*) { MT_PLATFORM_STUB(); return false; }
|
||||
void SetGuildSymbolPath(const char*) { MT_PLATFORM_STUB(); }
|
||||
void TextTail_SetLivingTime(long) { MT_PLATFORM_STUB(); }
|
||||
namespace {
|
||||
// The supplied 40250 Client/locale.cfg selects "en" (code page 1252).
|
||||
@@ -364,72 +369,3 @@ int LocaleService_StringCompareCI( LPCSTR szStringLeft, LPCSTR szStringRight, si
|
||||
{
|
||||
return strnicmp( szStringLeft, szStringRight, sizeLength );
|
||||
}
|
||||
|
||||
// 40250 UserInterface/GameType.cpp:9-73 (DEFAULT_FONT), verbatim.
|
||||
// PORT: the default names are CP949 literals in 40250; ui.py sets the locale font (app.SetDefaultFontName)
|
||||
// before anything asks for it.
|
||||
static std::string gs_strDefaultFontName = "굴림체:12.fnt";
|
||||
static std::string gs_strDefaultItalicFontName = "굴림체:12i.fnt";
|
||||
static CResource* gs_pkDefaultFont = NULL;
|
||||
static CResource* gs_pkDefaultItalicFont = NULL;
|
||||
|
||||
static bool gs_isReloadDefaultFont = false;
|
||||
|
||||
void DefaultFont_Startup()
|
||||
{
|
||||
gs_pkDefaultFont = NULL;
|
||||
}
|
||||
|
||||
void DefaultFont_Cleanup()
|
||||
{
|
||||
if (gs_pkDefaultFont)
|
||||
gs_pkDefaultFont->Release();
|
||||
}
|
||||
|
||||
void DefaultFont_SetName(const char * c_szFontName)
|
||||
{
|
||||
gs_strDefaultFontName = c_szFontName;
|
||||
gs_strDefaultFontName += ".fnt";
|
||||
|
||||
gs_strDefaultItalicFontName = c_szFontName;
|
||||
if(strchr(c_szFontName, ':'))
|
||||
gs_strDefaultItalicFontName += "i";
|
||||
gs_strDefaultItalicFontName += ".fnt";
|
||||
|
||||
gs_isReloadDefaultFont = true;
|
||||
}
|
||||
|
||||
bool ReloadDefaultFonts()
|
||||
{
|
||||
CResourceManager& rkResMgr = CResourceManager::Instance();
|
||||
|
||||
gs_isReloadDefaultFont = false;
|
||||
|
||||
CResource* pkNewFont = rkResMgr.GetResourcePointer(gs_strDefaultFontName.c_str());
|
||||
pkNewFont->AddReference();
|
||||
if (gs_pkDefaultFont)
|
||||
gs_pkDefaultFont->Release();
|
||||
gs_pkDefaultFont = pkNewFont;
|
||||
|
||||
CResource* pkNewItalicFont = rkResMgr.GetResourcePointer(gs_strDefaultItalicFontName.c_str());
|
||||
pkNewItalicFont->AddReference();
|
||||
if (gs_pkDefaultItalicFont)
|
||||
gs_pkDefaultItalicFont->Release();
|
||||
gs_pkDefaultItalicFont = pkNewItalicFont;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CResource* DefaultFont_GetResource()
|
||||
{
|
||||
if (!gs_pkDefaultFont || gs_isReloadDefaultFont)
|
||||
ReloadDefaultFonts();
|
||||
return gs_pkDefaultFont;
|
||||
}
|
||||
|
||||
CResource* DefaultItalicFont_GetResource()
|
||||
{
|
||||
if (!gs_pkDefaultItalicFont || gs_isReloadDefaultFont)
|
||||
ReloadDefaultFonts();
|
||||
return gs_pkDefaultItalicFont;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user