mirror of
https://github.com/pret/pokepinballrs.git
synced 2026-09-29 06:00:59 -04:00
1d3441da53
Removes 74 baserom incbins (104,512 bytes) and makes every background tile sheet in the game readable and correctly coloured, byte-for-byte identical to the ROM throughout. Palettes - Extract 69 standalone palettes to JASC .pal, built via the existing %.gbapal: %.pal rule. gbagfx's gbapal->pal direction pads anything that is not 16 or 256 colours up to 256 (gfx.c:822), so the JASC is written directly from the ROM bytes and gbagfx only does pal->gbapal. - Convert the 9 legacy raw-binary .pal files to JASC, so a single .pal format exists. dusclops_anim held 496 colours, over the JASC limit, so it becomes 31 per-frame files. BG sheets (tools/scripts/detilemap.py) - BG tile sheets are deduplicated, so the raw sheet is unreadable as an image at any width. The checked-in source becomes the assembled screen (8bpp, pixel = bank*16 + index, which keeps every per-cell palette bank distinct) and detilemap folds the screens back through their tilemaps. - Covers all 9 intro scenes and all 8 boards: 21 sheets. - Ruby and Sapphire stream their board through a 22-slot scroll ring, so a tilemap row R draws chunk R of a virtual bgtop+bgbottom strip rather than indexing the sheet. --row-chunk handles that; the model is written up in data/board_data/VRAM_LAYOUT.md. - 8 sheets have non-blank tiles no tilemap reaches (BG0 tilemaps are built at runtime); --extra carries them rather than silently zeroing. Build - .SECONDARY was unscoped, which marked $(OBJS) secondary too. Make does not rebuild a missing secondary file when its dependant looks current, so deleting an object and running `make compare` relinked a stale ELF and printed OK. Now scoped to generated art and audio. .PRECIOUS with patterns would be terser but defeats .DELETE_ON_ERROR, which would let a half-written .4bpp produce a wrong ROM silently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>