mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 02:39:57 -04:00
Remove the co-op of 0.8.0: its runtime layer, relay, menu tab, settings, tests and docs.
The hidden beta shared story progress through a relay a player had to run and never showed the other players. A new co-op replaces it. Gone are runtime/coop*.c and their headers, the menu's Co-op tab and its texts in four languages, tools/coop_relay.py, the co-op tests, docs/coop.md, the [coop] section of nx2navi.ini.example, the --probe-coop mode, the coop trace item, and Monocypher, which only this layer used. The old settings stay known as retired keys, so an nx2navi.ini that still sets them logs no unknown key, and they stay on the list of private settings, so a bug report keeps a room's secret, a relay's address and a name out. The platform layer's UDP sockets and fs_save_snapshot stay for the new co-op; cfg_ini_now and fs_profile_path, which nothing else called, are removed. Checked: the game builds and starts, the menu shows its four tabs, --probe-cfg and --probe-fs pass, and the launcher's private-settings test passes. tests/save_share_check.py builds without its co-op stub; it cannot run from this worktree because the folder's path is longer than Windows allows, on main too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "coop_game.h"
|
||||
#include "fs.h"
|
||||
#include "host.h"
|
||||
#include "platform/platform.h"
|
||||
@@ -600,11 +599,6 @@ void fs_save_crash_wait(void) {
|
||||
(unsigned long long)(plat_now_ms() - t0));
|
||||
}
|
||||
|
||||
int fs_profile_path(const char *rel, char *out, size_t cap) {
|
||||
if (cap) out[0] = 0;
|
||||
return *profile && snprintf(out, cap, "%s/%s", profile, rel) < (int)cap;
|
||||
}
|
||||
|
||||
int fs_save_snapshot(const char *folder, const char *prefix, int keep, char *out, size_t cap) {
|
||||
char root[1100];
|
||||
if (cap) out[0] = 0;
|
||||
@@ -1169,7 +1163,6 @@ static int64_t host_read_at(PlatFile *f, void *buf, uint32_t n, uint64_t off) {
|
||||
|
||||
static uint32_t open_file(uint64_t *out, const char *path, int mode) {
|
||||
if (romfs_owns(path)) {
|
||||
coop_game_rom_open(path); // coop_game.c: the title screen's start
|
||||
return romfs_open(out, path, mode);
|
||||
}
|
||||
fs_trace(mode & FS_OPEN_WRITE ? "write" : "read", path);
|
||||
@@ -2076,10 +2069,10 @@ static void probe_storage(void) {
|
||||
|
||||
// copies of the save: the first one, prefixed, outlasts the rotation of the later ones
|
||||
char first[PLAT_PATH_MAX], later[PLAT_PATH_MAX];
|
||||
int copies = fs_save_snapshot("coop-backup", "first-", 3, first, sizeof first);
|
||||
for (int i = 0; i < 6; i++) copies += fs_save_snapshot("coop-backup", NULL, 3, later, sizeof later);
|
||||
int copies = fs_save_snapshot("save-copies", "first-", 3, first, sizeof first);
|
||||
for (int i = 0; i < 6; i++) copies += fs_save_snapshot("save-copies", NULL, 3, later, sizeof later);
|
||||
char backup[PLAT_PATH_MAX * 3 + 96];
|
||||
snprintf(backup, sizeof backup, "%s/coop-backup", dir);
|
||||
snprintf(backup, sizeof backup, "%s/save-copies", dir);
|
||||
Listing bl;
|
||||
int dated = 0, prefixed = 0;
|
||||
if (!list_dir(backup, &bl)) {
|
||||
|
||||
Reference in New Issue
Block a user