NXP Rapid IoT prototyping kit port of Silabs "hungry gecko" smake-like game. https://os.mbed.com/teams/SiliconLabs/code/Hungry_gecko/
Dependencies: lib_sx9500 GraphicsDisplay ColorMemLCD Large_fonts
See a detailed description of this project on Hackster.io . https://www.hackster.io/marcomerli/riotwear-snake-ca6dfc
Diff: settings.h
- Revision:
- 80:77210aa1ad9c
- Child:
- 81:737dff75e013
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/settings.h Thu Dec 26 16:47:58 2019 +0000 @@ -0,0 +1,33 @@ +/***************************************************************************//** + * @file settings.h + * @settings file for Hungry Gecko program + ******************************************************************************/ +#ifndef SETTINGS_H_ +#define SETTINGS_H_ +#include "LCDSettings.h" +#include "ColorMemLCD.h" + +#define MAXLENGTH 255 +#define STEPSIZE 7 + +/* Define board limits, note that the display height and display width is 128 + * This particlular choice leads to 255 STEPSIZE x STEPSIZE tiles. Thus, + * the tile number can be stored in 1 uint8_t + * */ +#define TOPEDGE 3 +#define BOARD_HEIGHT 15 +#define BOARD_WIDTH 16 +#define BOARDERWIDTH (DISPLAY_WIDTH - STEPSIZE*BOARD_WIDTH) + +#define FOREGROUND_COLOR LCD_COLOR_BLACK +#define BACKGROUND_COLOR LCD_COLOR_GREEN // LCD_COLOR_WHITE + +#define MULTI_UPDATE 0 +#define TICKER_EN 1 + +/* Define allowed direction to move */ +typedef enum{ + LEFT=0, RIGHT, UP, DOWN +} Direction; + +#endif /* SETTINGS_H_ */ \ No newline at end of file