more zoom/center fixes. RLEs now load centered and visible.

This commit is contained in:
2024-06-02 20:12:28 +02:00
committed by T.v.Dein
parent 3785799f4e
commit 6527dba219
3 changed files with 15 additions and 8 deletions

11
TODO.md
View File

@@ -2,9 +2,16 @@
- changing options mid-game has no effect in most cases, even after a restart
- RLE file loading works, but if world is larger than screen, center is invisible.
- Statefile loading does not work correclty anymore. With larger grids
everything is empty. With square grids part of the grid is cut
off. Smaller grids load though
- Also when loading a state file, centering doesn't work anymore, I
think the geom calculation is overthrown by the parser func. So, put
this calc into its own func and always call. Or - as stated below -
put it onto camera.go and call from Init().
- Zoom 0 on reset only works when world<screen. otherwise zoom would
be negative So, on Init() memoize centered camera position or add a
Center() function to camera.go. Then on reset calculate the zoom
level so that the world fits into the screen.