mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 20:18:35 -07:00
formatting
This commit is contained in:
@@ -145,7 +145,8 @@ void animation_manager_check_blocking_process(AnimationManager* animation_manage
|
||||
|
||||
const StorageAnimationManifestInfo* manifest_info =
|
||||
animation_storage_get_meta(animation_manager->current_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(manifest_info, &stats, XTREME_SETTINGS()->unlock_anims);
|
||||
bool valid = animation_manager_is_valid_idle_animation(
|
||||
manifest_info, &stats, XTREME_SETTINGS()->unlock_anims);
|
||||
|
||||
if(!valid) {
|
||||
animation_manager_start_new_idle(animation_manager);
|
||||
@@ -201,8 +202,10 @@ static void animation_manager_start_new_idle(AnimationManager* animation_manager
|
||||
animation_storage_get_bubble_animation(animation_manager->current_animation);
|
||||
animation_manager->state = AnimationManagerStateIdle;
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ? (bubble_animation->duration) : (xtreme_settings->cycle_anims);
|
||||
furi_timer_start(animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ? (bubble_animation->duration) :
|
||||
(xtreme_settings->cycle_anims);
|
||||
furi_timer_start(
|
||||
animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
}
|
||||
|
||||
static bool animation_manager_check_blocking(AnimationManager* animation_manager) {
|
||||
@@ -355,7 +358,7 @@ static bool animation_manager_is_valid_idle_animation(
|
||||
|
||||
result = (sd_status == FSE_NOT_READY);
|
||||
}
|
||||
if (!unlock) {
|
||||
if(!unlock) {
|
||||
if((stats->butthurt < info->min_butthurt) || (stats->butthurt > info->max_butthurt)) {
|
||||
result = false;
|
||||
}
|
||||
@@ -370,8 +373,9 @@ static bool animation_manager_is_valid_idle_animation(
|
||||
static StorageAnimation*
|
||||
animation_manager_select_idle_animation(AnimationManager* animation_manager) {
|
||||
const char* old_animation_name = NULL;
|
||||
if (animation_manager->current_animation) {
|
||||
old_animation_name = animation_storage_get_meta(animation_manager->current_animation)->name;
|
||||
if(animation_manager->current_animation) {
|
||||
old_animation_name =
|
||||
animation_storage_get_meta(animation_manager->current_animation)->name;
|
||||
}
|
||||
|
||||
StorageAnimationList_t animation_list;
|
||||
@@ -391,8 +395,8 @@ static StorageAnimation*
|
||||
animation_storage_get_meta(storage_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(manifest_info, &stats, unlock);
|
||||
|
||||
if (old_animation_name != NULL) {
|
||||
if (strcmp(manifest_info->name, old_animation_name) == 0) {
|
||||
if(old_animation_name != NULL) {
|
||||
if(strcmp(manifest_info->name, old_animation_name) == 0) {
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
@@ -512,7 +516,8 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
const StorageAnimationManifestInfo* manifest_info =
|
||||
animation_storage_get_meta(restore_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(manifest_info, &stats, XTREME_SETTINGS()->unlock_anims);
|
||||
bool valid = animation_manager_is_valid_idle_animation(
|
||||
manifest_info, &stats, XTREME_SETTINGS()->unlock_anims);
|
||||
if(valid) {
|
||||
animation_manager_replace_current_animation(
|
||||
animation_manager, restore_animation);
|
||||
@@ -523,12 +528,16 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
animation_manager->idle_animation_timer,
|
||||
animation_manager->freezed_animation_time_left);
|
||||
} else {
|
||||
const BubbleAnimation* bubble_animation = animation_storage_get_bubble_animation(
|
||||
animation_manager->current_animation);
|
||||
const BubbleAnimation* bubble_animation =
|
||||
animation_storage_get_bubble_animation(
|
||||
animation_manager->current_animation);
|
||||
XtremeSettings* xtreme_settings = XTREME_SETTINGS();
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ? (bubble_animation->duration) : (xtreme_settings->cycle_anims);
|
||||
int32_t duration = (xtreme_settings->cycle_anims == 0) ?
|
||||
(bubble_animation->duration) :
|
||||
(xtreme_settings->cycle_anims);
|
||||
furi_timer_start(
|
||||
animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
animation_manager->idle_animation_timer,
|
||||
(duration > 0) ? (duration * 1000) : 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -35,18 +35,18 @@ void animation_handler_select_manifest() {
|
||||
FuriString* anim_dir = furi_string_alloc();
|
||||
FuriString* manifest = furi_string_alloc();
|
||||
bool use_asset_pack = xtreme_settings->asset_pack[0] != '\0';
|
||||
if (use_asset_pack) {
|
||||
if(use_asset_pack) {
|
||||
furi_string_printf(anim_dir, "%s/%s/Anims", PACKS_DIR, xtreme_settings->asset_pack);
|
||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||
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");
|
||||
} else {
|
||||
use_asset_pack = false;
|
||||
}
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
if (!use_asset_pack) {
|
||||
if(!use_asset_pack) {
|
||||
furi_string_set(anim_dir, BASE_ANIMATION_DIR);
|
||||
if(xtreme_settings->nsfw_mode) {
|
||||
furi_string_cat_str(anim_dir, "/nsfw");
|
||||
@@ -58,7 +58,8 @@ void animation_handler_select_manifest() {
|
||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||
}
|
||||
strlcpy(ANIMATION_DIR, furi_string_get_cstr(anim_dir), sizeof(ANIMATION_DIR));
|
||||
strlcpy(ANIMATION_MANIFEST_FILE, furi_string_get_cstr(manifest), sizeof(ANIMATION_MANIFEST_FILE));
|
||||
strlcpy(
|
||||
ANIMATION_MANIFEST_FILE, furi_string_get_cstr(manifest), sizeof(ANIMATION_MANIFEST_FILE));
|
||||
furi_string_free(manifest);
|
||||
furi_string_free(anim_dir);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ void desktop_lock_menu_draw_callback(Canvas* canvas, void* model) {
|
||||
str = "Set PIN + Off";
|
||||
}
|
||||
} else if(i == DesktopLockMenuIndexXtremeSettings) {
|
||||
str = "Xtreme Settings";
|
||||
str = "Xtreme Settings";
|
||||
}
|
||||
|
||||
if(str) //-V547
|
||||
|
||||
Reference in New Issue
Block a user