Tetris for the RA8875, derived from another users implementation.

Dependencies:   RA8875

Fork of Tetris by Sergejs Popovs

Tetris, adapted to the RA8875 graphics library and display.

As currently implemented, this version is defined for the 800x480 display. A number of macros can adapt it for other screen resolutions.

Further, while presently configured for landscape mode, it should be fairly easy to reconfigure it for portrait mode.

Revision:
10:a09d9bb9c5c8
Parent:
9:b97b336ab36a
--- a/Tetris/playGround.cpp	Sun Jul 28 03:35:36 2019 +0000
+++ b/Tetris/playGround.cpp	Sat Mar 28 15:34:00 2020 +0000
@@ -15,14 +15,14 @@
 #endif
 
 // Hot-Spots
-static const rect_t Drop   = rect_t( DROP );
-static const rect_t rLeft  = rect_t( ROT_LEFT );
-static const rect_t rRight = rect_t( ROT_RIGHT );
-static const rect_t mLeft  = rect_t( MOV_LEFT );
-static const rect_t mRight = rect_t( MOV_RIGHT );
-static const rect_t Replay = rect_t( REPLAY );
-static const point_t orig  = point_t(ORIGIN_X,ORIGIN_Y);
-static const point_t sb_orig = point_t(SB_X, SB_Y);
+static const rect_t Drop   = { DROP };
+static const rect_t rLeft  = { ROT_LEFT };
+static const rect_t rRight = { ROT_RIGHT };
+static const rect_t mLeft  = { MOV_LEFT };
+static const rect_t mRight = { MOV_RIGHT };
+static const rect_t Replay = { REPLAY };
+static const point_t orig  = { ORIGIN_X,ORIGIN_Y };
+static const point_t sb_orig = { SB_X, SB_Y };
 // Convert cell coordinates to a rectangle location
 //
 rect_t CellPosToRect(int x, int y, point_t o = orig, int bs = BLOCK_SIZE) {
@@ -139,7 +139,7 @@
     TFT.init(LCD_W,LCD_H,LCD_C);
     TFT.TouchPanelInit();
     TFT.Backlight_u8(BL_NORM);
-    TFT.SetOrientation();
+    TFT.SetGraphicsOrientation();
 }