Log In  

Cart #paziwerize-0 | 2019-08-13 | Code ▽ | Embed ▽ | No License

While there is no true PCOPY() command yet for Pico-8, you can certainly simulate having 3-extra virtual pages that will cost you no tiles, no mapper, and even no array space - if you are content to use the resolution of 64x64. In this two new commands are introduced. PCOPY() which will copy a page number from 0 to 3 back to a different page number 0 to 3 where zero is the display page.

It uses MEMCPY() so it should be fast enough.
Changed to use PGET() as apparently memcpy() does not work incrementally.

Doing so you can create images on the other three pages and recall them anytime you want.

You plot pixels using the PST() command where the first argument is page # (0-3), then x-coordinate, then y-coordinate, then color.

And there you have it !

See sourcecode for details. (Added debug option to see all activity)

HOPE THIS HELPS !

P#66653 2019-08-13 18:34 ( Edited 2019-08-13 19:18)


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-16 13:22:42 | 0.009s | Q:16