Move lvlup anim to asset system

This commit is contained in:
Willy-JL
2023-02-10 04:31:03 +00:00
parent 8cec6ee207
commit 1a9f098936
60 changed files with 4 additions and 18 deletions

View File

@@ -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) {
furi_assert(animation_manager);
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();
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_stack_remove_view(animation_manager->view_stack, prev_view);
view_stack_add_view(animation_manager->view_stack, next_view);
if(XTREME_ASSETS()->is_nsfw) {
one_shot_view_start_animation(animation_manager->one_shot_view, &A_Levelup1_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);
}
}
one_shot_view_start_animation(
animation_manager->one_shot_view, XTREME_ASSETS()->A_Levelup_128x64);
}
static void animation_manager_switch_to_animation_view(AnimationManager* animation_manager) {