1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

dolphin did

This commit is contained in:
MX
2023-06-09 14:14:05 +03:00
parent e9fc5f62a5
commit 53f6205766
19 changed files with 24 additions and 24 deletions

View File

@@ -399,7 +399,7 @@ int32_t arkanoid_game_app(void* p) {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
GameEvent event; GameEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@@ -276,7 +276,7 @@ void dealer_tick(GameState* game_state) {
if(dealer_score >= DEALER_MAX) { if(dealer_score >= DEALER_MAX) {
if(dealer_score > 21 || dealer_score < player_score) { if(dealer_score > 21 || dealer_score < player_score) {
DOLPHIN_DEED(DolphinDeedPluginGameWin); dolphin_deed(DolphinDeedPluginGameWin);
enqueue( enqueue(
&(game_state->queue_state), &(game_state->queue_state),
game_state, game_state,
@@ -571,7 +571,7 @@ int32_t blackjack_app(void* p) {
AppEvent event; AppEvent event;
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) { for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100); FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);

View File

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

View File

@@ -991,7 +991,7 @@ int32_t doom_app() {
music_player_worker_start(plugin_state->music_instance->worker); music_player_worker_start(plugin_state->music_instance->worker);
#endif #endif
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) { for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100); FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);

View File

@@ -309,7 +309,7 @@ int32_t flappy_game_app(void* p) {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
GameEvent event; GameEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@@ -464,7 +464,7 @@ int32_t game15_app() {
FPS, (SandboxRenderCallback)render_callback, (SandboxEventHandler)game_event_handler); FPS, (SandboxRenderCallback)render_callback, (SandboxEventHandler)game_event_handler);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
sandbox_loop(); sandbox_loop();
sandbox_free(); sandbox_free();

View File

@@ -401,7 +401,7 @@ int32_t game_2048_app() {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
bool is_finished = false; bool is_finished = false;
while(!is_finished) { while(!is_finished) {

View File

@@ -535,7 +535,7 @@ int32_t heap_defence_app(void* p) {
game->animation = AnimationPause; game->animation = AnimationPause;
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
GameEvent event = {0}; GameEvent event = {0};
while(event.input.key != InputKeyBack) { while(event.input.key != InputKeyBack) {

View File

@@ -240,7 +240,7 @@ static bool game_won(Minesweeper* minesweeper_state) {
dialog_message_set_buttons(message, NULL, "Play again", NULL); dialog_message_set_buttons(message, NULL, "Play again", NULL);
// Call dolphin deed when we win the game // Call dolphin deed when we win the game
DOLPHIN_DEED(DolphinDeedPluginGameWin); dolphin_deed(DolphinDeedPluginGameWin);
DialogMessageButton choice = dialog_message_show(minesweeper_state->dialogs, message); DialogMessageButton choice = dialog_message_show(minesweeper_state->dialogs, message);
dialog_message_free(message); dialog_message_free(message);
@@ -397,7 +397,7 @@ int32_t minesweeper_app(void* p) {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
PluginEvent event; PluginEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@@ -276,7 +276,7 @@ void tick(GameState* game_state, NotificationApp* notification) {
if(game_state->state == GameStatePlay) { if(game_state->state == GameStatePlay) {
if(game_state->top_cards[0].character == 11 && game_state->top_cards[1].character == 11 && 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) { game_state->top_cards[2].character == 11 && game_state->top_cards[3].character == 11) {
DOLPHIN_DEED(DolphinDeedPluginGameWin); dolphin_deed(DolphinDeedPluginGameWin);
game_state->state = GameStateAnimate; game_state->state = GameStateAnimate;
return; return;
} }
@@ -492,7 +492,7 @@ int32_t solitaire_app(void* p) {
AppEvent event; AppEvent event;
// Call Dolphin deed on game start // Call Dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) { for(bool processing = true; processing;) {
FuriStatus event_status = furi_message_queue_get(event_queue, &event, 150); FuriStatus event_status = furi_message_queue_get(event_queue, &event, 150);

View File

@@ -3130,7 +3130,7 @@ int32_t swd_probe_app_main(void* p) {
DBGS("swd_execute_script"); DBGS("swd_execute_script");
swd_execute_script(app, ANY_PATH("swd_scripts/startup.swd")); swd_execute_script(app, ANY_PATH("swd_scripts/startup.swd"));
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
DBGS("processing"); DBGS("processing");
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@@ -389,7 +389,7 @@ int32_t tetris_game_app() {
uint8_t downRepeatCounter = 0; uint8_t downRepeatCounter = 0;
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
for(bool processing = true; processing;) { for(bool processing = true; processing;) {
// This 10U implicitly sets the game loop speed. downRepeatCounter relies on this value // This 10U implicitly sets the game loop speed. downRepeatCounter relies on this value

View File

@@ -333,7 +333,7 @@ int32_t tictactoe_game_app(void* p) {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
GameEvent event; GameEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@@ -173,7 +173,7 @@ int32_t totp_app() {
} }
// Affecting dolphin level // Affecting dolphin level
DOLPHIN_DEED(DolphinDeedPluginStart); dolphin_deed(DolphinDeedPluginStart);
// Set system callbacks // Set system callbacks
ViewPort* view_port = view_port_alloc(); ViewPort* view_port = view_port_alloc();

View File

@@ -232,7 +232,7 @@ static void tick(PluginState* const plugin_state) {
free(z); free(z);
plugin_state->zombies[i] = NULL; plugin_state->zombies[i] = NULL;
plugin_state->score++; plugin_state->score++;
//if(plugin_state->score % 15 == 0) DOLPHIN_DEED(getRandomDeed()); //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 } else if(z->position.x <= WALL_X && z->position.x > 0) { // zombie got to the wall
plugin_state->zombies_count -= 1; plugin_state->zombies_count -= 1;
@@ -315,7 +315,7 @@ int32_t zombiez_game_app(void* p) {
gui_add_view_port(gui, view_port, GuiLayerFullscreen); gui_add_view_port(gui, view_port, GuiLayerFullscreen);
// Call dolphin deed on game start // Call dolphin deed on game start
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
PluginEvent event; PluginEvent event;
bool isRunning = true; bool isRunning = true;

View File

@@ -190,7 +190,7 @@ int32_t lfrfid_app(void* p) {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen); app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate); scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
DOLPHIN_DEED(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
} else { } else {
// TODO: exit properly // TODO: exit properly
lfrfid_free(app); lfrfid_free(app);

View File

@@ -292,7 +292,7 @@ int32_t nfc_app(void* p) {
dolphin_deed(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} else if(nfc->dev->format == NfcDeviceSaveFormatNfcV) { } else if(nfc->dev->format == NfcDeviceSaveFormatNfcV) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate);
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
dolphin_deed(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);

View File

@@ -93,7 +93,7 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) {
} else if(event.event == NfcWorkerEventReadBankCard) { } else if(event.event == NfcWorkerEventReadBankCard) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmvReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmvReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadMfClassicDictAttackRequired) { } else if(event.event == NfcWorkerEventReadMfClassicDictAttackRequired) {
if(mf_classic_dict_check_presence(MfClassicDictTypeSystem)) { if(mf_classic_dict_check_presence(MfClassicDictTypeSystem)) {

View File

@@ -110,7 +110,7 @@ bool subghz_scene_start_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state( scene_manager_set_scene_state(
subghz->scene_manager, SubGhzSceneStart, SubmenuIndexFrequencyAnalyzer); subghz->scene_manager, SubGhzSceneStart, SubmenuIndexFrequencyAnalyzer);
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneFrequencyAnalyzer); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneFrequencyAnalyzer);
DOLPHIN_DEED(DolphinDeedSubGhzFrequencyAnalyzer); dolphin_deed(DolphinDeedSubGhzFrequencyAnalyzer);
return true; return true;
} else if(event.event == SubmenuIndexTest) { } else if(event.event == SubmenuIndexTest) {
scene_manager_set_scene_state( scene_manager_set_scene_state(