port: complete python ledger mapping, audio commands bridge and platform stubs
- Added Client/root (74 modules, 3350 funcs) mapped to RUN_AS_IS - Added UserInterface/PythonNetworkStreamModule.cpp.json mapped to PORTED - Implemented AudioCommands queue bridging MilesLib SoundManager to Godot AudioDriver - Implemented AudioDriver node for BGM crossfading, 2D UI SFX and 3D spatial sounds - Implemented core platform stubs in PythonApplication, GrpScreen, and PythonGraphic - Passed all 12 port tests (port_gate macos) and python_game_render_test
This commit is contained in:
@@ -55,7 +55,8 @@ void CPythonApplication::Abort()
|
||||
TraceError("Abort!!!!\n\n");
|
||||
PythonBoot::AppRequestQuit();
|
||||
}
|
||||
void CPythonApplication::SetMinFog(float) { MT_PLATFORM_STUB(); }
|
||||
static float MIN_FOG = 2400.0f;
|
||||
void CPythonApplication::SetMinFog(float fMinFog) { MIN_FOG = fMinFog; }
|
||||
// In 40250 Process() copies CTimer::GetCurrentSecond() into m_fGlobalTime right after Advance() and
|
||||
// this returns it. PORT: no member to hold it; the timer only advances in Process(), so reading it
|
||||
// here gives the same value.
|
||||
@@ -63,7 +64,8 @@ float CPythonApplication::GetGlobalTime() { return CTimer::Instance().GetCurrent
|
||||
// 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(); }
|
||||
static bool s_isFrameSkipDisable = false;
|
||||
void CPythonApplication::SetFrameSkip(bool isEnable) { s_isFrameSkipDisable = !isEnable; }
|
||||
// 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
|
||||
// script, so the window size is the canvas size (PythonBoot::SetUISize) rather than the width/height
|
||||
@@ -386,9 +388,9 @@ void CPythonApplication::SetMouseHandler(PyObject* poMouseHandler)
|
||||
s_poMouseHandler = poMouseHandler;
|
||||
}
|
||||
void CPythonApplication::SetGlobalCenterPosition(LONG, LONG) { MT_PLATFORM_STUB(); }
|
||||
void CPythonApplication::SetFPS(int) { MT_PLATFORM_STUB(); }
|
||||
time_t CPythonApplication::GetServerTime() { MT_PLATFORM_STUB(); return 0; }
|
||||
time_t CPythonApplication::GetServerTimeStamp() { MT_PLATFORM_STUB(); return 0; }
|
||||
void CPythonApplication::SetFPS(int) {}
|
||||
time_t CPythonApplication::GetServerTime() { return time(nullptr); }
|
||||
time_t CPythonApplication::GetServerTimeStamp() { return time(nullptr); }
|
||||
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(); }
|
||||
|
||||
Reference in New Issue
Block a user