# ==========================================================================
# Crash 2 Recomp
#
# What this repo IS: the launcher source, our reverse-engineering work
# (seeds, symbols, patches, notes) and the build scripts.
#
# What it is NOT: the game, anything derived from the game, a BIOS, or the
# psxrecomp framework. Those are either copyrighted, machine-translated from
# copyrighted code, or third-party trees we deliberately do not carry.
#
# Everything under _build/ is reproducible from this repo plus your own disc.
# ==========================================================================


# --------------------------------------------------------------------------
# 1. Copyrighted game data - NEVER commit any of this
# --------------------------------------------------------------------------
# Your disc dump. Keep it outside the repo, or here where it stays ignored.
Crash Bandicoot 2 - Cortex Strikes Back (USA)/
*.bin
*.cue
*.iso
*.chd
*.img
*.ccd
*.sub
*.m3u

# The game's boot executable, extracted from the disc (e.g. SCUS_941.54).
input/
prepared_disc/
SCUS_*
SCES_*
SLUS_*
SLES_*

# C machine-translated from the game's MIPS code. Derived work - regenerate it
# locally with psxrecomp.exe build; never distribute it.
generated/
*_full.c
*_full_*.c
*_dispatch.c
*_decls.h
*.ranges

# PS1 BIOS images. OpenBIOS is MIT and ships with psxrecomp; a retail dump is
# yours alone. Neither belongs in git.
*.BIN
openbios.bin
SCPH*.bin
SCPH*.BIN
bios/


# --------------------------------------------------------------------------
# 2. Third-party trees we do not carry
# --------------------------------------------------------------------------
# psxrecomp is a BUILD-TIME TOOL, not a dependency of this project.
# PolyForm Noncommercial licensed. Fetch it yourself:
#   _build/psxrecomp-cli  <- release zip
#   _build/psxrecomp-src  <- git clone (for `analyze` tooling)
_build/psxrecomp-cli/
_build/psxrecomp-src/
_build/psxrecomp-cli.zip
psxrecomp/
recomp-ui/

# The generated project (contains the vendored framework + generated C).
_build/Crash2Recomp/

# Downloaded toolchains (ninja, cmake-clang-v1).
_build/tools/
toolchain/
*.tar.gz
*.zip


# --------------------------------------------------------------------------
# 3. Build output
# --------------------------------------------------------------------------
# Ignore the scratch build area, but keep the scripts and the small,
# hand-maintained project inputs someone needs to reproduce this build.
# (Pattern must be `_build/*`, not `_build/`, for the negations to apply, and
# each parent directory has to be re-included before its children.)
_build/*
!_build/*.ps1
!_build/*.py
!_build/padprobe.c
# Widescreen investigation probes (ws_census, ws_send, wsdiag, ...). Throwaway
# attach-only diagnostics written against whatever the debug server exposed
# that week; the findings they produced live in tuning/NOTES.md. Re-ignored
# after the !_build/*.py negation above, which would otherwise keep them.
_build/ws*.py

# The generated project: keep ONLY the reproducible inputs. Everything derived
# from the disc stays out - see section 1.
!_build/Crash2Recomp/
_build/Crash2Recomp/*
# game.toml is NOT kept: the launcher rewrites it with the player's settings
# (renderer, supersampling, widescreen mode, ...) on every launch, so it only
# ever showed up as a local change.
!_build/Crash2Recomp/CMakeLists.txt
!_build/Crash2Recomp/build.ps1
!_build/Crash2Recomp/build.sh
!_build/Crash2Recomp/README.md
!_build/Crash2Recomp/seeds/
!_build/Crash2Recomp/seeds/*.txt

build/
build-clang/
dist/
# Local release-packaging scripts. Anchored to the repo root so it cannot hide
# a vendored tools/ directory deeper in the tree.
/tools/
# Release notes are drafted per release and published with the download rather
# than kept in history. package.ps1 copies this into the bundle when present
# and simply omits it when not.
/RELEASE_NOTES.md
# Working migration tracker for the widescreen investigation. It is a live
# scratchpad that has already been retracted and rewritten in place; the
# durable conclusions live in tuning/NOTES.md instead.
/tuning/WIDESCREEN-PLAN.md
out/
cmake-build-*/
CMakeCache.txt
CMakeFiles/
*.o
*.obj
*.a
*.lib
*.exe
*.dll
*.pdb
*.ilk
*.exp
compile_commands.json
.ninja_deps
.ninja_log


# --------------------------------------------------------------------------
# 4. Runtime-generated state
# --------------------------------------------------------------------------
# Save data and memory cards are personal, and savestates are not portable
# between BIOS backends.
userdata/
saves/
save/
*.mcd
*.mcr
*.sav
*.savestate

# Written by the runtime next to the executable on first launch.
settings.json
settings.toml
keybinds.ini
input.ini
config.ini
game_options.toml
disc.cfg
bios.cfg

# Overlay capture/compile cache - rebuilt by playing.
overlay_captures.json
overlay_captures.json.d/
overlay_cache/
overlay_toolchain/

# Diagnostics.
*.log
psx_freeze_dump_*.json
psx_cps_exit_trace.json
analysis/

# Screenshots and frame grabs from debugging. Launcher UI artwork and anything
# under docs/ is real content, so keep those.
*.png
!docs/**/*.png
!launcher/**/assets/**/*.png
!launcher/**/assets/**/*.ico
!launcher/**/assets/**/*.svg
# Personal launcher artwork supplied locally; the native fallback is in code.
/launcher/crash2launcher/ui/assets/play-reference.png


# --------------------------------------------------------------------------
# 5. Python (the launcher)
# --------------------------------------------------------------------------
__pycache__/
*.py[cod]
*.egg-info/
.venv/
venv/
env/
.pytest_cache/
.mypy_cache/
.ruff_cache/

# PyInstaller
*.spec
!launcher/crash2launcher.spec
launcher/build/
launcher/dist/

# Test/check scripts. These are development aids, not part of what a player
# downloads or what the repo distributes, and they pull in PySide6 and a Qt
# offscreen platform to run. Kept on disk, out of git.
test_*.py
*_test.ps1


# --------------------------------------------------------------------------
# 6. Editors and OS
# --------------------------------------------------------------------------
.vscode/
.idea/
*.swp
*~
Thumbs.db
desktop.ini
Desktop.ini
.DS_Store


# --------------------------------------------------------------------------
# 7. Markdown
# --------------------------------------------------------------------------
# Notes, findings and status documents are working papers: they get retracted
# and rewritten in place as an investigation moves, and a half-true one in
# history is worse than none. Sections 3 already ignored RELEASE_NOTES.md and
# WIDESCREEN-PLAN.md one at a time for exactly that reason; this is the same
# rule, generalised.
#
# Note this only governs NEW files - git does not stop tracking a file because
# a pattern later matches it - so the three below stay in history either way.
# They are named anyway so that `git add` still works on them if one ever has
# to be re-added, instead of failing silently.
*.md
!README.md
!_build/Crash2Recomp/README.md
!tuning/NOTES.md
