754 Commits

Author SHA1 Message Date
Shane McGovern ce204aaf16 CLOSES #916: hide trainer sprite through the Fly/Dig warp fade
After the Fly departure animation finished (bird off-screen) and during
Dig/teleport, the trainer sprite popped back in standing at the old cell
for the whole 32-frame black fade-out before the transition.  The
player-hide guard only held while a departure animation was live:
flyAnim went nil the instant path2 completed and the teleportOut
countdown cleared the spin fields at 0, but startWarpTo's Transition
(not isOpaque) keeps the overworld drawing beneath the veil, and the
arrival animation is not armed until setMap's midpoint.

Add a playerHidden flag on OverworldState that bridges the gap:
- set when each departure completes (flyAnim path2 / teleportOut hit 0),
  immediately before the warp starts;
- cleared in startWarpTo's Transition enter callback, synchronously
  after setMap and before the arrival arms flyArrive / spinDrop, so the
  player is never drawable mid-fade and never bare on the landing frame;
- folded into both player-draw guards.

ROM-free regression test (tests/engine/warp_sprite_hidden_bug916.lua)
drives the REAL Transition + setMap headlessly for Dig and Fly and
asserts zero fade frames leave the player drawable bare (would have
observed 31/32 gap frames before the fix).  Runs in the CI headless T2
tier.

