508 Commits

Author SHA1 Message Date
bryanthaboi a6945ec4bb CLOSES #2479, CLOSES #2481, CLOSES #2483, CLOSES #2485 2026-09-26 05:44:05 -04:00
1jamie 76ede1171e feat: Gen 3 save editor, GBA extraction resilience, and UI/asset polish
- Save Editor (Gen 3):
  - Added full support for EV, IV, Nature, Ability, and Ribbons editing for Gen 3 Pokémon.
  - Implemented stat calculations, personality-based nature derivation, and Gen 3 save data structures.
  - Added comprehensive unit test suite in tests/save_editor_gen3_ev_iv_tests.lua.

- GBA Extraction & Graphics:
  - Added zero-copy ARM-safe ROM accessor and fast LZ77 string decompression.
  - Fixed bag chrome decompression string-buffer indexing preventing solid-color renders.
  - Fixed TM Case HM badge tile offset and palette mapping.
  - Added builtin moves fallback in src/core/game3/battle/builtin_moves.lua.
  - Improved parallel extraction resilience, desktop fallback search paths, and prefix handling.

- Android & Launchers:
  - Added dynamic high-res app launcher shortcuts and color palettes for all supported games.
  - Updated Android icon generator and intent dispatch handlers.
2026-09-25 16:20:40 -05:00
bryanthaboi c65fcf939d battle speed 2026-09-25 14:20:34 -04:00
bryanthaboi 389184789f import picker for custom cart 2026-09-25 13:18:59 -04:00
bryanthaboi 584350e9de CLOSES #2477 2026-09-25 13:08:56 -04:00
bryanthaboi 400f0a02f8 asdfasdf 2026-09-25 11:46:53 -04:00
bryanthaboi 8d1e1551c7 mod count in saves 2026-09-25 11:12:10 -04:00
bryanthaboi a685f16e00 updates to online 2026-09-25 10:28:21 -04:00
bryanthaboi f8c95b8e8a CLOSES #2347, CLOSES #2384, CLOSES #2456, CLOSES #2460, CLOSES #2461, CLOSES #2468, CLOSES #2470, CLOSES #2471, CLOSES #2472, CLOSES #2473 2026-09-25 07:11:46 -04:00
bryanthaboi 437a8ef8c5 gen3 link battle and union room fixes 2026-09-25 05:46:24 -04:00
bryanthaboi 78e66002ed another online fix 2026-09-24 16:31:44 -04:00
bryanthaboi 95ad378d89 Update union_room.lua 2026-09-24 14:44:17 -04:00
bryanthaboi 079e9776bb more online fix attempts 2026-09-24 13:22:09 -04:00
bryanthaboi ff69ff7878 another one 2026-09-24 11:45:50 -04:00
bryanthaboi 6fdff58b3d online fixes 2026-09-24 10:31:07 -04:00
bryanthaboi 72a17b27dd CLOSES #2444 2026-09-24 08:39:43 -04:00
bryanthaboi d51bdaff72 CLOSES #2441, CLOSES #2445, CLOSES #2448, CLOSES #2450 2026-09-24 06:24:54 -04:00
bryanthaboi 9335be1bbd online update 2026-09-24 05:17:32 -04:00
bryanthaboi 2a09429699 Merge pull request #2434 from bryanthaboi/feat/game3-mods
feat(game3): in-game MODS entry with FRLG-styled mod manager
2026-09-23 16:44:00 -04:00
bryanthaboi d2fdd3becc Merge remote-tracking branch 'origin/dev' into feat/game3-mods
# Conflicts:
#	src/ui/game3/start_menu.lua
2026-09-23 16:41:24 -04:00
bryanthaboi d408c9d78f Merge remote-tracking branch 'origin/dev' into pr-2442
# Conflicts:
#	src/core/game3/scripting/natives_seagallop.lua
2026-09-23 16:37:33 -04:00
bryanthaboi 123feef3a1 CLOSES #2425, CLOSES #2428, CLOSES #2431, CLOSES #2432, CLOSES #2433, CLOSES #2435, CLOSES #2436, CLOSES #2437, CLOSES #2440
CLOSES #2425, CLOSES #2428, CLOSES #2431, CLOSES #2432, CLOSES #2433, CLOSES #2435, CLOSES #2436, CLOSES #2437, CLOSES #2440
2026-09-23 16:34:15 -04:00
1jamie a366339873 fix(game3/battle): guard from_rom and move_target_byte against nil ROM pack in headless tests 2026-09-23 14:12:44 -05:00
1jamie ce79dc86d5 fix(game3): implement if_can_escape and if_cant_escape AI script commands 2026-09-23 14:04:03 -05:00
1jamie d74c43a71b fix(game3): make Engine.canSwitch and State.prefixedName resilient to unpopulated RomText cache 2026-09-23 13:59:20 -05:00
1jamie 703e103e3c fix(game3): make battle AI pack loading graceful when running outside full ROM cache 2026-09-23 13:55:54 -05:00
1jamie bb3a1cf3a6 fix(game3): fix Flags.get lookup in save repairRoamer and add Moves.priority fallbacks 2026-09-23 13:52:24 -05:00
1jamie 8621d024dc feat(game3): implement roaming legendary beasts, Seagallop ferry, field weather, and overworld fixes
- Implement roaming legendary beast system (Raikou, Entei, Suicune) matching pokefirered (src/roamer.c), including 31-cap IV fix, Roar despawn fix, battle flee logic, and trapping interactions (Mean Look, Shadow Tag, Arena Trap, Wrap).
- Implement Seagallop ferry crossing cutscene and transit between Sevii Islands and Kanto.
- Implement field weather engine, weather extraction, and particle rendering.
- Implement renewable hidden items and step events.
- Fix poison step sound effect (SE_FIELD_POISON).
- Fix encounter cooldown lookup for grass/cave terrain.
- Add comprehensive test suites for roamers, weather, Seagallop animations, and ladders.
2026-09-23 13:46:57 -05:00
bryanthaboi dee935a4ea CLOSES #2430 2026-09-23 11:58:32 -04:00
Shane McGovern 2454173ac6 feat(game3): in-game MODS entry with FRLG-styled mod manager
Add a gated MODS row to the FireRed/LeafGreen start menu and an always-on
MODS row in the option menu. Both open a manager on the game3 stack that
reuses ManagerState behavior (list, detail, options, staged apply, profiles)
and draws with FRLG chrome. Nested name/quantity prompts route to the Gen 3
naming screen and a quantity dialog; APPLY & RESTART returns to the title.
2026-09-23 15:15:44 +01:00
bryanthaboi ebbf4709c8 CLOSES #2411, CLOSES #2418, CLOSES #2420, CLOSES #2422, CLOSES #2423, CLOSES #2424 2026-09-23 05:51:05 -04:00
bryanthaboi 18661d45a1 Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-09-22 20:44:23 -04:00
bryanthaboi a446147787 CLOSES #2408, CLOSES #2413, CLOSES #2414, CLOSES #2415, CLOSES #2416, CLOSES #2417, CLOSES #2419 2026-09-22 20:44:21 -04:00
bryanthaboi 1c13c4c0d6 Merge pull request #2398 from thibautbus/fix/game3-trainer-class-ids
Recognise FireRed trainer classes by id, not by their name
2026-09-22 20:12:50 -04:00
1jamie 63155055a4 fix(game3/battle): preserve foe.name and foe.nickname when constructing wild battle mon 2026-09-22 19:07:19 -05:00
1jamie 6a0e10ec66 fix(test): resolve test runner stubs, cache loaders, and thread yield handling 2026-09-22 18:53:24 -05:00
1jamie f2a75271b0 Merge upstream/dev into grandpas-garage and resolve switch_seq conflict 2026-09-22 18:41:25 -05:00
1jamie ce8a2d3777 Fix battle EXP distribution, party status badges, pacing trainer sight, and LeafGreen launcher colors 2026-09-22 18:32:26 -05:00
1jamie 249d321082 Implement Old Man battle tutorial and S.S. Anne departure cutscene with accurate pret timing and OAM layering 2026-09-22 17:20:31 -05:00
bryanthaboi d920f7acdb clean up 2026-09-22 17:05:12 -04:00
bryanthaboi 9208d83a28 Merge branch 'dev' into pr-2409
# Conflicts:
#	src/ui/game3/save_menu.lua
2026-09-22 16:41:00 -04:00
1jamie 109a87c81c fix(game3): fix BGM silence after fanfares during battle and overworld dialog
- Preserve active track voices in Player.stopAt after fast-forward catchup
- Add start-from-0 fallback in Player.stopAt when at timestamp predates the retained snaps ring
- Mute m4a worker during stopAt pause so it does not synthesize empty buffers while fanfare plays
- Ensure Audio.resumeBgm calls Source:play on bgmSource if stopped
2026-09-22 15:37:18 -05:00
bryanthaboi 23617f43b4 CLOSES #2290, CLOSES #2338, CLOSES #2186, CLOSES #2305, CLOSES #2332, CLOSES #2320, CLOSES #2344, CLOSES #2291, CLOSES #2335, CLOSES #2340, CLOSES #2385, CLOSES #2352, CLOSES #2378, CLOSES #2403, CLOSES #2404, CLOSES #2405, CLOSES #2367, CLOSES #2037, CLOSES #2177, CLOSES #2368, CLOSES #2382, CLOSES #1951
CLOSES #2290, CLOSES #2338, CLOSES #2186, CLOSES #2305, CLOSES #2332, CLOSES #2320, CLOSES #2344, CLOSES #2291, CLOSES #2335, CLOSES #2340, CLOSES #2385, CLOSES #2352, CLOSES #2378, CLOSES #2403, CLOSES #2404, CLOSES #2405, CLOSES #2367, CLOSES #2037, CLOSES #2177, CLOSES #2368, CLOSES #2382, CLOSES #1951
2026-09-22 16:27:28 -04:00
Shane McGovern a5014826cd fix(game3): multichoice cart-arity fallback and tint boundary coverage
The wave-3 tint batch as its own commit, so the harness fold before it stays
reviewable on its own.

