From 4c60bc9e681865fcfc149775a1ed7ccd2613d5bf Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 23 May 2021 17:30:58 +0100 Subject: New port: Shanling Q1 native - Audio playback works - Touchscreen and buttons work - Bootloader works and is capable of dual boot - Plugins are working - Cabbiev2 theme has been ported - Stable for general usage Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps. There's a few minor known issues: - Bootloader must be installed manually using 'usbboot' as there is no support in jztool yet. - Keymaps may be lacking, need further testing and feedback. - Some plugins may not be fully adapted to the screen size and could benefit from further tweaking. - LCD shows abnormal effects under some circumstances: for example, after viewing a mostly black screen an afterimage appears briefly when going back to a brightly-lit screen. Sudden power-off without proper shutdown of the backlight causes a "dissolving" effect. - CW2015 battery reporting driver is buggy, and disabled for now. Battery reporting is currently voltage-based using the AXP192. Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a --- apps/plugins/snake2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'apps/plugins/snake2.c') diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 1536840daf..094fd854eb 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -62,6 +62,18 @@ Head and Tail are stored #define TOP_X4 548 /* x-coord of the lowerright item (hi-score) */ #define TOP_Y1 8 /* y-coord of the top row of items */ #define TOP_Y2 50 /* y-coord of the bottom row of items */ +#elif (LCD_WIDTH >= 360) && (LCD_HEIGHT >= 400) + #define MULTIPLIER 12 /*Modifier for porting on other screens*/ + #define MODIFIER_1 12 + #define MODIFIER_2 10 + #define CENTER_X 12 + #define CENTER_Y 40 + #define TOP_X1 34 /* x-coord of the upperleft item (game type) */ + #define TOP_X2 320 /* x-coord of the upperright item (maze type) */ + #define TOP_X3 42 /* x-coord of the lowerleft item (speed) */ + #define TOP_X4 314 /* x-coord of the lowerright item (hi-score) */ + #define TOP_Y1 4 /* y-coord of the top row of items */ + #define TOP_Y2 25 /* y-coord of the bottom row of items */ #elif (LCD_WIDTH >= 320) && (LCD_HEIGHT >= 240) #define MULTIPLIER 10 /*Modifier for porting on other screens*/ #define MODIFIER_1 10 @@ -446,6 +458,9 @@ CONFIG_KEYPAD == MROBE500_PAD #define SNAKE2_PLAYPAUSE BUTTON_PLAY #define SNAKE2_PLAYPAUSE_TEXT "PLAY" +#elif CONFIG_KEYPAD == SHANLING_Q1_PAD +/* use touchscreen */ + #else #error No keymap defined! #endif -- cgit v1.2.3