// 2V0-e temporary native module surfaces generated from 40250 UserInterface module exports. // These modules expose names for script loading; calls record that they still need the real 2V1-2V3 implementation. #include "ScriptLib/StdAfx.h" #include #include "../EterLib/UIRenderCommands.h" // GameplayModuleConstants.cpp: each module's 40250 constants. void AddStubConstants_profiler(PyObject* poModule); void AddStubConstants_udp(PyObject* poModule); namespace { // Returns `result`, a zero value shaped like the 40250 function's return (stub_constants.py), or 0. PyObject* stub_call_named(const char* name, PyObject* result = nullptr) { std::fprintf(stderr, "2V0 native stub called: %s\n", name); std::fflush(stderr); return result ? result : Py_BuildValue("i", 0); } // 40250 UserInterface/PythonProfilerModule.cpp: profiler export names. PyObject* stub_profiler_Push(PyObject*, PyObject*) { return stub_call_named("profiler.Push", Py_BuildNone()); } PyObject* stub_profiler_Pop(PyObject*, PyObject*) { return stub_call_named("profiler.Pop", Py_BuildNone()); } PyMethodDef methods_profiler[] = { { "Push", stub_profiler_Push, METH_VARARGS }, { "Pop", stub_profiler_Pop, METH_VARARGS }, { NULL, NULL } }; // 40250 UserInterface/PythonNetworkDatagramModule.cpp: udp export names. PyObject* stub_udp_Enable(PyObject*, PyObject*) { return stub_call_named("udp.Enable", Py_BuildNone()); } PyObject* stub_udp_Disable(PyObject*, PyObject*) { return stub_call_named("udp.Disable", Py_BuildNone()); } PyMethodDef methods_udp[] = { { "Enable", stub_udp_Enable, METH_VARARGS }, { "Disable", stub_udp_Disable, METH_VARARGS }, { NULL, NULL } }; } // namespace void init_2v0_gameplay_stubs() { { PyObject* module = Py_InitModule("profiler", methods_profiler); PyModule_AddIntConstant(module, "__port_stub__", 1); AddStubConstants_profiler(module); } { PyObject* module = Py_InitModule("udp", methods_udp); PyModule_AddIntConstant(module, "__port_stub__", 1); AddStubConstants_udp(module); } }