VIRTUAL BOY HOMEBREW DOCUMENT PART III.
Note: This page is under construction.
The biggest you can make your sprite sheet is 512x512 pixels.
In this example, each "sprite" is 40x40 pixels. So let's say you wanted to use the bottom half of "sprite" 2. You would do this:
vbSetWorld(31, WRLD_ON, screenposx, 0, screenposy, 40, 0, 20, 39, 19);
= The 40 represents the x position of where you want to begin "cutting" the sprite.
= The 20 represents the y position of where you want to begin "cutting" the sprite.
= The 39 represents how much of the place you cut's width (in pixels)
= The 19 represents how much of the place you cut's height (in pixels)
This is just if you want to save three values. You can save more than just one value, though. But it starts with 0. So you need two save values to save one value for some reason.
level = SAVE->Save_stuff[0];
Yes, just like that, the little arrow thingy in ASCII. To write to the save function, you'd do the opposite:
SAVE->Save_stuff[0]=level;
So then you could use the level in a switch statement or something.
and so on. In an upcoming document (yes, there will be a part IV!) I'll tell you how to rotate and zoom screens and print text. Wow.