Dig spin timing/lift and the black fade color are left as-is (fade is
intentional per #607).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-07 11:14:20 +01:00
Shane McGovern ed8a89c5ce Honor trainer battleTheme override (fixes #945)
trainers.battleTheme validated and merged onto the trainer record but was
never read: battle music came solely from data.audio.battle[kind] where
kind is computeMusicKind()'s final/gym/trainer/wild.  Route both battle-
theme start sites through a single choke point:

- BattleState:playBattleTheme() cues Music.playBattle with the override
  (self.trainer.battleTheme via battleTheme()), defaulting to the kind
  when unset, so vanilla fights and #782's non-gym Giovanni are unchanged.
- BattleState:enter() and OverworldController:pushBattle() both call it.
- Music.playBattle gains an optional 4th song arg that overrides the kind
  default, and real call sites now populate the music.select trainerId.
- Victory jingles stay kind-based: a custom battle theme has no derivable
  win-variant.

New ROM-free T2 suite tests/engine/trainer_battle_theme_bug945.lua covers
mod load, override resolution, the choke point, and the nil-override
parity gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-07 10:53:42 +01:00
Shane McGovern 66e7d9432e Fix Yellow Oak speech showing Nidorino instead of Pikachu (#915)
Yellow's field.oakSpeech manifest carried only shrink frames, so
OakSpeech.lua's `oakGfx.demoSpecies or "NIDORINO"` fallback fired and
the opening speech showed Nidorino's sprite and cry instead of the
player's Pikachu.

- Stamp demoSpecies "PIKACHU" in the Yellow import manifest (source of
  truth for fresh ROM imports and developer builds).
- Stamp it in make_yellow_manifest.py so regeneration keeps the value.
- Repair stale Yellow caches in Data:applyVersionedFieldData() with a
  fill-if-absent block, matching the #617 oldManBattle RATTATA pattern.
- Add parity test (manifest carries PIKACHU; stale cache filled;
  pre-stamped value left alone).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-07 10:51:50 +01:00
Shane McGovern d59a9522ee Fix mod update checks failing on non-JSON responses (#931)
The mod update and Find Mods feeds feed the raw HTTP body straight to
Json.decode. When the endpoint hands back something that is not JSON
(an HTML error page, a proxy/captive prompt, or a plain-text outage
message like "Exceeded secondary rate limit" -- usually still HTTP 200),
the decoder's "unexpected character 'E'" assert escaped through the
pcall and became the error message, blaming the parser instead of the
response.

Add Json.describeUnexpected() as a pre-decode content-type guard: it
returns nil for body shapes the endpoints actually publish (JSON object
or array) and otherwise a short message naming what the server sent
(HTML page / plain text / empty, with a preview). Wire it into
ModUpdate.parseReleases and ModIndex.parse, so both the sync and async
update-check paths surface the real answer instead of the parse error.
HTTP status was already checked upstream by HostShell.httpGet (non-2xx
becomes "HTTP <code> from <url> (...)"); this closes the remaining
"2xx but not JSON" gap everywhere, including bridge platforms that
expose no status or headers.

Add regression tests for plain-text, HTML, and empty bodies; strengthen
the ModIndex HTML soft-fail test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-07 10:49:10 +01:00
Yukita Mayako f1661b62b3 feat(OakSpeech): use field.playerSprites.walk in shrink step 2026-08-07 00:28:24 -04:00
AverageConsumer a98562f46b feat(android): expose secondary-screen touch events 2026-08-06 22:56:13 +02:00
Andrew Barnes 365bd24740 Document multiplayer session boundary 2026-08-06 16:50:30 -04:00
Andrew Barnes d50ea4d067 Route tournaments through multiplayer sessions 2026-08-06 16:50:30 -04:00
Andrew Barnes 52c96437fa Route link play through multiplayer sessions 2026-08-06 16:50:29 -04:00
Andrew Barnes 2a7c8ec81b Harden multiplayer session terminal handling 2026-08-06 16:50:29 -04:00
Andrew Barnes bd6c606303 Add multiplayer session FIFO facade 2026-08-06 16:50:28 -04:00
bryanthaboi 112120e8fe Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-08-06 14:36:03 -04:00
bryanthaboi 00f6e3a7b4 CLOSES #889 2026-08-06 14:36:01 -04:00
kikimanjaro 9cc72f951b Add nickname editing to the save editor's mon inspector
The mon inspector now has a NICKNAME section: a text field with Set / Clear, commit-on-Enter and discard-on-Escape.

Input is gated at the field instead of refused at commit. Only glyphs the game
font can actually draw AND that round-trip through a .sav are accepted, capped
at the naming screen's 10 glyphs, so a bad keystroke or paste never appears and
Set always succeeds. Chars like "@" (the Gen1 string terminator), "#" and the
dakuten kana have codec entries but no font tile so they are blocked rather than silently mangled.
2026-08-06 18:52:24 +02:00
Martin 493caee715 Merge dev and fix headless ROM builder dependency 2026-08-06 16:22:34 +02:00
bryanthaboi aa6217e581 Merge pull request #910 from andrewqsantos/feat/switch-ota-unified-launcher
Feat Switch OTA Update
2026-08-06 10:20:23 -04:00
bryanthaboi a640f5504f Merge pull request #906 from caorthann-celt/dev
Fix Xbox mod downloads and internal ROM imports
2026-08-06 10:20:00 -04:00
Caorthann e01672b97d Update Xbox UWP assets to match upstream 2026-08-06 15:15:07 +01:00
Caorthann 9e3d487a08 Add UWP LocalState baserom discovery 2026-08-06 15:15:07 +01:00
Caorthann 506cd2c5c5 Enable UWP mod downloads 2026-08-06 15:13:54 +01:00
bryanthaboi 6cb0ac5666 Merge pull request #908 from johnjohto/fix-red-cache-folder-899
Move Red's extracted cache under red/ with a legacy migration
2026-08-06 10:09:34 -04:00
bryanthaboi b7d0ff2e16 Merge pull request #904 from ShaneMcGovernIE/shanemcgovernie-hit-sfx-pitch-regression-test
Guard hit-sfx noise pitch with a CI regression test (#902)
2026-08-06 10:09:08 -04:00
bryanthaboi 984cefdc7b launcher updates 2026-08-06 09:57:31 -04:00
johnjohto 6c892cb7c1 Move Red's extracted cache under red/ with a legacy migration
Importing Red unpacked data/generated, assets/generated and
rom-cache.complete straight into the save-dir root, while Blue and
Yellow land under blue/ and yellow/. Red now uses cachePrefix red/
like the others.

CacheFs.migrateLegacyRedCache moves a pre-existing root cache into
red/ on first boot, from RomImporter.new before the readiness loop
and from mountVersion, so existing installs keep their import instead
of being asked for the ROM again. The move only runs when the root
marker resolves to the save directory, so a dev checkout's source
tree is never touched, and the portable game folder is skipped when
it is the physfs source.

Closes #899
2026-08-06 09:55:28 -04:00
Andrew Quenehen 52d1ddc5af Fix Switch OTA clean and NX version chip test after launcher layout changes. 2026-08-06 10:29:43 -03:00
Andrew Quenehen 75cd28435c Update build scripts and tests for ports/switch OTA paths.
Point launcher, fused build, docs, and gitignore at the relocated Switch port tree.
2026-08-06 10:24:04 -03:00
Andrew Quenehen 9aa8b4e371 Move Switch OTA launcher sources under ports/switch.
Consolidate the native OTA launcher, bootstrap, and assets into the Switch port tree.
2026-08-06 10:22:51 -03:00
Andrew Quenehen e94d8e32ef Drop stb_image from Switch OTA launcher with a pre-baked logo asset. 2026-08-06 10:14:11 -03:00
Andrew Quenehen 3fae3088ca Fix Switch OTA launcher self-update via a bootstrap NRO.
A running launcher cannot replace its own NRO on sdmc/FAT; stage the new
binary and chainload a tiny helper from romfs to swap it in before loading
the game.
2026-08-06 09:59:01 -03:00
Shane McGovern cbb08f76ae Add ROM-free regression test for hit-sfx noise pitch (#826/#902)
The super-effective / not-very-effective hit sounds were only covered by
the manual ears-only driver (tests/drivers/hit_sfx_bug826_test.lua), so
the wFrequencyModifier wiring that fixed #826 (and that #902 reports as
a swap had no CI guard.  This suite pins the polynomial-counter bytes
for all three hit sounds against the real audio/sfx programs: bare they
read swapped (super effective ends duller), and pitched they read
correct (super effective 4 shift 1 crack, not very effective
shift 10 thud).  A port that drops the modifier fails 11 of 24 checks.

CLOSES #902

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
EOF
)
2026-08-06 13:35:07 +01:00
Andrew Quenehen dd503706b0 Merge origin/dev (v0.1.74) into feat/switch-ota-unified-launcher.
Keep Switch version chip alongside upstream's new quit button in the launcher header.
2026-08-06 09:28:26 -03:00
Andrew Quenehen eeb181bcc0 Wrap Switch OTA button labels in parentheses so A/B/+ read as controls. 2026-08-06 09:17:49 -03:00
Andrew Quenehen 287534cf26 Mount romfs before the quiet OTA release check so HTTPS can load cacert.pem.
ota_net_init() now mounts romfs and initializes curl before the GitHub check runs, fixing silent update-check failures after TLS verification was enabled.
2026-08-06 09:14:35 -03:00
Andrew Quenehen d08fce5fd5 Fix fused Switch build polluting GAME_LOVE path capture.
Route common.sh say() to stderr so sourcing it before pack_game_love does not
mix progress lines into command substitution output.
2026-08-06 09:07:58 -03:00
Martin 0ae29744c8 Fix Blue ROM source setup 2026-08-06 14:06:55 +02:00
Andrew Quenehen 84e1a5177b Harden Switch OTA install with TLS verification and reliable NRO replace.
Enable HTTPS peer checks via a romfs CA bundle, remove existing NROs before rename on sdmc, and surface launcher replace failures before writing version.txt.
2026-08-06 08:58:22 -03:00
Andrew Quenehen c7e72149f1 Tighten Switch docs prose and drop filler patterns. 2026-08-06 08:43:32 -03:00
Andrew Quenehen ecfca19f11 Consolidate Switch docs into three production guides.
Remove internal development and hardware-evidence docs, drop issue references, and update cross-links and doc gates.
2026-08-06 08:36:43 -03:00
Andrew Quenehen 90a53e509a Remove duplicate Switch port credits from the README footer. 2026-08-06 08:29:03 -03:00
Andrew Quenehen 15fc97a996 Unify --fused with OTA launcher and require DEVKITPRO preflight for release builds. 2026-08-06 08:28:31 -03:00
bryanthaboi 6f75a64c46 deleting stale tests 2026-08-06 07:11:16 -04:00
Andrew Quenehen dc04a4e848 Improve Switch OTA flow with download progress and clearer error screens. 2026-08-06 07:54:28 -03:00
bryanthaboi cd37aa175c Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-08-06 06:36:46 -04:00
bryanthaboi cb6cfb5556 CLOSES #883, CLOSES #887, CLOSES #894 2026-08-06 06:36:12 -04:00
bryanthaboi 5528525888 Merge pull request #892 from MyFriendPKMN/dev 2026-08-06 05:18:15 -04:00
bryanthaboi a49ba66c36 Merge pull request #871 from ratherDashing/linux-arm64-appimage 2026-08-06 05:17:55 -04:00
Marcelo Machado dbc48f377a feat(trainerCard): enhance player portrait handling with trueColor support 2026-08-06 00:15:07 -03:00
bryanthaboi 1d77d42fe2 Merge pull request #881 from AverageConsumer/codex/upstream-screen-render-visible
Mod API: allow active screen states to be hidden from the main render
2026-08-05 17:13:14 -04:00
AverageConsumer b9e8b00af0 feat(mods): add screen render visibility hook 2026-08-05 22:42:37 +02:00
bryanthaboi e2820e02c5 CLOSES #604, CLOSES #666, CLOSES #716, CLOSES #727, CLOSES #763, CLOSES #781, CLOSES #784, CLOSES #799, CLOSES #801, CLOSES #810, CLOSES #828, CLOSES #834, CLOSES #838, CLOSES #849, CLOSES #852, CLOSES #857, CLOSES #863, CLOSES #864, CLOSES #867, CLOSES #869, CLOSES #870, CLOSES #872, CLOSES #839 2026-08-05 16:36:37 -04:00