Zal0 / ZGB

Game Boy / Color engine with lots of features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MoveScroll( ... ) does not support jumping long distances

mhughson opened this issue · comments

If you use MoveScroll to jump more than 1 tile at a time, it will not load in tiles for the rows you skip over.

For example, this is the result of scrolling by 16 pixels at a time:

image

The functionality is required for maps the don't start in the top left hand corner of the map.

I made a scroll to and force redraw function when using the ~2018 version of ZGB, the general idea probably still applies. There may be more efficient ways to do it and it might need some adjustment for modern zgb, not sure.
https://github.com/bbbbbr/plutoscorner/blob/7e362c33bc80b0de24cbb547a05325f4bfa01040/src/zgb_utils.c#L45C1-L64C1