diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 450d941ee..6fa6d1ec9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -383,7 +383,7 @@ jobs: - name: Set protobuf compiler cache identity shell: bash run: | - echo "SCCACHE_C_CUSTOM_CACHE_BUSTER=stfc-protobuf-${{ env.PROTOBUF_SCCACHE_SCHEMA }}-xmake-${{ env.XMAKE_VERSION }}-macos-${{ matrix.arch }}-release-${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('mods/src/prime/proto/*.proto', 'mods/xmake.lua', 'xmake.lua', 'xmake-requires.lock', 'xmake/dependencies/common.lua', 'xmake/dependencies/macos.lua', 'xmake/rules/protobuf_sccache.lua') }}" >> "$GITHUB_ENV" + echo "SCCACHE_C_CUSTOM_CACHE_BUSTER=stfc-protobuf-${{ env.PROTOBUF_SCCACHE_SCHEMA }}-xmake-${{ env.XMAKE_VERSION }}-macos-${{ matrix.arch }}-release-${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ hashFiles('src/mod/prime/proto/*.proto', 'src/mod/xmake.lua', 'xmake.lua', 'xmake-requires.lock', 'xmake/dependencies/common.lua', 'xmake/dependencies/macos.lua', 'xmake/rules/protobuf_sccache.lua') }}" >> "$GITHUB_ENV" - name: Locate XMake caches id: xmake_cache_paths @@ -434,7 +434,7 @@ jobs: uses: actions/cache/restore@v6 with: path: build/.swift-module-cache - key: macos-${{ matrix.arch }}-release-swift-modules-${{ env.SWIFT_MODULE_CACHE_SCHEMA }}-${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ steps.swift_toolchain.outputs.hash }}-${{ steps.xmake_cache_paths.outputs.plzma_sha }}-${{ hashFiles('macos-launcher/xmake.lua', 'macos-launcher/src/module.modulemap', 'xmake/dependencies/macos.lua', 'xmake-requires.lock', 'xmake-packages/packages/p/PLzmaSDK/**') }} + key: macos-${{ matrix.arch }}-release-swift-modules-${{ env.SWIFT_MODULE_CACHE_SCHEMA }}-${{ env.MACOSX_DEPLOYMENT_TARGET }}-${{ steps.swift_toolchain.outputs.hash }}-${{ steps.xmake_cache_paths.outputs.plzma_sha }}-${{ hashFiles('src/launcher/macos/xmake.lua', 'src/launcher/macos/module.modulemap', 'xmake/dependencies/macos.lua', 'xmake-requires.lock', 'xmake-packages/packages/p/PLzmaSDK/**') }} - name: Restore XMake compiler cache id: restore_build @@ -568,9 +568,9 @@ jobs: test -f build/macosx/arm64/release/macOSLauncher test -f "$APP/Contents/Resources/Assets.car" - test -f macos-launcher/src/Info.plist + test -f src/launcher/macos/Info.plist - cp macos-launcher/src/Info.plist \ + cp src/launcher/macos/Info.plist \ "$APP/Contents/Info.plist" test -f "$APP/Contents/Info.plist" diff --git a/AGENTS.md b/AGENTS.md index 8010ba825..2669b3627 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,7 +58,7 @@ Delete the `build/` folder to reset. Also delete `.vs/` for a full Visual Studio ### Source Layout -- **`mods/src/`** — Core mod code (the main codebase) +- **`src/mod/`** — Core mod code (the main codebase) - `config.h/.cc` — Singleton `Config` class, loads TOML settings, controls which patches are enabled - `patches/patches.cc` — Entry point: hooks `il2cpp_init`, then conditionally installs each patch - `patches/parts/` — Individual patch implementations (zoom, hotkeys, chat, UI scale, sync, etc.) @@ -66,9 +66,9 @@ Delete the `build/` folder to reset. Also delete `.vs/` for a full Visual Studio - `prime/` — Header-only IL2CPP type definitions mirroring the game's C# classes - `prime/proto/` — Protobuf definitions for game data sync - `il2cpp/` — IL2CPP helper functions for resolving methods, classes, and icalls at runtime -- **`win-proxy-dll/src/`** — Windows DLL proxy entry point -- **`macos-dylib/src/`** — macOS dylib entry point -- **`macos-loader/src/`** — macOS loader (finds game, injects dylib) +- **`src/platform/windows/`** — Windows DLL proxy entry point +- **`src/platform/macos/dylib/`** — macOS dylib entry point +- **`src/platform/macos/loader/`** — macOS loader (finds game, injects dylib) - **`macos-launcher/`** — Swift macOS GUI app - **`third_party/libil2cpp/`** — IL2CPP SDK headers - **`xmake-packages/`** — Custom xmake package definitions (e.g., `spud`) @@ -92,7 +92,7 @@ static auto class_helper = il2cpp_get_class_helper("Assembly.Name", "Namespace", static auto method = class_helper.GetMethodInfo("MethodName"); ``` -**Adding a new patch** — Create a `.cc` file in `mods/src/patches/parts/`, write an `InstallXxxHooks()` function, declare it in `patches.cc`, add a `bool installXxx` to `Config`, and register it in the `patches[]` array in `patches.cc`. Hook-install toggles are read from the `[patches]` TOML table in all build modes and should default to `true`; they exist as emergency compatibility switches for hook collisions or client drift. +**Adding a new patch** — Create a `.cc` file in `src/mod/patches/parts/`, write an `InstallXxxHooks()` function, declare it in `patches.cc`, add a `bool installXxx` to `Config`, and register it in the `patches[]` array in `patches.cc`. Hook-install toggles are read from the `[patches]` TOML table in all build modes and should default to `true`; they exist as emergency compatibility switches for hook collisions or client drift. **Separate hook installation from feature enablement** — Do not use a user-facing feature setting to decide whether its hooks are installed. Normally install all supported hooks, then have each hook check the feature setting and immediately preserve native behavior (usually by calling `original`) when the feature is disabled. Keep hook-install switches under `[patches]` and feature settings in their relevant sections such as `[ui]`, `[graphics]`, or `[audio]`; never place a feature-only toggle under `[patches]`. If an installer contains an early return based on a feature setting, or a `patches[]` entry points directly at a feature setting, treat that as a design error. Helpers that install no hooks, such as shortcut-only behavior, do not belong in `patches[]` at all. @@ -113,7 +113,7 @@ static auto method = class_helper.GetMethodInfo("MethodName"); ## Code Style - Uses `.clang-format` — 2-space indent, 120 column limit, Linux brace style, aligned assignments/declarations -- Version is defined in `mods/src/version.h` (VERSION_MAJOR/MINOR/REVISION/PATCH) +- Version is defined in `src/mod/version.h` (VERSION_MAJOR/MINOR/REVISION/PATCH) - Prefer narrow platform guards such as `#if _WIN32`, `#if !_WIN32`, and `#if __APPLE__`; do not assume every non-Windows path is macOS. - Logging via `spdlog::info()`, `spdlog::debug()`, etc. diff --git a/README.md b/README.md index dd912ed6d..f6856b3b1 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ This project is maintained solely at my own cost of time, energy and money. Any - Create parsed toml file to show what settings have been applied - Customise your keyboard shortcuts -For a full list of features see our [FEATURES.md](FEATURES.md) +For a full list of features see our [FEATURES.md](docs/FEATURES.md) ## Installing -Please see the [INSTALL.md](INSTALL.md) instructions which has steps on how to use this mod with Star Trek Fleet Command. +Please see the [INSTALL.md](docs/INSTALL.md) instructions which has steps on how to use this mod with Star Trek Fleet Command. For the Windows DLL identity marker, artifact-attestation trust boundary, and verification command, see [Windows DLL provenance](docs/WINDOWS_DLL_PROVENANCE.md). @@ -66,7 +66,7 @@ Please note, that whilst Mac support was added in this version, it's supported o Most keyboard shortcuts can be modified by updated your TOML file. If your file is empty, see the VARS file which has all the runtime settings that have -been applied. Valid values for any short can be found in [KEYMAPPING.md](KEYMAPPING.md) +been applied. Valid values for any short can be found in [KEYMAPPING.md](docs/KEYMAPPING.md) ### UI shortcuts diff --git a/create-contrib.sh b/create-contrib.sh deleted file mode 100644 index 15e19bd16..000000000 --- a/create-contrib.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!env /bin/bash -git shortlog -sne --all | awk '{$1=""; print "- " substr($0,2)}' > CONTRIBUTORS.md diff --git a/docs/FASTER_QUEUE_RECOVERY.md b/docs/FASTER_QUEUE_RECOVERY.md index 1d5424119..6ef8a5ed6 100644 --- a/docs/FASTER_QUEUE_RECOVERY.md +++ b/docs/FASTER_QUEUE_RECOVERY.md @@ -50,6 +50,6 @@ The older off-screen Kir'Shara combat-completion repair was fixed by Scopely. Th ## Validation -Run `tests/run-action-queue.ps1` on Windows, or compile `tests/action_queue.cc` with a C++23 compiler and `-Imods/src`. Tests use the production policy and request store with fake weak handles. They cover one-shot recovery, reordered/still-present targets, cross-fleet rejection, stale attempts, replaced/collected queues, expiry, reentrant cancellation, bounded capacity and cleanup. They do not model game ABI or network scheduling. +Run `tests/run-action-queue.ps1` on Windows, or compile `tests/action_queue.cc` with a C++23 compiler and `-Isrc/mod`. Tests use the production policy and request store with fake weak handles. They cover one-shot recovery, reordered/still-present targets, cross-fleet rejection, stale attempts, replaced/collected queues, expiry, reentrant cancellation, bounded capacity and cleanup. They do not model game ABI or network scheduling. The prototype produced two observed handoffs with the next target attempted 1–2 ms later and successful responses within 388–532 ms. Those timings are observations, not a latency guarantee. The final adapter requires its own smoke test: normal queued combat; removal of the outstanding target; removal before the first successful course response; queue clear/rebuild; recall; and session restart. Group-wave behavior needs additional coverage when available. diff --git a/FEATURES.md b/docs/FEATURES.md similarity index 99% rename from FEATURES.md rename to docs/FEATURES.md index 5f6fbb2f8..059288f61 100644 --- a/FEATURES.md +++ b/docs/FEATURES.md @@ -2,7 +2,7 @@ The STFC Community Mod adds configurable quality-of-life improvements to the desktop version of Star Trek Fleet Command. This catalog describes the user-facing features represented by the current source code and English example configuration. -Most options are configured in `community_patch_settings.toml`. The mod creates a default settings file when one is missing and also writes a parsed settings file so you can see the values that were applied. Nearly every shortcut can be remapped; see [`KEYMAPPING.md`](KEYMAPPING.md) for valid key names. +Most options are configured in `community_patch_settings.toml`. The mod creates a default settings file when one is missing and also writes a parsed settings file so you can see the values that were applied. Nearly every shortcut can be remapped; see [`KEYMAPPING.md`](docs/KEYMAPPING.md) for valid key names. ## Display and window controls @@ -176,4 +176,4 @@ The default shortcut map includes the following high-use controls. All of these | Focus search | `CTRL-F` | | Toggle borderless fullscreen | `F11` | -For the complete shortcut list and the names accepted by the configuration parser, see [`README.md`](README.md) and [`KEYMAPPING.md`](KEYMAPPING.md). +For the complete shortcut list and the names accepted by the configuration parser, see [`README.md`](README.md) and [`KEYMAPPING.md`](docs/KEYMAPPING.md). diff --git a/INSTALL.md b/docs/INSTALL.md similarity index 100% rename from INSTALL.md rename to docs/INSTALL.md diff --git a/KEYMAPPING.md b/docs/KEYMAPPING.md similarity index 100% rename from KEYMAPPING.md rename to docs/KEYMAPPING.md diff --git a/docs/VERSION_SUBSTITUTION.md b/docs/VERSION_SUBSTITUTION.md index 89e8dff58..e59213442 100644 --- a/docs/VERSION_SUBSTITUTION.md +++ b/docs/VERSION_SUBSTITUTION.md @@ -2,20 +2,20 @@ ## Overview -The macOS launcher's `Info.plist` file now automatically uses the version defined in `mods/src/version.h` during the build process. This ensures consistency between the application version and the mod version. +The macOS launcher's `Info.plist` file now automatically uses the version defined in `src/mod/version.h` during the build process. This ensures consistency between the application version and the mod version. ## Implementation ### Files Involved -- **Template**: `macos-launcher/src/Info.plist.template` - Contains version placeholders -- **Generated**: `macos-launcher/src/Info.plist` - Generated during build (not committed to git) -- **Source**: `mods/src/version.h` - Contains version definitions -- **Build**: `macos-launcher/xmake.lua` - Contains version extraction and substitution logic +- **Template**: `src/launcher/macos/Info.plist.template` - Contains version placeholders +- **Generated**: `src/launcher/macos/Info.plist` - Generated during build (not committed to git) +- **Source**: `src/mod/version.h` - Contains version definitions +- **Build**: `src/launcher/macos/xmake.lua` - Contains version extraction and substitution logic ### Version Extraction -The build process extracts version components from `mods/src/version.h`: +The build process extracts version components from `src/mod/version.h`: ```c #define VERSION_MAJOR 0 @@ -42,7 +42,7 @@ During build, these placeholders are replaced with the actual version. ## Build Process 1. **Configuration Phase**: `on_config` function in xmake.lua executes -2. **Version Extraction**: Reads and parses `mods/src/version.h` +2. **Version Extraction**: Reads and parses `src/mod/version.h` 3. **Template Processing**: Replaces `${VERSION}` in template with extracted version 4. **File Generation**: Writes processed `Info.plist` to source directory 5. **Build**: Xcode uses the generated `Info.plist` for app bundle creation @@ -66,7 +66,7 @@ This script simulates the build process and verifies: ### Updating Version -Version updates are made in `mods/src/version.h` only. The macOS launcher will automatically pick up changes during the next build. +Version updates are made in `src/mod/version.h` only. The macOS launcher will automatically pick up changes during the next build. ### Modifying Info.plist @@ -76,7 +76,7 @@ Changes to the Info.plist should be made to `Info.plist.template`, not the gener If version substitution fails: -1. Check that `mods/src/version.h` exists and contains expected `VERSION_*` definitions +1. Check that `src/mod/version.h` exists and contains expected `VERSION_*` definitions 2. Verify `Info.plist.template` contains `${VERSION}` placeholders 3. Run the verification script to identify specific issues 4. Check xmake build output for error messages diff --git a/docs/configuration/example_community_patch_settings.toml b/docs/configuration/example_community_patch_settings.toml new file mode 100644 index 000000000..6ae7868b6 --- /dev/null +++ b/docs/configuration/example_community_patch_settings.toml @@ -0,0 +1,16 @@ +# Localized example configuration files are generated from the languages +# supported by https://modconfig.pages.dev: +# +# English (en): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_en.toml +# Deutsch (de): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_de.toml +# Nederlands (nl): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_nl.toml +# Français (fr): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_fr.toml +# Español (es): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_es.toml +# Русский (ru): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_ru.toml +# Dansk (da): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_da.toml +# tlhIngan Hol (tlh): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_tlh.toml +# Minionese (en-x-minionese): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_en-x-minionese.toml +# Cockney (en-GB-x-cockney): https://github.com/STFC-Mod/mod/blob/dev/docs/configuration/example_community_patch_settings_en-GB-x-cockney.toml +# +# Choose the example for your preferred language and save a copy as +# community_patch_settings.toml in the appropriate settings folder. diff --git a/example_community_patch_settings_da.toml b/docs/configuration/example_community_patch_settings_da.toml similarity index 100% rename from example_community_patch_settings_da.toml rename to docs/configuration/example_community_patch_settings_da.toml diff --git a/example_community_patch_settings_de.toml b/docs/configuration/example_community_patch_settings_de.toml similarity index 100% rename from example_community_patch_settings_de.toml rename to docs/configuration/example_community_patch_settings_de.toml diff --git a/example_community_patch_settings_en-GB-x-cockney.toml b/docs/configuration/example_community_patch_settings_en-GB-x-cockney.toml similarity index 100% rename from example_community_patch_settings_en-GB-x-cockney.toml rename to docs/configuration/example_community_patch_settings_en-GB-x-cockney.toml diff --git a/example_community_patch_settings_en-x-minionese.toml b/docs/configuration/example_community_patch_settings_en-x-minionese.toml similarity index 100% rename from example_community_patch_settings_en-x-minionese.toml rename to docs/configuration/example_community_patch_settings_en-x-minionese.toml diff --git a/example_community_patch_settings_en.toml b/docs/configuration/example_community_patch_settings_en.toml similarity index 100% rename from example_community_patch_settings_en.toml rename to docs/configuration/example_community_patch_settings_en.toml diff --git a/example_community_patch_settings_es.toml b/docs/configuration/example_community_patch_settings_es.toml similarity index 100% rename from example_community_patch_settings_es.toml rename to docs/configuration/example_community_patch_settings_es.toml diff --git a/example_community_patch_settings_fr.toml b/docs/configuration/example_community_patch_settings_fr.toml similarity index 100% rename from example_community_patch_settings_fr.toml rename to docs/configuration/example_community_patch_settings_fr.toml diff --git a/example_community_patch_settings_nl.toml b/docs/configuration/example_community_patch_settings_nl.toml similarity index 100% rename from example_community_patch_settings_nl.toml rename to docs/configuration/example_community_patch_settings_nl.toml diff --git a/example_community_patch_settings_ru.toml b/docs/configuration/example_community_patch_settings_ru.toml similarity index 100% rename from example_community_patch_settings_ru.toml rename to docs/configuration/example_community_patch_settings_ru.toml diff --git a/example_community_patch_settings_tlh.toml b/docs/configuration/example_community_patch_settings_tlh.toml similarity index 100% rename from example_community_patch_settings_tlh.toml rename to docs/configuration/example_community_patch_settings_tlh.toml diff --git a/example_community_patch_settings.toml b/example_community_patch_settings.toml deleted file mode 100644 index acaa85f11..000000000 --- a/example_community_patch_settings.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Localized example configuration files are generated from the languages -# supported by https://modconfig.pages.dev: -# -# English (en): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_en.toml -# Deutsch (de): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_de.toml -# Nederlands (nl): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_nl.toml -# Français (fr): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_fr.toml -# Español (es): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_es.toml -# Русский (ru): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_ru.toml -# Dansk (da): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_da.toml -# tlhIngan Hol (tlh): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_tlh.toml -# Minionese (en-x-minionese): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_en-x-minionese.toml -# Cockney (en-GB-x-cockney): https://github.com/STFC-Mod/mod/blob/dev/example_community_patch_settings_en-GB-x-cockney.toml -# -# Choose the example for your preferred language and save a copy as -# community_patch_settings.toml in the appropriate settings folder. diff --git a/macos-launcher/src/launcher.icns b/macos-launcher/src/launcher.icns deleted file mode 100644 index b8cc49296..000000000 Binary files a/macos-launcher/src/launcher.icns and /dev/null differ diff --git a/scripts/check-il2cpp-dump.py b/scripts/check-il2cpp-dump.py index 76d507356..07abcf269 100755 --- a/scripts/check-il2cpp-dump.py +++ b/scripts/check-il2cpp-dump.py @@ -21,7 +21,7 @@ import re from collections import defaultdict -SRC_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') +SRC_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'src') TYPE_HEAD = re.compile( r'^(?:\[.*\]\s*)?(?:(?:public|private|protected|internal|static|sealed|abstract|readonly|ref|unsafe|partial)\s+)*' @@ -161,8 +161,7 @@ def call_arity(text): def scan_source(root): """Returns ({binding name: (asm, ns, class)}, [(file, owner, kind, member, static, arity)]).""" classes, uses = {}, [] - for dirpath, _, files in (entry for directory in ('mods/src', 'libs') - for entry in os.walk(os.path.join(root, directory))): + for dirpath, _, files in os.walk(root): if os.sep + 'proto' in dirpath: continue for f in files: diff --git a/scripts/create-mac-dmg.sh b/scripts/create-mac-dmg.sh index fc4811439..05a943e2d 100755 --- a/scripts/create-mac-dmg.sh +++ b/scripts/create-mac-dmg.sh @@ -26,7 +26,7 @@ lipo -create build/macosx/$ARCH/$CONFIG/macOSLauncher build/macosx/x86_64/$CONFI lipo -create build/macosx/$ARCH/$CONFIG/stfc-community-mod-loader build/macosx/x86_64/$CONFIG/stfc-community-mod-loader -output build/macosx/$ARCH/$CONFIG/macOSLauncher.app/Contents/stfc-community-mod-loader lipo -create build/macosx/$ARCH/$CONFIG/libstfc-community-mod.dylib build/macosx/x86_64/$CONFIG/libstfc-community-mod.dylib -output build/macosx/$ARCH/$CONFIG/macOSLauncher.app/Contents/libstfc-community-mod.dylib cp assets/launcher.icns build/macosx/$ARCH/$CONFIG/macOSLauncher.app/Contents/Resources/ -cp macos-launcher/src/Info.plist build/macosx/$ARCH/$CONFIG/macOSLauncher.app/Contents/ +cp src/launcher/macos/Info.plist build/macosx/$ARCH/$CONFIG/macOSLauncher.app/Contents/ rm -rf build/macosx/$ARCH/$CONFIG/*.dSYM || true rm -rf build/macosx/$ARCH/$CONFIG/STFC\ Community\ Mod.app || true diff --git a/scripts/mac-build-test-debug.sh b/scripts/mac-build-test-debug.sh index 9f1254027..5bf301ba6 100755 --- a/scripts/mac-build-test-debug.sh +++ b/scripts/mac-build-test-debug.sh @@ -222,7 +222,7 @@ package_app_bundle() { exit 1 fi - local info_plist_path="${PROJECT_ROOT}/macos-launcher/src/Info.plist" + local info_plist_path="${PROJECT_ROOT}/src/launcher/macos/Info.plist" if [[ ! -f "$info_plist_path" ]]; then print_error "Generated Info.plist not found at: $info_plist_path" print_info "Run the configure/build step so xmake can generate it from Info.plist.template" diff --git a/scripts/stamp-version-hash.py b/scripts/stamp-version-hash.py index b20136823..25df9cd6c 100644 --- a/scripts/stamp-version-hash.py +++ b/scripts/stamp-version-hash.py @@ -18,7 +18,7 @@ def main() -> None: parser.add_argument( "--header", type=Path, - default=Path("mods/src/version.h"), + default=Path("src/mod/version.h"), help="version header to update", ) args = parser.parse_args() diff --git a/scripts/validate-example-configs.py b/scripts/validate-example-configs.py index 45d1400c8..b579acbb0 100644 --- a/scripts/validate-example-configs.py +++ b/scripts/validate-example-configs.py @@ -20,7 +20,7 @@ def main() -> int: root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - pattern = os.path.join(root, "example_community_patch_settings*.toml") + pattern = os.path.join(root, "docs/configuration/example_community_patch_settings*.toml") files = sorted(glob.glob(pattern)) if not files: print(f"no example config files matched {pattern!r}", file=sys.stderr) diff --git a/scripts/verify_version_substitution.py b/scripts/verify_version_substitution.py index 98d3815b5..b49f32e78 100755 --- a/scripts/verify_version_substitution.py +++ b/scripts/verify_version_substitution.py @@ -12,7 +12,7 @@ def get_version_from_header(): """Extract version from version.h (mimics the Lua function in xmake.lua)""" - version_file = "mods/src/version.h" + version_file = "src/mod/version.h" if not os.path.isfile(version_file): return "1.0.0.0" @@ -39,7 +39,7 @@ def simulate_build_process(): print(f"1. Extracted version: {version}") # Step 2: Check template file exists - template_file = "macos-launcher/src/Info.plist.template" + template_file = "src/launcher/macos/Info.plist.template" if not os.path.isfile(template_file): print(f"❌ ERROR: Template file not found: {template_file}") return False @@ -56,7 +56,7 @@ def simulate_build_process(): processed_content = template_content.replace("${VERSION}", version) # Step 4: Write generated file - output_file = "macos-launcher/src/Info.plist" + output_file = "src/launcher/macos/Info.plist" with open(output_file, 'w') as f: f.write(processed_content) @@ -107,7 +107,7 @@ def simulate_build_process(): def cleanup(): """Clean up generated files""" - output_file = "macos-launcher/src/Info.plist" + output_file = "src/launcher/macos/Info.plist" if os.path.isfile(output_file): os.remove(output_file) print(f"Cleaned up generated file: {output_file}") diff --git a/macos-launcher/src/ActionView.swift b/src/launcher/macos/ActionView.swift similarity index 100% rename from macos-launcher/src/ActionView.swift rename to src/launcher/macos/ActionView.swift diff --git a/macos-launcher/src/Assets.xcassets/AccentColor.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/AccentColor.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/launcher/macos/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/AppIcon.appiconset/Contents.json rename to src/launcher/macos/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/Contents.json b/src/launcher/macos/Assets.xcassets/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/Contents.json rename to src/launcher/macos/Assets.xcassets/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarLightOrange.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarLightOrange.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarLightOrange.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarLightOrange.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarOrange.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarOrange.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarOrange.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarOrange.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarPink.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarPink.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarPink.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarPink.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarPlum.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarPlum.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarPlum.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarPlum.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarTan.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarTan.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarTan.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarTan.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarViolet.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarViolet.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarViolet.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarViolet.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/lcarWhite.colorset/Contents.json b/src/launcher/macos/Assets.xcassets/lcarWhite.colorset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/lcarWhite.colorset/Contents.json rename to src/launcher/macos/Assets.xcassets/lcarWhite.colorset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/ufp-logo.imageset/Contents.json b/src/launcher/macos/Assets.xcassets/ufp-logo.imageset/Contents.json similarity index 100% rename from macos-launcher/src/Assets.xcassets/ufp-logo.imageset/Contents.json rename to src/launcher/macos/Assets.xcassets/ufp-logo.imageset/Contents.json diff --git a/macos-launcher/src/Assets.xcassets/ufp-logo.imageset/ufp-logo.png b/src/launcher/macos/Assets.xcassets/ufp-logo.imageset/ufp-logo.png similarity index 100% rename from macos-launcher/src/Assets.xcassets/ufp-logo.imageset/ufp-logo.png rename to src/launcher/macos/Assets.xcassets/ufp-logo.imageset/ufp-logo.png diff --git a/macos-launcher/src/ContentView.swift b/src/launcher/macos/ContentView.swift similarity index 100% rename from macos-launcher/src/ContentView.swift rename to src/launcher/macos/ContentView.swift diff --git a/macos-launcher/src/Info.plist.template b/src/launcher/macos/Info.plist.template similarity index 100% rename from macos-launcher/src/Info.plist.template rename to src/launcher/macos/Info.plist.template diff --git a/macos-launcher/src/LauncherMain.swift b/src/launcher/macos/LauncherMain.swift similarity index 100% rename from macos-launcher/src/LauncherMain.swift rename to src/launcher/macos/LauncherMain.swift diff --git a/macos-launcher/src/PatchEntitlements.swift b/src/launcher/macos/PatchEntitlements.swift similarity index 100% rename from macos-launcher/src/PatchEntitlements.swift rename to src/launcher/macos/PatchEntitlements.swift diff --git a/macos-launcher/src/TemporaryFolderURL.swift b/src/launcher/macos/TemporaryFolderURL.swift similarity index 100% rename from macos-launcher/src/TemporaryFolderURL.swift rename to src/launcher/macos/TemporaryFolderURL.swift diff --git a/macos-launcher/src/UpdaterFileOperations.swift b/src/launcher/macos/UpdaterFileOperations.swift similarity index 100% rename from macos-launcher/src/UpdaterFileOperations.swift rename to src/launcher/macos/UpdaterFileOperations.swift diff --git a/macos-launcher/src/XsollaLib.swift b/src/launcher/macos/XsollaLib.swift similarity index 100% rename from macos-launcher/src/XsollaLib.swift rename to src/launcher/macos/XsollaLib.swift diff --git a/macos-launcher/src/ini.swift b/src/launcher/macos/ini.swift similarity index 100% rename from macos-launcher/src/ini.swift rename to src/launcher/macos/ini.swift diff --git a/macos-launcher/src/macOSLauncher.entitlements b/src/launcher/macos/macOSLauncher.entitlements similarity index 100% rename from macos-launcher/src/macOSLauncher.entitlements rename to src/launcher/macos/macOSLauncher.entitlements diff --git a/macos-launcher/src/module.modulemap b/src/launcher/macos/module.modulemap similarity index 58% rename from macos-launcher/src/module.modulemap rename to src/launcher/macos/module.modulemap index e29611b4e..66cc1daf3 100644 --- a/macos-launcher/src/module.modulemap +++ b/src/launcher/macos/module.modulemap @@ -1,5 +1,5 @@ module libplzma { - header "../deps/PLzmaSDK/libplzma.h" + header "../../../macos-launcher/deps/PLzmaSDK/libplzma.h" export * } diff --git a/macos-launcher/src/rsync.cc b/src/launcher/macos/rsync.cc similarity index 100% rename from macos-launcher/src/rsync.cc rename to src/launcher/macos/rsync.cc diff --git a/macos-launcher/src/rsync.h b/src/launcher/macos/rsync.h similarity index 100% rename from macos-launcher/src/rsync.h rename to src/launcher/macos/rsync.h diff --git a/macos-launcher/src/rsync.swift b/src/launcher/macos/rsync.swift similarity index 100% rename from macos-launcher/src/rsync.swift rename to src/launcher/macos/rsync.swift diff --git a/macos-launcher/xmake.lua b/src/launcher/macos/xmake.lua similarity index 84% rename from macos-launcher/xmake.lua rename to src/launcher/macos/xmake.lua index ef0ea8722..b5fe1d699 100644 --- a/macos-launcher/xmake.lua +++ b/src/launcher/macos/xmake.lua @@ -2,7 +2,7 @@ add_rules("mode.debug", "mode.release") -- Function to extract version from version.h function get_version_from_header() - local version_file = path.join(os.scriptdir(), "../mods/src/version.h") + local version_file = path.join(os.scriptdir(), "../../mod/version.h") if not os.isfile(version_file) then return "1.0.0.0" end @@ -24,11 +24,11 @@ target("macOSLauncher") set_kind("binary") set_basename("macOSLauncher") - add_files("src/**/*.swift") - add_files("src/*.swift", "src/*.xcassets") - add_files("deps/PlzmaSDK/swift/*.swift") - add_files("src/*.cc") - add_includedirs("deps/PLzmaSDK") + add_files("**/*.swift") + add_files("*.swift", "*.xcassets") + add_files("../../../macos-launcher/deps/PLzmaSDK/swift/*.swift") + add_files("*.cc") + add_includedirs("../../../macos-launcher/deps/PLzmaSDK") add_packages("librsync", "PLzmaSDK") add_ldflags("-lc++", {force = true}) @@ -36,14 +36,14 @@ target("macOSLauncher") add_values("xcode.codesign_identity", "-") add_values("xcode.bundle_display_name", "Star Trek Fleet Command Community Mod") add_values("xcode.product_name", "STFC Community Mod") - add_values("xcode.bundle_info_plist", "src/Info.plist") + add_values("xcode.bundle_info_plist", "Info.plist") -- Keep imported Swift/Clang modules in a stable path that CI can persist. local swift_module_cache = path.join(os.projectdir(), "build", ".swift-module-cache") add_scflags( "-module-cache-path", swift_module_cache, "-Xcc -fmodules", - "-Xcc -fmodule-map-file=macos-launcher/src/module.modulemap", + "-Xcc -fmodule-map-file=src/launcher/macos/module.modulemap", "-D SWIFT_PACKAGE", {force = true}) @@ -57,7 +57,7 @@ target("macOSLauncher") target:add("scflags", "-external-plugin-path", sdk_platform .. "/Developer/usr/lib/swift/host/plugins#" .. sdk_platform .. "/Developer/usr/bin/swift-plugin-server") - local version_file = path.join(os.scriptdir(), "../mods/src/version.h") + local version_file = path.join(os.scriptdir(), "../../mod/version.h") if not os.isfile(version_file) then -- GitHub Actions warning print("::warning file=" .. version_file .. "::version.h not found, using default version 1.0.0.0") @@ -81,8 +81,8 @@ target("macOSLauncher") end -- Generate Info.plist - local info_plist_template = path.join(os.scriptdir(), "src/Info.plist.template") - local info_plist_output = path.join(os.scriptdir(), "src/Info.plist") + local info_plist_template = path.join(os.scriptdir(), "Info.plist.template") + local info_plist_output = path.join(os.scriptdir(), "Info.plist") if os.isfile(info_plist_template) then -- Read the template @@ -101,7 +101,7 @@ target("macOSLauncher") -- Clean up generated file after build (optional) after_clean(function (target) - local info_plist_output = path.join(os.scriptdir(), "src/Info.plist") + local info_plist_output = path.join(os.scriptdir(), "Info.plist") if os.isfile(info_plist_output) then os.rm(info_plist_output) print("Cleaned generated Info.plist") diff --git a/libs/il2cpp/GameAssembly.lib b/src/libs/il2cpp/GameAssembly.lib similarity index 100% rename from libs/il2cpp/GameAssembly.lib rename to src/libs/il2cpp/GameAssembly.lib diff --git a/libs/il2cpp/include/il2cpp/api.h b/src/libs/il2cpp/include/il2cpp/api.h similarity index 100% rename from libs/il2cpp/include/il2cpp/api.h rename to src/libs/il2cpp/include/il2cpp/api.h diff --git a/libs/il2cpp/include/il2cpp/hook.h b/src/libs/il2cpp/include/il2cpp/hook.h similarity index 100% rename from libs/il2cpp/include/il2cpp/hook.h rename to src/libs/il2cpp/include/il2cpp/hook.h diff --git a/libs/il2cpp/include/il2cpp/il2cpp.h b/src/libs/il2cpp/include/il2cpp/il2cpp.h similarity index 100% rename from libs/il2cpp/include/il2cpp/il2cpp.h rename to src/libs/il2cpp/include/il2cpp/il2cpp.h diff --git a/libs/il2cpp/include/il2cpp/method_contract.h b/src/libs/il2cpp/include/il2cpp/method_contract.h similarity index 100% rename from libs/il2cpp/include/il2cpp/method_contract.h rename to src/libs/il2cpp/include/il2cpp/method_contract.h diff --git a/libs/il2cpp/src/api.cc b/src/libs/il2cpp/src/api.cc similarity index 100% rename from libs/il2cpp/src/api.cc rename to src/libs/il2cpp/src/api.cc diff --git a/libs/il2cpp/src/il2cpp.cc b/src/libs/il2cpp/src/il2cpp.cc similarity index 100% rename from libs/il2cpp/src/il2cpp.cc rename to src/libs/il2cpp/src/il2cpp.cc diff --git a/libs/il2cpp/xmake.lua b/src/libs/il2cpp/xmake.lua similarity index 100% rename from libs/il2cpp/xmake.lua rename to src/libs/il2cpp/xmake.lua diff --git a/libs/unity/include/unity/core.h b/src/libs/unity/include/unity/core.h similarity index 100% rename from libs/unity/include/unity/core.h rename to src/libs/unity/include/unity/core.h diff --git a/libs/unity/include/unity/input.h b/src/libs/unity/include/unity/input.h similarity index 100% rename from libs/unity/include/unity/input.h rename to src/libs/unity/include/unity/input.h diff --git a/libs/unity/include/unity/tracker.h b/src/libs/unity/include/unity/tracker.h similarity index 100% rename from libs/unity/include/unity/tracker.h rename to src/libs/unity/include/unity/tracker.h diff --git a/libs/unity/include/unity/ui.h b/src/libs/unity/include/unity/ui.h similarity index 100% rename from libs/unity/include/unity/ui.h rename to src/libs/unity/include/unity/ui.h diff --git a/libs/unity/src/input.cc b/src/libs/unity/src/input.cc similarity index 100% rename from libs/unity/src/input.cc rename to src/libs/unity/src/input.cc diff --git a/libs/unity/src/tracker.cc b/src/libs/unity/src/tracker.cc similarity index 100% rename from libs/unity/src/tracker.cc rename to src/libs/unity/src/tracker.cc diff --git a/libs/unity/xmake.lua b/src/libs/unity/xmake.lua similarity index 100% rename from libs/unity/xmake.lua rename to src/libs/unity/xmake.lua diff --git a/mods/src/config.cc b/src/mod/config.cc similarity index 99% rename from mods/src/config.cc rename to src/mod/config.cc index 93367cc18..6bc85d870 100644 --- a/mods/src/config.cc +++ b/src/mod/config.cc @@ -1,11 +1,11 @@ #include "config.h" #include "file.h" -#include "patches/shortcuts.h" -#include "str_utils.h" +#include "shortcuts.h" +#include "text.h" #include "version.h" -#include "prime/ui.h" +#include "game/ui.h" #include #include diff --git a/mods/src/config.h b/src/mod/config.h similarity index 99% rename from mods/src/config.h rename to src/mod/config.h index 8a3c4e21e..ea6cfa476 100644 --- a/mods/src/config.h +++ b/src/mod/config.h @@ -5,8 +5,8 @@ // startup and again whenever the file changes; a few are also toggled at runtime by hotkeys. Everything runs on // the game thread except sync, whose workers retain immutable snapshots. -#include "patches/parts/notification_audio.h" -#include "patches/shortcuts.h" +#include "features/notification_audio.h" +#include "shortcuts.h" #include diff --git a/mods/src/patches/parts/action_queue.cc b/src/mod/features/action_queue.cc similarity index 99% rename from mods/src/patches/parts/action_queue.cc rename to src/mod/features/action_queue.cc index ccbd516a7..004cfc63d 100644 --- a/mods/src/patches/parts/action_queue.cc +++ b/src/mod/features/action_queue.cc @@ -1,10 +1,10 @@ #include "action_queue.h" -#include "patches/patches.h" +#include "features/features.h" #include // Use the host ABI for the 24-byte value-type callback on Windows and both Mac architectures. // Validate the managed layout before installing. -#include "prime/queues.h" +#include "game/queues.h" #include #include #include diff --git a/mods/src/patches/parts/action_queue.h b/src/mod/features/action_queue.h similarity index 100% rename from mods/src/patches/parts/action_queue.h rename to src/mod/features/action_queue.h diff --git a/mods/src/patches/action_queue_guard_policy.h b/src/mod/features/action_queue_guard_policy.h similarity index 100% rename from mods/src/patches/action_queue_guard_policy.h rename to src/mod/features/action_queue_guard_policy.h diff --git a/mods/src/patches/parts/alliance_store.cc b/src/mod/features/alliance_store.cc similarity index 99% rename from mods/src/patches/parts/alliance_store.cc rename to src/mod/features/alliance_store.cc index 2ad913732..d6c4656b6 100644 --- a/mods/src/patches/parts/alliance_store.cc +++ b/src/mod/features/alliance_store.cc @@ -1,11 +1,11 @@ // alliance_store: native material research tooltips in the Alliance Games store, and its currency refresh once its // bundles are ready. One feature owner, no claim-trace or file probe. [patches] alliancegamesstorehooks. -#include "patches/native_hook_extent.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/Hub.h" -#include "prime/inventory.h" +#include "game/app.h" +#include "game/inventory.h" +#include "game/native_hook_extent.h" #include #include diff --git a/mods/src/patches/parts/galactic_anomaly_timer.cc b/src/mod/features/anomaly_timer.cc similarity index 98% rename from mods/src/patches/parts/galactic_anomaly_timer.cc rename to src/mod/features/anomaly_timer.cc index e374ef10d..547736e79 100644 --- a/mods/src/patches/parts/galactic_anomaly_timer.cc +++ b/src/mod/features/anomaly_timer.cc @@ -2,11 +2,11 @@ // Help All / Engage / Claim drawer. All Unity work runs on the frame tick; there are no detours of its own. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/Hub.h" -#include "prime/hud.h" -#include "prime/ui.h" +#include "game/app.h" +#include "game/hud.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/audio_events.cc b/src/mod/features/audio.cc similarity index 96% rename from mods/src/patches/parts/audio_events.cc rename to src/mod/features/audio.cc index 14a12a26f..bba24de17 100644 --- a/mods/src/patches/parts/audio_events.cc +++ b/src/mod/features/audio.cc @@ -1,10 +1,10 @@ // [audio]: logs the game's sound events by name, and mutes the ones in disabled_events. #include "config.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/Hub.h" +#include "game/app.h" #include #include diff --git a/mods/src/patches/parts/buff_fixes.cc b/src/mod/features/buffs.cc similarity index 97% rename from mods/src/patches/parts/buff_fixes.cc rename to src/mod/features/buffs.cc index 78c8f51be..e3f7a6586 100644 --- a/mods/src/patches/parts/buff_fixes.cc +++ b/src/mod/features/buffs.cc @@ -2,9 +2,9 @@ // against a buff list the game cannot handle. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/server.h" +#include "game/server.h" #include #include diff --git a/mods/src/patches/parts/zoom.cc b/src/mod/features/camera.cc similarity index 99% rename from mods/src/patches/parts/zoom.cc rename to src/mod/features/camera.cc index 9dede3c57..0a87732b6 100644 --- a/mods/src/patches/parts/zoom.cc +++ b/src/mod/features/camera.cc @@ -3,12 +3,12 @@ // held touches that keep panning. Fleet label detail, which follows the zoom, is in fleet_labels.cc. #include "config.h" -#include "patches/patches.h" -#include "patches/shortcuts.h" +#include "features/features.h" +#include "shortcuts.h" -#include "prime/Hub.h" -#include "prime/navigation.h" -#include "prime/ui.h" +#include "game/app.h" +#include "game/navigation.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/cargo.cc b/src/mod/features/cargo.cc similarity index 97% rename from mods/src/patches/parts/cargo.cc rename to src/mod/features/cargo.cc index 13623af8f..7411da88a 100644 --- a/mods/src/patches/parts/cargo.cc +++ b/src/mod/features/cargo.cc @@ -2,10 +2,10 @@ // count-up animation. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/server.h" -#include "prime/ui.h" +#include "game/server.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/chat.cc b/src/mod/features/chat.cc similarity index 98% rename from mods/src/patches/parts/chat.cc rename to src/mod/features/chat.cc index aa3b49e14..f8487d9ce 100644 --- a/mods/src/patches/parts/chat.cc +++ b/src/mod/features/chat.cc @@ -3,13 +3,13 @@ // default_chat_width and auto_open_chat, which size side chat and open alliance side chat once per login. #include "config.h" -#include "patches/chat_startup.h" -#include "patches/patches.h" -#include "patches/shortcuts.h" +#include "features/chat_startup.h" +#include "features/features.h" +#include "shortcuts.h" -#include "prime/Hub.h" -#include "prime/chat.h" -#include "prime/ui.h" +#include "game/app.h" +#include "game/chat.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/chat_startup.h b/src/mod/features/chat_startup.h similarity index 100% rename from mods/src/patches/chat_startup.h rename to src/mod/features/chat_startup.h diff --git a/mods/src/patches/parts/chat_titles.cc b/src/mod/features/chat_titles.cc similarity index 98% rename from mods/src/patches/parts/chat_titles.cc rename to src/mod/features/chat_titles.cc index d024167f6..f8502f78d 100644 --- a/mods/src/patches/parts/chat_titles.cc +++ b/src/mod/features/chat_titles.cc @@ -1,9 +1,9 @@ -#include "patches/patches.h" -#include "prime/chat.h" +#include "features/features.h" +#include "game/chat.h" #include #include "config.h" -#include "patches/native_hook_extent.h" +#include "game/native_hook_extent.h" #include diff --git a/mods/src/patches/parts/double_click_assign_ship.cc b/src/mod/features/dock.cc similarity index 98% rename from mods/src/patches/parts/double_click_assign_ship.cc rename to src/mod/features/dock.cc index c9f38db01..4876b421b 100644 --- a/mods/src/patches/parts/double_click_assign_ship.cc +++ b/src/mod/features/dock.cc @@ -5,12 +5,12 @@ // the game's order. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" #include "ship_tile_click.h" -#include "str_utils.h" +#include "text.h" -#include "prime/fleet.h" -#include "prime/ui.h" +#include "game/fleet.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/double_click_assign_ship.h b/src/mod/features/double_click_assign_ship.h similarity index 80% rename from mods/src/patches/parts/double_click_assign_ship.h rename to src/mod/features/double_click_assign_ship.h index 78eb81f51..162977141 100644 --- a/mods/src/patches/parts/double_click_assign_ship.h +++ b/src/mod/features/double_click_assign_ship.h @@ -1,6 +1,6 @@ #pragma once -#include "prime/fleet.h" +#include "game/fleet.h" void AssignShipEnterKeyUpdate(); void DoubleClickOnShipTileClicked(FleetPlayerData* ship); diff --git a/mods/src/patches/patches.h b/src/mod/features/features.h similarity index 99% rename from mods/src/patches/patches.h rename to src/mod/features/features.h index 8b370533f..4c17c9e37 100644 --- a/mods/src/patches/patches.h +++ b/src/mod/features/features.h @@ -76,6 +76,8 @@ void FleetLabelsAfterZoom(NavigationZoom* zoom); // forbidden_tech.cc extern const Feature kForbiddenTechConfirm; + +// forbidden_tech_ship_name.cc extern const Feature kForbiddenTechShipName; // game_config.cc @@ -148,9 +150,6 @@ float WindowDpiScale(bool refresh = false); // sync/sync.cc extern const Feature kSync; - - - extern const Feature kInteriorZoom; extern const Feature kChatTitles; extern const Feature kRevealConfirm; diff --git a/mods/src/patches/parts/space_actions.cc b/src/mod/features/fleet_actions.cc similarity index 99% rename from mods/src/patches/parts/space_actions.cc rename to src/mod/features/fleet_actions.cc index 9bf2d885d..eff2fe8f5 100644 --- a/mods/src/patches/parts/space_actions.cc +++ b/src/mod/features/fleet_actions.cc @@ -4,15 +4,15 @@ #include "action_queue.h" #include "config.h" -#include "patches/patches.h" -#include "patches/shortcuts.h" +#include "features/features.h" +#include "shortcuts.h" #include -#include "prime/Hub.h" -#include "prime/fleet.h" -#include "prime/navigation.h" -#include "prime/ui.h" -#include "prime/viewers.h" +#include "game/app.h" +#include "game/fleet.h" +#include "game/navigation.h" +#include "game/ui.h" +#include "game/viewers.h" #include #include diff --git a/mods/src/patches/parts/fleet_labels.cc b/src/mod/features/fleet_labels.cc similarity index 99% rename from mods/src/patches/parts/fleet_labels.cc rename to src/mod/features/fleet_labels.cc index 5090e3488..7f1a641f4 100644 --- a/mods/src/patches/parts/fleet_labels.cc +++ b/src/mod/features/fleet_labels.cc @@ -3,9 +3,9 @@ // hooks in camera.cc report the zoom here. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/navigation.h" +#include "game/navigation.h" #include #include diff --git a/mods/src/patches/parts/forbidden_tech_confirmation.cc b/src/mod/features/forbidden_tech.cc similarity index 98% rename from mods/src/patches/parts/forbidden_tech_confirmation.cc rename to src/mod/features/forbidden_tech.cc index 98b5e60ab..7d6745d2a 100644 --- a/mods/src/patches/parts/forbidden_tech_confirmation.cc +++ b/src/mod/features/forbidden_tech.cc @@ -1,9 +1,9 @@ // auto_confirm_ft_upgrade: answers the forbidden tech upgrade confirmation with Confirm instead of showing it. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/ui.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/forbidden_tech_ship_name.cc b/src/mod/features/forbidden_tech_ship_name.cc similarity index 98% rename from mods/src/patches/parts/forbidden_tech_ship_name.cc rename to src/mod/features/forbidden_tech_ship_name.cc index 067b7b697..617338124 100644 --- a/mods/src/patches/parts/forbidden_tech_ship_name.cc +++ b/src/mod/features/forbidden_tech_ship_name.cc @@ -2,11 +2,11 @@ // panel, including ships without a dock. Inventory tiles keep their native dock badges. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/fleet.h" -#include "prime/inventory.h" -#include "prime/ui.h" +#include "game/fleet.h" +#include "game/inventory.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/game_config.cc b/src/mod/features/game_config.cc similarity index 94% rename from mods/src/patches/parts/game_config.cc rename to src/mod/features/game_config.cc index c5fba9320..ae8fece20 100644 --- a/mods/src/patches/parts/game_config.cc +++ b/src/mod/features/game_config.cc @@ -2,9 +2,9 @@ // loads. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/Hub.h" +#include "game/app.h" #include #include diff --git a/mods/src/patches/parts/haven.cc b/src/mod/features/haven.cc similarity index 99% rename from mods/src/patches/parts/haven.cc rename to src/mod/features/haven.cc index 0f7a7ba2c..f1e0545eb 100644 --- a/mods/src/patches/parts/haven.cc +++ b/src/mod/features/haven.cc @@ -1,6 +1,6 @@ // Haven's extended camera range, road surface depth and help-history ordering. -#include "prime/haven.h" -#include "patches/patches.h" +#include "game/haven.h" +#include "features/features.h" #include #include diff --git a/mods/src/patches/parts/hotkeys.cc b/src/mod/features/hotkeys.cc similarity index 98% rename from mods/src/patches/parts/hotkeys.cc rename to src/mod/features/hotkeys.cc index 461310c2d..5bec8490f 100644 --- a/mods/src/patches/parts/hotkeys.cc +++ b/src/mod/features/hotkeys.cc @@ -3,11 +3,11 @@ // shortcuts live with their features: screens.cc, fleet_actions.cc, chat.cc, camera.cc. #include "config.h" -#include "patches/patches.h" -#include "patches/shortcuts.h" +#include "features/features.h" +#include "shortcuts.h" -#include "prime/Hub.h" -#include "prime/ui.h" +#include "game/app.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/instant_warp.cc b/src/mod/features/instant_warp.cc similarity index 97% rename from mods/src/patches/parts/instant_warp.cc rename to src/mod/features/instant_warp.cc index 4236755d3..5e6bc333d 100644 --- a/mods/src/patches/parts/instant_warp.cc +++ b/src/mod/features/instant_warp.cc @@ -2,13 +2,13 @@ // previews that answer on the system card's visit button, and the shortcut that cycles the default. #include "config.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/fleet.h" -#include "prime/navigation.h" -#include "prime/ui.h" -#include "prime/viewers.h" +#include "game/fleet.h" +#include "game/navigation.h" +#include "game/ui.h" +#include "game/viewers.h" #include #include diff --git a/mods/src/patches/parts/interior_zoom.cc b/src/mod/features/interior_zoom.cc similarity index 98% rename from mods/src/patches/parts/interior_zoom.cc rename to src/mod/features/interior_zoom.cc index 0733cfe6e..629068b51 100644 --- a/mods/src/patches/parts/interior_zoom.cc +++ b/src/mod/features/interior_zoom.cc @@ -1,10 +1,10 @@ #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/navigation.h" +#include "game/navigation.h" #include -#include +#include #include diff --git a/mods/src/patches/parts/shortcut_hints.cc b/src/mod/features/keybind_badges.cc similarity index 97% rename from mods/src/patches/parts/shortcut_hints.cc rename to src/mod/features/keybind_badges.cc index 87e75726e..4ecbc099f 100644 --- a/mods/src/patches/parts/shortcut_hints.cc +++ b/src/mod/features/keybind_badges.cc @@ -3,14 +3,14 @@ // action that replaces it. #include "config.h" -#include "patches/patches.h" -#include "patches/ship_shortcut_hint.h" -#include "patches/shortcuts.h" -#include "prime/fleet.h" -#include "str_utils.h" +#include "features/features.h" +#include "features/ship_shortcut_hint.h" +#include "game/fleet.h" +#include "shortcuts.h" +#include "text.h" #include -#include "prime/ui.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/loading_screen.cc b/src/mod/features/loading_screens.cc similarity index 99% rename from mods/src/patches/parts/loading_screen.cc rename to src/mod/features/loading_screens.cc index 905adb8b4..19a917adf 100644 --- a/mods/src/patches/parts/loading_screen.cc +++ b/src/mod/features/loading_screens.cc @@ -2,11 +2,11 @@ // loading tips. They share the embedded images and reset together when the game reloads. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" #include "version.h" -#include "prime/loading.h" -#include "prime/ui.h" +#include "game/loading.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/daily_faction_bulk_claim.cc b/src/mod/features/missions.cc similarity index 98% rename from mods/src/patches/parts/daily_faction_bulk_claim.cc rename to src/mod/features/missions.cc index 30a0742f0..c2769f5d0 100644 --- a/mods/src/patches/parts/daily_faction_bulk_claim.cc +++ b/src/mod/features/missions.cc @@ -3,11 +3,11 @@ // the chosen factions' dailies, show only their icons next to the toggle, and can switch the toggle on. #include "config.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/hud.h" -#include "prime/missions.h" +#include "game/hud.h" +#include "game/missions.h" #include #include diff --git a/mods/src/patches/parts/notification_audio.cc b/src/mod/features/notification_audio.cc similarity index 98% rename from mods/src/patches/parts/notification_audio.cc rename to src/mod/features/notification_audio.cc index 9141272af..968ab6e47 100644 --- a/mods/src/patches/parts/notification_audio.cc +++ b/src/mod/features/notification_audio.cc @@ -1,6 +1,6 @@ // Named notification cues and their generated mono PCM WAV data. -#include "patches/parts/notification_audio.h" -#include "str_utils.h" +#include "features/notification_audio.h" +#include "text.h" #include diff --git a/mods/src/patches/parts/notification_audio.h b/src/mod/features/notification_audio.h similarity index 100% rename from mods/src/patches/parts/notification_audio.h rename to src/mod/features/notification_audio.h diff --git a/mods/src/patches/parts/notification_audio_mac.mm b/src/mod/features/notification_audio_mac.mm similarity index 100% rename from mods/src/patches/parts/notification_audio_mac.mm rename to src/mod/features/notification_audio_mac.mm diff --git a/mods/src/patches/parts/officer_sort.cc b/src/mod/features/officers.cc similarity index 98% rename from mods/src/patches/parts/officer_sort.cc rename to src/mod/features/officers.cc index 12369bd1f..b28219dac 100644 --- a/mods/src/patches/parts/officer_sort.cc +++ b/src/mod/features/officers.cc @@ -2,10 +2,10 @@ // and the officer assignment screen, by appending it to the sort menus after the game builds them. #include "config.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/officers.h" +#include "game/officers.h" #include #include diff --git a/mods/src/patches/parts/pinned_ship_click.cc b/src/mod/features/pinned_ship_click.cc similarity index 97% rename from mods/src/patches/parts/pinned_ship_click.cc rename to src/mod/features/pinned_ship_click.cc index 1e7d816da..0f25c2d2e 100644 --- a/mods/src/patches/parts/pinned_ship_click.cc +++ b/src/mod/features/pinned_ship_click.cc @@ -1,12 +1,12 @@ #include "config.h" +#include "features/features.h" #include "file.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "text.h" +#include "game/fleet.h" +#include "game/ui.h" #include "pinned_ship_click.h" -#include "prime/fleet.h" -#include "prime/ui.h" #include "ship_tile_click.h" #include diff --git a/mods/src/patches/parts/pinned_ship_click.h b/src/mod/features/pinned_ship_click.h similarity index 73% rename from mods/src/patches/parts/pinned_ship_click.h rename to src/mod/features/pinned_ship_click.h index 185a36acf..361bddaa8 100644 --- a/mods/src/patches/parts/pinned_ship_click.h +++ b/src/mod/features/pinned_ship_click.h @@ -1,5 +1,5 @@ #pragma once -#include "prime/fleet.h" +#include "game/fleet.h" void PinShipClickOnTileClicked(FleetPlayerData* ship); diff --git a/mods/src/patches/parts/queue_address_guard.cc b/src/mod/features/queue_address_guard.cc similarity index 97% rename from mods/src/patches/parts/queue_address_guard.cc rename to src/mod/features/queue_address_guard.cc index 5cfaec4eb..868da242a 100644 --- a/mods/src/patches/parts/queue_address_guard.cc +++ b/src/mod/features/queue_address_guard.cc @@ -1,6 +1,6 @@ -#include "patches/patches.h" -#include "patches/queue_address_guard_policy.h" -#include "prime/queues.h" +#include "features/features.h" +#include "features/queue_address_guard_policy.h" +#include "game/queues.h" #include #include #include diff --git a/mods/src/patches/queue_address_guard_policy.h b/src/mod/features/queue_address_guard_policy.h similarity index 100% rename from mods/src/patches/queue_address_guard_policy.h rename to src/mod/features/queue_address_guard_policy.h diff --git a/mods/src/patches/parts/reveal_confirmation.cc b/src/mod/features/reveal_confirmation.cc similarity index 95% rename from mods/src/patches/parts/reveal_confirmation.cc rename to src/mod/features/reveal_confirmation.cc index 34b1b9dd7..b21d73cb6 100644 --- a/mods/src/patches/parts/reveal_confirmation.cc +++ b/src/mod/features/reveal_confirmation.cc @@ -1,10 +1,10 @@ #include "config.h" -#include "patches/patches.h" +#include "features/features.h" #include -#include "prime/fleet.h" -#include "prime/ui.h" +#include "game/fleet.h" +#include "game/ui.h" #include diff --git a/mods/src/patches/parts/screens.cc b/src/mod/features/screens.cc similarity index 98% rename from mods/src/patches/parts/screens.cc rename to src/mod/features/screens.cc index 9221ff1ff..a58408b49 100644 --- a/mods/src/patches/parts/screens.cc +++ b/src/mod/features/screens.cc @@ -3,15 +3,15 @@ // focusing the search box. #include "config.h" -#include "patches/patches.h" -#include "patches/shortcuts.h" - -#include "prime/Hub.h" -#include "prime/fleet.h" -#include "prime/inventory.h" -#include "prime/navigation.h" -#include "prime/officers.h" -#include "prime/ui.h" +#include "features/features.h" +#include "shortcuts.h" + +#include "game/app.h" +#include "game/fleet.h" +#include "game/inventory.h" +#include "game/navigation.h" +#include "game/officers.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/ship_shortcut_hint.h b/src/mod/features/ship_shortcut_hint.h similarity index 100% rename from mods/src/patches/ship_shortcut_hint.h rename to src/mod/features/ship_shortcut_hint.h diff --git a/mods/src/patches/parts/ship_tile_click.cc b/src/mod/features/ship_tile_click.cc similarity index 97% rename from mods/src/patches/parts/ship_tile_click.cc rename to src/mod/features/ship_tile_click.cc index ca1643305..540af2963 100644 --- a/mods/src/patches/parts/ship_tile_click.cc +++ b/src/mod/features/ship_tile_click.cc @@ -3,8 +3,8 @@ #include "config.h" #include "double_click_assign_ship.h" +#include "game/fleet.h" #include "pinned_ship_click.h" -#include "prime/fleet.h" #include diff --git a/mods/src/patches/parts/ship_tile_click.h b/src/mod/features/ship_tile_click.h similarity index 100% rename from mods/src/patches/parts/ship_tile_click.h rename to src/mod/features/ship_tile_click.h diff --git a/mods/src/patches/parts/open_bulk_claim_gifts.cc b/src/mod/features/shop.cc similarity index 99% rename from mods/src/patches/parts/open_bulk_claim_gifts.cc rename to src/mod/features/shop.cc index dd87acfe8..87d737a47 100644 --- a/mods/src/patches/parts/open_bulk_claim_gifts.cc +++ b/src/mod/features/shop.cc @@ -3,9 +3,9 @@ // disable_exchange_all on the artifact shards popup. #include "config.h" -#include "patches/patches.h" +#include "features/features.h" -#include "prime/inventory.h" +#include "game/inventory.h" #include #include diff --git a/mods/src/patches/parts/thin_queue_protection.cc b/src/mod/features/thin_queue_protection.cc similarity index 98% rename from mods/src/patches/parts/thin_queue_protection.cc rename to src/mod/features/thin_queue_protection.cc index 705cd356a..41766efe1 100644 --- a/mods/src/patches/parts/thin_queue_protection.cc +++ b/src/mod/features/thin_queue_protection.cc @@ -1,10 +1,10 @@ -#include "patches/action_queue_guard_policy.h" -#include "patches/patches.h" +#include "features/action_queue_guard_policy.h" +#include "features/features.h" #include // Port of the active v2.1.0-guffa.10 guard, not the dormant completion repair. // Shared 64-bit managed layout; incompatible runtime contracts leave the feature unavailable. -#include "prime/queues.h" +#include "game/queues.h" #include #include #include diff --git a/mods/src/patches/parts/toast_text.h b/src/mod/features/toast_text.h similarity index 100% rename from mods/src/patches/parts/toast_text.h rename to src/mod/features/toast_text.h diff --git a/mods/src/patches/parts/toasts.cc b/src/mod/features/toasts.cc similarity index 99% rename from mods/src/patches/parts/toasts.cc rename to src/mod/features/toasts.cc index 36e8265ee..d4e1655e0 100644 --- a/mods/src/patches/parts/toasts.cc +++ b/src/mod/features/toasts.cc @@ -2,13 +2,13 @@ // Windows notifications, with a readable body for battle results. #include "config.h" -#include "patches/patches.h" -#include "patches/parts/toast_text.h" -#include "str_utils.h" +#include "features/features.h" +#include "features/toast_text.h" +#include "text.h" -#include "prime/fleet.h" -#include "prime/server.h" -#include "prime/ui.h" +#include "game/fleet.h" +#include "game/server.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/tracked_objects.cc b/src/mod/features/tracked_objects.cc similarity index 86% rename from mods/src/patches/parts/tracked_objects.cc rename to src/mod/features/tracked_objects.cc index a5d7b6f44..c1bab45bd 100644 --- a/mods/src/patches/parts/tracked_objects.cc +++ b/src/mod/features/tracked_objects.cc @@ -1,15 +1,15 @@ // The game screens and widgets the shortcuts and labels look up through unity::Newest and unity::Instances. A class // left out here is never found there. -#include "patches/patches.h" +#include "features/features.h" -#include "prime/chat.h" -#include "prime/fleet.h" -#include "prime/inventory.h" -#include "prime/navigation.h" -#include "prime/officers.h" -#include "prime/ui.h" -#include "prime/viewers.h" +#include "game/chat.h" +#include "game/fleet.h" +#include "game/inventory.h" +#include "game/navigation.h" +#include "game/officers.h" +#include "game/ui.h" +#include "game/viewers.h" #include diff --git a/mods/src/patches/parts/ui_scale.cc b/src/mod/features/ui_scale.cc similarity index 97% rename from mods/src/patches/parts/ui_scale.cc rename to src/mod/features/ui_scale.cc index 0a91104ca..bdf800a9b 100644 --- a/mods/src/patches/parts/ui_scale.cc +++ b/src/mod/features/ui_scale.cc @@ -1,11 +1,11 @@ // UI, object viewer, and system ship scaling, and the hotkeys that adjust them at runtime. #include "config.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/fleet.h" -#include "prime/ui.h" +#include "game/fleet.h" +#include "game/ui.h" #include #include diff --git a/mods/src/patches/parts/window.cc b/src/mod/features/window.cc similarity index 98% rename from mods/src/patches/parts/window.cc rename to src/mod/features/window.cc index ccafe2c87..f7017b1d4 100644 --- a/mods/src/patches/parts/window.cc +++ b/src/mod/features/window.cc @@ -1,12 +1,12 @@ // The game window on Windows: free resizing, the -ccm profile in the title bar, allow_cursor, and the monitor's DPI // scale. -#include "patches/patches.h" +#include "features/features.h" #if _WIN32 #include "config.h" #include "file.h" -#include "prime/Hub.h" +#include "game/app.h" #include #include diff --git a/mods/src/file.cc b/src/mod/file.cc similarity index 100% rename from mods/src/file.cc rename to src/mod/file.cc diff --git a/mods/src/file.h b/src/mod/file.h similarity index 100% rename from mods/src/file.h rename to src/mod/file.h diff --git a/mods/src/file_macos.mm b/src/mod/file_macos.mm similarity index 100% rename from mods/src/file_macos.mm rename to src/mod/file_macos.mm diff --git a/mods/src/prime/Hub.h b/src/mod/game/app.h similarity index 100% rename from mods/src/prime/Hub.h rename to src/mod/game/app.h diff --git a/mods/src/prime/chat.h b/src/mod/game/chat.h similarity index 99% rename from mods/src/prime/chat.h rename to src/mod/game/chat.h index c1b3d58eb..e28338d9f 100644 --- a/mods/src/prime/chat.h +++ b/src/mod/game/chat.h @@ -2,7 +2,7 @@ // Chat manager and chat view controllers. -#include "prime/ui.h" +#include "ui.h" #include diff --git a/mods/src/prime/fleet.h b/src/mod/game/fleet.h similarity index 99% rename from mods/src/prime/fleet.h rename to src/mod/game/fleet.h index 7c8ef6aeb..fe5084a80 100644 --- a/mods/src/prime/fleet.h +++ b/src/mod/game/fleet.h @@ -3,9 +3,9 @@ // Player fleets and ships: fleet data and managers, the fleet bar, the action queue, and the ship management screens // and dock. -#include "prime/Hub.h" -#include "prime/server.h" -#include "prime/ui.h" +#include "app.h" +#include "server.h" +#include "ui.h" #include diff --git a/mods/src/prime/haven.h b/src/mod/game/haven.h similarity index 99% rename from mods/src/prime/haven.h rename to src/mod/game/haven.h index 4513e750f..749ca1334 100644 --- a/mods/src/prime/haven.h +++ b/src/mod/game/haven.h @@ -1,7 +1,7 @@ #pragma once // Haven's camera providers, blend frames and help history. -#include "prime/ui.h" +#include "ui.h" #include #include diff --git a/mods/src/prime/hud.h b/src/mod/game/hud.h similarity index 99% rename from mods/src/prime/hud.h rename to src/mod/game/hud.h index 4639af05a..f9df1e4e8 100644 --- a/mods/src/prime/hud.h +++ b/src/mod/game/hud.h @@ -3,7 +3,7 @@ // The HUD around the space views: the mission buttons, the faction and system panel, the alliance drawer, and the // galactic anomaly the viewed system may have. -#include "prime/ui.h" +#include "ui.h" #include diff --git a/mods/src/prime/inventory.h b/src/mod/game/inventory.h similarity index 99% rename from mods/src/prime/inventory.h rename to src/mod/game/inventory.h index 215be81c3..0af6fd59e 100644 --- a/mods/src/prime/inventory.h +++ b/src/mod/game/inventory.h @@ -2,8 +2,8 @@ // The inventory, its use and purchase popups, and the shop and gift screens. -#include "prime/server.h" -#include "prime/ui.h" +#include "server.h" +#include "ui.h" #include diff --git a/mods/src/prime/loading.h b/src/mod/game/loading.h similarity index 98% rename from mods/src/prime/loading.h rename to src/mod/game/loading.h index 29d6b175d..a8c213aa1 100644 --- a/mods/src/prime/loading.h +++ b/src/mod/game/loading.h @@ -2,7 +2,7 @@ // The login screen, the transition screen shown between sections, and their loading tips and slide shows. -#include "prime/ui.h" +#include "ui.h" #include diff --git a/mods/src/prime/missions.h b/src/mod/game/missions.h similarity index 96% rename from mods/src/prime/missions.h rename to src/mod/game/missions.h index 062d1c8ef..a9ea37bca 100644 --- a/mods/src/prime/missions.h +++ b/src/mod/game/missions.h @@ -2,7 +2,7 @@ // The missions screen and its daily goals. -#include "prime/server.h" +#include "server.h" #include #include diff --git a/mods/src/patches/native_hook_extent.cc b/src/mod/game/native_hook_extent.cc similarity index 99% rename from mods/src/patches/native_hook_extent.cc rename to src/mod/game/native_hook_extent.cc index f17e3fe77..aeddfd088 100644 --- a/mods/src/patches/native_hook_extent.cc +++ b/src/mod/game/native_hook_extent.cc @@ -1,4 +1,4 @@ -#include "patches/native_hook_extent.h" +#include "game/native_hook_extent.h" #if __APPLE__ #include diff --git a/mods/src/patches/native_hook_extent.h b/src/mod/game/native_hook_extent.h similarity index 100% rename from mods/src/patches/native_hook_extent.h rename to src/mod/game/native_hook_extent.h diff --git a/mods/src/prime/navigation.h b/src/mod/game/navigation.h similarity index 99% rename from mods/src/prime/navigation.h rename to src/mod/game/navigation.h index 7a4efb1f1..bbe2f06e4 100644 --- a/mods/src/prime/navigation.h +++ b/src/mod/game/navigation.h @@ -2,9 +2,9 @@ // System and galaxy navigation: camera zoom and pan, LOD, sections, bookmarks, course prompts. -#include "prime/Hub.h" -#include "prime/fleet.h" -#include "prime/ui.h" +#include "app.h" +#include "fleet.h" +#include "ui.h" #include diff --git a/mods/src/prime/officers.h b/src/mod/game/officers.h similarity index 99% rename from mods/src/prime/officers.h rename to src/mod/game/officers.h index fa390e9e5..168c233f4 100644 --- a/mods/src/prime/officers.h +++ b/src/mod/game/officers.h @@ -2,7 +2,7 @@ // The officer roster and officer assignment screens, and the sort options their lists offer. -#include "prime/ui.h" +#include "ui.h" #include diff --git a/mods/src/prime/proto/Digit.Client.Localization.proto b/src/mod/game/proto/Digit.Client.Localization.proto similarity index 100% rename from mods/src/prime/proto/Digit.Client.Localization.proto rename to src/mod/game/proto/Digit.Client.Localization.proto diff --git a/mods/src/prime/proto/Digit.Client.SaveSystem.proto b/src/mod/game/proto/Digit.Client.SaveSystem.proto similarity index 100% rename from mods/src/prime/proto/Digit.Client.SaveSystem.proto rename to src/mod/game/proto/Digit.Client.SaveSystem.proto diff --git a/mods/src/prime/proto/Digit.Engine.Attributes.proto b/src/mod/game/proto/Digit.Engine.Attributes.proto similarity index 100% rename from mods/src/prime/proto/Digit.Engine.Attributes.proto rename to src/mod/game/proto/Digit.Engine.Attributes.proto diff --git a/mods/src/prime/proto/Digit.Networking.Core.proto b/src/mod/game/proto/Digit.Networking.Core.proto similarity index 100% rename from mods/src/prime/proto/Digit.Networking.Core.proto rename to src/mod/game/proto/Digit.Networking.Core.proto diff --git a/mods/src/prime/proto/Digit.Platform.Models.proto b/src/mod/game/proto/Digit.Platform.Models.proto similarity index 100% rename from mods/src/prime/proto/Digit.Platform.Models.proto rename to src/mod/game/proto/Digit.Platform.Models.proto diff --git a/mods/src/prime/proto/Digit.Prime.Bookmarks.proto b/src/mod/game/proto/Digit.Prime.Bookmarks.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.Bookmarks.proto rename to src/mod/game/proto/Digit.Prime.Bookmarks.proto diff --git a/mods/src/prime/proto/Digit.Prime.Inventories.proto b/src/mod/game/proto/Digit.Prime.Inventories.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.Inventories.proto rename to src/mod/game/proto/Digit.Prime.Inventories.proto diff --git a/mods/src/prime/proto/Digit.Prime.Missions.proto b/src/mod/game/proto/Digit.Prime.Missions.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.Missions.proto rename to src/mod/game/proto/Digit.Prime.Missions.proto diff --git a/mods/src/prime/proto/Digit.Prime.NewFlags.proto b/src/mod/game/proto/Digit.Prime.NewFlags.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.NewFlags.proto rename to src/mod/game/proto/Digit.Prime.NewFlags.proto diff --git a/mods/src/prime/proto/Digit.Prime.PersistentPrefs.proto b/src/mod/game/proto/Digit.Prime.PersistentPrefs.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.PersistentPrefs.proto rename to src/mod/game/proto/Digit.Prime.PersistentPrefs.proto diff --git a/mods/src/prime/proto/Digit.Prime.TerritoryCapture.proto b/src/mod/game/proto/Digit.Prime.TerritoryCapture.proto similarity index 100% rename from mods/src/prime/proto/Digit.Prime.TerritoryCapture.proto rename to src/mod/game/proto/Digit.Prime.TerritoryCapture.proto diff --git a/mods/src/prime/proto/Digit.PrimePlatform.Content.proto b/src/mod/game/proto/Digit.PrimePlatform.Content.proto similarity index 100% rename from mods/src/prime/proto/Digit.PrimePlatform.Content.proto rename to src/mod/game/proto/Digit.PrimePlatform.Content.proto diff --git a/mods/src/prime/proto/Digit.PrimePlatform.Models.proto b/src/mod/game/proto/Digit.PrimePlatform.Models.proto similarity index 100% rename from mods/src/prime/proto/Digit.PrimePlatform.Models.proto rename to src/mod/game/proto/Digit.PrimePlatform.Models.proto diff --git a/mods/src/prime/proto/Digit.PrimeServer.Models.proto b/src/mod/game/proto/Digit.PrimeServer.Models.proto similarity index 100% rename from mods/src/prime/proto/Digit.PrimeServer.Models.proto rename to src/mod/game/proto/Digit.PrimeServer.Models.proto diff --git a/mods/src/prime/proto/stfc.proto b/src/mod/game/proto/stfc.proto similarity index 100% rename from mods/src/prime/proto/stfc.proto rename to src/mod/game/proto/stfc.proto diff --git a/mods/src/prime/proto/stfc.sync.proto b/src/mod/game/proto/stfc.sync.proto similarity index 100% rename from mods/src/prime/proto/stfc.sync.proto rename to src/mod/game/proto/stfc.sync.proto diff --git a/mods/src/prime/queues.h b/src/mod/game/queues.h similarity index 99% rename from mods/src/prime/queues.h rename to src/mod/game/queues.h index fb0e76d7c..69dd26fd6 100644 --- a/mods/src/prime/queues.h +++ b/src/mod/game/queues.h @@ -1,8 +1,8 @@ #pragma once // Checked queue metadata and storage access. Unknown layouts retain native behavior. -#include "patches/action_queue_guard_policy.h" -#include "patches/parts/action_queue.h" -#include "patches/queue_address_guard_policy.h" +#include "features/action_queue.h" +#include "features/action_queue_guard_policy.h" +#include "features/queue_address_guard_policy.h" #include #include #include diff --git a/mods/src/prime/server.h b/src/mod/game/server.h similarity index 100% rename from mods/src/prime/server.h rename to src/mod/game/server.h diff --git a/mods/src/prime/ui.h b/src/mod/game/ui.h similarity index 100% rename from mods/src/prime/ui.h rename to src/mod/game/ui.h diff --git a/mods/src/prime/viewers.h b/src/mod/game/viewers.h similarity index 98% rename from mods/src/prime/viewers.h rename to src/mod/game/viewers.h index 439d4e5cb..f0b7fdb47 100644 --- a/mods/src/prime/viewers.h +++ b/src/mod/game/viewers.h @@ -2,9 +2,9 @@ // Object viewer cards shown for targets in space, and their scan/engage buttons. -#include "prime/fleet.h" -#include "prime/navigation.h" -#include "prime/ui.h" +#include "fleet.h" +#include "navigation.h" +#include "ui.h" #include diff --git a/mods/src/patches/patches.cc b/src/mod/mod.cc similarity index 99% rename from mods/src/patches/patches.cc rename to src/mod/mod.cc index 2a7ba3bf3..bd312ba52 100644 --- a/mods/src/patches/patches.cc +++ b/src/mod/mod.cc @@ -1,11 +1,11 @@ #include "mod.h" #include "config.h" -#include "patches/patches.h" +#include "features/features.h" #include "file.h" #include "version.h" -#include "prime/ui.h" +#include "game/ui.h" #include #include diff --git a/mods/src/mod.h b/src/mod/mod.h similarity index 100% rename from mods/src/mod.h rename to src/mod/mod.h diff --git a/mods/src/patches/parts/embedded_cc_logo_image.h b/src/mod/patches/parts/embedded_cc_logo_image.h similarity index 100% rename from mods/src/patches/parts/embedded_cc_logo_image.h rename to src/mod/patches/parts/embedded_cc_logo_image.h diff --git a/mods/src/patches/parts/embedded_loading_image.h b/src/mod/patches/parts/embedded_loading_image.h similarity index 100% rename from mods/src/patches/parts/embedded_loading_image.h rename to src/mod/patches/parts/embedded_loading_image.h diff --git a/mods/src/patches/parts/embedded_logo_image.h b/src/mod/patches/parts/embedded_logo_image.h similarity index 100% rename from mods/src/patches/parts/embedded_logo_image.h rename to src/mod/patches/parts/embedded_logo_image.h diff --git a/mods/src/patches/shortcuts.cc b/src/mod/shortcuts.cc similarity index 99% rename from mods/src/patches/shortcuts.cc rename to src/mod/shortcuts.cc index cc80010d0..c91826eff 100644 --- a/mods/src/patches/shortcuts.cc +++ b/src/mod/shortcuts.cc @@ -1,6 +1,6 @@ -#include "patches/shortcuts.h" +#include "shortcuts.h" -#include "str_utils.h" +#include "text.h" #include #include diff --git a/mods/src/shortcuts.def b/src/mod/shortcuts.def similarity index 100% rename from mods/src/shortcuts.def rename to src/mod/shortcuts.def diff --git a/mods/src/patches/shortcuts.h b/src/mod/shortcuts.h similarity index 100% rename from mods/src/patches/shortcuts.h rename to src/mod/shortcuts.h diff --git a/mods/src/patches/parts/sync/battlelogs.cc b/src/mod/sync/battlelogs.cc similarity index 99% rename from mods/src/patches/parts/sync/battlelogs.cc rename to src/mod/sync/battlelogs.cc index d6e3a271f..cc3cf35c3 100644 --- a/mods/src/patches/parts/sync/battlelogs.cc +++ b/src/mod/sync/battlelogs.cc @@ -1,7 +1,7 @@ // Battle logs: the game only sends battle headers, so each new battle's journal is fetched from the game server // with the participants' player and alliance names resolved, then uploaded. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" #include "version.h" #include diff --git a/mods/src/patches/fleet_watch.cc b/src/mod/sync/fleet_watch.cc similarity index 99% rename from mods/src/patches/fleet_watch.cc rename to src/mod/sync/fleet_watch.cc index 6acd07c4f..fd0f83f2e 100644 --- a/mods/src/patches/fleet_watch.cc +++ b/src/mod/sync/fleet_watch.cc @@ -1,6 +1,6 @@ -#include "patches/fleet_watch.h" +#include "sync/fleet_watch.h" -#include +#include "game/fleet.h" #include diff --git a/mods/src/patches/fleet_watch.h b/src/mod/sync/fleet_watch.h similarity index 98% rename from mods/src/patches/fleet_watch.h rename to src/mod/sync/fleet_watch.h index fd01b337b..a137c9a4a 100644 --- a/mods/src/patches/fleet_watch.h +++ b/src/mod/sync/fleet_watch.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "game/fleet.h" namespace fleet_watch { diff --git a/mods/src/patches/parts/sync/fleets.cc b/src/mod/sync/fleets.cc similarity index 99% rename from mods/src/patches/parts/sync/fleets.cc rename to src/mod/sync/fleets.cc index 046c4a32e..e0d8b32a7 100644 --- a/mods/src/patches/parts/sync/fleets.cc +++ b/src/mod/sync/fleets.cc @@ -2,11 +2,11 @@ // as a first sync, and late re-reads after server updates. Everything that reads the game runs on the game thread // and only publishes; uploads stay on the target workers. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" -#include "patches/fleet_watch.h" +#include "sync/fleet_watch.h" -#include +#include "game/fleet.h" #include #include diff --git a/mods/src/patches/parts/sync/records.cc b/src/mod/sync/records.cc similarity index 99% rename from mods/src/patches/parts/sync/records.cc rename to src/mod/sync/records.cc index 90f785296..ab41856a1 100644 --- a/mods/src/patches/parts/sync/records.cc +++ b/src/mod/sync/records.cc @@ -1,6 +1,6 @@ // Game responses become canonical wire records. Delivery owns comparison, removal and initial-sync state. -#include "patches/parts/sync/sync.h" -#include "str_utils.h" +#include "sync/sync.h" +#include "text.h" #include #include #include diff --git a/mods/src/patches/parts/sync/state.cc b/src/mod/sync/state.cc similarity index 99% rename from mods/src/patches/parts/sync/state.cc rename to src/mod/sync/state.cc index b93db361c..eb45c58b9 100644 --- a/mods/src/patches/parts/sync/state.cc +++ b/src/mod/sync/state.cc @@ -1,5 +1,5 @@ // Canonical record state and per-target acknowledgement, without threads or HTTP. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" #include namespace data_sync diff --git a/mods/src/patches/parts/sync/sync.cc b/src/mod/sync/sync.cc similarity index 98% rename from mods/src/patches/parts/sync/sync.cc rename to src/mod/sync/sync.cc index 79fe63ab5..f1e3ae8d1 100644 --- a/mods/src/patches/parts/sync/sync.cc +++ b/src/mod/sync/sync.cc @@ -2,13 +2,13 @@ // which turns them into records for the sync targets (records.cc), uploaded by upload.cc. It also captures the game's // session for the battle-log requests. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" -#include "patches/patches.h" -#include "str_utils.h" +#include "features/features.h" +#include "text.h" -#include "prime/Hub.h" -#include "prime/server.h" +#include "game/app.h" +#include "game/server.h" #include #include diff --git a/mods/src/patches/parts/sync/sync.h b/src/mod/sync/sync.h similarity index 99% rename from mods/src/patches/parts/sync/sync.h rename to src/mod/sync/sync.h index faaf0ef1f..5013b2500 100644 --- a/mods/src/patches/parts/sync/sync.h +++ b/src/mod/sync/sync.h @@ -5,7 +5,7 @@ #include "config.h" -#include "prime/server.h" +#include "game/server.h" #include #include diff --git a/mods/src/patches/parts/sync/upload.cc b/src/mod/sync/upload.cc similarity index 99% rename from mods/src/patches/parts/sync/upload.cc rename to src/mod/sync/upload.cc index e5b8dcac3..f6a1ea08a 100644 --- a/mods/src/patches/parts/sync/upload.cc +++ b/src/mod/sync/upload.cc @@ -1,5 +1,5 @@ // One owner for canonical records, target cursors and session identity. HTTP runs outside its lock. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" #include "version.h" #include #include diff --git a/mods/src/str_utils.h b/src/mod/text.h similarity index 100% rename from mods/src/str_utils.h rename to src/mod/text.h diff --git a/mods/src/version.h b/src/mod/version.h similarity index 100% rename from mods/src/version.h rename to src/mod/version.h diff --git a/mods/xmake.lua b/src/mod/xmake.lua similarity index 92% rename from mods/xmake.lua rename to src/mod/xmake.lua index 8d81cd1b8..c3e9707b8 100644 --- a/mods/xmake.lua +++ b/src/mod/xmake.lua @@ -55,8 +55,8 @@ do ) end - local assets = path.join(target:scriptdir(), "../assets") - local outdir = path.join(target:scriptdir(), "src/features") + local assets = path.join(target:scriptdir(), "../../assets") + local outdir = path.join(target:scriptdir(), "features") local loading = get_config("bg_image") if not loading or loading == "" then @@ -88,11 +88,11 @@ do if is_plat("windows") and os.getenv("STFC_MSVC_SCCACHE") == "1" then add_rules("stfc.cxx.sccache", {override = true}) end - add_files("src/**.cc") + add_files("**.cc") add_deps("unity", {public = true}) add_deps("il2cpp", {public = true}) - add_headerfiles("src/**.h") - add_includedirs("src", { public = true }) + add_headerfiles("**.h") + add_includedirs(".", { public = true }) -- Packages add_packages("spud", "nlohmann_json", "protobuf", "libil2cpp", "toml++", "spdlog", "libcurl", "capstone", "cpr") @@ -101,7 +101,7 @@ do else add_rules("protobuf.cpp") end - add_files("src/prime/proto/*.proto") + add_files("game/proto/*.proto") set_exceptions("cxx") add_defines("NOMINMAX") @@ -122,7 +122,7 @@ do elseif is_plat("macosx") then add_cxflags("-fms-extensions") -- Add Objective-C++ source - add_files("src/**.mm") + add_files("**.mm") -- Link Cocoa framework add_frameworks("Cocoa") end diff --git a/macos-dylib/src/main.cc b/src/platform/macos/dylib/main.cc similarity index 100% rename from macos-dylib/src/main.cc rename to src/platform/macos/dylib/main.cc diff --git a/macos-dylib/xmake.lua b/src/platform/macos/dylib/xmake.lua similarity index 85% rename from macos-dylib/xmake.lua rename to src/platform/macos/dylib/xmake.lua index 5efca0bd6..e3395bcc9 100644 --- a/macos-dylib/xmake.lua +++ b/src/platform/macos/dylib/xmake.lua @@ -1,7 +1,7 @@ target("stfc-community-mod") do set_kind("shared") - add_files("src/*.cc") + add_files("*.cc") add_deps("mods") set_exceptions("cxx") set_policy("build.optimization.lto", true) diff --git a/macos-loader/src/library_dir.mm b/src/platform/macos/loader/library_dir.mm similarity index 100% rename from macos-loader/src/library_dir.mm rename to src/platform/macos/loader/library_dir.mm diff --git a/macos-loader/src/main.cc b/src/platform/macos/loader/main.cc similarity index 100% rename from macos-loader/src/main.cc rename to src/platform/macos/loader/main.cc diff --git a/macos-loader/xmake.lua b/src/platform/macos/loader/xmake.lua similarity index 61% rename from macos-loader/xmake.lua rename to src/platform/macos/loader/xmake.lua index ef00a84a8..36b25b353 100644 --- a/macos-loader/xmake.lua +++ b/src/platform/macos/loader/xmake.lua @@ -1,9 +1,9 @@ target("stfc-community-mod-loader") do set_kind("binary") - add_files("src/*.cc") - add_files("src/*.mm") - add_headerfiles("src/*.h") + add_files("*.cc") + add_files("*.mm") + add_headerfiles("*.h") add_frameworks("Foundation") add_packages("inifile-cpp") end diff --git a/win-proxy-dll/src/main.cc b/src/platform/windows/main.cc similarity index 100% rename from win-proxy-dll/src/main.cc rename to src/platform/windows/main.cc diff --git a/win-proxy-dll/src/version.cc b/src/platform/windows/version.cc similarity index 100% rename from win-proxy-dll/src/version.cc rename to src/platform/windows/version.cc diff --git a/win-proxy-dll/src/version.def b/src/platform/windows/version.def similarity index 100% rename from win-proxy-dll/src/version.def rename to src/platform/windows/version.def diff --git a/win-proxy-dll/src/version.rc b/src/platform/windows/version.rc similarity index 100% rename from win-proxy-dll/src/version.rc rename to src/platform/windows/version.rc diff --git a/win-proxy-dll/xmake.lua b/src/platform/windows/xmake.lua similarity index 81% rename from win-proxy-dll/xmake.lua rename to src/platform/windows/xmake.lua index f41d62e52..d051770a3 100644 --- a/win-proxy-dll/xmake.lua +++ b/src/platform/windows/xmake.lua @@ -2,9 +2,9 @@ target("stfc-community-mod") do set_kind("shared") add_rules("stfc.identity") - add_files("src/*.cc") - add_files("src/*.rc") - add_files("src/version.def") + add_files("*.cc") + add_files("*.rc") + add_files("version.def") add_shflags("/DEF:src/version.def") add_deps("mods") set_exceptions("cxx") diff --git a/tests/action_queue.cc b/tests/action_queue.cc index 39028fb27..7dcafcf13 100644 --- a/tests/action_queue.cc +++ b/tests/action_queue.cc @@ -1,4 +1,4 @@ -#include "patches/parts/action_queue.h" +#include "features/action_queue.h" #include #include #include diff --git a/tests/mod_logic.cc b/tests/mod_logic.cc index b3623fa83..9bcd9f6cb 100644 --- a/tests/mod_logic.cc +++ b/tests/mod_logic.cc @@ -1,10 +1,10 @@ // Settings parsing and shortcut matching, run against production code with Unity input replaced by a fake. #include "config.h" -#include "patches/chat_startup.h" -#include "patches/parts/toast_text.h" -#include "patches/ship_shortcut_hint.h" -#include "patches/shortcuts.h" -#include "str_utils.h" +#include "features/chat_startup.h" +#include "features/ship_shortcut_hint.h" +#include "features/toast_text.h" +#include "shortcuts.h" +#include "text.h" #include #include diff --git a/tests/queue_address_guard.cc b/tests/queue_address_guard.cc index c26580398..1ebaf03fd 100644 --- a/tests/queue_address_guard.cc +++ b/tests/queue_address_guard.cc @@ -1,4 +1,4 @@ -#include "patches/queue_address_guard_policy.h" +#include "features/queue_address_guard_policy.h" #include #include diff --git a/tests/run-action-queue.ps1 b/tests/run-action-queue.ps1 index ab5cdf5b1..3f10aab96 100644 --- a/tests/run-action-queue.ps1 +++ b/tests/run-action-queue.ps1 @@ -5,15 +5,15 @@ $ErrorActionPreference = 'Stop' Push-Location (Split-Path -Parent $PSScriptRoot) try { New-Item -ItemType Directory -Path build -Force | Out-Null - & clang++ -std=c++23 -Imods/src tests/action_queue.cc -o build/action_queue_tests.exe + & clang++ -std=c++23 -Isrc/mod tests/action_queue.cc -o build/action_queue_tests.exe if ($LASTEXITCODE -ne 0) { throw 'Action queue test compilation failed.' } & ./build/action_queue_tests.exe if ($LASTEXITCODE -ne 0) { throw 'Action queue regression failed.' } - & clang++ -std=c++23 -Imods/src tests/thin_queue_protection.cc -o build/thin_queue_protection_tests.exe + & clang++ -std=c++23 -Isrc/mod tests/thin_queue_protection.cc -o build/thin_queue_protection_tests.exe if ($LASTEXITCODE -ne 0) { throw 'Thin Queue Protection test compilation failed.' } & ./build/thin_queue_protection_tests.exe if ($LASTEXITCODE -ne 0) { throw 'Thin Queue Protection regression failed.' } - & clang++ -std=c++23 -Imods/src tests/queue_address_guard.cc -o build/queue_address_guard_tests.exe + & clang++ -std=c++23 -Isrc/mod tests/queue_address_guard.cc -o build/queue_address_guard_tests.exe if ($LASTEXITCODE -ne 0) { throw "Kirshara address guard test compilation failed." } & ./build/queue_address_guard_tests.exe if ($LASTEXITCODE -ne 0) { throw "Kirshara address guard policy regression failed." } diff --git a/tests/sync_logic.cc b/tests/sync_logic.cc index b3ea2aa30..dab8f176e 100644 --- a/tests/sync_logic.cc +++ b/tests/sync_logic.cc @@ -1,5 +1,5 @@ // Production encoders against independent wire fixtures, and delivery against controlled HTTP outcomes/time. -#include "patches/parts/sync/sync.h" +#include "sync/sync.h" #include #include #include diff --git a/tests/thin_queue_protection.cc b/tests/thin_queue_protection.cc index 34ae5330b..91a9e1ccc 100644 --- a/tests/thin_queue_protection.cc +++ b/tests/thin_queue_protection.cc @@ -1,4 +1,4 @@ -#include "patches/action_queue_guard_policy.h" +#include "features/action_queue_guard_policy.h" #include #include diff --git a/tests/unity_tracker.cc b/tests/unity_tracker.cc index cc813bfef..9968fa984 100644 --- a/tests/unity_tracker.cc +++ b/tests/unity_tracker.cc @@ -17,7 +17,7 @@ #undef DO_API #undef DO_API_NO_RETURN -#include "../libs/unity/src/tracker.cc" +#include "../src/libs/unity/src/tracker.cc" #include #include diff --git a/xmake.lua b/xmake.lua index fa30f9877..bd98a6a52 100644 --- a/xmake.lua +++ b/xmake.lua @@ -10,13 +10,13 @@ includes("xmake/rules/stfc_identity.lua") if is_plat("windows") then includes("xmake/dependencies/windows.lua") - includes("win-proxy-dll") + includes("src/platform/windows") add_links("rpcrt4", "runtimeobject") elseif is_plat("macosx") then includes("xmake/dependencies/macos.lua") - includes("macos-dylib") - includes("macos-loader") - includes("macos-launcher") + includes("src/platform/macos/dylib") + includes("src/platform/macos/loader") + includes("src/launcher/macos") end add_rules("mode.debug") @@ -25,17 +25,17 @@ add_rules("mode.releasedbg") includes("xmake/rules/protobuf_sccache.lua") includes("xmake/rules/cxx_sccache.lua") -includes("libs/il2cpp") -includes("libs/unity") -includes("mods") +includes("src/libs/il2cpp") +includes("src/libs/unity") +includes("src/mod") target("il2cpp-bindings-tests") set_kind("binary") set_default(false) set_exceptions("cxx") - add_files("tests/il2cpp_bindings.cc", "libs/unity/src/input.cc") - add_includedirs("libs/unity/include") + add_files("tests/il2cpp_bindings.cc", "src/libs/unity/src/input.cc") + add_includedirs("src/libs/unity/include") add_deps("il2cpp") target("il2cpp-gc-tests") @@ -57,37 +57,37 @@ target("mod-logic-tests") set_kind("binary") set_default(false) set_exceptions("cxx") - add_files("tests/mod_logic.cc", "mods/src/patches/shortcuts.cc", "mods/src/config.cc", "mods/src/file.cc", "mods/src/patches/parts/notification_audio.cc") - add_includedirs("mods/src", "libs/il2cpp/include", "third_party/libil2cpp", "libs/unity/include") + add_files("tests/mod_logic.cc", "src/mod/shortcuts.cc", "src/mod/config.cc", "src/mod/file.cc", "src/mod/features/notification_audio.cc") + add_includedirs("src/mod", "src/libs/il2cpp/include", "third_party/libil2cpp", "src/libs/unity/include") add_packages("spdlog", "toml++") if is_plat("macosx") then add_files("mods/src/file_macos.mm") end if is_plat("macosx") then add_frameworks("Cocoa") - add_files("mods/src/patches/parts/notification_audio_mac.mm") + add_files("src/mod/features/notification_audio_mac.mm") elseif is_plat("windows") then add_syslinks("shell32", "winmm") end - add_defines('STFC_EXAMPLE_SETTINGS="' .. path.translate(path.absolute("example_community_patch_settings_en.toml"), "/") .. '"') + add_defines('STFC_EXAMPLE_SETTINGS="' .. path.translate(path.absolute("docs/configuration/example_community_patch_settings_en.toml"), "/") .. '"') add_defines('STFC_SHORTCUT_DEFAULTS="' .. path.translate(path.absolute("tests/shortcut_defaults.toml"), "/") .. '"') target("sync-logic-tests") set_kind("binary") set_default(false) set_exceptions("cxx") - add_files("tests/sync_logic.cc", "mods/src/patches/parts/sync/records.cc", "mods/src/patches/parts/sync/state.cc") - add_includedirs("mods/src", "libs/il2cpp/include", "third_party/libil2cpp", "libs/unity/include") + add_files("tests/sync_logic.cc", "src/mod/sync/records.cc", "src/mod/sync/state.cc") + add_includedirs("src/mod", "src/libs/il2cpp/include", "third_party/libil2cpp", "src/libs/unity/include") add_packages("protobuf", "spdlog", "toml++", "nlohmann_json") add_rules("protobuf.cpp") - add_files("mods/src/prime/proto/*.proto") + add_files("src/mod/game/proto/*.proto") target("unity-tracker-tests") set_kind("binary") set_default(false) set_exceptions("cxx") add_files("tests/unity_tracker.cc") - add_includedirs("libs/unity/include") + add_includedirs("src/libs/unity/include") add_packages("spud") add_deps("il2cpp") @@ -95,12 +95,12 @@ target("config-reload-tests") set_kind("binary") set_default(false) set_exceptions("cxx") - add_files("tests/config_reload.cc", "mods/src/patches/shortcuts.cc", "mods/src/config.cc", "mods/src/patches/parts/notification_audio.cc") - add_includedirs("mods/src", "libs/il2cpp/include", "third_party/libil2cpp", "libs/unity/include") + add_files("tests/config_reload.cc", "src/mod/shortcuts.cc", "src/mod/config.cc", "src/mod/features/notification_audio.cc") + add_includedirs("src/mod", "src/libs/il2cpp/include", "third_party/libil2cpp", "src/libs/unity/include") add_packages("spdlog", "toml++") if is_plat("macosx") then add_frameworks("Cocoa") - add_files("mods/src/patches/parts/notification_audio_mac.mm") + add_files("src/mod/features/notification_audio_mac.mm") elseif is_plat("windows") then add_syslinks("shell32", "winmm") end @@ -109,6 +109,6 @@ target("launcher-rsync-tests") set_kind("binary") set_default(false) set_exceptions("cxx") - add_files("tests/launcher_rsync.cc", "macos-launcher/src/rsync.cc") - add_includedirs("macos-launcher/src") + add_files("tests/launcher_rsync.cc", "src/launcher/macos/rsync.cc") + add_includedirs("src/launcher/macos") add_packages("librsync")