Merge co-op, off by default: rooms through a relay, progress sync between the players' own saves, and a Co-op tab.

Without the other players drawn in the world, which are unfinished. No relay address is built in, and with co-op off nothing opens a socket. Built on Windows and tested against a relay on this PC only; two games in one room and any real network have not been tried.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-11 00:40:20 -05:00
63 changed files with 20726 additions and 50 deletions

View File

@@ -5,6 +5,7 @@
#include <stdio.h>
#include <string.h>
#include "coop.h"
#include "fs.h"
#include "host.h"
#include "kernel.h"
@@ -243,6 +244,7 @@ static void svc_body(Cpu *c, uint32_t imm, uint64_t pc) {
// profile saved, logs flushed, exit code 0
char at[160];
rt_log("guest ExitProcess at %s; exiting", ldr_describe(pc, at, sizeof at));
coop_shutdown(); // LEAVE and BYE to the room, before the process ends
fs_save_flush();
vk_pipeline_prewarm_marker_clear(); // as the window's close (gfx_present.c gfx_window_closed)
vk_pipeline_save();