From: fred-boy Date: Fri, 27 Sep 2019 11:20:28 +0000 (+0700) Subject: Fix resolution pick X-Git-Tag: alpha0.4~49 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=2c3594c99c35dec659d290e5daddd54f56603f98;p=cavedroid.git Fix resolution pick --- 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();