Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPRn_AUTOOFF counters #300

Merged
merged 5 commits into from
Dec 22, 2023
Merged

Conversation

flarn2006
Copy link
Contributor

@flarn2006 flarn2006 commented Apr 14, 2021

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.

@AliceLR AliceLR merged commit 4cfa962 into AliceLR:master Dec 22, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants