? Faster ACLS ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)

Faster ACLS

In 3.3, ACLS accepts 3 arguments, which disable some things when not 0 ACLS skipGraphics, skipSpdef, skipFont skipGraphics will skip clearing the graphics pages and loading the default sprite/BG sheets (the slowest part). skipDef will skip resetting the sprite definitions (minimal speed impact). skipFont will skip loading the default font (minimal speed impact). If you are not using the default sprites/BG, you can do:FOR I=0 TO 3 GPAGE 0,I GCLS NEXT ACLS TRUE,FALSE,FALSEThis is the same as normal ACLS, but doesn't load the default sprite/BG sheets. (Which is fine if you load your own right after or aren't using sprites/BG)
Author
12Me21
Updated
Rating
4 votes
Categories
Keywords
5 Comment(s) Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies What the heck This can't be true Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies It might even be faster to unroll that loop Lumage Lumage Head Admin Day Person I like the warm sunshine and wake up early! Express Yourself Gardening I like to garden! Hobbies Touhou Project Is Awesome! I love Touhou Project! Express Yourself a loop construct is negligible compared to a graphics page wipe, almost certainly. this is assuming that the SmileBASIC pre-compiler doesn't expand constant loops anyway. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS It definitely doesn't; I remember when I used repeated commands instead of a FOR loop when decompressing audio data, and it was a little bit faster. But that was because it was already inside like 3 nested loops, where this only runs once so there probably won't be any noticeable change. MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Oh. This I did not know.