From 2c3594c99c35dec659d290e5daddd54f56603f98 Mon Sep 17 00:00:00 2001 From: fred-boy Date: Fri, 27 Sep 2019 18:20:28 +0700 Subject: [PATCH] Fix resolution pick --- .../ru/deadsoftware/cavedroid/game/GameProc.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameProc.java b/core/src/ru/deadsoftware/cavedroid/game/GameProc.java index d018b3e..8ceb7cf 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/GameProc.java +++ b/core/src/ru/deadsoftware/cavedroid/game/GameProc.java @@ -50,14 +50,11 @@ public class GameProc implements Serializable, Disposable { mobs.add(new Pig(i * 256, 196 * 16)); } physics = new GamePhysics(); - if (CaveGame.TOUCH) { - renderer = new GameRenderer(320, - 320 * ((float) GameScreen.getHeight() / GameScreen.getWidth())); - } else { - ctrlMode = 1; - renderer = new GameRenderer(480, - 480 * ((float) GameScreen.getHeight() / GameScreen.getWidth())); - } + + int scale = CaveGame.TOUCH ? 320 : 480; + if (CaveGame.TOUCH) ctrlMode = 1; + renderer = new GameRenderer(scale, scale * GameScreen.getHeight() / GameScreen.getWidth()); + maxCreativeScroll = GameItems.getItemsSize() / 8; createFluidThread(); -- 2.29.2