megazeux icon indicating copy to clipboard operation
megazeux copied to clipboard

Add SPRn_AUTOOFF counters

Open flarn2006 opened this issue 3 years ago • 0 comments

This is to simplify the process of clearing sprites intended to only appear on a single board. Normally, setting up sprites in :justentered works fine, but since there's no :justleft, clearing them when leaving the board can be tricky, especially if the sprite ID's are dynamically allocated using &ROBOT_ID&. But with SPRn_AUTOOFF, it's just a matter of adding another line to the sprite initialization, and it will automatically be cleared when leaving the board, without the need to add any code anywhere else.

This also changes struct sprite::flags from char to unsigned int, since there were no bits left for the new flag.

flarn2006 avatar Apr 14 '21 13:04 flarn2006