Remove dolphin deeds (xp) from games

This commit is contained in:
Willy-JL
2023-02-20 20:30:40 +00:00
parent 8d78d6b524
commit 85e77d82db
16 changed files with 5 additions and 79 deletions
@@ -5,7 +5,6 @@
#include <gui/view.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <dolphin/dolphin.h>
#define TAG "Arkanoid"
@@ -398,9 +397,6 @@ int32_t arkanoid_game_app(void* p) {
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
GameEvent event;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
+1 -6
View File
@@ -1,7 +1,6 @@
#include <gui/gui.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <dialogs/dialogs.h>
#include <gui/canvas_i.h>
@@ -278,7 +277,6 @@ void dealer_tick(GameState* game_state) {
if(dealer_score >= DEALER_MAX) {
if(dealer_score > 21 || dealer_score < player_score) {
DOLPHIN_DEED(DolphinDeedPluginGameWin);
enqueue(
&(game_state->queue_state),
game_state,
@@ -572,9 +570,6 @@ int32_t blackjack_app(void* p) {
AppEvent event;
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
GameState* localstate = (GameState*)acquire_mutex_block(&state_mutex);
@@ -635,4 +630,4 @@ free_and_exit:
furi_message_queue_free(event_queue);
return return_code;
}
}
-4
View File
@@ -13,7 +13,6 @@
#include "level.h"
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <dolphin/dolphin.h>
#define SOUND
@@ -996,9 +995,6 @@ int32_t doom_app() {
music_player_worker_load_rtttl_from_string(plugin_state->music_instance->worker, dsintro);
music_player_worker_start(plugin_state->music_instance->worker);
#endif
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
PluginState* plugin_state = (PluginState*)acquire_mutex_block(&state_mutex);
@@ -1,12 +1,10 @@
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <FlappyBird_icons.h>
#include <furi.h>
#include <gui/gui.h>
#include <gui/icon_animation_i.h>
#include <input/input.h>
#include <dolphin/dolphin.h>
#define TAG "Flappy"
#define DEBUG false
@@ -257,10 +255,6 @@ static void flappy_game_render_callback(Canvas* const canvas, void* ctx) {
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 37, 31, "Game Over");
if(game_state->points != 0 && game_state->points % 5 == 0) {
DOLPHIN_DEED(getRandomDeed());
}
canvas_set_font(canvas, FontSecondary);
char buffer[12];
snprintf(buffer, sizeof(buffer), "Score: %u", game_state->points);
@@ -313,9 +307,6 @@ int32_t flappy_game_app(void* p) {
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
GameEvent event;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
-4
View File
@@ -3,7 +3,6 @@
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <storage/storage.h>
#include <dolphin/dolphin.h>
#include "sandbox.h"
@@ -463,9 +462,6 @@ int32_t game15_app() {
sandbox_init(
FPS, (SandboxRenderCallback)render_callback, (SandboxEventHandler)game_event_handler);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
sandbox_loop();
sandbox_free();
game_free();
@@ -13,7 +13,6 @@
#include <gui/gui.h>
#include <input/input.h>
#include <storage/storage.h>
#include <dolphin/dolphin.h>
#include "digits.h"
#include "array_utils.h"
@@ -398,9 +397,6 @@ 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);
@@ -15,7 +15,6 @@
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <gui/canvas_i.h>
#include <dolphin/dolphin.h>
#define Y_FIELD_SIZE 6
#define Y_LAST (Y_FIELD_SIZE - 1)
@@ -531,9 +530,6 @@ int32_t heap_defence_app(void* p) {
game->game_status = 0;
game->animation = AnimationPause;
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
GameEvent event = {0};
while(event.input.key != InputKeyBack) {
if(furi_message_queue_get(event_queue, &event, 100) != FuriStatusOk) {
@@ -8,7 +8,6 @@
#include <dialogs/dialogs.h>
#include <m-string.h>
#include <dolphin/dolphin.h>
#include "assets.h"
@@ -253,9 +252,6 @@ static bool game_won(Minesweeper* minesweeper_state) {
dialog_message_set_buttons(message, NULL, "Play again", NULL);
dialog_message_set_icon(message, NULL, 72, 17);
// Call dolphin deed when we win the game
DOLPHIN_DEED(DolphinDeedPluginGameWin);
DialogMessageButton choice = dialog_message_show(dialogs, message);
dialog_message_free(message);
furi_string_free(tempStr);
@@ -410,9 +406,6 @@ int32_t minesweeper_app(void* p) {
Gui* gui = furi_record_open("gui");
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
PluginEvent event;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
@@ -29,11 +29,6 @@ static bool flipp_pomodoro_app_custom_event_callback(void* ctx, uint32_t event)
app->view_dispatcher, FlippPomodoroAppCustomEventStateUpdated);
return CustomEventConsumed;
case FlippPomodoroAppCustomEventStageComplete:
if(flipp_pomodoro__get_stage(app->state) == FlippPomodoroStageFocus) {
// REGISTER a deed on work stage complete to get an acheivement
DOLPHIN_DEED(DolphinDeedPluginGameWin);
};
flipp_pomodoro__toggle_stage(app->state);
notification_message(
app->notification_app,
@@ -98,4 +93,4 @@ int32_t flipp_pomodoro_app(void* p) {
flipp_pomodoro_app_free(app);
return 0;
};
};
@@ -2,7 +2,6 @@
#include <gui/gui.h>
#include <input/input.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
@@ -346,8 +345,6 @@ int32_t snake_game_app(void* p) {
notification_message_block(notification, &sequence_display_backlight_enforce_on);
DOLPHIN_DEED(DolphinDeedPluginGameStart);
SnakeEvent event;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
@@ -1,5 +1,4 @@
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <furi.h>
#include <gui/canvas_i.h>
#include "defines.h"
@@ -277,7 +276,6 @@ void tick(GameState* game_state, NotificationApp* notification) {
if(game_state->state == GameStatePlay) {
if(game_state->top_cards[0].character == 11 && game_state->top_cards[1].character == 11 &&
game_state->top_cards[2].character == 11 && game_state->top_cards[3].character == 11) {
DOLPHIN_DEED(DolphinDeedPluginGameWin);
game_state->state = GameStateAnimate;
return;
}
@@ -492,9 +490,6 @@ int32_t solitaire_app(void* p) {
AppEvent event;
// Call Dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 150);
GameState* localstate = (GameState*)acquire_mutex_block(&state_mutex);
@@ -6,7 +6,6 @@
#include <string.h>
#include <furi_hal_resources.h>
#include <furi_hal_gpio.h>
#include <dolphin/dolphin.h>
#define BORDER_OFFSET 1
#define MARGIN_OFFSET 3
@@ -154,10 +153,6 @@ static void tetris_game_render_callback(Canvas* const canvas, void* ctx) {
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 4, 63, "Game Over");
if(tetris_state->numLines % 8 == 0 && tetris_state->numLines != 0) {
DOLPHIN_DEED(getRandomDeed());
}
char buffer[13];
snprintf(buffer, sizeof(buffer), "Lines: %u", tetris_state->numLines);
canvas_set_font(canvas, FontSecondary);
@@ -395,9 +390,6 @@ int32_t tetris_game_app() {
Piece* newPiece = malloc(sizeof(Piece));
uint8_t downRepeatCounter = 0;
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) {
// This 10U implicitly sets the game loop speed. downRepeatCounter relies on this value
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 10U);
@@ -484,4 +476,4 @@ int32_t tetris_game_app() {
free(tetris_state);
return 0;
}
}
@@ -3,7 +3,6 @@
#include <input/input.h>
#include <stdlib.h>
#include <gui/view.h>
#include <dolphin/dolphin.h>
#define TAG "TicTacToe"
@@ -331,9 +330,6 @@ int32_t tictactoe_game_app(void* p) {
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
GameEvent event;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
@@ -383,4 +379,4 @@ int32_t tictactoe_game_app(void* p) {
free(tictactoe_state);
return 0;
}
}
+1 -5
View File
@@ -2,7 +2,6 @@
#include <gui/gui.h>
#include <input/input.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
//ORIGINAL REPO: https://github.com/Dooskington/flipperzero-zombiez
//AUTHORS: https://github.com/Dooskington | https://github.com/DevMilanIan
@@ -314,9 +313,6 @@ int32_t zombiez_game_app(void* p) {
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart);
PluginEvent event;
bool isRunning = true;
while(isRunning) {
@@ -401,4 +397,4 @@ free_and_exit:
furi_message_queue_free(event_queue);
return return_code;
}
}
@@ -40,8 +40,6 @@ static const DolphinDeedWeight dolphin_deed_weights[] = {
{1, DolphinAppPlugin}, // DolphinDeedGpioUartBridge
{1, DolphinAppPlugin}, // DolphinDeedPluginStart
{1, DolphinAppPlugin}, // DolphinDeedPluginGameStart
{10, DolphinAppPlugin}, // DolphinDeedPluginGameWin
};
static uint8_t dolphin_deed_limits[] = {
@@ -56,8 +56,6 @@ typedef enum {
DolphinDeedGpioUartBridge,
DolphinDeedPluginStart,
DolphinDeedPluginGameStart,
DolphinDeedPluginGameWin,
DolphinDeedMAX,