I wouldn't recommend having them directly set bits of SRAM, because then, if you get a sprite, die, and then don't save your game, the sprite will disappear anyway. I'd just have them set a normal RAM address and make that transfer over to SRAM on game save. Thank you for noting my comments, though.
To clarify, I was picturing something like this:
!RAM = $0DDB ; this gets saved to, and loaded from, SRAM
Bits:
db $01,$02,$04,$08,$10,$20,$40,$80
MaxHealth:
db $05,$0F,$14,$19,$1E,$23,$28,$2D,$32
LDY $C2,x ; sprite state from INIT routine, obtained by checking the X position and extra bit
LDA Bits,y ; check a certain bit
AND !RAM ; check the saved bits
BNE EraseSprite ; erase the sprite if it has already been collected
STA $00 ; save the bit value for later
JSL $01A7DC ; check for player/sprite contact
BCC Return
LDA $00 ; the bit from before
TSB !RAM ; if the sprite hasn't been collected, set the "collected" bit
LDA !RAM
JSR CheckBits ; count the total number of bits set (when this subroutine returns, Y will have a number between 00-08, the total number of set bits in !RAM)
LDA MaxHealth,y
STA !MaxHealth ; set the maximum health depending on how many sprites have been collected
EraseSprite:
STZ $14C8,x ; make the sprite disappear
Return:
RTS
That's about what I had in mind, anyway. I don't know what your idea was.
Also, and I'm trying to be constructive here, you've gotten some complaints on the readme for that pause menu being hard to understand. I personally think I could probably figure it out with enough time, effort, and careful reading of both the readme and the patch, but others might not feel the same way.
Still cool stuff in any case. (My ASM work pales in comparison...)
----------------
I'm working on a hack! Check it out
here. Progress: 64/95 levels.