multichoice.lua: Multichoice.COUNTS is the live option-count source for the
cart - 65 of 65 entries match pret's src/script_menu.c, where
ScriptMenu_MultichoiceGrid reads sMultichoiceLists[id].list and .count
(:915-930).  The table is load-bearing in a ROM-less run: with no import
cache present there is nothing else to ask how many options a list has.

adapters.lua: the multichoice operand reader no longer treats row[4] as an
option count.  pret asm/macros/event.inc:893-899 lays the command out as
x, y, multichoiceId, ignoreBPress - four bytes and no count field - so the
old read shifted the operand stream and every later decode in the command
went wrong with it.

tests/game3_photo_tint_boundary_test.lua: pins the cache-miss arity fallback
and the yield behaviour it rests on, which is the BUG2 root cause.  Run
twice green; the existing tint suite still passes 33/33 alongside it.
2026-09-22 19:24:52 +01:00
Shane McGovern 72f083f0c4 Merge remote-tracking branch 'upstream/dev' into nexhas28/gen3-review-v3-fixes
# Conflicts:
#	src/core/game3/save_schema_firered.lua
#	src/core/game3/scripting/natives.lua
#	src/import/RomExtractorGen3.lua
#	src/import/gba/versions.lua
2026-09-22 18:28:33 +01:00
Shane McGovern 41935aa2a2 fix(game3): wave 2 - 118 review fixes, seam work, and the gate to 282 suites
Second batch of the Gen 3 review work: the review lanes closed their queues
and the test gate grew with them.

