Show anim errors, move credits to default pack
Remove fallback anim setting Retry when anim manager resumes error anim Always skip error anim when manager picks new anim
@@ -113,14 +113,6 @@ static void xtreme_app_scene_interface_graphics_unlock_anims_changed(VariableIte
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void xtreme_app_scene_interface_graphics_fallback_anim_changed(VariableItem* item) {
|
||||
XtremeApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
xtreme_settings.fallback_anim = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
void xtreme_app_scene_interface_graphics_on_enter(void* context) {
|
||||
XtremeApp* app = context;
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
@@ -171,15 +163,6 @@ void xtreme_app_scene_interface_graphics_on_enter(void* context) {
|
||||
variable_item_set_current_value_index(item, xtreme_settings.unlock_anims);
|
||||
variable_item_set_current_value_text(item, xtreme_settings.unlock_anims ? "ON" : "OFF");
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list,
|
||||
"Credits Anim",
|
||||
2,
|
||||
xtreme_app_scene_interface_graphics_fallback_anim_changed,
|
||||
app);
|
||||
variable_item_set_current_value_index(item, xtreme_settings.fallback_anim);
|
||||
variable_item_set_current_value_text(item, xtreme_settings.fallback_anim ? "ON" : "OFF");
|
||||
|
||||
variable_item_list_set_enter_callback(
|
||||
var_item_list, xtreme_app_scene_interface_graphics_var_item_list_callback, app);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#define TAG "AnimationManager"
|
||||
|
||||
#define HARDCODED_ANIMATION_NAME "thank_you_128x64"
|
||||
#define HARDCODED_ANIMATION_NAME "L1_AnimationError_128x64"
|
||||
#define NO_SD_ANIMATION_NAME "L1_NoSd_128x49"
|
||||
#define BAD_BATTERY_ANIMATION_NAME "L1_BadBattery_128x47"
|
||||
|
||||
@@ -388,21 +388,15 @@ static StorageAnimation*
|
||||
uint32_t whole_weight = 0;
|
||||
|
||||
// Filter valid animations
|
||||
bool fallback = xtreme_settings.fallback_anim;
|
||||
bool unlock = xtreme_settings.unlock_anims;
|
||||
StorageAnimationList_it_t it;
|
||||
for(StorageAnimationList_it(it, animation_list); !StorageAnimationList_end_p(it);) {
|
||||
StorageAnimation* storage_animation = *StorageAnimationList_ref(it);
|
||||
const StorageAnimationManifestInfo* manifest_info =
|
||||
animation_storage_get_meta(storage_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(manifest_info, &stats, unlock);
|
||||
|
||||
if(strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME) == 0 && !fallback) {
|
||||
// Skip fallback animation
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if(valid) {
|
||||
if(animation_manager_is_valid_idle_animation(manifest_info, &stats, unlock) &&
|
||||
strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME)) { // Dont pick error anim randomly
|
||||
StorageAnimationList_next(it);
|
||||
} else {
|
||||
animation_storage_free_storage_animation(&storage_animation);
|
||||
@@ -543,7 +537,8 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
animation_storage_get_meta(restore_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(
|
||||
manifest_info, &stats, xtreme_settings.unlock_anims);
|
||||
if(valid) {
|
||||
// Restore only if anim is valid and not the error anim
|
||||
if(valid && strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME) != 0) {
|
||||
animation_manager_replace_current_animation(
|
||||
animation_manager, restore_animation);
|
||||
animation_manager->state = AnimationManagerStateIdle;
|
||||
|
||||
7
assets/dolphin/external/manifest.txt
vendored
@@ -175,3 +175,10 @@ Max butthurt: 14
|
||||
Min level: 22
|
||||
Max level: 30
|
||||
Weight: 4
|
||||
|
||||
Name: thank_you_128x64
|
||||
Min butthurt: 0
|
||||
Max butthurt: 14
|
||||
Min level: 6
|
||||
Max level: 30
|
||||
Weight: 1
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
BIN
assets/dolphin/internal/L1_AnimationError_128x64/frame_0.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
14
assets/dolphin/internal/L1_AnimationError_128x64/meta.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
Filetype: Flipper Animation
|
||||
Version: 1
|
||||
|
||||
Width: 128
|
||||
Height: 64
|
||||
Passive frames: 1
|
||||
Active frames: 0
|
||||
Frames order: 0
|
||||
Active cycles: 0
|
||||
Frame rate: 1
|
||||
Duration: 30
|
||||
Active cooldown: 0
|
||||
|
||||
Bubble slots: 0
|
||||
@@ -2,7 +2,7 @@ Filetype: Flipper Animation Manifest
|
||||
Version: 1
|
||||
|
||||
# Animation 1
|
||||
Name: thank_you_128x64
|
||||
Name: L1_AnimationError_128x64
|
||||
Min butthurt: 0
|
||||
Max butthurt: 14
|
||||
Min level: 1
|
||||
|
||||
@@ -10,7 +10,6 @@ XtremeSettings xtreme_settings = {
|
||||
.anim_speed = 100, // 100%
|
||||
.cycle_anims = 0, // Meta.txt
|
||||
.unlock_anims = false, // OFF
|
||||
.fallback_anim = true, // ON
|
||||
.menu_style = MenuStyleWii, // Wii
|
||||
.lock_on_boot = false, // OFF
|
||||
.bad_pins_format = false, // OFF
|
||||
@@ -69,10 +68,6 @@ void XTREME_SETTINGS_LOAD() {
|
||||
x->unlock_anims = b;
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_bool(file, "fallback_anim", &b, 1)) {
|
||||
x->fallback_anim = b;
|
||||
}
|
||||
flipper_format_rewind(file);
|
||||
if(flipper_format_read_uint32(file, "menu_style", &u, 1)) {
|
||||
x->menu_style = CLAMP(u, MenuStyleCount - 1U, 0U);
|
||||
}
|
||||
@@ -209,7 +204,6 @@ void XTREME_SETTINGS_SAVE() {
|
||||
flipper_format_write_uint32(file, "anim_speed", &x->anim_speed, 1);
|
||||
flipper_format_write_int32(file, "cycle_anims", &x->cycle_anims, 1);
|
||||
flipper_format_write_bool(file, "unlock_anims", &x->unlock_anims, 1);
|
||||
flipper_format_write_bool(file, "fallback_anim", &x->fallback_anim, 1);
|
||||
e = x->menu_style;
|
||||
flipper_format_write_uint32(file, "menu_style", &e, 1);
|
||||
flipper_format_write_bool(file, "bad_pins_format", &x->bad_pins_format, 1);
|
||||
|
||||
@@ -57,7 +57,6 @@ typedef struct {
|
||||
uint32_t anim_speed;
|
||||
int32_t cycle_anims;
|
||||
bool unlock_anims;
|
||||
bool fallback_anim;
|
||||
MenuStyle menu_style;
|
||||
bool lock_on_boot;
|
||||
bool bad_pins_format;
|
||||
|
||||