172 Commits

Author SHA1 Message Date
bryanthaboi a6945ec4bb CLOSES #2479, CLOSES #2481, CLOSES #2483, CLOSES #2485 2026-09-26 05:44:05 -04:00
bryanthaboi c65fcf939d battle speed 2026-09-25 14:20:34 -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 a3251d10d5 little clean up for mystery gifts 2026-09-24 11:24:20 -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 c9c20d361e Merge remote-tracking branch 'origin/dev' into pr-2406
# Conflicts:
#	src/import/gba/versions.lua
2026-09-23 16:43:55 -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
thibautbus 3252a3f2c9 Draw Japanese text in FireRed with the cart's own Japanese fonts
game3 prints every string with the US cart's Latin font, and FrlgFont has
no glyph for a kana, so a Japanese translation of FireRed would print
blank. The US cart still carries its Japanese fonts, which its text
printer draws for a string in Japanese mode (pokefirered/src/text.c:141,
:227): pret builds them into the US ROM, with the normal font's width
table.

The font extractor now bakes both, the normal font from its eight-to-a-row
layout (DecompressGlyph_Normal, text.c:1452) with its widths and the small
one sixteen to a row (DecompressGlyph_Small, text.c:1372), as
chrome/fonts/japanese_{normal,small}_{fg,shadow}.rgba and
japanese_widths.lua. LeafGreen's addresses follow the same -0x24 shift as
the rest of text.o. Cache version 120 re-imports existing caches.

FrlgFont numbers a Japanese character by its byte in the Japanese block of
pokefirered/charmap.txt (kana 01-A0, the full-width space, !?。ー), plus
the symbols the font keeps at the Latin block's codes in their full-width
forms (digits, letters, 『』「」, 円, /, :), offset past the Latin
glyphs. A character with no Latin glyph draws from the Japanese sheet, at
the width the cart gives it (the table for the normal font, 8px for the
small one). Latin text is drawn as before.
2026-09-23 18:07:32 +02:00
bryanthaboi dee935a4ea CLOSES #2430 2026-09-23 11:58:32 -04:00
bryanthaboi ebbf4709c8 CLOSES #2411, CLOSES #2418, CLOSES #2420, CLOSES #2422, CLOSES #2423, CLOSES #2424 2026-09-23 05:51:05 -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 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
bryanthaboi 21c868b90a leafgreen 2026-09-22 09:56:36 -04:00
bryanthaboi 351b7b3cbb Merge pull request #2396 from thibautbus/fix/game3-egg-nickname 2026-09-22 07:38:18 -04:00
bryanthaboi 35f02cc5d2 CLOSES #2394 2026-09-22 07:36:16 -04:00
thibautbus aaacf02dc0 Draw a FireRed egg's menu icon as an egg
The party, the PC boxes and the release animation drew an egg with the icon
of the species it will hatch into, so a Pichu egg showed as a Pichu. pret's
party menu picks the icon from GetMonData(MON_DATA_SPECIES_OR_EGG), which is
SPECIES_EGG for any egg (pokefirered/src/pokemon.c:3245, party_menu.c:2655).

Pokemon.speciesOrEgg does the same, and the icon call sites use it. The
species pass only extracted icons up to NUM_SPECIES - 1, so the egg extractor
now also bakes gMonIconTable[SPECIES_EGG] as pokemon/icons/412.rgba. Cache
version 114 re-imports existing caches so the icon appears.
2026-09-22 12:10:44 +02:00
bryanthaboi e5569bd0a1 Dublin time 2026-09-22 05:34:03 -04:00
Shane McGovern b5366c5671 Merge branch 'dev' into nexhas28-implement-deoxys-triangle-event
Only src/import/gba/versions.lua conflicted, and not on the value: both
branches had independently taken CACHE_VERSION 111 for unrelated cache
layouts.  dev's 111 is the hidden-item bitfield fix in
extract_map_events.lua (id % 256, qty % 128); this branch's 111 is the new
deoxys_rock_fragments field effect.  Sharing one number would let a cache
stamped by dev be treated as fresh, silently dropping the meteorite
shatter artwork, so the Deoxys artwork moves to 112.

