Revert "Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into dev"
This reverts commit 708dd167c8.
2
.gitignore
vendored
@@ -74,7 +74,9 @@ lib/STM32CubeWB
|
|||||||
|
|
||||||
# Asset packs
|
# Asset packs
|
||||||
assets/dolphin/custom/*
|
assets/dolphin/custom/*
|
||||||
|
!assets/dolphin/custom/NSFW/
|
||||||
!assets/dolphin/custom/WatchDogs/
|
!assets/dolphin/custom/WatchDogs/
|
||||||
!assets/dolphin/custom/ReadMe.md
|
!assets/dolphin/custom/ReadMe.md
|
||||||
assets/resources/dolphin_custom/*
|
assets/resources/dolphin_custom/*
|
||||||
|
!assets/resources/dolphin_custom/NSFW/
|
||||||
!assets/resources/dolphin_custom/WatchDogs/
|
!assets/resources/dolphin_custom/WatchDogs/
|
||||||
|
|||||||
@@ -457,10 +457,14 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) {
|
|||||||
|
|
||||||
browser->last_tab_switch_dir = key;
|
browser->last_tab_switch_dir = key;
|
||||||
|
|
||||||
if(key == InputKeyLeft) {
|
for(int i = 0; i < 2; i++) {
|
||||||
tab = ((tab - 1) + ArchiveTabTotal) % ArchiveTabTotal;
|
if(key == InputKeyLeft) {
|
||||||
} else {
|
tab = ((tab - 1) + ArchiveTabTotal) % ArchiveTabTotal;
|
||||||
tab = (tab + 1) % ArchiveTabTotal;
|
} else {
|
||||||
|
tab = (tab + 1) % ArchiveTabTotal;
|
||||||
|
}
|
||||||
|
if(tab == ArchiveTabInternal && !furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) continue;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
browser->is_root = true;
|
browser->is_root = true;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ static const char* tab_default_paths[] = {
|
|||||||
[ArchiveTabBadUsb] = ANY_PATH("badusb"),
|
[ArchiveTabBadUsb] = ANY_PATH("badusb"),
|
||||||
[ArchiveTabU2f] = "/app:u2f",
|
[ArchiveTabU2f] = "/app:u2f",
|
||||||
[ArchiveTabApplications] = ANY_PATH("apps"),
|
[ArchiveTabApplications] = ANY_PATH("apps"),
|
||||||
|
[ArchiveTabInternal] = STORAGE_INT_PATH_PREFIX,
|
||||||
[ArchiveTabBrowser] = STORAGE_ANY_PATH_PREFIX,
|
[ArchiveTabBrowser] = STORAGE_ANY_PATH_PREFIX,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ static const ArchiveFileTypeEnum known_type[] = {
|
|||||||
[ArchiveTabBadUsb] = ArchiveFileTypeBadUsb,
|
[ArchiveTabBadUsb] = ArchiveFileTypeBadUsb,
|
||||||
[ArchiveTabU2f] = ArchiveFileTypeU2f,
|
[ArchiveTabU2f] = ArchiveFileTypeU2f,
|
||||||
[ArchiveTabApplications] = ArchiveFileTypeApplication,
|
[ArchiveTabApplications] = ArchiveFileTypeApplication,
|
||||||
|
[ArchiveTabInternal] = ArchiveFileTypeUnknown,
|
||||||
[ArchiveTabBrowser] = ArchiveFileTypeUnknown,
|
[ArchiveTabBrowser] = ArchiveFileTypeUnknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ static const char* ArchiveTabNames[] = {
|
|||||||
[ArchiveTabBadUsb] = "Bad USB",
|
[ArchiveTabBadUsb] = "Bad USB",
|
||||||
[ArchiveTabU2f] = "U2F",
|
[ArchiveTabU2f] = "U2F",
|
||||||
[ArchiveTabApplications] = "Apps",
|
[ArchiveTabApplications] = "Apps",
|
||||||
|
[ArchiveTabInternal] = "Internal",
|
||||||
[ArchiveTabBrowser] = "Browser",
|
[ArchiveTabBrowser] = "Browser",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ typedef enum {
|
|||||||
ArchiveTabBadUsb,
|
ArchiveTabBadUsb,
|
||||||
ArchiveTabU2f,
|
ArchiveTabU2f,
|
||||||
ArchiveTabApplications,
|
ArchiveTabApplications,
|
||||||
|
ArchiveTabInternal,
|
||||||
ArchiveTabBrowser,
|
ArchiveTabBrowser,
|
||||||
ArchiveTabTotal,
|
ArchiveTabTotal,
|
||||||
} ArchiveTabEnum;
|
} ArchiveTabEnum;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "../bad_usb_app_i.h"
|
#include "../bad_usb_app_i.h"
|
||||||
#include "../../../settings/xtreme_settings/xtreme_settings.h"
|
#include "../../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BadUsbCustomEventErrorBack,
|
BadUsbCustomEventErrorBack,
|
||||||
@@ -32,7 +32,7 @@ void bad_usb_scene_error_on_enter(void* context) {
|
|||||||
app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app);
|
app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app);
|
||||||
} else if(app->error == BadUsbAppErrorCloseRpc) {
|
} else if(app->error == BadUsbAppErrorCloseRpc) {
|
||||||
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
|
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
widget_add_string_multiline_element(
|
widget_add_string_multiline_element(
|
||||||
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
|
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
|
||||||
widget_add_string_multiline_element(
|
widget_add_string_multiline_element(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <toolbox/path.h>
|
#include <toolbox/path.h>
|
||||||
#include <gui/elements.h>
|
#include <gui/elements.h>
|
||||||
#include <assets_icons.h>
|
#include <assets_icons.h>
|
||||||
#include "../../../settings/xtreme_settings/xtreme_settings.h"
|
#include "../../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
#define MAX_NAME_LEN 64
|
#define MAX_NAME_LEN 64
|
||||||
|
|
||||||
@@ -28,7 +28,6 @@ static void bad_usb_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
elements_string_fit_width(canvas, disp_str, 128 - 2);
|
elements_string_fit_width(canvas, disp_str, 128 - 2);
|
||||||
canvas_set_font(canvas, FontSecondary);
|
canvas_set_font(canvas, FontSecondary);
|
||||||
canvas_draw_str(canvas, 2, 8, furi_string_get_cstr(disp_str));
|
canvas_draw_str(canvas, 2, 8, furi_string_get_cstr(disp_str));
|
||||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
|
||||||
|
|
||||||
if(strlen(model->layout) == 0) {
|
if(strlen(model->layout) == 0) {
|
||||||
furi_string_set(disp_str, "(default)");
|
furi_string_set(disp_str, "(default)");
|
||||||
@@ -49,7 +48,7 @@ static void bad_usb_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
|
|
||||||
if((model->state.state == BadUsbStateIdle) || (model->state.state == BadUsbStateDone) ||
|
if((model->state.state == BadUsbStateIdle) || (model->state.state == BadUsbStateDone) ||
|
||||||
(model->state.state == BadUsbStateNotConnected)) {
|
(model->state.state == BadUsbStateNotConnected)) {
|
||||||
if(xtreme_settings->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
elements_button_center(canvas, "Cum");
|
elements_button_center(canvas, "Cum");
|
||||||
} else {
|
} else {
|
||||||
elements_button_center(canvas, "Start");
|
elements_button_center(canvas, "Start");
|
||||||
@@ -68,7 +67,7 @@ static void bad_usb_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
if(model->state.state == BadUsbStateNotConnected) {
|
if(model->state.state == BadUsbStateNotConnected) {
|
||||||
canvas_draw_icon(canvas, 4, 26, &I_Clock_18x18);
|
canvas_draw_icon(canvas, 4, 26, &I_Clock_18x18);
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
if(xtreme_settings->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Plug me");
|
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Plug me");
|
||||||
canvas_draw_str_aligned(canvas, 127, 43, AlignRight, AlignBottom, "in, Daddy");
|
canvas_draw_str_aligned(canvas, 127, 43, AlignRight, AlignBottom, "in, Daddy");
|
||||||
} else {
|
} else {
|
||||||
@@ -78,7 +77,7 @@ static void bad_usb_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
} else if(model->state.state == BadUsbStateWillRun) {
|
} else if(model->state.state == BadUsbStateWillRun) {
|
||||||
canvas_draw_icon(canvas, 4, 26, &I_Clock_18x18);
|
canvas_draw_icon(canvas, 4, 26, &I_Clock_18x18);
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
if(xtreme_settings->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Will cum");
|
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Will cum");
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Will run");
|
canvas_draw_str_aligned(canvas, 127, 31, AlignRight, AlignBottom, "Will run");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "../u2f_app_i.h"
|
#include "../u2f_app_i.h"
|
||||||
#include "../../../settings/xtreme_settings/xtreme_settings.h"
|
#include "../../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
static void u2f_scene_error_event_callback(GuiButtonType result, InputType type, void* context) {
|
static void u2f_scene_error_event_callback(GuiButtonType result, InputType type, void* context) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
@@ -27,7 +27,7 @@ void u2f_scene_error_on_enter(void* context) {
|
|||||||
app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app);
|
app->widget, GuiButtonTypeLeft, "Back", u2f_scene_error_event_callback, app);
|
||||||
} else if(app->error == U2fAppErrorCloseRpc) {
|
} else if(app->error == U2fAppErrorCloseRpc) {
|
||||||
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
|
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
widget_add_string_multiline_element(
|
widget_add_string_multiline_element(
|
||||||
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
|
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
|
||||||
widget_add_string_multiline_element(
|
widget_add_string_multiline_element(
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
|
|
||||||
if(model->display_msg == U2fMsgNotConnected) {
|
if(model->display_msg == U2fMsgNotConnected) {
|
||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connect_me_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connect_me_62x31);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
canvas, 128 / 2, 3, AlignCenter, AlignTop, "Plug me in d-daddy");
|
canvas, 128 / 2, 3, AlignCenter, AlignTop, "Plug me in d-daddy");
|
||||||
} else {
|
} else {
|
||||||
@@ -32,7 +32,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connected_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connected_62x31);
|
||||||
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Connected!");
|
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Connected!");
|
||||||
} else if(model->display_msg == U2fMsgRegister) {
|
} else if(model->display_msg == U2fMsgRegister) {
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
elements_button_center(canvas, "CUM");
|
elements_button_center(canvas, "CUM");
|
||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Auth_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Auth_62x31);
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
@@ -44,7 +44,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
canvas, 128 / 2, 3, AlignCenter, AlignTop, "Press OK to register");
|
canvas, 128 / 2, 3, AlignCenter, AlignTop, "Press OK to register");
|
||||||
}
|
}
|
||||||
} else if(model->display_msg == U2fMsgAuth) {
|
} else if(model->display_msg == U2fMsgAuth) {
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
elements_button_center(canvas, "CUM");
|
elements_button_center(canvas, "CUM");
|
||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Auth_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Auth_62x31);
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
@@ -57,7 +57,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
}
|
}
|
||||||
} else if(model->display_msg == U2fMsgSuccess) {
|
} else if(model->display_msg == U2fMsgSuccess) {
|
||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connected_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Connected_62x31);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Cum released~");
|
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Cum released~");
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
@@ -65,7 +65,7 @@ static void u2f_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
}
|
}
|
||||||
} else if(model->display_msg == U2fMsgError) {
|
} else if(model->display_msg == U2fMsgError) {
|
||||||
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Error_62x31);
|
canvas_draw_icon(canvas, 22, 15, XTREME_ASSETS()->I_Error_62x31);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Unable to cum");
|
canvas_draw_str_aligned(canvas, 128 / 2, 3, AlignCenter, AlignTop, "Unable to cum");
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ App(
|
|||||||
fap_category="Misc",
|
fap_category="Misc",
|
||||||
order=81,
|
order=81,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ App(
|
|||||||
fap_icon_assets="images",
|
fap_icon_assets="images",
|
||||||
fap_icon="flipp_pomodoro_10.png",
|
fap_icon="flipp_pomodoro_10.png",
|
||||||
fap_icon_assets_symbol="flipp_pomodoro",
|
fap_icon_assets_symbol="flipp_pomodoro",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# COMPILE ISTRUCTIONS:
|
# COMPILE ISTRUCTIONS:
|
||||||
|
|
||||||
# Clean the code and remove old binaries/compilation artefact
|
# Clean the code and remove old binaries/compilation artefact
|
||||||
# ./fbt -c fap_rubiks_cube_scrambler
|
# ./fbt -c fap_rubiks_cube_scrambler
|
||||||
|
|
||||||
# Compile FAP
|
# Compile FAP
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include "animation_storage.h"
|
#include "animation_storage.h"
|
||||||
#include "animation_manager.h"
|
#include "animation_manager.h"
|
||||||
|
|
||||||
#include "../../../settings/xtreme_settings/xtreme_settings.h"
|
#include "../../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
#define TAG "AnimationManager"
|
#define TAG "AnimationManager"
|
||||||
|
|
||||||
@@ -569,9 +569,6 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
|||||||
static void animation_manager_switch_to_one_shot_view(AnimationManager* animation_manager) {
|
static void animation_manager_switch_to_one_shot_view(AnimationManager* animation_manager) {
|
||||||
furi_assert(animation_manager);
|
furi_assert(animation_manager);
|
||||||
furi_assert(!animation_manager->one_shot_view);
|
furi_assert(!animation_manager->one_shot_view);
|
||||||
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
|
||||||
DolphinStats stats = dolphin_stats(dolphin);
|
|
||||||
furi_record_close(RECORD_DOLPHIN);
|
|
||||||
|
|
||||||
animation_manager->one_shot_view = one_shot_view_alloc();
|
animation_manager->one_shot_view = one_shot_view_alloc();
|
||||||
one_shot_view_set_interact_callback(
|
one_shot_view_set_interact_callback(
|
||||||
@@ -580,19 +577,8 @@ static void animation_manager_switch_to_one_shot_view(AnimationManager* animatio
|
|||||||
View* next_view = one_shot_view_get_view(animation_manager->one_shot_view);
|
View* next_view = one_shot_view_get_view(animation_manager->one_shot_view);
|
||||||
view_stack_remove_view(animation_manager->view_stack, prev_view);
|
view_stack_remove_view(animation_manager->view_stack, prev_view);
|
||||||
view_stack_add_view(animation_manager->view_stack, next_view);
|
view_stack_add_view(animation_manager->view_stack, next_view);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
one_shot_view_start_animation(
|
||||||
one_shot_view_start_animation(animation_manager->one_shot_view, &A_Levelup1_128x64);
|
animation_manager->one_shot_view, XTREME_ASSETS()->A_Levelup_128x64);
|
||||||
} else {
|
|
||||||
if(stats.level <= 20) {
|
|
||||||
one_shot_view_start_animation(
|
|
||||||
animation_manager->one_shot_view, &A_Levelup1_128x64_sfw);
|
|
||||||
} else if(stats.level >= 21) {
|
|
||||||
one_shot_view_start_animation(
|
|
||||||
animation_manager->one_shot_view, &A_Levelup2_128x64_sfw);
|
|
||||||
} else {
|
|
||||||
furi_assert(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void animation_manager_switch_to_animation_view(AnimationManager* animation_manager) {
|
static void animation_manager_switch_to_animation_view(AnimationManager* animation_manager) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void animation_handler_select_manifest() {
|
|||||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||||
if(storage_common_stat(storage, furi_string_get_cstr(manifest), NULL) == FSE_OK) {
|
if(storage_common_stat(storage, furi_string_get_cstr(manifest), NULL) == FSE_OK) {
|
||||||
FURI_LOG_I(TAG, "Custom Manifest selected");
|
FURI_LOG_I(TAG, "Custom manifest selected");
|
||||||
} else {
|
} else {
|
||||||
use_asset_pack = false;
|
use_asset_pack = false;
|
||||||
}
|
}
|
||||||
@@ -48,14 +48,8 @@ void animation_handler_select_manifest() {
|
|||||||
}
|
}
|
||||||
if(!use_asset_pack) {
|
if(!use_asset_pack) {
|
||||||
furi_string_set(anim_dir, BASE_ANIMATION_DIR);
|
furi_string_set(anim_dir, BASE_ANIMATION_DIR);
|
||||||
if(xtreme_settings->nsfw_mode) {
|
|
||||||
furi_string_cat_str(anim_dir, "/nsfw");
|
|
||||||
FURI_LOG_I(TAG, "NSFW Manifest selected");
|
|
||||||
} else {
|
|
||||||
furi_string_cat_str(anim_dir, "/sfw");
|
|
||||||
FURI_LOG_I(TAG, "SFW Manifest selected");
|
|
||||||
}
|
|
||||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||||
|
FURI_LOG_I(TAG, "Base manifest selected");
|
||||||
}
|
}
|
||||||
strlcpy(ANIMATION_DIR, furi_string_get_cstr(anim_dir), sizeof(ANIMATION_DIR));
|
strlcpy(ANIMATION_DIR, furi_string_get_cstr(anim_dir), sizeof(ANIMATION_DIR));
|
||||||
strlcpy(
|
strlcpy(
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
#include "helpers/pin_lock.h"
|
#include "helpers/pin_lock.h"
|
||||||
#include "helpers/slideshow_filename.h"
|
#include "helpers/slideshow_filename.h"
|
||||||
|
|
||||||
|
#include "../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
static void desktop_auto_lock_arm(Desktop*);
|
static void desktop_auto_lock_arm(Desktop*);
|
||||||
static void desktop_auto_lock_inhibit(Desktop*);
|
static void desktop_auto_lock_inhibit(Desktop*);
|
||||||
static void desktop_start_auto_lock_timer(Desktop*);
|
static void desktop_start_auto_lock_timer(Desktop*);
|
||||||
@@ -305,6 +307,9 @@ static bool desktop_check_file_flag(const char* flag_path) {
|
|||||||
int32_t desktop_srv(void* p) {
|
int32_t desktop_srv(void* p) {
|
||||||
UNUSED(p);
|
UNUSED(p);
|
||||||
|
|
||||||
|
// TODO: find a (working) way to run this at startup without hooking desktop
|
||||||
|
XTREME_ASSETS_LOAD();
|
||||||
|
|
||||||
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
|
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
|
||||||
FURI_LOG_W("Desktop", "Desktop load skipped. Device is in special startup mode.");
|
FURI_LOG_W("Desktop", "Desktop load skipped. Device is in special startup mode.");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
#include "../desktop_i.h"
|
#include "../desktop_i.h"
|
||||||
#include "../../../settings/xtreme_settings/xtreme_settings.h"
|
#include "../../../settings/xtreme_settings/xtreme_assets.h"
|
||||||
|
|
||||||
#define DesktopFaultEventExit 0x00FF00FF
|
#define DesktopFaultEventExit 0x00FF00FF
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ void desktop_scene_fault_on_enter(void* context) {
|
|||||||
|
|
||||||
Popup* popup = desktop->hw_mismatch_popup;
|
Popup* popup = desktop->hw_mismatch_popup;
|
||||||
popup_set_context(popup, desktop);
|
popup_set_context(popup, desktop);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
popup_set_header(
|
popup_set_header(
|
||||||
popup,
|
popup,
|
||||||
"Slut passed out\n but is now back",
|
"Slut passed out\n but is now back",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ static void render_callback(Canvas* canvas, void* _ctx) {
|
|||||||
const char* mood_str = NULL;
|
const char* mood_str = NULL;
|
||||||
const Icon* portrait = NULL;
|
const Icon* portrait = NULL;
|
||||||
|
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
if(stats->butthurt <= 4) {
|
if(stats->butthurt <= 4) {
|
||||||
portrait = xtreme_assets->I_passport_happy_46x49;
|
portrait = xtreme_assets->I_passport_happy_46x49;
|
||||||
mood_str = "Status: Wet";
|
mood_str = "Status: Wet";
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ void power_settings_scene_power_off_on_enter(void* context) {
|
|||||||
DialogEx* dialog = app->dialog;
|
DialogEx* dialog = app->dialog;
|
||||||
|
|
||||||
dialog_ex_set_header(dialog, "Turn Off Device?", 64, 2, AlignCenter, AlignTop);
|
dialog_ex_set_header(dialog, "Turn Off Device?", 64, 2, AlignCenter, AlignTop);
|
||||||
if(XTREME_SETTINGS()->nsfw_mode) {
|
if(XTREME_ASSETS()->is_nsfw) {
|
||||||
dialog_ex_set_text(
|
dialog_ex_set_text(
|
||||||
dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop);
|
dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -3,15 +3,6 @@
|
|||||||
#include <power/power_service/power.h>
|
#include <power/power_service/power.h>
|
||||||
#include <lib/toolbox/version.h>
|
#include <lib/toolbox/version.h>
|
||||||
|
|
||||||
static void xtreme_settings_scene_start_base_graphics_changed(VariableItem* item) {
|
|
||||||
XtremeSettingsApp* app = variable_item_get_context(item);
|
|
||||||
bool value = variable_item_get_current_value_index(item);
|
|
||||||
variable_item_set_current_value_text(item, value ? "NSFW" : "SFW");
|
|
||||||
XTREME_SETTINGS()->nsfw_mode = value;
|
|
||||||
app->settings_changed = true;
|
|
||||||
app->assets_changed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void xtreme_settings_scene_start_asset_pack_changed(VariableItem* item) {
|
static void xtreme_settings_scene_start_asset_pack_changed(VariableItem* item) {
|
||||||
XtremeSettingsApp* app = variable_item_get_context(item);
|
XtremeSettingsApp* app = variable_item_get_context(item);
|
||||||
uint8_t index = variable_item_get_current_value_index(item);
|
uint8_t index = variable_item_get_current_value_index(item);
|
||||||
@@ -172,11 +163,6 @@ void xtreme_settings_scene_start_on_enter(void* context) {
|
|||||||
storage_file_free(folder);
|
storage_file_free(folder);
|
||||||
furi_record_close(RECORD_STORAGE);
|
furi_record_close(RECORD_STORAGE);
|
||||||
|
|
||||||
item = variable_item_list_add(
|
|
||||||
var_item_list, "Base Graphics", 2, xtreme_settings_scene_start_base_graphics_changed, app);
|
|
||||||
variable_item_set_current_value_index(item, xtreme_settings->nsfw_mode);
|
|
||||||
variable_item_set_current_value_text(item, xtreme_settings->nsfw_mode ? "NSFW" : "SFW");
|
|
||||||
|
|
||||||
item = variable_item_list_add(
|
item = variable_item_list_add(
|
||||||
var_item_list,
|
var_item_list,
|
||||||
"Asset Pack",
|
"Asset Pack",
|
||||||
|
|||||||
@@ -2,175 +2,50 @@
|
|||||||
#include "assets_icons.h"
|
#include "assets_icons.h"
|
||||||
#include <core/dangerous_defines.h>
|
#include <core/dangerous_defines.h>
|
||||||
|
|
||||||
|
#define ICONS_FMT PACKS_DIR "/%s/Icons/%s"
|
||||||
|
|
||||||
XtremeAssets* xtreme_assets = NULL;
|
XtremeAssets* xtreme_assets = NULL;
|
||||||
|
|
||||||
XtremeAssets* XTREME_ASSETS() {
|
void anim(const Icon** replace, const char* name, FuriString* path, File* file) {
|
||||||
if(xtreme_assets == NULL) {
|
do {
|
||||||
XTREME_ASSETS_LOAD();
|
furi_string_printf(path, ICONS_FMT "/meta", XTREME_SETTINGS()->asset_pack, name);
|
||||||
}
|
if(!storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING))
|
||||||
return xtreme_assets;
|
break;
|
||||||
|
int32_t width, height, frame_rate, frame_count;
|
||||||
|
storage_file_read(file, &width, 4);
|
||||||
|
storage_file_read(file, &height, 4);
|
||||||
|
storage_file_read(file, &frame_rate, 4);
|
||||||
|
storage_file_read(file, &frame_count, 4);
|
||||||
|
storage_file_close(file);
|
||||||
|
|
||||||
|
Icon* icon = malloc(sizeof(Icon));
|
||||||
|
FURI_CONST_ASSIGN(icon->width, width);
|
||||||
|
FURI_CONST_ASSIGN(icon->height, height);
|
||||||
|
FURI_CONST_ASSIGN(icon->frame_rate, frame_rate);
|
||||||
|
FURI_CONST_ASSIGN(icon->frame_count, frame_count);
|
||||||
|
icon->frames = malloc(sizeof(const uint8_t*) * icon->frame_count);
|
||||||
|
const char* pack = XTREME_SETTINGS()->asset_pack;
|
||||||
|
|
||||||
|
bool ok = true;
|
||||||
|
for(int i = 0; ok && i < icon->frame_count; ++i) {
|
||||||
|
ok = false;
|
||||||
|
furi_string_printf(path, ICONS_FMT "/frame_%02d.bm", pack, name, i);
|
||||||
|
if(!storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING))
|
||||||
|
break;
|
||||||
|
|
||||||
|
uint64_t size = storage_file_size(file);
|
||||||
|
FURI_CONST_ASSIGN_PTR(icon->frames[i], malloc(size));
|
||||||
|
if(storage_file_read(file, (void*)icon->frames[i], size) == size) ok = true;
|
||||||
|
storage_file_close(file);
|
||||||
|
}
|
||||||
|
if(!ok) break;
|
||||||
|
|
||||||
|
*replace = icon;
|
||||||
|
} while(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTREME_ASSETS_LOAD() {
|
void icon(const Icon** replace, const char* name, FuriString* path, File* file) {
|
||||||
if(xtreme_assets != NULL) return;
|
furi_string_printf(path, ICONS_FMT ".bmx", XTREME_SETTINGS()->asset_pack, name);
|
||||||
|
|
||||||
xtreme_assets = malloc(sizeof(XtremeAssets));
|
|
||||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
|
||||||
|
|
||||||
if(xtreme_settings->nsfw_mode) {
|
|
||||||
xtreme_assets->I_BLE_Pairing_128x64 = &I_BLE_Pairing_128x64;
|
|
||||||
xtreme_assets->I_DolphinCommon_56x48 = &I_DolphinCommon_56x48;
|
|
||||||
xtreme_assets->I_DolphinMafia_115x62 = &I_DolphinMafia_115x62;
|
|
||||||
xtreme_assets->I_DolphinNice_96x59 = &I_DolphinNice_96x59;
|
|
||||||
xtreme_assets->I_DolphinWait_61x59 = &I_DolphinWait_61x59;
|
|
||||||
xtreme_assets->I_iButtonDolphinVerySuccess_108x52 = &I_iButtonDolphinVerySuccess_108x52;
|
|
||||||
xtreme_assets->I_DolphinReadingSuccess_59x63 = &I_DolphinReadingSuccess_59x63;
|
|
||||||
xtreme_assets->I_NFC_dolphin_emulation_47x61 = &I_NFC_dolphin_emulation_47x61;
|
|
||||||
xtreme_assets->I_passport_bad_46x49 = &I_flipper;
|
|
||||||
xtreme_assets->I_passport_DB = &I_passport_DB;
|
|
||||||
xtreme_assets->I_passport_happy_46x49 = &I_flipper;
|
|
||||||
xtreme_assets->I_passport_okay_46x49 = &I_flipper;
|
|
||||||
xtreme_assets->I_RFIDDolphinReceive_97x61 = &I_RFIDDolphinReceive_97x61;
|
|
||||||
xtreme_assets->I_RFIDDolphinSend_97x61 = &I_RFIDDolphinSend_97x61;
|
|
||||||
xtreme_assets->I_RFIDDolphinSuccess_108x57 = &I_RFIDDolphinSuccess_108x57;
|
|
||||||
xtreme_assets->I_Cry_dolph_55x52 = &I_Cry_dolph_55x52;
|
|
||||||
xtreme_assets->I_Scanning_123x52 = &I_Scanning_123x52;
|
|
||||||
xtreme_assets->I_Auth_62x31 = &I_Auth_62x31;
|
|
||||||
xtreme_assets->I_Connect_me_62x31 = &I_Connect_me_62x31;
|
|
||||||
xtreme_assets->I_Connected_62x31 = &I_Connected_62x31;
|
|
||||||
xtreme_assets->I_Error_62x31 = &I_Error_62x31;
|
|
||||||
} else {
|
|
||||||
xtreme_assets->I_BLE_Pairing_128x64 = &I_BLE_Pairing_128x64_sfw;
|
|
||||||
xtreme_assets->I_DolphinCommon_56x48 = &I_DolphinCommon_56x48_sfw;
|
|
||||||
xtreme_assets->I_DolphinMafia_115x62 = &I_DolphinMafia_115x62_sfw;
|
|
||||||
xtreme_assets->I_DolphinNice_96x59 = &I_DolphinNice_96x59_sfw;
|
|
||||||
xtreme_assets->I_DolphinWait_61x59 = &I_DolphinWait_61x59_sfw;
|
|
||||||
xtreme_assets->I_iButtonDolphinVerySuccess_108x52 =
|
|
||||||
&I_iButtonDolphinVerySuccess_108x52_sfw;
|
|
||||||
xtreme_assets->I_DolphinReadingSuccess_59x63 = &I_DolphinReadingSuccess_59x63_sfw;
|
|
||||||
xtreme_assets->I_NFC_dolphin_emulation_47x61 = &I_NFC_dolphin_emulation_47x61_sfw;
|
|
||||||
xtreme_assets->I_passport_bad_46x49 = &I_passport_bad1_46x49_sfw;
|
|
||||||
xtreme_assets->I_passport_DB = &I_passport_DB_sfw;
|
|
||||||
xtreme_assets->I_passport_happy_46x49 = &I_passport_happy1_46x49_sfw;
|
|
||||||
xtreme_assets->I_passport_okay_46x49 = &I_passport_okay1_46x49_sfw;
|
|
||||||
xtreme_assets->I_RFIDDolphinReceive_97x61 = &I_RFIDDolphinReceive_97x61_sfw;
|
|
||||||
xtreme_assets->I_RFIDDolphinSend_97x61 = &I_RFIDDolphinSend_97x61_sfw;
|
|
||||||
xtreme_assets->I_RFIDDolphinSuccess_108x57 = &I_RFIDDolphinSuccess_108x57_sfw;
|
|
||||||
xtreme_assets->I_Cry_dolph_55x52 = &I_Cry_dolph_55x52_sfw;
|
|
||||||
xtreme_assets->I_Scanning_123x52 = &I_Scanning_123x52_sfw;
|
|
||||||
xtreme_assets->I_Auth_62x31 = &I_Auth_62x31_sfw;
|
|
||||||
xtreme_assets->I_Connect_me_62x31 = &I_Connect_me_62x31_sfw;
|
|
||||||
xtreme_assets->I_Connected_62x31 = &I_Connected_62x31_sfw;
|
|
||||||
xtreme_assets->I_Error_62x31 = &I_Error_62x31_sfw;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xtreme_settings->asset_pack[0] == '\0') return;
|
|
||||||
FileInfo info;
|
|
||||||
FuriString* path = furi_string_alloc();
|
|
||||||
const char* pack = xtreme_settings->asset_pack;
|
|
||||||
furi_string_printf(path, PACKS_DIR "/%s", pack);
|
|
||||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
|
||||||
if(storage_common_stat(storage, furi_string_get_cstr(path), &info) == FSE_OK &&
|
|
||||||
info.flags & FSF_DIRECTORY) {
|
|
||||||
File* file = storage_file_alloc(storage);
|
|
||||||
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_BLE_Pairing_128x64, pack, "BLE/BLE_Pairing_128x64.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_DolphinCommon_56x48,
|
|
||||||
pack,
|
|
||||||
"Dolphin/DolphinCommon_56x48.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_DolphinMafia_115x62,
|
|
||||||
pack,
|
|
||||||
"iButton/DolphinMafia_115x62.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_DolphinNice_96x59, pack, "iButton/DolphinNice_96x59.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_DolphinWait_61x59, pack, "iButton/DolphinWait_61x59.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_iButtonDolphinVerySuccess_108x52,
|
|
||||||
pack,
|
|
||||||
"iButton/iButtonDolphinVerySuccess_108x52.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_DolphinReadingSuccess_59x63,
|
|
||||||
pack,
|
|
||||||
"Infrared/DolphinReadingSuccess_59x63.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_NFC_dolphin_emulation_47x61,
|
|
||||||
pack,
|
|
||||||
"NFC/NFC_dolphin_emulation_47x61.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_passport_bad_46x49,
|
|
||||||
pack,
|
|
||||||
"Passport/passport_bad_46x49.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(&xtreme_assets->I_passport_DB, pack, "Passport/passport_DB.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_passport_happy_46x49,
|
|
||||||
pack,
|
|
||||||
"Passport/passport_happy_46x49.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_passport_okay_46x49,
|
|
||||||
pack,
|
|
||||||
"Passport/passport_okay_46x49.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_RFIDDolphinReceive_97x61,
|
|
||||||
pack,
|
|
||||||
"RFID/RFIDDolphinReceive_97x61.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_RFIDDolphinSend_97x61,
|
|
||||||
pack,
|
|
||||||
"RFID/RFIDDolphinSend_97x61.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_RFIDDolphinSuccess_108x57,
|
|
||||||
pack,
|
|
||||||
"RFID/RFIDDolphinSuccess_108x57.bmx",
|
|
||||||
path,
|
|
||||||
file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_Cry_dolph_55x52, pack, "Settings/Cry_dolph_55x52.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_Scanning_123x52, pack, "SubGhz/Scanning_123x52.bmx", path, file);
|
|
||||||
swap_bmx_icon(&xtreme_assets->I_Auth_62x31, pack, "U2F/Auth_62x31.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_Connect_me_62x31, pack, "U2F/Connect_me_62x31.bmx", path, file);
|
|
||||||
swap_bmx_icon(
|
|
||||||
&xtreme_assets->I_Connected_62x31, pack, "U2F/Connected_62x31.bmx", path, file);
|
|
||||||
swap_bmx_icon(&xtreme_assets->I_Error_62x31, pack, "U2F/Error_62x31.bmx", path, file);
|
|
||||||
|
|
||||||
storage_file_free(file);
|
|
||||||
}
|
|
||||||
furi_record_close(RECORD_STORAGE);
|
|
||||||
furi_string_free(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
void swap_bmx_icon(
|
|
||||||
const Icon** replace,
|
|
||||||
const char* pack,
|
|
||||||
const char* name,
|
|
||||||
FuriString* path,
|
|
||||||
File* file) {
|
|
||||||
furi_string_printf(path, PACKS_DIR "/%s/Icons/%s", pack, name);
|
|
||||||
if(storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
if(storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||||
uint64_t size = storage_file_size(file) - 8;
|
uint64_t size = storage_file_size(file) - 8;
|
||||||
int32_t width, height;
|
int32_t width, height;
|
||||||
@@ -190,3 +65,80 @@ void swap_bmx_icon(
|
|||||||
storage_file_close(file);
|
storage_file_close(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void swap(XtremeAssets* x, FuriString* p, File* f) {
|
||||||
|
anim(&x->A_Levelup_128x64, "Animations/Levelup_128x64", p, f);
|
||||||
|
icon(&x->I_BLE_Pairing_128x64, "BLE/BLE_Pairing_128x64", p, f);
|
||||||
|
icon(&x->I_DolphinCommon_56x48, "Dolphin/DolphinCommon_56x48", p, f);
|
||||||
|
icon(&x->I_DolphinMafia_115x62, "iButton/DolphinMafia_115x62", p, f);
|
||||||
|
icon(&x->I_DolphinNice_96x59, "iButton/DolphinNice_96x59", p, f);
|
||||||
|
icon(&x->I_DolphinWait_61x59, "iButton/DolphinWait_61x59", p, f);
|
||||||
|
icon(&x->I_iButtonDolphinVerySuccess_108x52, "iButton/iButtonDolphinVerySuccess_108x52", p, f);
|
||||||
|
icon(&x->I_DolphinReadingSuccess_59x63, "Infrared/DolphinReadingSuccess_59x63", p, f);
|
||||||
|
icon(&x->I_NFC_dolphin_emulation_47x61, "NFC/NFC_dolphin_emulation_47x61", p, f);
|
||||||
|
icon(&x->I_passport_bad_46x49, "Passport/passport_bad_46x49", p, f);
|
||||||
|
icon(&x->I_passport_DB, "Passport/passport_DB", p, f);
|
||||||
|
icon(&x->I_passport_happy_46x49, "Passport/passport_happy_46x49", p, f);
|
||||||
|
icon(&x->I_passport_okay_46x49, "Passport/passport_okay_46x49", p, f);
|
||||||
|
icon(&x->I_RFIDDolphinReceive_97x61, "RFID/RFIDDolphinReceive_97x61", p, f);
|
||||||
|
icon(&x->I_RFIDDolphinSend_97x61, "RFID/RFIDDolphinSend_97x61", p, f);
|
||||||
|
icon(&x->I_RFIDDolphinSuccess_108x57, "RFID/RFIDDolphinSuccess_108x57", p, f);
|
||||||
|
icon(&x->I_Cry_dolph_55x52, "Settings/Cry_dolph_55x52", p, f);
|
||||||
|
icon(&x->I_Scanning_123x52, "SubGhz/Scanning_123x52", p, f);
|
||||||
|
icon(&x->I_Auth_62x31, "U2F/Auth_62x31", p, f);
|
||||||
|
icon(&x->I_Connect_me_62x31, "U2F/Connect_me_62x31", p, f);
|
||||||
|
icon(&x->I_Connected_62x31, "U2F/Connected_62x31", p, f);
|
||||||
|
icon(&x->I_Error_62x31, "U2F/Error_62x31", p, f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTREME_ASSETS_LOAD() {
|
||||||
|
if(xtreme_assets != NULL) return;
|
||||||
|
|
||||||
|
xtreme_assets = malloc(sizeof(XtremeAssets));
|
||||||
|
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||||
|
|
||||||
|
xtreme_assets->A_Levelup_128x64 = &A_Levelup_128x64;
|
||||||
|
xtreme_assets->I_BLE_Pairing_128x64 = &I_BLE_Pairing_128x64;
|
||||||
|
xtreme_assets->I_DolphinCommon_56x48 = &I_DolphinCommon_56x48;
|
||||||
|
xtreme_assets->I_DolphinMafia_115x62 = &I_DolphinMafia_115x62;
|
||||||
|
xtreme_assets->I_DolphinNice_96x59 = &I_DolphinNice_96x59;
|
||||||
|
xtreme_assets->I_DolphinWait_61x59 = &I_DolphinWait_61x59;
|
||||||
|
xtreme_assets->I_iButtonDolphinVerySuccess_108x52 = &I_iButtonDolphinVerySuccess_108x52;
|
||||||
|
xtreme_assets->I_DolphinReadingSuccess_59x63 = &I_DolphinReadingSuccess_59x63;
|
||||||
|
xtreme_assets->I_NFC_dolphin_emulation_47x61 = &I_NFC_dolphin_emulation_47x61;
|
||||||
|
xtreme_assets->I_passport_bad_46x49 = &I_passport_bad_46x49;
|
||||||
|
xtreme_assets->I_passport_DB = &I_passport_DB;
|
||||||
|
xtreme_assets->I_passport_happy_46x49 = &I_passport_happy_46x49;
|
||||||
|
xtreme_assets->I_passport_okay_46x49 = &I_passport_okay_46x49;
|
||||||
|
xtreme_assets->I_RFIDDolphinReceive_97x61 = &I_RFIDDolphinReceive_97x61;
|
||||||
|
xtreme_assets->I_RFIDDolphinSend_97x61 = &I_RFIDDolphinSend_97x61;
|
||||||
|
xtreme_assets->I_RFIDDolphinSuccess_108x57 = &I_RFIDDolphinSuccess_108x57;
|
||||||
|
xtreme_assets->I_Cry_dolph_55x52 = &I_Cry_dolph_55x52;
|
||||||
|
xtreme_assets->I_Scanning_123x52 = &I_Scanning_123x52;
|
||||||
|
xtreme_assets->I_Auth_62x31 = &I_Auth_62x31;
|
||||||
|
xtreme_assets->I_Connect_me_62x31 = &I_Connect_me_62x31;
|
||||||
|
xtreme_assets->I_Connected_62x31 = &I_Connected_62x31;
|
||||||
|
xtreme_assets->I_Error_62x31 = &I_Error_62x31;
|
||||||
|
|
||||||
|
if(xtreme_settings->asset_pack[0] == '\0') return;
|
||||||
|
xtreme_assets->is_nsfw = strncmp(xtreme_settings->asset_pack, "NSFW", strlen("NSFW")) == 0;
|
||||||
|
FileInfo info;
|
||||||
|
FuriString* path = furi_string_alloc();
|
||||||
|
furi_string_printf(path, PACKS_DIR "/%s", xtreme_settings->asset_pack);
|
||||||
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||||
|
if(storage_common_stat(storage, furi_string_get_cstr(path), &info) == FSE_OK &&
|
||||||
|
info.flags & FSF_DIRECTORY) {
|
||||||
|
File* file = storage_file_alloc(storage);
|
||||||
|
swap(xtreme_assets, path, file);
|
||||||
|
storage_file_free(file);
|
||||||
|
}
|
||||||
|
furi_record_close(RECORD_STORAGE);
|
||||||
|
furi_string_free(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
XtremeAssets* XTREME_ASSETS() {
|
||||||
|
if(xtreme_assets == NULL) {
|
||||||
|
XTREME_ASSETS_LOAD();
|
||||||
|
}
|
||||||
|
return xtreme_assets;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
#define PACKS_DIR EXT_PATH("dolphin_custom")
|
#define PACKS_DIR EXT_PATH("dolphin_custom")
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
bool is_nsfw;
|
||||||
|
const Icon* A_Levelup_128x64;
|
||||||
const Icon* I_BLE_Pairing_128x64;
|
const Icon* I_BLE_Pairing_128x64;
|
||||||
const Icon* I_DolphinCommon_56x48;
|
const Icon* I_DolphinCommon_56x48;
|
||||||
const Icon* I_DolphinMafia_115x62;
|
const Icon* I_DolphinMafia_115x62;
|
||||||
@@ -30,15 +32,6 @@ typedef struct {
|
|||||||
const Icon* I_Error_62x31;
|
const Icon* I_Error_62x31;
|
||||||
} XtremeAssets;
|
} XtremeAssets;
|
||||||
|
|
||||||
XtremeAssets* XTREME_ASSETS();
|
|
||||||
|
|
||||||
void XTREME_ASSETS_LOAD();
|
void XTREME_ASSETS_LOAD();
|
||||||
|
|
||||||
void swap_bmx_icon(
|
XtremeAssets* XTREME_ASSETS();
|
||||||
const Icon** replace,
|
|
||||||
const char* base,
|
|
||||||
const char* name,
|
|
||||||
FuriString* path,
|
|
||||||
File* file);
|
|
||||||
|
|
||||||
void free_bmx_icon(Icon* icon);
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t cycle_anims;
|
int32_t cycle_anims;
|
||||||
bool unlock_anims;
|
bool unlock_anims;
|
||||||
bool nsfw_mode;
|
|
||||||
char asset_pack[MAX_PACK_NAME_LEN];
|
char asset_pack[MAX_PACK_NAME_LEN];
|
||||||
BatteryStyle battery_style;
|
BatteryStyle battery_style;
|
||||||
uint16_t anim_speed;
|
uint16_t anim_speed;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 383 B |
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 383 B |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |