Dolphin deeds done in loader, exclude games/media

This commit is contained in:
Willy-JL
2023-08-03 23:19:23 +02:00
parent 21eeb53960
commit 09533b36e0
41 changed files with 8 additions and 112 deletions

View File

@@ -4,7 +4,6 @@
#include <input/input.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <dolphin/dolphin.h>
static int matrix[6][7] = {0};
static int cursorx = 3;
@@ -235,8 +234,6 @@ int32_t four_in_row_app(void* p) {
return 255;
}
// dolphin_deed(DolphinDeedPluginGameStart);
// Создаем новый view port
ViewPort* view_port = view_port_alloc();
// Создаем callback отрисовки, без контекста

View File

@@ -397,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);

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>
@@ -276,7 +275,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,
@@ -570,9 +568,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);
furi_mutex_acquire(game_state->mutex, FuriWaitForever);
@@ -630,4 +625,4 @@ free_and_exit:
furi_message_queue_free(event_queue);
return return_code;
}
}

View File

@@ -381,7 +381,6 @@ int32_t bomberduck_app(void* p) {
return 255;
}
// dolphin_deed(DolphinDeedPluginGameStart);
// Создаем новый view port
ViewPort* view_port = view_port_alloc();
// Создаем callback отрисовки, без контекста
@@ -456,7 +455,6 @@ int32_t bomberduck_app(void* p) {
world.running = 0;
world.level += 1;
// if(world.level % 5 == 0) {
// dolphin_deed(DolphinDeedPluginGameWin);
// }
}
for(int i = 0; i < world.bombs_count; i++) {

View File

@@ -3,7 +3,6 @@
#include <furi_hal.h>
#include <input/input.h>
#include <gui/elements.h>
#include <dolphin/dolphin.h>
#include "../helpers/camera_suite_haptic.h"
#include "../helpers/camera_suite_speaker.h"
#include "../helpers/camera_suite_led.h"
@@ -383,4 +382,4 @@ void camera_suite_view_camera_free(CameraSuiteViewCamera* instance) {
View* camera_suite_view_camera_get_view(CameraSuiteViewCamera* instance) {
furi_assert(instance);
return instance->view;
}
}

View File

@@ -3,7 +3,6 @@
#include <furi_hal.h>
#include <input/input.h>
#include <gui/elements.h>
#include <dolphin/dolphin.h>
struct CameraSuiteViewGuide {
View* view;

View File

@@ -993,9 +993,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);
furi_mutex_acquire(plugin_state->mutex, FuriWaitForever);

View File

@@ -2,7 +2,6 @@
#include <furi.h>
#include <furi_hal.h>
#include <dolphin/dolphin.h>
static bool dtmf_dolphin_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -83,7 +82,6 @@ int32_t dtmf_dolphin_app(void* p) {
UNUSED(p);
DTMFDolphinApp* app = app_alloc();
dolphin_deed(DolphinDeedPluginStart);
view_dispatcher_run(app->view_dispatcher);
app_free(app);

View File

@@ -6,7 +6,6 @@
#include <gui/canvas_i.h>
#include <gui/gui.h>
#include <input/input.h>
#include <dolphin/dolphin.h>
//#include <math.h>
//#include <notification/notification.h>
//#include <notification/notification_messages.h>
@@ -326,7 +325,6 @@ int32_t esp8266_deauth_app(void* p) {
SWiFiDeauthApp* app = malloc(sizeof(SWiFiDeauthApp));
dolphin_deed(DolphinDeedPluginStart);
esp8266_deauth_app_init(app);
furi_hal_gpio_init_simple(app->m_GpioButtons.pinButtonUp, GpioModeOutputPushPull);

View File

@@ -311,9 +311,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);

View File

@@ -3,7 +3,6 @@
#include <furi_hal.h>
#include <input/input.h>
#include <gui/elements.h>
//#include <dolphin/dolphin.h>
#include <storage/storage.h>
#include <string.h>
#include "flipbip_icons.h"

View File

@@ -456,9 +456,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();

View File

@@ -393,9 +393,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);

View File

@@ -532,9 +532,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) {

View File

@@ -8,7 +8,6 @@
#include <dialogs/dialogs.h>
#include "ir_remote_icons.h"
#include <assets_icons.h>
#include <dolphin/dolphin.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
@@ -113,7 +112,6 @@ static void app_input_callback(InputEvent* input_event, void* ctx) {
int32_t infrared_remote_app(char* p) {
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
dolphin_deed(DolphinDeedPluginStart);
// App button string
IRApp* app = malloc(sizeof(IRApp));

View File

@@ -236,9 +236,6 @@ static bool game_won(Minesweeper* minesweeper_state) {
message, furi_string_get_cstr(tempStr), 64, 32, AlignCenter, AlignCenter);
dialog_message_set_buttons(message, NULL, "Play again", NULL);
// Call dolphin deed when we win the game
// dolphin_deed(DolphinDeedPluginGameWin);
DialogMessageButton choice = dialog_message_show(minesweeper_state->dialogs, message);
dialog_message_free(message);
furi_string_free(tempStr);
@@ -393,9 +390,6 @@ int32_t minesweeper_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;
for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);

View File

@@ -1,6 +1,5 @@
#include "fuzzer_i.h"
#include "helpers/fuzzer_types.h"
#include <dolphin/dolphin.h>
static bool fuzzer_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -21,8 +20,6 @@ static void fuzzer_app_tick_event_callback(void* context) {
}
PacsFuzzerApp* fuzzer_app_alloc() {
dolphin_deed(DolphinDeedPluginStart);
PacsFuzzerApp* app = malloc(sizeof(PacsFuzzerApp));
app->fuzzer_state.menu_index = 0;

View File

@@ -1,5 +1,4 @@
#include "nfc_magic_i.h"
#include <dolphin/dolphin.h>
bool nfc_magic_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -174,7 +173,6 @@ int32_t nfc_magic_app(void* p) {
UNUSED(p);
NfcMagic* nfc_magic = nfc_magic_alloc();
dolphin_deed(DolphinDeedPluginStart);
scene_manager_next_scene(nfc_magic->scene_manager, NfcMagicSceneStart);
view_dispatcher_run(nfc_magic->view_dispatcher);

View File

@@ -9,7 +9,6 @@
#include <dialogs/dialogs.h>
#include <input/input.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <nrf24.h>
#include <u8g2.h>

View File

@@ -12,7 +12,6 @@
#include <nrf24.h>
#include "mousejacker_ducky.h"
#include <assets_icons.h>
#include <dolphin/dolphin.h>
#define TAG "mousejacker"
#define LOGITECH_MAX_CHANNEL 85
@@ -279,7 +278,6 @@ static int32_t mj_worker_thread(void* ctx) {
int32_t mousejacker_app(void* p) {
UNUSED(p);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
dolphin_deed(DolphinDeedPluginStart);
PluginState* plugin_state = malloc(sizeof(PluginState));
mousejacker_state_init(plugin_state);

View File

@@ -9,10 +9,8 @@
#include <dialogs/dialogs.h>
#include <input/input.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <nrf24.h>
#include <u8g2.h>
#include <dolphin/dolphin.h>
#define TAG "nrf24scan"
#define VERSION "2.2"
@@ -1332,7 +1330,6 @@ static void render_callback(Canvas* const canvas, void* ctx) {
int32_t nrf24scan_app(void* p) {
UNUSED(p);
APP = malloc(sizeof(Nrf24Scan));
dolphin_deed(DolphinDeedPluginStart);
APP->event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
PluginState* plugin_state = malloc(sizeof(PluginState));
plugin_state->mutex = furi_mutex_alloc(FuriMutexTypeNormal);

View File

@@ -4,7 +4,6 @@
#include <input/input.h>
#include <notification/notification_messages.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <nrf24.h>
#include <toolbox/stream/file_stream.h>
@@ -315,7 +314,6 @@ static void start_sniffing() {
int32_t nrfsniff_app(void* p) {
UNUSED(p);
dolphin_deed(DolphinDeedPluginStart);
uint8_t address[5] = {0};
uint32_t start = 0;
hexlify(address, 5, top_address);

View File

@@ -1,5 +1,4 @@
#include "picopass_i.h"
#include <dolphin/dolphin.h>
#define TAG "PicoPass"
@@ -219,7 +218,6 @@ int32_t picopass_app(void* p) {
UNUSED(p);
picopass_migrate_from_old_folder();
dolphin_deed(DolphinDeedPluginStart);
Picopass* picopass = picopass_alloc();
scene_manager_next_scene(picopass->scene_manager, PicopassSceneStart);

View File

@@ -4,7 +4,6 @@
#include <furi_hal.h>
#include <lib/flipper_format/flipper_format.h>
#include "protocols/protocol_items.h"
#include <dolphin/dolphin.h>
static bool pocsag_pager_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -199,7 +198,6 @@ int32_t pocsag_pager_app(void* p) {
UNUSED(p);
POCSAGPagerApp* pocsag_pager_app = pocsag_pager_app_alloc();
dolphin_deed(DolphinDeedPluginStart);
view_dispatcher_run(pocsag_pager_app->view_dispatcher);
pocsag_pager_app_free(pocsag_pager_app);

View File

@@ -32,10 +32,6 @@ static bool flipp_pomodoro_app_custom_event_callback(void* ctx, uint32_t event)
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);
FURI_LOG_I(TAG, "Focus stage reward added");
flipp_pomodoro_statistics__increase_focus_stages_completed(app->statistics);
};
@@ -110,9 +106,6 @@ int32_t flipp_pomodoro_app(void* p) {
FURI_LOG_I(TAG, "Initial");
FlippPomodoroApp* app = flipp_pomodoro_app_alloc();
FURI_LOG_I(TAG, "Run deed added");
// dolphin_deed(DolphinDeedPluginGameStart);
view_dispatcher_run(app->view_dispatcher);
flipp_pomodoro_app_free(app);

View File

@@ -15,7 +15,6 @@
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/elements.h>
#include <dolphin/dolphin.h>
#include <input/input.h>
// App resource imports

View File

@@ -2,7 +2,6 @@
* See the LICENSE file for information about the license. */
#include "app.h"
#include <dolphin/dolphin.h>
RawSamplesBuffer *RawSamples, *DetectedSamples;
extern const SubGhzProtocolRegistry protoview_protocol_registry;
@@ -259,7 +258,6 @@ static bool keyboard_view_dispatcher_navigation_callback(void* ctx) {
int32_t protoview_app_entry(void* p) {
UNUSED(p);
ProtoViewApp* app = protoview_app_alloc();
dolphin_deed(DolphinDeedPluginStart);
/* Create a timer. We do data analysis in the callback. */
FuriTimer* timer = furi_timer_alloc(timer_callback, FuriTimerTypePeriodic, app);

View File

@@ -2,7 +2,6 @@
#include <gui/gui.h>
#include <input/input.h>
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <furi_hal.h>
@@ -85,7 +84,6 @@ int32_t sentry_safe_app(void* p) {
UNUSED(p);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(Event));
dolphin_deed(DolphinDeedPluginStart);
SentryState* sentry_state = malloc(sizeof(SentryState));

View File

@@ -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>
@@ -400,8 +399,6 @@ int32_t snake_20_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);
@@ -525,4 +522,4 @@ int32_t snake_20_app(void* p) {
free(snake_state);
return 0;
}
}

View File

@@ -1,5 +1,4 @@
#include <stdlib.h>
#include <dolphin/dolphin.h>
#include <furi.h>
#include <gui/canvas_i.h>
#include "defines.h"
@@ -276,7 +275,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;
}
@@ -491,9 +489,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);
furi_mutex_acquire(game_state->mutex, FuriWaitForever);
@@ -567,4 +562,4 @@ free_and_exit:
free(game_state);
furi_message_queue_free(event_queue);
return return_code;
}
}

View File

@@ -5,7 +5,6 @@
#include <input/input.h>
#include <stdlib.h>
#include "spectrum_analyzer.h"
#include <dolphin/dolphin.h>
#include <lib/drivers/cc1101_regs.h>
#include "spectrum_analyzer_worker.h"
@@ -441,7 +440,6 @@ void spectrum_analyzer_free(SpectrumAnalyzer* instance) {
int32_t spectrum_analyzer_app(void* p) {
UNUSED(p);
dolphin_deed(DolphinDeedPluginStart);
SpectrumAnalyzer* spectrum_analyzer = spectrum_analyzer_alloc();
InputEvent input;

View File

@@ -1,7 +1,6 @@
#include "subbrute_i.h"
#include "subbrute_custom_event.h"
#include "scenes/subbrute_scene.h"
#include <dolphin/dolphin.h>
#define TAG "SubBruteApp"
@@ -203,7 +202,6 @@ int32_t subbrute_app(void* p) {
UNUSED(p);
furi_hal_power_suppress_charge_enter();
dolphin_deed(DolphinDeedPluginStart);
SubBruteState* instance = subbrute_alloc();
view_dispatcher_attach_to_gui(
instance->view_dispatcher, instance->gui, ViewDispatcherTypeFullscreen);

View File

@@ -18,7 +18,6 @@
#include <lib/subghz/transmitter.h>
#include <lib/subghz/protocols/raw.h>
#include <dolphin/dolphin.h>
#include "playlist_file.h"
#include "canvas_helper.h"
@@ -721,8 +720,6 @@ void playlist_free(Playlist* app) {
}
int32_t playlist_app(char* p) {
dolphin_deed(DolphinDeedPluginStart);
// create playlist folder
{
Storage* storage = furi_record_open(RECORD_STORAGE);

View File

@@ -3137,8 +3137,6 @@ int32_t swd_probe_app_main(void* p) {
DBGS("swd_execute_script");
swd_execute_script(app, SWD_PATH "/startup.swd");
// dolphin_deed(DolphinDeedPluginGameStart);
DBGS("processing");
for(bool processing = true; processing;) {
swd_main_loop(app);

View File

@@ -387,9 +387,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);

View File

@@ -331,9 +331,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);

View File

@@ -192,9 +192,6 @@ int32_t totp_app() {
return 253;
}
// Affecting dolphin level
// dolphin_deed(DolphinDeedPluginStart);
// Set system callbacks
ViewPort* view_port = view_port_alloc();
view_port_draw_callback_set(view_port, render_callback, plugin_state);

View File

@@ -3,7 +3,6 @@
#include <furi_hal_power.h>
#include <furi.h>
#include <furi_hal.h>
#include <dolphin/dolphin.h>
static bool wifi_deauther_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -25,7 +24,6 @@ static void wifi_deauther_app_tick_event_callback(void* context) {
WifideautherApp* wifi_deauther_app_alloc() {
WifideautherApp* app = malloc(sizeof(WifideautherApp));
dolphin_deed(DolphinDeedPluginStart);
app->gui = furi_record_open(RECORD_GUI);

View File

@@ -2,7 +2,6 @@
#include <furi.h>
#include <furi_hal.h>
#include <dolphin/dolphin.h>
static bool wifi_marauder_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -24,7 +23,6 @@ static void wifi_marauder_app_tick_event_callback(void* context) {
WifiMarauderApp* wifi_marauder_app_alloc() {
WifiMarauderApp* app = malloc(sizeof(WifiMarauderApp));
dolphin_deed(DolphinDeedPluginStart);
app->gui = furi_record_open(RECORD_GUI);
app->dialogs = furi_record_open(RECORD_DIALOGS);

View File

@@ -231,8 +231,6 @@ static void tick(PluginState* const plugin_state) {
free(z);
plugin_state->zombies[i] = NULL;
plugin_state->score++;
//if(plugin_state->score % 15 == 0) dolphin_deed(getRandomDeed());
//}
} else if(z->position.x <= WALL_X && z->position.x > 0) { // zombie got to the wall
plugin_state->zombies_count -= 1;
free(z);
@@ -313,9 +311,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) {

View File

@@ -120,7 +120,10 @@ static void loader_pubsub_callback(const void* message, void* context) {
static void loader_applications_start_app(LoaderApplicationsApp* app) {
const char* name = furi_string_get_cstr(app->fap_path);
// dolphin_deed(DolphinDeedPluginStart);
if(!furi_string_start_with_str(app->fap_path, EXT_PATH("apps/Games/")) &&
!furi_string_start_with_str(app->fap_path, EXT_PATH("apps/Media/"))) {
dolphin_deed(DolphinDeedPluginStart);
}
// load app
FuriThreadId thread_id = furi_thread_get_current_id();