Quick question. Trying to get a custom sprite with a specific set extra byte to spawn through a question block. Based on GPS' spawn_sprite_block routine I added the two lines I commented:
Code LDA !9E,x
STA !7FAB9E,x
LDA #$88
STA !7FAB10,x
LDA #$01 ; extra byte set bit 1
STA !7FAB40,x ; extra byte 1 address
JSL $0187A7|!bank
and added this line to the GPS defines ($60A4 based on GIEPY's SA-1 defines)
Code%define_sprite_table(sprite_extra_byte1, "7FAB40", $7FAB40, $60A4)
Sprite spawns properly but it's not detecting the extra byte. What am I missing? (Sprite is definitely set up correctly. Directly placing it with extension 01 works.)
Also I've been wondering why the routine stores #$88 into !7FAB10, from what I've gathered only bit 7 indicates a custom sprite. What's bit 4 for?
EDIT: Problem solved, it was an issue with the sprite, not the block. For some reason the init part which handles the extra byte was not loaded when spawned from the block even though $14C8 is set to 1.