src/core/game3/field_view.lua auto-merged: dev's Doors.draw viewport
arguments and this branch's bg_flash veil do not overlap.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-21 19:51:17 +01:00
bryanthaboi bf7f2bee90 CLOSES #2364, CLOSES #2380, CLOSES #2366, CLOSES #2362 2026-09-21 14:43:32 -04:00
Shane McGovern 6d3af84fde fix(game3): make the Deoxys rock redden and its shards visible
Two Birth Island visuals were broken; both are now verified on screen.

1. The meteorite never reddened as the triangle puzzle progressed.
   OwSprites.recolour_sprite called Image:newImageData, which LOVE 11 does
   not have, so the pcall always failed and setObjectPalette silently
   returned false for all ten steps.  Keep the ImageData the sheet was
   decoded from in load_one and clone() it before mapPixel (which mutates
   in place); the override copy keeps its imageData in step too.

2. The shatter happened, but the shards were invisible.  The flash was a
   whole-screen Renderer.screenVeil painted after the composite, and the
   shards only live ~8 frames, so they were drawn underneath it.  pret
   (field_effect.c:3946) blends PALETTES_BG only -- BlendPalettes plus
   BeginNormalPaletteFade -- so the OBJ shards, which share the
   meteorite's palette tag 4371, keep their colours against a white map.
   Replace startWhiteFlash with startBgFlash, drawn by FieldView.draw
   between the last map layer and the actors.  Also match pret's shake
   cadence (flip every second frame) and its `++tTimer > 120` test.

