From e19e280e0d8282cf75287c6a56e6b4dcb8d1138b Mon Sep 17 00:00:00 2001 From: Cyphgirl Date: Sat, 8 Aug 2026 09:55:33 -0400 Subject: [PATCH] Extract the catch target collision map from baserom gCatchTargetCollisionBitmap is not graphics. CheckCatchTargetCollision indexes it [y * 48 + x] against the ball's offset from the Jirachi centre, bounds-checked to 48 on both axes, which accounts for the label exactly: 2304 bytes, one per position. Bit 7 is the solid flag and the low seven bits are the surface angle the collision answers with, scaled by 512. So it goes to data/board_data/collision as a .bin with its dimensions in the name, next to the flipper map and the per-board entity maps, rather than through gbagfx. tools/collision_viewer already reads that family. Decoding it confirms the reading: the solid cells form a disc filling 41% of the square, and the angles of the solid cells run the full range around it, which is what a round target should look like. make compare passes. Co-Authored-By: Claude Opus 5 --- .../collision/catch_target_collision_48x48.bin | Bin 0 -> 2304 bytes data/rom_1.s | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 data/board_data/collision/catch_target_collision_48x48.bin diff --git a/data/board_data/collision/catch_target_collision_48x48.bin b/data/board_data/collision/catch_target_collision_48x48.bin new file mode 100644 index 0000000000000000000000000000000000000000..7d8ab6c1b17d3f5b01f21a336ba1dd7a029adb36 GIT binary patch literal 2304 zcmeH@L2H9R5Jvs!9wZ=AkP-yR#X}J!6eI*8c<~|u31y)aL2~dS0SRTHh#(&N&8|fn z*Cai*^gAfJ@6F7Prv2w<8+h_WR`*%K6XJO*#JOz*13m~hjAwz%afIPGk5_tx;d;IH zeP0T$>n@i|+nyCRf`{a=4H1cxU?Y}gsfA4x z3qBZm5-iIwl@kekM-4*H({<0I>h?kiiizSV-tBf_giC;?Krl^vu~-$tOP2WzY$B!2wFqY?eDN@%p1j0X5 zyp|o%02z5|&@_#*JW62nH^z!W3Uz%tael@nl+|e>@JLa}c}}M@!nt}HDkAt|l;z8^s;atvzk=gP2*Lmj{5nmi)B%FPZ_`8!16B9Yf1UaSoi2Xg literal 0 HcmV?d00001 diff --git a/data/rom_1.s b/data/rom_1.s index a3ff3394..6bda7c39 100644 --- a/data/rom_1.s +++ b/data/rom_1.s @@ -1155,8 +1155,12 @@ gPikaSaverPartialCoverageGfx:: @ 0x08397E6C .incbin "graphics/stage/main/pika_saver_partial_coverage.4bpp" .space 0x20 +@ Not graphics: a 48x48 collision map, one byte per position, indexed +@ [y * 48 + x] by CheckCatchTargetCollision (all_board_process6_collision.c) +@ against the ball's offset from the Jirachi centre. Bit 7 is the solid flag and +@ the low seven bits are the surface angle the collision answers with. gCatchTargetCollisionBitmap:: @ 0x0839A28C - .incbin "baserom.gba", 0x39A28C, 0x900 + .incbin "data/board_data/collision/catch_target_collision_48x48.bin" .include "data/graphics/mon_portraits_pals.inc"