;ENEMY DELETION PROTOTYPE ;OmegaDragnet9 ;This has some issues and requires a bit of setup. ;Might be worthwhile to save on roomstates. lorom ;Event PLM not included. The PLM that is included only serves to provide a PLM argument ;by which the Room ASM can detect if a certain event has been triggered. ;Otherwise you'd be left with a hardcoded event OR be stuck with only the Room Index (which does work well enough.) !A7Freespace = $A7FF8A org $8FFCC0 ;Room ASM ;LDA $079D LDA $1C21 JSL $808233 BCC END JSL BankA7 END: RTS org !A7Freespace BankA7: JSR $A943 ;Sets Enemy Properties as dead RTL ;So what I gather of thise routine in Bank $A7, the reason all the enemies seemingly vanish at once ;is because it is summoned by the Room ASM once a frame and appears to be running down a list of the enemy index. ;I don't believe it's actually deleting them all at one time. ;---------------------------------------------------- org $84FEC0 ;This goes in the room. It's only purpose is to have a PLM argument and store that to a value in RAM ;The Room ASM takes that value in RAM, and determines the event to trigger the deletion of all the room's enemies. DW Setup DW InstList Setup: PHY LDA $1DC7,y ;PLM variable (event # to set) AND #$00FF STA $1C21 PLY RTS RTS InstList: DW $86B4 ;KNOWN BUGS ;If you have a fast door transition you can see enemies for half a second. ;Additionally, if you do not set the enemies to process offscreen, the graphics will remain for about a frame where ;they would normally spawn in game.