fixed a bug where world thumbnail is not centered to the player

This commit is contained in:
minjaesong
2022-02-25 15:35:17 +09:00
parent dc86de139c
commit 95476359fe
2 changed files with 15 additions and 14 deletions

View File

@@ -53,11 +53,11 @@ object WriteSavegame {
val w = 960
val h = 640
val cx = (1 - WorldCamera.x % 2)
val cy = (1 - WorldCamera.y % 2)
val cx = /*1-*/(WorldCamera.x % 2)
val cy = /*1-*/(WorldCamera.y % 2)
val x = (fb.width - w) - cx // force the even-numbered position
val y = (fb.height - h) - cy // force the even-numbered position
val x = (fb.width - w) / 2 - cx // force the even-numbered position
val y = (fb.height - h) / 2 - cy // force the even-numbered position
val p = Pixmap.createFromFrameBuffer(x, y, w, h)
IngameRenderer.fboRGBexport = p