Question how the heck do I do this with an image in the SGDK? Can I even do this?

Moderator: Stef
Or calculating it outside hblank where timing is not an issue (i.e. in the main "thread", or during vblank) and storing the results in RAM. Although in his he just needs to stretch an image so probably the values remain fixed and can be stored in ROM.Miquel wrote: Thu Oct 05, 2017 9:39 pm If I remember correctly there is a function pointer to be used for those reasons, just change the vertical scroll then, but you need a new scroll value for each call, better having it pre-calculated.
He's short in memory.Miquel wrote: Thu Oct 05, 2017 9:39 pm Depending on your situation, perhaps it's wiser to simply enlarge your image accomplishing better resolution.
It definitely takes a lot of CPU time (just jumping into the handler eats up about 10% of the scanline) but I doubt it needs that much. Then again maybe SGDK makes it take longer through overhead =PMiquel wrote: Thu Oct 05, 2017 9:39 pm Having hblank interruptions for every line takes about 50% of the cpu, in your case you will need every two, so about 25% of the cpu will be gone this way.