Fix the build after archiving rpg/ui/scene: drop their last live dependents

rpg/ui/scene moved to archive/ earlier left a handful of otherwise-generic
systems with dead references into them:
- asset/loader/chunk existed solely to load rpg overworld map chunks
  (tile_t, worldpos_t) - deleted outright, along with its
  ASSET_LOADER_TYPE_CHUNK entry in assetloader.c/h.
- save/slot wrapped party_t/storyflagval_t/map-name/cutscene-path, which is
  100% rpg save data - deleted outright (save.c/h, savedevice.c/h and the
  Linux save backend keep their generic settings/device-discovery logic,
  just lose the slot read/write pieces that only existed for it).
- locale/localemanager.c and test/CMakeLists.txt/test/save/* had a few
  stray includes and test cases that only existed for the now-gone code.

Also restores assets/locale/en_US.po (copied back from archive/assets/) -
locale init still needs a real locale file to boot into, even with the
asset-moving/archiving done separately.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
YourWishesandClaude Sonnet 5 committed 2026-10-15 09:08:02 -05:00
1 parent f6b884bf7f
commit fdfdfa3a66
31 files changed
+292 -1994

No files matched your search

+2 -60
View File
@@ -8,9 +8,7 @@
#include "dusktest.h"
#include "savetestfixture.h"
#include "save/savedevice.h"
#include "save/slot/saveslot.h"
#include "save/settings/savesettings.h"
#include "save/save.h"
#include "util/memory.h"
#include "util/string.h"
@@ -150,28 +148,10 @@ static void test_saveDeviceCheckAvailability_resolvesSynchronouslyOnLinux(
}
// ============================================================
// saveDeviceSlotWrite / saveDeviceSlotRead / saveDeviceSettingsWrite /
// saveDeviceSettingsRead - dispatch to the platform's four hooks.
// saveDeviceSettingsWrite / saveDeviceSettingsRead - dispatch to the
// platform's hooks.
// ============================================================
static void test_saveDeviceSlotWrite_nullAsserts(void **state) {
savedevice_t device;
// Content is never touched - both calls assert on a NULL argument
// before either device or slot would actually be read.
saveslot_t slot;
expect_assert_failure(saveDeviceSlotWrite(NULL, &slot, 0));
expect_assert_failure(saveDeviceSlotWrite(&device, NULL, 0));
}
static void test_saveDeviceSlotRead_nullAsserts(void **state) {
savedevice_t device;
saveslot_t slot;
expect_assert_failure(saveDeviceSlotRead(NULL, &slot, 0));
expect_assert_failure(saveDeviceSlotRead(&device, NULL, 0));
}
static void test_saveDeviceSettingsWrite_nullAsserts(void **state) {
savedevice_t device;
savesettings_t settings;
@@ -190,32 +170,6 @@ static void test_saveDeviceSettingsRead_nullAsserts(void **state) {
expect_assert_failure(saveDeviceSettingsRead(&device, NULL));
}
static void test_saveDeviceSlot_dispatchesToPlatform(void **state) {
savedevice_t device;
errorret_t initRet = saveDeviceInit(&device);
assert_true(errorIsOk(initRet));
// The save directory must exist before a write can succeed - normally
// saveDeviceCheckAvailability does this via the platform's mkdirp.
saveDeviceCheckAvailability(&device, updateCallback, NULL);
saveDeviceUpdate(&device);
// saveSlotInit() only ever operates on SAVE.slot now, so that's the
// write source here.
saveSlotInit(&SAVE.slot);
SAVE.slot.cachedData.playerLevel = 21;
errorret_t writeRet = saveDeviceSlotWrite(&device, &SAVE.slot, 0);
assert_true(errorIsOk(writeRet));
// No pre-init needed - saveSlotReadJSON() (via saveDeviceSlotRead) fully
// resets/overwrites its destination struct regardless of prior content.
saveslot_t read;
errorret_t readRet = saveDeviceSlotRead(&device, &read, 0);
assert_true(errorIsOk(readRet));
assert_int_equal(read.cachedData.playerLevel, 21);
}
static void test_saveDeviceSettings_dispatchesToPlatform(void **state) {
savedevice_t device;
errorret_t initRet = saveDeviceInit(&device);
@@ -303,14 +257,6 @@ int main(void) {
saveTestFixtureSetup, saveTestFixtureTeardown
),
cmocka_unit_test_setup_teardown(
test_saveDeviceSlotWrite_nullAsserts,
saveTestFixtureSetup, saveTestFixtureTeardown
),
cmocka_unit_test_setup_teardown(
test_saveDeviceSlotRead_nullAsserts,
saveTestFixtureSetup, saveTestFixtureTeardown
),
cmocka_unit_test_setup_teardown(
test_saveDeviceSettingsWrite_nullAsserts,
saveTestFixtureSetup, saveTestFixtureTeardown
@@ -319,10 +265,6 @@ int main(void) {
test_saveDeviceSettingsRead_nullAsserts,
saveTestFixtureSetup, saveTestFixtureTeardown
),
cmocka_unit_test_setup_teardown(
test_saveDeviceSlot_dispatchesToPlatform,
saveTestFixtureSetup, saveTestFixtureTeardown
),
cmocka_unit_test_setup_teardown(
test_saveDeviceSettings_dispatchesToPlatform,
saveTestFixtureSetup, saveTestFixtureTeardown