Skip to content

Commit 36ba49e

Browse files
committed
Add snake game
* Applications: Added a classic game https://en.wikipedia.org/wiki/Snake_(video_game_genre) Co-authored-by: LionZXY <nikita@kulikof.ru>
1 parent efded63 commit 36ba49e

File tree

3 files changed

+430
-0
lines changed

3 files changed

+430
-0
lines changed

applications/applications.c

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ extern int32_t vibro_test_app(void* p);
4242

4343
// Plugins
4444
extern int32_t music_player_app(void* p);
45+
extern int32_t snake_game_app(void* p);
4546

4647
// On system start hooks declaration
4748
extern void bt_cli_init();
@@ -203,6 +204,10 @@ const FlipperApplication FLIPPER_PLUGINS[] = {
203204
#ifdef APP_MUSIC_PLAYER
204205
{.app = music_player_app, .name = "Music Player", .stack_size = 1024, .icon = &A_Plugins_14},
205206
#endif
207+
208+
#ifdef APP_SNAKE_GAME
209+
{.app = snake_game_app, .name = "Snake Game", .stack_size = 1024, .icon = &A_Plugins_14},
210+
#endif
206211
};
207212

208213
const size_t FLIPPER_PLUGINS_COUNT = sizeof(FLIPPER_PLUGINS) / sizeof(FlipperApplication);

applications/applications.mk

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ APP_ABOUT = 1
3535

3636
# Plugins
3737
APP_MUSIC_PLAYER = 1
38+
APP_SNAKE_GAME = 1
3839

3940
# Debug
4041
APP_ACCESSOR = 1
@@ -185,6 +186,11 @@ CFLAGS += -DAPP_MUSIC_PLAYER
185186
SRV_GUI = 1
186187
endif
187188

189+
APP_SNAKE_GAME ?= 0
190+
ifeq ($(APP_SNAKE_GAME), 1)
191+
CFLAGS += -DAPP_SNAKE_GAME
192+
SRV_GUI = 1
193+
endif
188194

189195
APP_IBUTTON ?= 0
190196
ifeq ($(APP_IBUTTON), 1)

0 commit comments

Comments
 (0)