diff --git a/bin/classes/mangavalk/tetris/CanvasView.class b/bin/classes/mangavalk/tetris/CanvasView.class index 34d4cda..f7b24c6 100644 Binary files a/bin/classes/mangavalk/tetris/CanvasView.class and b/bin/classes/mangavalk/tetris/CanvasView.class differ diff --git a/src/mangavalk/tetris/CanvasView.java b/src/mangavalk/tetris/CanvasView.java index 8aff5f1..e798e51 100644 --- a/src/mangavalk/tetris/CanvasView.java +++ b/src/mangavalk/tetris/CanvasView.java @@ -310,14 +310,6 @@ public class CanvasView extends View } }; - /*private Runnable TimeoutDown = new Runnable() { - @Override - public void run() { - NextWillLock = true; - GoDown(); - } - };*/ - MediaPlayer mp; //endregion variabelen @@ -592,18 +584,11 @@ public class CanvasView extends View public void onResume() { - /*mp.start(); - GamePlaying = true;*/ - } - // 10 squares width - // 18 heigh + } private void DrawGameSpace(Canvas canvas) { - // Background - //Rect(canvas, GameSpaceTop, GameSpaceBottom, GameSpaceLeft, GameSpaceRight, Color.GRAY); - // Sides canvas.drawBitmap(bitmapblockline, GetRealPixelSize(DIP_W, dpWidth, 0), GetRealPixelSize(DIP_H, dpHeight, GameSpaceTop), null); canvas.drawBitmap(bitmapblockline, GetRealPixelSize(DIP_W, dpWidth, GameSpaceRight), GetRealPixelSize(DIP_H, dpHeight, GameSpaceTop), null); @@ -797,18 +782,6 @@ public class CanvasView extends View canvas.drawBitmap(bitmapgameover, (int)GetRealPixelSize(DIP_W, dpWidth, GameSpaceLeft), (int)GetRealPixelSize(DIP_H, dpHeight, GameSpaceTop), null); } - - /* - Rect(canvas, 122, 133, 1, 11, Color.BLUE); // Left - Rect(canvas, 122, 133, 21, 33, Color.BLUE); // Right - - Rect(canvas, 122, 137, 55, 70, Color.BLUE); // Rotate Left - Rect(canvas, 115, 137, 74, 88, Color.BLUE); // Rotate Right - - Rect(canvas, 143, 155, 28, 55, Color.BLUE); // Menu - - Rect(canvas, 133, 144, 11, 21, Color.BLUE); // Down - */ } private void DrawScore(Canvas canvas, int Score) @@ -1236,7 +1209,6 @@ public class CanvasView extends View { if (moveX >= 28 && moveX <= 55 && moveY >= 143 && moveY <= 155) // Menu { - //GamePlaying = !GamePlaying; if (GamePlaying) onPause(); else @@ -1250,15 +1222,6 @@ public class CanvasView extends View if (!goingDown) { - // Infinite swing - /*if (NextWillLock) - { - handler.removeCallbacksAndMessages(null); - int newSpeed = (int)((1000 / 59.73) * LevelSpeed[_level]); - handler.postDelayed(runnable, newSpeed); - NextWillLock = false; - }*/ - if (GamePlaying) { if (!GameOver) @@ -1340,11 +1303,6 @@ public class CanvasView extends View } else { - /*if (NextWillLock) - {*/ - /*int newSpeed = (int)((1000 / 59.73) * LevelSpeed[level]); - handler.postDelayed(runnable, newSpeed);*/ - NextWillLock = false; ParseBlockArrayToDrawArray(); @@ -1364,13 +1322,6 @@ public class CanvasView extends View { this.postInvalidate(); } - /*} - else - { - NextWillLock = true; - handler.removeCallbacksAndMessages(null); - handler.postDelayed(TimeoutDown, 3000); - }*/ } goingDown = false; @@ -1444,11 +1395,8 @@ public class CanvasView extends View { for (int y=17; y>0; y--) { - /*if (blockArray[y-1][x] != 0) - {*/ blockArray[y][x] = blockArray[y-1][x]; blockArray[y-1][x] = 0; - //} } } } @@ -1459,11 +1407,8 @@ public class CanvasView extends View { for (int x=1; x<10; x++) { - /*if (blockArray[y][x-1] == 0) - {*/ blockArray[y][x-1] = blockArray[y][x]; blockArray[y][x] = 0; - //} } } } @@ -1474,11 +1419,8 @@ public class CanvasView extends View { for (int x=8; x>=0; x--) { - /*if (blockArray[y][x-1] == 0) - {*/ blockArray[y][x+1] = blockArray[y][x]; blockArray[y][x] = 0; - //} } } } @@ -1842,7 +1784,6 @@ public class CanvasView extends View paint.setColor(Color); paint.setStyle(Style.FILL); - // Style Square canvas.drawRect( GetRealPixelSize(DIP_W, dpWidth, Left), GetRealPixelSize(DIP_H, dpHeight, Top),