2V2-e.2: Godot consumer of the 3D draw commands, offline screenshot

python_3d_surface.gd turns RenderGame's recorded draws into meshes under a
camera read back from SetPerspective; textures come from the 40250 packs.
GetFarClip and the CMapManager ctor ported verbatim. Until the environment
is ported, lit draws with no light/ambient are shown unshaded (stand-in).
script/python_game_render_test.sh runs system.py login -> select -> game
against port_fake_login_server (or --live via MT_LIVE_*) and screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 20:35:36 +09:00
co-authored by Claude Opus 5.5
parent 5bfa13c5cc
commit 1fe8a4b643
12 changed files with 630 additions and 6 deletions
@@ -0,0 +1,34 @@
// The fake 40250 auth + game server of port_login_flow_test as its own process, for runs that drive the
// real client from Godot (script/python_game_render_test.sh). Prints "ports <auth> <game>" once it
// listens and serves until SIGTERM or SIGINT; the milestones go to stderr on the way out.
#include "port_login_flow_server.h"
#include <csignal>
#include <cstdio>
#include <unistd.h>
static volatile std::sig_atomic_t g_stop = 0;
static void on_signal(int) { g_stop = 1; }
int main()
{
std::signal(SIGTERM, on_signal);
std::signal(SIGINT, on_signal);
FakeLoginServer server;
if (!server.Start())
{
std::fprintf(stderr, "port_fake_login_server: cannot listen on loopback\n");
return 1;
}
std::printf("ports %d %d\n", server.AuthPort(), server.GamePort());
std::fflush(stdout);
while (!g_stop)
pause();
std::fprintf(stderr, "port_fake_login_server events:");
for (const auto& e : server.Events())
std::fprintf(stderr, " %s", e.c_str());
std::fprintf(stderr, "\nport_fake_login_server error: %s\n", server.Error().c_str());
server.Stop();
return server.Failed() ? 1 : 0;
}