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

@@ -12,6 +12,7 @@
#include "gfx.h"
#include "cfg.h"
#include "coop_game.h"
#include "host.h"
#include "nvn_api.h"
#include "nvn_hmap.h"
@@ -864,6 +865,7 @@ NVN_API(nvnQueuePresentTexture) {
movie_tick(c); // ov_movie.c: hand over decoded movie frames that are due; needs the core, so before the wait
res_present(c); // resolution.c: a DLSS mode change sets the game's render size again, between frames
wide_present(); // widescreen.c: Ocarina's DLSS render scale
coop_present(c); // coop_game.c: co-op progress sync reads and sets the game's flags, between frames
NVN_BLOCKING();
if (o->magic != NVN_WIN_MAGIC || idx < 0 || idx >= o->ntex || idx >= 4 || !o->tex[idx])
rt_fatal("nvn: QueuePresentTexture of image %d on window %p", idx, (void *)o);