mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
Playing games now affect Flipper's level
All games now will increase flipper's level when you start them or win in some of them Games with endless play like tetris or flappy bird has no winning logic so they will increase level only when you start them
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <gui/gui.h>
|
||||
#include <input/input.h>
|
||||
#include <storage/storage.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#include "digits.h"
|
||||
#include "array_utils.h"
|
||||
@@ -382,7 +383,7 @@ int32_t game_2048_app() {
|
||||
|
||||
ValueMutex state_mutex;
|
||||
if(!init_mutex(&state_mutex, game_state, sizeof(GameState))) {
|
||||
FURI_LOG_E("SnakeGame", "cannot create mutex\r\n");
|
||||
FURI_LOG_E("2048Game", "cannot create mutex\r\n");
|
||||
free(game_state);
|
||||
return 255;
|
||||
}
|
||||
@@ -397,6 +398,9 @@ int32_t game_2048_app() {
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
// Call dolphin deed on game start
|
||||
DOLPHIN_DEED(DolphinDeedPluginGameStart);
|
||||
|
||||
bool is_finished = false;
|
||||
while(!is_finished) {
|
||||
FuriStatus event_status = furi_message_queue_get(event_queue, &input, FuriWaitForever);
|
||||
|
||||
Reference in New Issue
Block a user