]> git.zerfleddert.de Git - FreeShisen/commitdiff
use "traditional" tileset from libkmahjongg, with bigger resolution
authorgitknilch <gitknilch@cwde.de>
Sat, 30 Mar 2013 07:39:47 +0000 (08:39 +0100)
committergitknilch <gitknilch@cwde.de>
Sat, 30 Mar 2013 07:39:47 +0000 (08:39 +0100)
remove old tileset for now

res/drawable/tileset.png [deleted file]
res/drawable/traditional.png [new file with mode: 0644]
src/de/cwde/freeshisen/ShisenShoView.java

diff --git a/res/drawable/tileset.png b/res/drawable/tileset.png
deleted file mode 100644 (file)
index b4286a7..0000000
Binary files a/res/drawable/tileset.png and /dev/null differ
diff --git a/res/drawable/traditional.png b/res/drawable/traditional.png
new file mode 100644 (file)
index 0000000..9555304
Binary files /dev/null and b/res/drawable/traditional.png differ
index 6f567ce21e92bf57302e0ea426f0fd1fb35bbb27..b802f0d59511e87a7b531c2a64a8fc87c6ce047e 100644 (file)
@@ -111,7 +111,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
        private void loadTileset() {
                BitmapFactory.Options ops = new BitmapFactory.Options();
                ops.inScaled = false;
-               Bitmap tileset = BitmapFactory.decodeResource(getResources(), R.drawable.tileset, ops);
+               Bitmap tileset = BitmapFactory.decodeResource(getResources(), R.drawable.traditional, ops);
                tileset.setDensity(Bitmap.DENSITY_NONE);
 
                // The tile set has 4 rows x 9 columns
@@ -124,8 +124,8 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
                // align to screen:
                // "large" is 16x6, and we want to have a nice border, so we use 17x7 and
                // choose the lowest scale so everything fits
-               float scalex = ((float) screenWidth/17) / loadedtileWidth;
-               float scaley = ((float) screenHeight/7) / loadedtileHeight;
+               float scalex = ((float) (screenWidth - 2)/17) / loadedtileWidth;
+               float scaley = ((float) (screenHeight - 2)/7) / loadedtileHeight;
                if (scaley < scalex) {
                        scalex = scaley;
                } else {
Impressum, Datenschutz