mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-25 15:01:11 +02:00
ca4d3d283c
Crystal boots from a user-supplied ROM, imports a full cache and is playable: copyright, the Crystal intro movie, the animated title, gender select, Oak, and out into Johto. 122 of the cart's 169 script specials are implemented. Import and data - tools/make_crystal_manifest.py derives the manifest by importing make_gold_manifest as a library, with three additive keyword seams. Gold and Silver still regenerate byte-identical, which is the standing requirement for touching that generator. - crystal_symbol_deltas.py and crystal_movie_symbols.py carry the symbol delta: Crystal renames the credits mons, splits the trainer card, Pokegear and pack-pal blocks by gender, and replaces the intro and title outright. - Crystal-only manifest keys: engineFlagOrder (162 flags to Gold's 93, so the badge block sits one higher) and unownCharmap (the main charmap parser stops at the first newcharmap so the two cannot contaminate each other). Extractor - RomExtractorGen2 becomes three-edition. Crystal corrections: PAL_MAP_BANK 0x13, a flat PICS_FIX pic bank, audio bank 0x5e, the mapSongs id-100 hole, seven NPC trades, a TradeTexts stride of 8, the five Crystal tileset anim steps with per-row degrade, and the column-major trainer card portraits. - New: animated front sprites (frames, bitmasks, play and idle scripts), the Battle Tower roster, Kris assets, Mobile System GB art, and the Crystal intro and title via src/import/CrystalMovie.lua. Engine - GameVersion gains engine(id) and fixes(id). Gold and Silver keep their original bugs where the bug is not hardware dependent; Crystal gets the fixes Crystal shipped: Lucky Number boxes 10-14, surfing onto an NPC, and the Reflect and Light Screen defence overflow. - Crystal story: Suicune and Eusine, Celebi behind the GS Ball flag, the Ruins of Alph chambers, Buena, the Move Tutor, the Poke Seer, and the Battle Tower including the wInBattleTowerBattle badge-boost guard. - Kris and the gender flag, animated fronts in battle and the summary screen, and mon caught data. Verification - Every extracted asset is pixel-compared against pret's own source PNGs. - Gold caches are byte-identical before and after, file for file. - New Crystal suites plus a T2 Gen 2 tier; the full suite passes.
48 lines
1.7 KiB
Bash
Executable File
48 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run the LÖVE2D Pokémon Red port (macOS-friendly).
|
|
#
|
|
# Assumes scripts/setup.sh has been run once for at least one game (generated
|
|
# data present and LÖVE installed). Extra arguments are passed through to LÖVE.
|
|
#
|
|
# Link play is peer-to-peer (lua-enet, bundled with LÖVE): one player
|
|
# picks HOST A GAME in START > LINK and reads out the address shown;
|
|
# the other picks JOIN A GAME and types it in. UDP port 7777 by
|
|
# default (override with POKEPORT_LINK_PORT on both sides).
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
fail() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; }
|
|
|
|
if [ ! -f "$ROOT/data/generated/maps.lua" ] \
|
|
&& [ ! -f "$ROOT/blue/data/generated/maps.lua" ] \
|
|
&& [ ! -f "$ROOT/yellow/data/generated/maps.lua" ] \
|
|
&& [ ! -f "$ROOT/gold/data/generated/maps.lua" ] \
|
|
&& [ ! -f "$ROOT/silver/data/generated/maps.lua" ] \
|
|
&& [ ! -f "$ROOT/crystal/data/generated/maps.lua" ]; then
|
|
fail "generated data missing, run scripts/setup.sh first"
|
|
fi
|
|
|
|
find_love() {
|
|
command -v love >/dev/null 2>&1 && { echo "love"; return; }
|
|
for app in "/Applications/love.app" "$HOME/Applications/love.app"; do
|
|
if [ -x "$app/Contents/MacOS/love" ]; then
|
|
echo "$app/Contents/MacOS/love"
|
|
return
|
|
fi
|
|
done
|
|
return 1
|
|
}
|
|
|
|
LOVE_BIN="$(find_love)" \
|
|
|| fail "LÖVE not found, run scripts/setup.sh (or install from https://love2d.org)"
|
|
|
|
# SDL2 on Wayland crashes during desktop drag-and-drop in certain compositors;
|
|
# default to X11/XWayland when available to ensure rock-solid drag-drop stability.
|
|
if [ -n "${WAYLAND_DISPLAY:-}" ] && [ -z "${SDL_VIDEODRIVER:-}" ]; then
|
|
export SDL_VIDEODRIVER=x11
|
|
fi
|
|
|
|
exec "$LOVE_BIN" "$ROOT" "$@"
|