Commit Graph

1154 Commits

Author SHA1 Message Date
bryanthaboi fcdaecd496 CLOSES #2726, CLOSES #2727, CLOSES #2729, CLOSES #2730, CLOSES #2731, CLOSES #2733, CLOSES #2734, CLOSES #2735, CLOSES #2736, CLOSES #2737, CLOSES #2740 2026-10-07 06:04:57 -04:00
bryanthaboi 2f89018cb3 home / migration box work 2026-10-07 04:19:41 -04:00
bryanthaboi 21a64419fd PR #2725: strip comments, drop unused FilePicker.SAVE and ensureDecompressed 2026-10-06 20:13:27 -04:00
bryanthaboi 96d03d7581 Merge pull request #2725 from pokeparadox/dev 2026-10-06 20:05:59 -04:00
bryanthaboi 1c46326ab9 Merge pull request #2579 from flaviodelima/fix/battle-text-ttf-advance
# Conflicts:
#	src/battle/BattleState.lua
2026-10-06 20:05:48 -04:00
bryanthaboi c926b0f2d4 PR #2724: strip test comments 2026-10-06 20:02:32 -04:00
bryanthaboi 3cbf780369 Merge pull request #2724 from thibautbus/feat/rs-translation-runtime 2026-10-06 20:00:47 -04:00
bryanthaboi 07f9f8796c PR #2716: raw joysticks read axes 1/2 only, speed rows show 0/1, strip comments 2026-10-06 20:00:34 -04:00
bryanthaboi 74694e452a Merge pull request #2716 from Nexhas28/feat/sdl-controller-support 2026-10-06 19:56:51 -04:00
bryanthaboi 93cd84d232 follow up 2026-10-06 19:45:14 -04:00
bryanthaboi e7d5b86c93 CLOSES #2484, CLOSES #2600, CLOSES #2694, CLOSES #2708, CLOSES #2713, CLOSES #2723 2026-10-06 19:00:50 -04:00
bryanthaboi 4ecf6f371f launcher pauncher 2026-10-06 17:26:40 -04:00
Kevin Winfield-Pantoja 5b927d875f Merge branch 'bryanthaboi:dev' into dev 2026-10-06 22:17:17 +01:00
PokeParadox ad2daac7fb Import RetroArch RZIP-compressed .srm saves
SrmDecompress unwraps #RZIPv files (chunk walk fixed for exact-EOF
chunks, LÖVE decompress container arg). SaveFileIO.readSource only
unwraps compression -- size policy stays in importToSlot so gen3
128 KiB and gen2 footer saves pass through. Save picker accepts .srm
(FilePicker.SAVE + chooseSav filters), FilePicker.SAVE moved above
return. Covered by tests/save_rzip_test.lua.
2026-10-06 22:15:45 +01:00
PokeParadox f8ed24ff6e Import ROM from .zip/.7z archives
RomArchive sniffs magic, probes platform mount capability (zip/7z,
cached), unwraps first accepted-size ROM (prefer known SHA-1). Wired
into startData, filedropped game-tab zip routing, chooseRom picker
exts, FileBrowser rom filter (hidden when capability probe fails).
2026-10-06 21:45:25 +01:00
thibautbus 2d404a7dc7 Resolve Ruby and Sapphire's party prompts again each time the menu opens
The prompt a mode shows (Choose a POKéMON., Move to where?...) was kept on the party menu for the rest of the session. PartyMenu.show now clears it, like the menu's other per-open state, so a prompt is resolved once per opening.
2026-10-06 22:27:57 +02:00
thibautbus 359f41ff76 Print Ruby and Sapphire's party menu prompts from the cart's text
The party menu's prompts (Do what with {STR_VAR_1}?, Choose a POKéMON., Move to where?...) printed the rse/party pack's copies, plain English strings that also dropped the POKéMON's name from Do what with {STR_VAR_1}?. They now read the script cache by their PartyMenuPromptTexts slot, with the selected POKéMON's name as STR_VAR_1, the pack's copy as the fallback; a prompt is resolved once for the menu or mode that shows it.
2026-10-06 22:27:57 +02:00
thibautbus 117af9f40c Resolve Ruby and Sapphire's party menu actions once per menu
Data.drawActions looked each action's text up in the script cache on every frame. It now draws the texts the party menu resolves once for each action list (action_texts, exposed as PartyMenu._actionTextsFor), as Emerald's and FireRed's menus already do.
2026-10-06 22:27:57 +02:00
thibautbus 6a5d69adb8 Print Ruby and Sapphire's party menu actions from the cart's text
The Ruby/Sapphire party menu printed its actions from the rse/menus
pack's cursor options, plain English strings the extractor copied from
sPokemonMenuActions, and a field move's English label, so a translation
mod's SUMMARY, SWITCH, ITEM and the others never showed. The actions now
read the script cache by the labels sPokemonMenuActions points at
(pokeruby/src/pokemon_menu.c:126), with the pack's copy as the fallback,
and a field move prints its move's name, as the cart does; Emerald's
party menu does the same since gen1recomp#2678.
2026-10-06 22:27:57 +02:00
thibautbus 2700e0b073 Print Ruby and Sapphire's Easy Chat words translated
The Ruby/Sapphire Easy Chat editor, mail composer and reader, Dewford
trendy phrase editor and trainer card printed each word's cart text
(EasyChatText.rawWord) and the pickers each group's and word's raw
name, and the TV and the Dewford line naming the new trend got the raw
words too, so a translation mod's Easy Chat vocabulary never showed
there. They now print EasyChatText.word and groupName, as the other
game3 screens do, each screen keeping a word it resolves until it opens
again; the comparisons the scripts rely on (changed phrases, the
Mystery Event words, the trend's comparison) keep the raw text.

Gabby and Ty's last quote is printed from the cart's bytes, so a
translated word the cart's charset cannot hold (a Japanese one on a US
cart) keeps the cart's word there instead of printing "????".
2026-10-06 22:27:57 +02:00
thibautbus 31351ae2e9 Read Ruby and Sapphire's native screens' cart text from the script cache
The Ruby/Sapphire shop, decoration menus, move relearner and contest
paintings printed the cart strings their extractors copied into their
packs (textBytes, keyed by the strings' pokeruby labels), so a
translation never reached them. The script cache holds the same strings
under the same labels, where a mod's text overrides land: these screens
now read it there, with the pack's copy as the fallback, the way
Emerald's screens do (RomText.irOr). The shop, the decoration menus and
the move relearner keep each text they resolve until the screen opens
again, the painting its caption once it is built.

A hall painting's caption names the trainer, then the POKéMON, as the
US cart does; the European carts name the POKéMON first, their
possessive row starting with a space (" von ", " de ", " di ",
pokeruby/src/contest_painting.c:234), and so does the caption now
when the row does.
2026-10-06 22:27:57 +02:00
thibautbus bb568d3283 Read Ruby and Sapphire's Pokédex text from the cart
The native Ruby/Sapphire Pokédex printed the entry's two description
pages from the entries pack, and its labels (?????POKéMON, CRY OF,
REGISTRATION COMPLETE...) and search screen from the chrome packs'
English copies, so a translation never reached them: the Emerald path's
Strings() lookup does not cover the native one, and the search screen's
labels are Emerald's (gText_Dex*), which Ruby and Sapphire's cache does
not have.

The entries pack now keeps the pret label of each description pointer
(DexDescription_Treecko_1 and _2; each edition words its entries in its
own way under the same labels), and the Ruby/Sapphire Pokédex pack the
DexText_ label of each search title and description (DexText_ABC...);
the pack's version moves to 1 and the entries are ready on Ruby and
Sapphire only with their labels, so a cache imported without them is
imported again. The screen reads them from the script cache by those
labels, its own labels by their gDexText_* labels and the category
through Strings(), as Emerald's does, with the pack's copy as the
fallback.

The category is followed by what the unknown-category string has after
its question marks, as only the English cart does
(pokeruby/src/pokedex.c:4228): " POKéMON" in English, "ポケモン" in
Japanese, nothing in the European strings ("?????", "POKéMON ?????"),
whose carts print the category alone.

The Japanese size comparison row is a suffix ("の おおきさくらべ"), so
the screen prints the player's name before it.
2026-10-06 22:27:57 +02:00
thibautbus b5988d4654 Expand Ruby and Sapphire's placeholders from the script cache
The runtime expanded Ruby and Sapphire's {EVIL_TEAM}, {GOOD_LEADER},
{VERSION}, {RIVAL} and {KUN} (and the other version-dependent names)
from text/placeholders.lua, the values the extractor reads from the US
cart, so a translation never reached them: the team leaders stayed MAXIE
and ARCHIE, the rival MAY or BRENDAN, the version RUBY or SAPPHIRE, and
the Japanese honorific empty. Each value is a cart string the script
cache also holds under its pokeruby label (gExpandedPlaceholder_Maxie,
_May, _Ruby, _Kun...); the placeholders now read it from there, with the
extract's value as the fallback, the way Emerald's do.

The labels are defined once, in text_placeholders_extract.lua
(rsSymbols, the evil and good teams swapped by edition), and both the
Ruby/Sapphire import and the message box read them from there.
2026-10-06 22:27:41 +02:00
bryanthaboi 697e064fd2 Gen 3 online: all versions on the relay, event catalog, link room presence 2026-10-06 15:48:54 -04:00
bryanthaboi 6c9e395a06 CLOSES #2693, CLOSES #2697, CLOSES #2698, CLOSES #2699, CLOSES #2701, CLOSES #2702, CLOSES #2703, CLOSES #2705, CLOSES #2706, CLOSES #2707, CLOSES #2709, CLOSES #2710, CLOSES #2711, CLOSES #2712, CLOSES #2714
CLOSES #2693, CLOSES #2697, CLOSES #2698, CLOSES #2699, CLOSES #2701, CLOSES #2702, CLOSES #2703, CLOSES #2705, CLOSES #2706, CLOSES #2707, CLOSES #2709, CLOSES #2710, CLOSES #2711, CLOSES #2712, CLOSES #2714
2026-10-06 13:43:11 -04:00
Shane McGovern 1a53525722 feat(input): full SDL controller support and analog rebinds in Options
- Add normalizePad() and aliases in GamepadMap for triggers and sticks
- Automatically load custom mappings from SDL_GAMECONTROLLERCONFIG and gamecontrollerdb.txt
- Add support for left and right analog sticks, triggers (L2/R2), stick clicks (LS/RS), and extra SDL buttons (Guide, Touchpad, Paddles)
- Route analog stick axis thresholds into discrete directional press/release events for seamless in-game and menu navigation
- Support rebinding buttons, thumbstick directions, triggers, and stick clicks in the CONTROLS menu (BindingsMenu) with clear abbreviated labels (LS-UP, RS-DN, L2, R2, etc.)
- Integrate stick axis event dispatch across Gen1, Gen2, and Gen3 game loops
- Add comprehensive test suite in tests/engine/sdl_controller_support_test.lua covering all axes, buttons, holds, rebinding, and multi-generation routing
2026-10-06 16:56:38 +01:00
bryanthaboi 1f5b6c793a ci fix 2026-10-06 11:18:34 -04:00
bryanthaboi 6bdecf2109 Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-10-06 11:00:18 -04:00
bryanthaboi 927f3ecc6c fixes to id sync and also box 2026-10-06 11:00:16 -04:00
Shane McGovern 7ce425cddc Merge pull request #2704 from bryanthaboi/Nexhas28/portmaster-submission
feat(portmaster): prepare catalogue testing package
2026-10-06 07:16:24 +01:00
Shane McGovern fce5f08650 feat(portmaster): prepare catalogue testing package 2026-10-06 04:58:36 +01:00
bryanthaboi 581262bc2f gen2 secretId scan skips TrainerIdSync 2026-10-05 21:49:22 -04:00
bryanthaboi 5434569119 ID sync 2026-10-05 20:46:08 -04:00
bryanthaboi 13e9a2316e Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-10-05 15:52:18 -04:00
bryanthaboi 62988f759a Update em_pc.lua 2026-10-05 15:52:08 -04:00
bryanthaboi cfce7352fc Merge pull request #2678 from thibautbus/feat/emerald-translation-runtime
Make Emerald's screens reachable by translation mods
2026-10-05 15:46:24 -04:00
bryanthaboi 34377eef5a further performance udpdates 2026-10-05 15:45:58 -04:00
bryanthaboi 6613f5bc42 CLOSES #2691, CLOSES #2690, CLOSES #2677, CLOSES #2646 2026-10-05 12:48:22 -04:00
thibautbus 2fd5d09228 Resolve the translated texts once when each screen opens
Several screens looked their cart strings up in the script cache on every draw, every frame or every read. Each now resolves them once:

- the Battle Arena's judgment titles, when the window opens;
- the Battle Dome's tourney title, when the tree opens, and a match card's win and match-number texts, when the card is built;
- the Frontier Pass map's landmark names and descriptions, when the map opens;
- the Pokédex search screen's option texts, when the cursor moves instead of on every frame of the option list;
- the party menu's action labels, once per action list;
- the Battle Pyramid bag's "Return to" place, when the bag opens;
- the expanded placeholders, when their table is built for the current script cache.
2026-10-05 18:19:57 +02:00
bryanthaboi dd5d394f84 Merge pull request #2680 from thibautbus/fix/game3-name-order-in-cart-text
Join names to translated cart text the way the European carts do
2026-10-05 11:33:59 -04:00
bryanthaboi c4a7d2e114 Merge pull request #2679 from thibautbus/fix/frlg-honorific-placeholder
Print FireRed's honorific after the player's name
2026-10-05 11:23:37 -04:00
bryanthaboi 4d41d4b9a6 Merge pull request #2681 from thibautbus/fix/menu-labels-black-without-title
Draw a menu's choices in black when it has no title
2026-10-05 11:23:34 -04:00
bryanthaboi 72f2294d8d CLOSES #2649, CLOSES #2650, CLOSES #2652, CLOSES #2653, CLOSES #2654, CLOSES #2657, CLOSES #2658, CLOSES #2659, CLOSES #2660, CLOSES #2662, CLOSES #2664, CLOSES #2665, CLOSES #2666, CLOSES #2669, CLOSES #2671, CLOSES #2672, CLOSES #2674, CLOSES #2676, CLOSES #2682, CLOSES #2683, CLOSES #2684, CLOSES #2685, CLOSES #2686, CLOSES #2687, CLOSES #2688, CLOSES #2689
CLOSES #2649, CLOSES #2650, CLOSES #2652, CLOSES #2653, CLOSES #2654, CLOSES #2657, CLOSES #2658, CLOSES #2659, CLOSES #2660, CLOSES #2662, CLOSES #2664, CLOSES #2665, CLOSES #2666, CLOSES #2669, CLOSES #2671, CLOSES #2672, CLOSES #2674, CLOSES #2676, CLOSES #2682, CLOSES #2683, CLOSES #2684, CLOSES #2685, CLOSES #2686, CLOSES #2687, CLOSES #2688, CLOSES #2689
2026-10-05 11:06:01 -04:00
thibautbus 8b9165f121 Expand Emerald's placeholders from the script cache
The runtime expanded {RIVAL} and {KUN} from text/placeholders.lua, the values the extractor reads from the US cart, so a translation never reached them: the rival stayed MAY or BRENDAN and the Japanese honorific stayed empty. Each value is a cart string the script cache also holds under its pret label (gText_ExpandedPlaceholder_May, _Brendan, _Kun, _Chan...); the placeholders now read it from there, with the extract's value as the fallback.
2026-10-05 14:46:31 +02:00
thibautbus 686bcc74f7 Print Emerald's party menu actions from the cart's text
The rse/menus pack's cursor options are plain English strings. The Emerald profile lists sCursorOptions' strings, an action prints the cart's text for its option and a field move prints the move's name, as the cart does; the pack's labels still identify the actions.
2026-10-05 14:46:31 +02:00
thibautbus 62e62842ab Read the Emerald Pokédex search screen's text from the cart
The search screen's option titles and descriptions and its help lines come from the chrome pack's English copies. They are read by their pret labels instead (gText_DexSortNumericalTitle, gText_SearchForPkmnBasedOnParameters, gTypeNames[type]...), with the copies as the fallback.
2026-10-05 14:46:31 +02:00
thibautbus 09ace425f4 Read the Pyramid's floor names and Ever Grande City's fly destinations from the script cache
The map name popup prints a Battle Pyramid floor's name through RomText.refIr(), and the region map reads Ever Grande City's two fly destinations by sEverGrandeCityNames' labels, so both follow a text override.
2026-10-05 14:46:31 +02:00
thibautbus 6eb2b6413b Read the Battle Frontier's cart text from the script cache
Several Battle Frontier screens print a cart string from the pack their extractor wrote, so a text override never reaches them although the script cache holds the same string. RomText.irOr() and RomText.refIr() read the cache's text by label, or by the symbol and address a pack reference keeps, and fall back on the pack's copy. The records window, the S.S. Tidal menu, the Battle Dome, the Battle Arena, the Apprentice, the Frontier Pass, the Trainer Hill records and the Pyramid bag's "Return to" line use them; the Dome's and the Arena's strings, kept without a symbol, are read by the label of their table.
2026-10-05 14:46:31 +02:00
thibautbus e234323060 Translate Emerald map-section names
Mapsec.name() returns Strings(name): every caller displays the name, so the region map, the PokéNav, the map name popup, Match Call, TV and the other screens that print it follow, and the RSE summary's met location is translated the same way.
2026-10-05 14:46:31 +02:00
thibautbus 6b5993f7de Translate Emerald Pokédex categories and descriptions
The Pokédex entry passes its category and description through Strings() when drawn, and the starter selection and the Battle Factory build the same CopyMonCategoryText string the same way.
2026-10-05 14:46:31 +02:00