v0.4.2: reintroduced scissoring, now only used when its needed

This commit is contained in:
Evan Debenham
2016-09-08 20:13:40 -04:00
parent 275dcf8863
commit 23ac0135f3
4 changed files with 22 additions and 5 deletions
@@ -36,7 +36,9 @@ public class Camera extends Gizmo {
protected static float invH2;
public static Camera main;
public boolean fullScreen;
public float zoom;
public int x;
@@ -101,10 +103,12 @@ public class Camera extends Gizmo {
public static Camera createFullscreen( float zoom ) {
int w = (int)Math.ceil( Game.width / zoom );
int h = (int)Math.ceil( Game.height / zoom );
return new Camera(
(int)(Game.width - w * zoom) / 2,
(int)(Game.height - h * zoom) / 2,
w, h, zoom );
Camera c = new Camera(
(int)(Game.width - w * zoom) / 2,
(int)(Game.height - h * zoom) / 2,
w, h, zoom );
c.fullScreen = true;
return c;
}
public Camera( int x, int y, int width, int height, float zoom ) {