Hi everybody,
Here is a new snippet for you, to make a sinus scroll, like we had , on Amiga in the 80's
I provide you in this topic a zip file that contains all you need to test, this is the entire project (see file attachment)
Here's some explanations and a screenie.
The screenie first :
Usually, we use a command like "CopyRect" to cut a picture into some pieces and draw them in the same time.
But here, we can't do that so there is an other method.
We setup a sprite and setup frames animation. That permits us to cut the image into some pieces. But these parts are in the same sprite (subimages).
So, we clone the first sprite we made, a number of time to have "several parts" In fact we draw each sprite with a special frame that is calculate in a loop. (Because all clone have each subimage like the first sprite)
We use an array to store the sinus coordinate. But as you can see this is an array of 255 and not 360 (for 360 degrees). In fact this is to have a smaller array. If you multiply 255 * 1.406 (see the code), we have : 360 or almost.
Finally we make a for next loop that draw sprites with a subimage selection on each, in fact each sprite are one small part of the image.
It's difficult to explain in english for me but try it and read the code, it's not difficult in fact
You can download it by clicking on the small download button at the bottom on the right of this message
Have fun !
Happy AppGameKit !
PS : Sorry for my english lol