1 Commits

Author SHA1 Message Date
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