Commit Graph

194 Commits

Author SHA1 Message Date
bryanthaboi 8c5d877bb9 various fixes 2026-09-30 15:47:06 -04:00
bryanthaboi 6806d5a235 CLOSES #2577, CLOSES #2573, CLOSES #2572 2026-09-30 13:54:23 -04:00
bryanthaboi 370aaf4e1f Merge branch 'dev' of https://github.com/bryanthaboi/gen1recomp into dev 2026-09-30 12:18:25 -04:00
bryanthaboi 932a075496 CLOSES #2564, CLOSES #2570 2026-09-30 12:18:24 -04:00
Shane McGovern 795276935c Performance pass: cut per-frame allocations and draw calls, fix frame-rate and batch bugs
- Shared render: cache Font encode/width, skip unchanged palette/ShaderFX
  uniform sends, reuse quads and scratch tables, cheaper sprite palettes
- Mods: fast path for loaded requires, memoized sandbox verdicts, fewer
  Hooks:call allocations, drop emptied hook chains
- Audio: bulk PCM writes, cry/SFX prewarm on the worker, sliced sync
  fallback, cached Gen 3 SE sources
- Gen 1: per-frame SGB battle palettes, hoisted overworld FX, cached menus
- Gen 2: numeric attr grid, indexed anim cells, entity culling, memoized
  cache keys, palette shader set once per tile run
- Gen 3: reuse native tile batches, per-cell metatile rebuilds, partial
  FRLG tile anim uploads, near-view ghost ticking, packed FRLG font atlas
- Fixes: emergency quit timer, Gen 3 batch regression and stale sprite
  index, trainer card texture leak, missing pic re-reads, anim tint cache,
  Crystal ghost grass overdraw, refresh-rate dependent counters, pad swap
2026-09-30 14:53:18 +00:00
bryanthaboi 4f7657aad0 performance attempts 2026-09-30 05:40:41 -04:00
bryanthaboi bf45bb51d6 CLOSES #2557 2026-09-29 16:00:57 -04:00
bryanthaboi 9eb6f199b9 CLOSES #2554 2026-09-29 14:31:55 -04:00
bryanthaboi f99d59f8f6 CLOSES #2548 2026-09-29 13:30:13 -04:00
bryanthaboi 9fb3c529e7 couple tiny fixes 2026-09-29 10:38:20 -04:00
bryanthaboi ebd4985cc0 CLOSES #2524, CLOSES #2540, CLOSES #2541, CLOSES #2542 2026-09-29 10:08:21 -04:00
bryanthaboi a739e70c9e update 2026-09-28 20:37:29 -04:00
bryanthaboi 8450c8f107 CLOSES #2515, CLOSES #2516, CLOSES #2518, CLOSES #2519, CLOSES #2521, CLOSES #2522, CLOSES #2523, CLOSES #2525, CLOSES #2526
CLOSES #2515, CLOSES #2516, CLOSES #2518, CLOSES #2519, CLOSES #2521, CLOSES #2522, CLOSES #2523, CLOSES #2525, CLOSES #2526
2026-09-28 14:33:06 -04:00
bryanthaboi 5d8009096a other update 2026-09-28 10:30:30 -04:00
bryanthaboi 193f350db0 more perf updates 2026-09-28 10:18:27 -04:00
bryanthaboi d4899e48b0 ok o ok 2026-09-28 09:13:34 -04:00
bryanthaboi f6898903b6 asdf 2026-09-28 08:53:02 -04:00
bryanthaboi ff9cc6d172 YELLOWCARD 2026-09-28 06:45:52 -04:00
bryanthaboi 3620e787d2 FIELD GOAL 2026-09-27 16:58:27 -04:00
bryanthaboi 690f0cd9a1 TOUCHDOWN 2026-09-27 16:07:31 -04:00
bryanthaboi 0fa4aeacc3 CLOSES #2452, CLOSES #2493, CLOSES #2496, CLOSES #2499, CLOSES #2500, CLOSES #2501, CLOSES #2502, CLOSES #2503 2026-09-26 20:29:32 -04:00
Shane McGovern 8c4acf669d feat: make crash reports readable and attributable 2026-09-26 22:35:10 +01:00
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