Review census: 139 routed findings -- 118 fixed, 14 invalid (the report had
Gen 4+ semantics in more than one place), 6 struck as stale after
re-verification, 1 re-routed. Every fix carries its own pret citation in
docs/game3/review-v3-triage.md; the E10 opcode closure is itemised in
docs/game3/e10-opcode-spec.md (18 ops wired, 2 reclassified to the seam class).

Representative ROM-grounded changes:
- The POKéMON start-menu entry is now gated on FLAG_SYS_POKEMON_GET the way
  retail does it (pokefirered/src/start_menu.c:217-218, flag 0x828).
- Money ops read their amount raw and gate the change on the disable byte
  (pokefirered/src/scrcmd.c:1798-1830, pokefirered/asm/macros/event.inc:1166-1186);
  random and the warp family VarGet theirs
  (pokefirered/src/scrcmd.c:455-461, :719-731).
- The HM table matches FRLG: there is no Whirlpool HM
  (pokefirered/include/constants/items.h:411-418).
- The day-care party-full guard follows src/daycare.c:525, :1081.
- Knock Off keeps its battle-scoped send-out mask
  (pokefirered/src/battle_script_commands.c:2730-2752, :4489), carried from
  the first batch.

Structural work: the I6/I9/J1 architecture items landed as seams (profile
selector, capability flags, font provider, virtual-object layer), the adopted
footprint register keeps a KEEP verdict, the quantizer target is met, and the
30 drain items plus carves 1-4 are folded in.

