Register observable 2V0 gameplay stubs through RunApp

This commit is contained in:
shen
2026-09-22 20:05:22 -07:00
parent b221a9eaf5
commit 9c30f06083
8 changed files with 2014 additions and 14 deletions
@@ -18,7 +18,13 @@ void CPythonApplication::Exit() { MT_PLATFORM_STUB(); }
void CPythonApplication::Abort() { MT_PLATFORM_STUB(); }
void CPythonApplication::SetMinFog(float) { MT_PLATFORM_STUB(); }
void CPythonApplication::SetFrameSkip(bool) { MT_PLATFORM_STUB(); }
bool CPythonApplication::Create(PyObject*, const char*, int, int, int) { MT_PLATFORM_STUB(); return false; }
bool CPythonApplication::Create(PyObject*, const char*, int, int, int) {
MT_PLATFORM_STUB();
// appCreate returns NULL on failure. Give Python the exception that
// prototype.RunApp expects rather than a SystemError with no exception set.
PyErr_SetString(PyExc_RuntimeError, "CREATE_DEVICE");
return false;
}
void CPythonApplication::UpdateGame() { MT_PLATFORM_STUB(); }
void CPythonApplication::RenderGame() { MT_PLATFORM_STUB(); }
bool CPythonApplication::Process() { MT_PLATFORM_STUB(); return false; }
@@ -79,10 +85,19 @@ bool LoadLocaleData(const char*) { MT_PLATFORM_STUB(); return false; }
void SetGuildSymbolPath(const char*) { MT_PLATFORM_STUB(); }
void DefaultFont_SetName(const char*) { MT_PLATFORM_STUB(); }
void TextTail_SetLivingTime(long) { MT_PLATFORM_STUB(); }
const char* LocaleService_GetName() { MT_PLATFORM_STUB(); return ""; }
namespace {
// The supplied 40250 Client/locale.cfg selects "en" (code page 1252).
// Keep these mutable for app.ForceSetLocale, as Locale.cpp does.
std::string locale_name = "en";
std::string locale_path = "locale/en";
}
const char* LocaleService_GetName() { return "EUROPE"; }
bool LocaleService_IsCHEONMA() { MT_PLATFORM_STUB(); return false; }
void LocaleService_SetCHEONMA(bool) { MT_PLATFORM_STUB(); }
unsigned LocaleService_GetCodePage() { MT_PLATFORM_STUB(); return 0; }
const char* LocaleService_GetLocaleName() { MT_PLATFORM_STUB(); return ""; }
const char* LocaleService_GetLocalePath() { MT_PLATFORM_STUB(); return ""; }
void LocaleService_ForceSetLocale(const char*, const char*) { MT_PLATFORM_STUB(); }
unsigned LocaleService_GetCodePage() { return 1252; }
const char* LocaleService_GetLocaleName() { return locale_name.c_str(); }
const char* LocaleService_GetLocalePath() { return locale_path.c_str(); }
void LocaleService_ForceSetLocale(const char* name, const char* path) {
locale_name = name ? name : "";
locale_path = path ? path : "";
}