# =============================================================================
# IP PROTECTION: DO NOT REMOVE OR LOOSEN THESE RULES WITHOUT REVIEW
# =============================================================================
# This repository must never contain disc data, extracted assets, or any
# material owned by Sony Interactive Entertainment / Team Ico.
# The rules below ignore every common PS2 dump and extracted-asset format.
# If you need to add a real source file whose name happens to collide, prefer
# renaming the file rather than weakening the patterns.
# =============================================================================

# --- Disc images and PS2 executables ---
*.bin
*.iso
*.cue
*.chd
*.mdf
*.mds
*.nrg
*.elf
*.irx
SLUS-*
SLES-*
SLPS-*
SLPM-*
SCUS-*
SCES-*
SCPS-*
# the boot files' own names (SCES_507.60, SCPS_110.03, ...)
SLUS_*
SLES_*
SLPS_*
SLPM_*
SCUS_*
SCES_*
SCPS_*
baserom/
# the same as symlinks (a git worktree may link them)
/baserom
baseelf*
# The discs' reference files (tools/extract_elf.py copies them to baserom/<slug>/)
MAIN.MAP
SRCFILE.TXT
TRFILE.TXT
TRTABLE.BIN
SYSTEM.CNF

# --- Build outputs that may embed disc-derived data ---
build/
*.o
*.a
*.lib
*.obj
*.map

# --- Extracted assets (populated at build time from the user's disc) ---
assets/
# port-owned, openly licensed assets (not disc data)
!port/assets/
# the port's extracted game archive
*.o2r
*.o2r.tmp

# --- Audio / texture / model dumps ---
*.aifc
*.aiff
*.wav
*.adp
*.vag
*.vab
*.mid
*.seq
*.tm2
*.png.bin
*.rgba16
*.rgba32

# --- Symbol files derived from the original ELF ---
# (Symbol *names* invented by us are fine; raw vendor symbol tables are not.)
*.sym.bak

# --- Toolchain / venv / editor noise ---
.venv/
/.venv
venv/
__pycache__/
*.pyc
*.pyo
.mypy_cache/
.pytest_cache/
.idea/
.vscode/
!.vscode/extensions.json
*.swp
.DS_Store
Thumbs.db

# --- Local config overrides ---
.env
.env.local
config/local.*

# --- Local toolchain (a period compiler tree left from an older checkout) ---
tools/cc/
tools/ghidra/
# The host build's toolchains (tools/fetch_toolchain.sh) and build trees
# (CMakePresets.json; build/ held the retired PS2 build's output and is
# ignored as well).
tools/toolchain/
/tools/toolchain
build-host/
# test checkpoint packages
dist/

# --- Agent guidance / local-only ---
# CLAUDE.md is auto-loaded by Claude Code and is the agent's local preamble;
# it stays out of the public repo.
CLAUDE.md
.claude/
# Ninja state: build.ninja, .ninja_log and .ninja_deps are written by Ninja
# (or left by the retired PS2 build) in the directory it ran in.
build.ninja
.ninja_log
.ninja_deps

# PAL listing-derived source-structure census (docs/pal_source_tree.*): local-only,
# derived from the disc's listing in baserom/pal/; bulk metadata stays out of git.
docs/pal_source_tree.md
docs/pal_source_tree.json

# Local caches of the matching era's tools (never committed)
.port_cache/
.transplant_cache/
*.rddump

# --- Local-only working notes: never part of the repository ---
# The maintainer's cookbook, notes and matching guides, kept beside the
# working trees.
docs/COOKBOOK.md
docs/NOTES.md
docs/ARCHIVE_retired_notes.md
docs/MATCH_VU.md
docs/MATCHING_NOTES.md

# --- Android (android/, tools/fetch_android.sh) ---
android/.gradle/
android/build/
android/app/build/
android/app/.cxx/
android/local.properties
# signing keys and their passwords never enter the repository
*.jks
*.keystore
android-keystores/
/android-keystores

# coverage_check.py: the previous run's pictures
tools/.coverage/
