Zal0 / ZGB

Game Boy / Color engine with lots of features
MIT License
703 stars 51 forks source link

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

Open mhughson opened 2 years ago

mhughson commented 2 years ago

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.

bbbbbr commented 7 months ago

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