mirror of
https://github.com/pret/pokepinballrs.git
synced 2026-10-06 23:59:25 -04:00
cc8fd5d6db
Both of my earlier readings were wrong. These are not frames of a fixed size at all. UpdateKickbackLogic in main_board_pichu_entity.c does not just move the sprites -- it writes raw OAM entries straight out of gCatchOverlayOamData, three u16 per sprite for four sprites, once per animation frame. So each frame chooses its own sprite sizes and tile numbers, and no single metatile can describe the data. Reading that table out gives the real layout: 14 frames referencing 27 distinct sprites packed back to back with no alignment, in sizes from 8x8 to 32x32 (4x4, 4x2, 4x1, 2x1, 1x4 and 1x1 in tiles). 275 of the 288 tiles are referenced; the last 13 never are. pika_saver_coverage_shape.json is generated from that table and passed to gbagfx with -oamshape, so every sprite now appears in the sheet at its true dimensions instead of being sliced on a grid that does not exist. Two tool limits shaped the packing: pieces must be legal OBJ shapes (spacers are exempt) and the bounding box is capped at 32x32, so the sprites are laid out in four columns rather than one, 16x21 tiles. Graphics only; both .4bpp round-trip byte-identically and make compare passes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>