port: CMapOutdoor + PythonBackground + minimap (1:1 40250)
GameLib map/area/terrain units, PRTerrainLib Terrain/TextureSet, PythonBackground(+Module) and ColorTransitionHelper ported verbatim; pending stand-ins and background module stubs removed. Hand edits: BeginEnvironment's pointer tag via uintptr_t, LoadWaterMap reads the file's 32-bit longs. Terrain draw passes stay platform no-ops (Godot draws the terrain). RecordingDevice gains textures, buffers and render targets; orthographic draws become UI commands so CPythonMiniMap's masked tiles show through minimap_image_filter in python_ui_surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b69116992c
commit
2ead95756e
@@ -35,36 +35,6 @@
|
||||
#include "UserInterface/PythonTextTail.h"
|
||||
|
||||
// 40250 UserInterface/PythonBackgroundModule.cpp
|
||||
void AddStubConstants_background(PyObject* poModule)
|
||||
{
|
||||
(void) poModule;
|
||||
PyModule_AddIntConstant(poModule, "PART_SKY", CMapOutdoor::PART_SKY);
|
||||
PyModule_AddIntConstant(poModule, "PART_TREE", CMapOutdoor::PART_TREE);
|
||||
PyModule_AddIntConstant(poModule, "PART_CLOUD", CMapOutdoor::PART_CLOUD);
|
||||
PyModule_AddIntConstant(poModule, "PART_WATER", CMapOutdoor::PART_WATER);
|
||||
PyModule_AddIntConstant(poModule, "PART_OBJECT", CMapOutdoor::PART_OBJECT);
|
||||
PyModule_AddIntConstant(poModule, "PART_TERRAIN", CMapOutdoor::PART_TERRAIN);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_DEFAULT", CSkyObject::SKY_RENDER_MODE_DEFAULT);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_DIFFUSE", CSkyObject::SKY_RENDER_MODE_DIFFUSE);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_TEXTURE", CSkyObject::SKY_RENDER_MODE_TEXTURE);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_MODULATE", CSkyObject::SKY_RENDER_MODE_MODULATE);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_MODULATE2X", CSkyObject::SKY_RENDER_MODE_MODULATE2X);
|
||||
PyModule_AddIntConstant(poModule, "SKY_RENDER_MODE_MODULATE4X", CSkyObject::SKY_RENDER_MODE_MODULATE4X);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_NONE", CPythonBackground::SHADOW_NONE);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_GROUND", CPythonBackground::SHADOW_GROUND);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_GROUND_AND_SOLO", CPythonBackground::SHADOW_GROUND_AND_SOLO);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_ALL", CPythonBackground::SHADOW_ALL);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_ALL_HIGH", CPythonBackground::SHADOW_ALL_HIGH);
|
||||
PyModule_AddIntConstant(poModule, "SHADOW_ALL_MAX", CPythonBackground::SHADOW_ALL_MAX);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE0", CPythonBackground::DISTANCE0);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE1", CPythonBackground::DISTANCE1);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE2", CPythonBackground::DISTANCE2);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE3", CPythonBackground::DISTANCE3);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE4", CPythonBackground::DISTANCE4);
|
||||
PyModule_AddIntConstant(poModule, "DISTANCE_SORT", CMapOutdoor::DISTANCE_SORT);
|
||||
PyModule_AddIntConstant(poModule, "TEXTURE_SORT", CMapOutdoor::TEXTURE_SORT);
|
||||
}
|
||||
|
||||
// 40250 UserInterface/PythonEventManagerMoudle.cpp
|
||||
void AddStubConstants_event(PyObject* poModule)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "../EterLib/UIRenderCommands.h"
|
||||
|
||||
// GameplayModuleConstants.cpp: each module's 40250 constants.
|
||||
void AddStubConstants_background(PyObject* poModule);
|
||||
void AddStubConstants_event(PyObject* poModule);
|
||||
void AddStubConstants_eventMgr(PyObject* poModule);
|
||||
void AddStubConstants_guild(PyObject* poModule);
|
||||
@@ -27,106 +26,6 @@ PyObject* stub_call_named(const char* name, PyObject* result = nullptr) {
|
||||
return result ? result : Py_BuildValue("i", 0);
|
||||
}
|
||||
|
||||
// 40250 UserInterface/PythonBackgroundModule.cpp: background export names.
|
||||
PyObject* stub_background_IsSoftwareTiling(PyObject*, PyObject*) { return stub_call_named("background.IsSoftwareTiling", Py_BuildValue("i", 0)); }
|
||||
PyObject* stub_background_EnableSoftwareTiling(PyObject*, PyObject*) { return stub_call_named("background.EnableSoftwareTiling", Py_BuildNone()); }
|
||||
PyObject* stub_background_EnableSnow(PyObject*, PyObject*) { return stub_call_named("background.EnableSnow", Py_BuildNone()); }
|
||||
PyObject* stub_background_GlobalPositionToLocalPosition(PyObject*, PyObject*) { return stub_call_named("background.GlobalPositionToLocalPosition", Py_BuildValue("ii", 0, 0)); }
|
||||
PyObject* stub_background_GlobalPositionToMapInfo(PyObject*, PyObject*) { return stub_call_named("background.GlobalPositionToMapInfo", Py_BuildValue("sii", "", 0, 0)); }
|
||||
PyObject* stub_background_GetRenderShadowTime(PyObject*, PyObject*) { return stub_call_named("background.GetRenderShadowTime", Py_BuildValue("i", 0)); }
|
||||
PyObject* stub_background_LoadMap(PyObject*, PyObject*) { return stub_call_named("background.LoadMap", Py_BuildNone()); }
|
||||
PyObject* stub_background_Destroy(PyObject*, PyObject*) { return stub_call_named("background.Destroy", Py_BuildNone()); }
|
||||
PyObject* stub_background_RegisterEnvironmentData(PyObject*, PyObject*) { return stub_call_named("background.RegisterEnvironmentData", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetEnvironmentData(PyObject*, PyObject*) { return stub_call_named("background.SetEnvironmentData", Py_BuildNone()); }
|
||||
PyObject* stub_background_GetCurrentMapName(PyObject*, PyObject*) { return stub_call_named("background.GetCurrentMapName", Py_BuildValue("s", "")); }
|
||||
PyObject* stub_background_GetPickingPoint(PyObject*, PyObject*) { return stub_call_named("background.GetPickingPoint", Py_BuildValue("fff", 0.0, 0.0, 0.0)); }
|
||||
PyObject* stub_background_BeginEnvironment(PyObject*, PyObject*) { return stub_call_named("background.BeginEnvironment", Py_BuildNone()); }
|
||||
PyObject* stub_background_EndEnvironment(PyObject*, PyObject*) { return stub_call_named("background.EndEnvironment", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetCharacterDirLight(PyObject*, PyObject*) { return stub_call_named("background.SetCharacterDirLight", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetBackgroundDirLight(PyObject*, PyObject*) { return stub_call_named("background.SetBackgroundDirLight", Py_BuildNone()); }
|
||||
PyObject* stub_background_Initialize(PyObject*, PyObject*) { return stub_call_named("background.Initialize", Py_BuildNone()); }
|
||||
PyObject* stub_background_Update(PyObject*, PyObject*) { return stub_call_named("background.Update", Py_BuildNone()); }
|
||||
PyObject* stub_background_Render(PyObject*, PyObject*) { return stub_call_named("background.Render", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderPCBlocker(PyObject*, PyObject*) { return stub_call_named("background.RenderPCBlocker", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderCollision(PyObject*, PyObject*) { return stub_call_named("background.RenderCollision", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderSky(PyObject*, PyObject*) { return stub_call_named("background.RenderSky", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderCloud(PyObject*, PyObject*) { return stub_call_named("background.RenderCloud", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderWater(PyObject*, PyObject*) { return stub_call_named("background.RenderWater", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderEffect(PyObject*, PyObject*) { return stub_call_named("background.RenderEffect", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderBeforeLensFlare(PyObject*, PyObject*) { return stub_call_named("background.RenderBeforeLensFlare", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderAfterLensFlare(PyObject*, PyObject*) { return stub_call_named("background.RenderAfterLensFlare", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderCharacterShadowToTexture(PyObject*, PyObject*) { return stub_call_named("background.RenderCharacterShadowToTexture", Py_BuildNone()); }
|
||||
PyObject* stub_background_RenderDungeon(PyObject*, PyObject*) { return stub_call_named("background.RenderDungeon", Py_BuildNone()); }
|
||||
PyObject* stub_background_GetHeight(PyObject*, PyObject*) { return stub_call_named("background.GetHeight", Py_BuildValue("f", 0.0)); }
|
||||
PyObject* stub_background_SetShadowLevel(PyObject*, PyObject*) { return stub_call_named("background.SetShadowLevel", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetVisiblePart(PyObject*, PyObject*) { return stub_call_named("background.SetVisiblePart", Py_BuildNone()); }
|
||||
PyObject* stub_background_GetShadowMapColor(PyObject*, PyObject*) { return stub_call_named("background.GetShadowMapColor", Py_BuildValue("i", 0)); }
|
||||
PyObject* stub_background_SetSplatLimit(PyObject*, PyObject*) { return stub_call_named("background.SetSplatLimit", Py_BuildNone()); }
|
||||
PyObject* stub_background_GetRenderedSplatNum(PyObject*, PyObject*) { return stub_call_named("background.GetRenderedSplatNum", Py_BuildValue("iifs", 0, 0, 0.0, "")); }
|
||||
PyObject* stub_background_GetRenderedGraphicThingInstanceNum(PyObject*, PyObject*) { return stub_call_named("background.GetRenderedGraphicThingInstanceNum", Py_BuildValue("ii", 0, 0)); }
|
||||
PyObject* stub_background_SelectViewDistanceNum(PyObject*, PyObject*) { return stub_call_named("background.SelectViewDistanceNum", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetViewDistanceSet(PyObject*, PyObject*) { return stub_call_named("background.SetViewDistanceSet", Py_BuildNone()); }
|
||||
PyObject* stub_background_GetFarClip(PyObject*, PyObject*) { return stub_call_named("background.GetFarClip", Py_BuildValue("f", 0.0)); }
|
||||
PyObject* stub_background_GetDistanceSetInfo(PyObject*, PyObject*) { return stub_call_named("background.GetDistanceSetInfo", Py_BuildValue("ifff", 0, 0.0, 0.0, 0.0)); }
|
||||
PyObject* stub_background_SetBGLoading(PyObject*, PyObject*) { return stub_call_named("background.SetBGLoading", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetRenderSort(PyObject*, PyObject*) { return stub_call_named("background.SetRenderSort", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetTransparentTree(PyObject*, PyObject*) { return stub_call_named("background.SetTransparentTree", Py_BuildNone()); }
|
||||
PyObject* stub_background_SetXMasTree(PyObject*, PyObject*) { return stub_call_named("background.SetXMasTree", Py_BuildNone()); }
|
||||
PyObject* stub_background_RegisterDungeonMapName(PyObject*, PyObject*) { return stub_call_named("background.RegisterDungeonMapName", Py_BuildNone()); }
|
||||
PyObject* stub_background_VisibleGuildArea(PyObject*, PyObject*) { return stub_call_named("background.VisibleGuildArea", Py_BuildNone()); }
|
||||
PyObject* stub_background_DisableGuildArea(PyObject*, PyObject*) { return stub_call_named("background.DisableGuildArea", Py_BuildNone()); }
|
||||
PyObject* stub_background_WarpTest(PyObject*, PyObject*) { return stub_call_named("background.WarpTest", Py_BuildNone()); }
|
||||
PyMethodDef methods_background[] = {
|
||||
{ "IsSoftwareTiling", stub_background_IsSoftwareTiling, METH_VARARGS },
|
||||
{ "EnableSoftwareTiling", stub_background_EnableSoftwareTiling, METH_VARARGS },
|
||||
{ "EnableSnow", stub_background_EnableSnow, METH_VARARGS },
|
||||
{ "GlobalPositionToLocalPosition", stub_background_GlobalPositionToLocalPosition, METH_VARARGS },
|
||||
{ "GlobalPositionToMapInfo", stub_background_GlobalPositionToMapInfo, METH_VARARGS },
|
||||
{ "GetRenderShadowTime", stub_background_GetRenderShadowTime, METH_VARARGS },
|
||||
{ "LoadMap", stub_background_LoadMap, METH_VARARGS },
|
||||
{ "Destroy", stub_background_Destroy, METH_VARARGS },
|
||||
{ "RegisterEnvironmentData", stub_background_RegisterEnvironmentData, METH_VARARGS },
|
||||
{ "SetEnvironmentData", stub_background_SetEnvironmentData, METH_VARARGS },
|
||||
{ "GetCurrentMapName", stub_background_GetCurrentMapName, METH_VARARGS },
|
||||
{ "GetPickingPoint", stub_background_GetPickingPoint, METH_VARARGS },
|
||||
{ "BeginEnvironment", stub_background_BeginEnvironment, METH_VARARGS },
|
||||
{ "EndEnvironment", stub_background_EndEnvironment, METH_VARARGS },
|
||||
{ "SetCharacterDirLight", stub_background_SetCharacterDirLight, METH_VARARGS },
|
||||
{ "SetBackgroundDirLight", stub_background_SetBackgroundDirLight, METH_VARARGS },
|
||||
{ "Initialize", stub_background_Initialize, METH_VARARGS },
|
||||
{ "Update", stub_background_Update, METH_VARARGS },
|
||||
{ "Render", stub_background_Render, METH_VARARGS },
|
||||
{ "RenderPCBlocker", stub_background_RenderPCBlocker, METH_VARARGS },
|
||||
{ "RenderCollision", stub_background_RenderCollision, METH_VARARGS },
|
||||
{ "RenderSky", stub_background_RenderSky, METH_VARARGS },
|
||||
{ "RenderCloud", stub_background_RenderCloud, METH_VARARGS },
|
||||
{ "RenderWater", stub_background_RenderWater, METH_VARARGS },
|
||||
{ "RenderEffect", stub_background_RenderEffect, METH_VARARGS },
|
||||
{ "RenderBeforeLensFlare", stub_background_RenderBeforeLensFlare, METH_VARARGS },
|
||||
{ "RenderAfterLensFlare", stub_background_RenderAfterLensFlare, METH_VARARGS },
|
||||
{ "RenderCharacterShadowToTexture", stub_background_RenderCharacterShadowToTexture, METH_VARARGS },
|
||||
{ "RenderDungeon", stub_background_RenderDungeon, METH_VARARGS },
|
||||
{ "GetHeight", stub_background_GetHeight, METH_VARARGS },
|
||||
{ "SetShadowLevel", stub_background_SetShadowLevel, METH_VARARGS },
|
||||
{ "SetVisiblePart", stub_background_SetVisiblePart, METH_VARARGS },
|
||||
{ "GetShadowMapColor", stub_background_GetShadowMapColor, METH_VARARGS },
|
||||
{ "SetSplatLimit", stub_background_SetSplatLimit, METH_VARARGS },
|
||||
{ "GetRenderedSplatNum", stub_background_GetRenderedSplatNum, METH_VARARGS },
|
||||
{ "GetRenderedGraphicThingInstanceNum", stub_background_GetRenderedGraphicThingInstanceNum, METH_VARARGS },
|
||||
{ "SelectViewDistanceNum", stub_background_SelectViewDistanceNum, METH_VARARGS },
|
||||
{ "SetViewDistanceSet", stub_background_SetViewDistanceSet, METH_VARARGS },
|
||||
{ "GetFarClip", stub_background_GetFarClip, METH_VARARGS },
|
||||
{ "GetDistanceSetInfo", stub_background_GetDistanceSetInfo, METH_VARARGS },
|
||||
{ "SetBGLoading", stub_background_SetBGLoading, METH_VARARGS },
|
||||
{ "SetRenderSort", stub_background_SetRenderSort, METH_VARARGS },
|
||||
{ "SetTransparentTree", stub_background_SetTransparentTree, METH_VARARGS },
|
||||
{ "SetXMasTree", stub_background_SetXMasTree, METH_VARARGS },
|
||||
{ "RegisterDungeonMapName", stub_background_RegisterDungeonMapName, METH_VARARGS },
|
||||
{ "VisibleGuildArea", stub_background_VisibleGuildArea, METH_VARARGS },
|
||||
{ "DisableGuildArea", stub_background_DisableGuildArea, METH_VARARGS },
|
||||
{ "WarpTest", stub_background_WarpTest, METH_VARARGS },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
// 40250 UserInterface/PythonEventManagerMoudle.cpp: event export names.
|
||||
PyObject* stub_event_RegisterEventSet(PyObject*, PyObject*) { return stub_call_named("event.RegisterEventSet", Py_BuildValue("i", 0)); }
|
||||
PyObject* stub_event_RegisterEventSetFromString(PyObject*, PyObject*) { return stub_call_named("event.RegisterEventSetFromString", Py_BuildValue("i", 0)); }
|
||||
@@ -557,11 +456,6 @@ PyMethodDef methods_udp[] = {
|
||||
} // namespace
|
||||
|
||||
void init_2v0_gameplay_stubs() {
|
||||
{
|
||||
PyObject* module = Py_InitModule("background", methods_background);
|
||||
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
||||
AddStubConstants_background(module);
|
||||
}
|
||||
{
|
||||
PyObject* module = Py_InitModule("event", methods_event);
|
||||
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
||||
|
||||
@@ -359,6 +359,7 @@ bool run_main_script_body(const char* lpCmdLine, std::string* error)
|
||||
initeffect();
|
||||
initfly();
|
||||
initskill();
|
||||
initBackground();
|
||||
initServerStateChecker();
|
||||
init_2v0_gameplay_stubs();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user