![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tetris for the RA8875, derived from another users implementation.
Fork of Tetris by
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.
Diff: Tetris/playGround.cpp
- Revision:
- 9:b97b336ab36a
- Parent:
- 7:0e426e81c566
- Child:
- 10:a09d9bb9c5c8
diff -r 6e28bd30cfb4 -r b97b336ab36a Tetris/playGround.cpp --- a/Tetris/playGround.cpp Mon Mar 04 12:16:19 2019 +0000 +++ b/Tetris/playGround.cpp Sun Jul 28 03:35:36 2019 +0000 @@ -15,14 +15,14 @@ #endif // Hot-Spots -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}; +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); // Convert cell coordinates to a rectangle location // rect_t CellPosToRect(int x, int y, point_t o = orig, int bs = BLOCK_SIZE) {