Tests: T6 now runs 282 top-level suites (273 + 9 new), the re-sweep ends at
267 pass / 0 fail, the engine tier is 634 suites, modkit 37, and the full
gate ran green twice with T3 active on an imported Red cache. Documented
skips are the lua5.4 oversize-save oracle where lua5.4 is absent and the
config-partials listed in docs/game3/game3-artifact-conversions-v3.md.

Docs shipped: review-v3-triage.md, e10-opcode-spec.md, rse-seams.md,
game3-suite-sweep-v113.md, game3-artifact-conversions-v3.md,
test-baseline-v3.md (plus the first-batch docs already on the branch).
2026-09-22 18:23:06 +01:00
bryanthaboi 21c868b90a leafgreen 2026-09-22 09:56:36 -04:00
thibautbus 5ad701022b Pick the FireRed Elite Four and champion transitions by class id
BattleTransition.pickTrainer told the Elite Four and the champion by class
names ("ELITE_FOUR", "CHAMPION", "RIVAL") or by class ids 57 and 58, and
the Elite Four members by trainer ids 412-419. None of these is
FireRed's: TRAINER_CLASS_ELITE_FOUR is 87, TRAINER_CLASS_CHAMPION 90, and
Lorelei, Bruno, Agatha and Lance are trainers 410-413 (735-738 for the
rematch). The bridge also never passed the class, so these battles always
got the terrain transition. The bridge now hands over the foe's class id
and pickTrainer follows GetTrainerBattleTransition
(pokefirered/src/battle_setup.c:624): the Elite Four member's own
transition, BLUE for the champion, and none for the rival's class (a
caller's isRival flag still asks for BLUE).

A Trainer Tower or e-Reader foe carries a facility class instead, whose
numbers overlap the trainer classes (FACILITY_CLASS_LASS is 90, the
champion's class), and pret never picks their transition by class
(battle_setup.c:660), so pickTrainer ignores the class for them.
2026-09-22 15:28:54 +02:00
thibautbus fa0ab3621f Record FireRed gym, Elite Four and champion wins by class id
The quest log told a gym leader, Elite Four or champion win from the
trainer's class name ("LEADER", "ELITE FOUR", "CHAMPION"). With a
translated class every such win fell back to the plain trainer event, and
in French, where the gym LEADER class reads CHAMPION, every gym win would
be logged as a champion battle. pret switches on the class id
(pokefirered/src/quest_log_battle.c:25); the battle state now keeps the
trainer's class id next to its name, and the recorder reads it.
2026-09-22 15:20:31 +02:00
thibautbus 1c2a7d64de Give the FireRed rival and champion the rival's name by class id
Trainers.info gave a trainer the player's chosen rival name only when its
class was called "RIVAL". A mod that translates the class (RIVALE in
German and Italian) made the rival battle as the ROM's placeholder TERRY,
and the champion, whose class is CHAMPION, was always TERRY. pret's
B_TXT_TRAINER1_NAME names TRAINER_CLASS_RIVAL_EARLY, _RIVAL_LATE and
_CHAMPION by the rival's name (pokefirered/src/battle_message.c:2078);
Trainers.info now does the same, by class id.
2026-09-22 15:20:31 +02:00