Skip to content

Commit

Permalink
Add snake game
Browse files Browse the repository at this point in the history
* Applications: Added a classic game https://en.wikipedia.org/wiki/Snake_(video_game_genre)
Co-authored-by: LionZXY <nikita@kulikof.ru>
  • Loading branch information
OlegSchwann committed Nov 22, 2021
1 parent efded63 commit 36ba49e
Show file tree
Hide file tree
Showing 3 changed files with 430 additions and 0 deletions.
5 changes: 5 additions & 0 deletions applications/applications.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern int32_t vibro_test_app(void* p);

// Plugins
extern int32_t music_player_app(void* p);
extern int32_t snake_game_app(void* p);

// On system start hooks declaration
extern void bt_cli_init();
Expand Down Expand Up @@ -203,6 +204,10 @@ const FlipperApplication FLIPPER_PLUGINS[] = {
#ifdef APP_MUSIC_PLAYER
{.app = music_player_app, .name = "Music Player", .stack_size = 1024, .icon = &A_Plugins_14},
#endif

#ifdef APP_SNAKE_GAME
{.app = snake_game_app, .name = "Snake Game", .stack_size = 1024, .icon = &A_Plugins_14},
#endif
};

const size_t FLIPPER_PLUGINS_COUNT = sizeof(FLIPPER_PLUGINS) / sizeof(FlipperApplication);
Expand Down
6 changes: 6 additions & 0 deletions applications/applications.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ APP_ABOUT = 1

# Plugins
APP_MUSIC_PLAYER = 1
APP_SNAKE_GAME = 1

# Debug
APP_ACCESSOR = 1
Expand Down Expand Up @@ -185,6 +186,11 @@ CFLAGS += -DAPP_MUSIC_PLAYER
SRV_GUI = 1
endif

APP_SNAKE_GAME ?= 0
ifeq ($(APP_SNAKE_GAME), 1)
CFLAGS += -DAPP_SNAKE_GAME
SRV_GUI = 1
endif

APP_IBUTTON ?= 0
ifeq ($(APP_IBUTTON), 1)
Expand Down
Loading

0 comments on commit 36ba49e

Please sign in to comment.