port: verify root pack ledger and repair runtime adapters
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "../EterLib/RenderCommands3D.h"
|
||||
#include "EterLib/GrpDevice.h"
|
||||
#include "../ScriptLib/PythonBoot.h"
|
||||
#include "ServerClock.h"
|
||||
|
||||
// 2V0-d link surface; 2V0-f adds the application lifecycle (Create/Loop/Process/Exit) that
|
||||
// prototype.RunApp() drives. The rest of the members still wait for the game slices (2V1-2V3).
|
||||
@@ -387,10 +388,40 @@ void CPythonApplication::SetMouseHandler(PyObject* poMouseHandler)
|
||||
{
|
||||
s_poMouseHandler = poMouseHandler;
|
||||
}
|
||||
void CPythonApplication::SetGlobalCenterPosition(LONG, LONG) { MT_PLATFORM_STUB(); }
|
||||
void CPythonApplication::SetGlobalCenterPosition(LONG x, LONG y)
|
||||
{
|
||||
// 40250 PythonApplication.cpp:1284: the background owns the global-to-local map offset.
|
||||
CPythonBackground& background = CPythonBackground::Instance();
|
||||
background.GlobalPositionToLocalPosition(x, y);
|
||||
SetCenterPosition(x, y, background.GetHeight(x, y));
|
||||
}
|
||||
void CPythonApplication::SetFPS(int) {}
|
||||
time_t CPythonApplication::GetServerTime() { return time(nullptr); }
|
||||
time_t CPythonApplication::GetServerTimeStamp() { return time(nullptr); }
|
||||
namespace {
|
||||
DWORD s_server_start_msec = 0;
|
||||
time_t s_server_time = 0;
|
||||
time_t s_local_start_time = 0;
|
||||
}
|
||||
|
||||
void SetPlatformServerTime(time_t server_time)
|
||||
{
|
||||
s_server_start_msec = ELTimer_GetMSec();
|
||||
s_server_time = server_time;
|
||||
s_local_start_time = time(nullptr);
|
||||
}
|
||||
|
||||
time_t GetPlatformServerTime()
|
||||
{
|
||||
return static_cast<time_t>(ELTimer_GetMSec() - s_server_start_msec) + s_server_time;
|
||||
}
|
||||
|
||||
time_t GetPlatformServerTimeStamp()
|
||||
{
|
||||
return (time(nullptr) - s_local_start_time) + s_server_time;
|
||||
}
|
||||
|
||||
void CPythonApplication::SetServerTime(time_t server_time) { SetPlatformServerTime(server_time); }
|
||||
time_t CPythonApplication::GetServerTime() { return GetPlatformServerTime(); }
|
||||
time_t CPythonApplication::GetServerTimeStamp() { return GetPlatformServerTimeStamp(); }
|
||||
void CPythonApplication::SetConnectData(const char*, int) { MT_PLATFORM_STUB(); }
|
||||
void CPythonApplication::GetConnectData(std::string& ip, int& port) { MT_PLATFORM_STUB(); ip.clear(); port = 0; }
|
||||
void CPythonApplication::SetForceSightRange(int) { MT_PLATFORM_STUB(); }
|
||||
@@ -540,4 +571,3 @@ bool LoadLocaleData(const char* localePath)
|
||||
NANOEND
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user