Adds tests/drivers/game3_deoxys_visual.lua, which walks all eleven puzzle
positions, shatters the rock, and counts shard-coloured pixels in the
saved frames: 492 px at the shatter frame, 192 px a few frames later
(0 before this fix).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-21 19:39:12 +01:00
bryanthaboi fdc9506256 another big dump 2026-09-21 11:14:17 -04:00
bryanthaboi 2945ed8987 firered: elevators, braille, alt layouts, on-frame scripts, fly and heal data, field item use 2026-09-21 05:39:03 -04:00
bryanthaboi 92b4fb9eb5 firered: forced movement, darkness, safari, rocket hideout, victory road, script ops 2026-09-20 21:17:57 -04:00
bryanthaboi 1af407498c firered softlocks, specials, cave encounters, sevii ferry 2026-09-20 17:31:31 -04:00
bryanthaboi 605654a086 CLOSES #2310 2026-09-20 13:21:16 -04:00
bryanthaboi 0d5cf4f9e1 CLOSES #2303, CLOSES #2306, CLOSES #2307, CLOSES #2309, CLOSES #2312, CLOSES #2317 2026-09-20 11:22:57 -04:00
Shane McGovern f11b9c762f fix(audio): play the badge jingle the cartridge plays (#2339)
Badge lines are end-battle texts (SaveEndBattleTextPointers), so they are
printed while the battle sound engine is still loaded.  A text sound command
names an id rather than a sound, and that engine's SFX_Headers_2 gives those
ids different sounds: the id behind sound_get_item_1 / sound_level_up is
SFX_Level_Up there, and the id behind sound_get_key_item is SFX_Ball_Poof.
The port resolved the jingle by name, so it always played the overworld
reading (Get_Item1 / Get_Key_Item) -- the wrong jingle for receiving the
BOULDERBADGE, and the same collision for Cerulean, Saffron, Cinnabar and
Viridian in Red, Blue and Yellow alike.

Add victories.badgeSoundFor(), which answers with the jingle that is actually
audible for the badge hand-over:

  Red/Blue  Brock Level_Up, Misty Ball_Poof, Sabrina Ball_Poof,
            Blaine Ball_Poof, Giovanni Level_Up
  Yellow    the same, except Misty: CeruleanGym.asm drops the command from
            that line, so Yellow's Cascade Badge has no jingle

Vermilion, Celadon and Fuchsia carry no sound on their badge lines in any
version.  The raw `badgeSound` field keeps the overworld-engine name, which is
what the TM texts (printed in the overworld) genuinely need.

Tests: pin the literal per-version jingle and its page for all five badge
leaders in tests/engine/gym_badge_jingle_page_bug1982.lua (53 checks), and
have the #1606 and driver suites assert through badgeSoundFor.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-19 23:28:31 +01:00
bryanthaboi 661d75ef1c junk 2026-09-18 16:49:48 -04:00
bryanthaboi bdfac727aa bing bang bong 2026-09-18 15:42:32 -04:00
bryanthaboi 96d23ab93b battle stuff 2026-09-18 13:11:33 -04:00
bryanthaboi 9e9a54cbb4 oaky baby 2026-09-18 09:12:33 -04:00
bryanthaboi c86cf40e73 perfected intro babbyyyyy 2026-09-18 08:28:29 -04:00
bryanthaboi c8bfac84f9 havok fixes and what not 2026-09-17 12:26:56 -04:00
bryanthaboi a820875208 Merge remote-tracking branch 'upstream/dev' into grandpas-garage 2026-09-17 08:26:26 -04:00
bryanthaboi 8c8581ed0c CLOSES #2089, CLOSES #2198, CLOSES #2227, CLOSES #2246, CLOSES #2277, CLOSES #2278, CLOSES #2280, CLOSES #2281, CLOSES #2282, CLOSES #2283, CLOSES #2286 2026-09-16 09:45:20 -04:00
bryanthaboi feec1d43fd CLOSES #2235, CLOSES #2245, CLOSES #2252, CLOSES #2253, CLOSES #2257, CLOSES #2261, CLOSES #2262, CLOSES #2263, CLOSES #2264, CLOSES #2267, CLOSES #2268, CLOSES #2272, CLOSES #2273, CLOSES #2274, CLOSES #2275 2026-09-13 11:49:05 -04:00
bryanthaboi d615ad39ab bazinga 2 2026-09-13 03:34:39 -04:00
bryanthaboi acdcbd8d4d bazinga 2026-09-13 01:06:04 -04:00
bryanthaboi e6ee9aeee7 CLOSES #2120 2026-09-11 09:11:34 -04:00
bryanthaboi dccc90ead7 CLOSES #1709, CLOSES #2202, CLOSES #2217, CLOSES #2234, CLOSES #2237, CLOSES #2238, CLOSES #2239, CLOSES #2240, CLOSES #2241, CLOSES #2242, CLOSES #2243, CLOSES #2244, CLOSES #2247, CLOSES #2248, CLOSES #2249, CLOSES #2250, CLOSES #2251 2026-09-10 17:50:42 -04:00
bryanthaboi ca8a32746b CLOSES #2166 and other stuff, including documentation updates for better understandability and helpfulness 2026-09-09 09:32:09 -04:00
bryanthaboi 2e24febaca CLOSES #2199, CLOSES #2200, CLOSES #2203, CLOSES #2204, CLOSES #2205, CLOSES #2206, CLOSES #2212, CLOSES #2214, CLOSES #2218, CLOSES #2219, CLOSES #2223, CLOSES #2224, CLOSES #2225, CLOSES #2226 2026-09-09 07:32:12 -04:00
bryanthaboi 60df2fbb65 CLOSES #2230, CLOSES #2232 2026-09-09 06:05:00 -04:00
bryanthaboi 4420f14cbd CLOSES #2185, CLOSES #2188, CLOSES #2189, CLOSES #2190, CLOSES #2191, CLOSES #2192, CLOSES #2193, CLOSES #2194, CLOSES #2195, CLOSES #2196, CLOSES #2197 2026-09-05 08:55:59 -04:00
bryanthaboi 1863af2bac gsc: the battle HUD frame fades with the rest of the screen 2026-09-04 10:45:08 -04:00
bryanthaboi 9ae53ac81f gsc: intro palette rotations, music fade and player icon, CLOSES #2171 2026-09-04 10:45:07 -04:00