Play only basic good animations (#872)

* New Basic Animations
* Keep only basic calm animations

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2021-12-07 17:02:19 +04:00
committed by GitHub
parent e09009e497
commit 185647a09a
75 changed files with 453 additions and 427 deletions

View File

@@ -11,6 +11,8 @@
#include <desktop/desktop.h>
#include <dolphin/dolphin.h>
#define KEEP_ONLY_CALM_BASIC_ANIMATIONS 1
LIST_DEF(AnimationList, const PairedAnimation*, M_PTR_OPLIST)
#define M_OPL_AnimationList_t() LIST_OPLIST(AnimationList)
@@ -81,14 +83,16 @@ void desktop_start_new_idle_animation(DesktopAnimation* animation) {
furi_record_close("dolphin");
furi_assert((stats.level >= 1) && (stats.level <= 3));
uint8_t level = stats.level;
AnimationList_t animation_list;
AnimationList_init(animation_list);
PUSH_BACK_ANIMATIONS(animation_list, mad_animation, stats.butthurt);
#if KEEP_ONLY_CALM_BASIC_ANIMATIONS
PUSH_BACK_ANIMATIONS(animation_list, calm_animation, 0);
#else
PUSH_BACK_ANIMATIONS(animation_list, calm_animation, stats.butthurt);
switch(level) {
PUSH_BACK_ANIMATIONS(animation_list, mad_animation, stats.butthurt);
switch(stats.level) {
case 1:
PUSH_BACK_ANIMATIONS(animation_list, level_1_animation, stats.butthurt);
break;
@@ -119,6 +123,7 @@ void desktop_start_new_idle_animation(DesktopAnimation* animation) {
animation->sd_shown_error_card_bad = false;
animation->sd_shown_error_db = false;
}
#endif
uint32_t whole_weight = 0;
for

View File

@@ -6,9 +6,9 @@
// Calm/Mad Basic Idle Animations
#define COMMON_BASIC_DURATION (60 * 60)
#define COMMON_ACTIVE_CYCLES 7
#define COMMON_ACTIVE_COOLDOWN 30
#define COMMON_BASIC_DURATION (2 * 60 * 60)
#define COMMON_ACTIVE_CYCLES 1
#define COMMON_ACTIVE_COOLDOWN 15
#define COMMON_WEIGHT 3
#define BUTTHURT_LEVEL(x) (1UL << (x))
@@ -18,7 +18,7 @@
#define COMMON_ACTIVE_DURATION(x) ((x)*COMMON_ACTIVE_CYCLES / 2)
static const BasicAnimation animation_TV = {
.icon = &A_TV_128x51,
.icon = &A_Tv_128x52,
.duration = COMMON_BASIC_DURATION,
.weight = COMMON_WEIGHT,
.active_cooldown = COMMON_ACTIVE_COOLDOWN,
@@ -27,12 +27,12 @@ static const BasicAnimation animation_TV = {
BUTTHURT_LEVEL(6) | BUTTHURT_LEVEL(7)};
static const ActiveAnimation animation_TV_active = {
.icon = &A_TVActive_128x51,
.duration = COMMON_ACTIVE_DURATION(2),
.icon = &A_TvActive_128x52,
.duration = COMMON_ACTIVE_DURATION(6),
};
static const BasicAnimation animation_sleep = {
.icon = &A_Sleep_128x51,
.icon = &A_Sleep_128x52,
.black_status_bar = true,
.duration = COMMON_BASIC_DURATION,
.weight = COMMON_WEIGHT,
@@ -43,9 +43,9 @@ static const BasicAnimation animation_sleep = {
BUTTHURT_LEVEL(9) | BUTTHURT_LEVEL(10)};
static const ActiveAnimation animation_sleep_active = {
.icon = &A_SleepActive_128x51,
.icon = &A_SleepActive_128x52,
.black_status_bar = true,
.duration = COMMON_ACTIVE_DURATION(2),
.duration = COMMON_ACTIVE_DURATION(5),
};
static const BasicAnimation animation_leaving = {
@@ -62,7 +62,7 @@ static const ActiveAnimation animation_leaving_active = {
};
static const BasicAnimation animation_laptop = {
.icon = &A_Laptop_128x51,
.icon = &A_Laptop_128x52,
.duration = COMMON_BASIC_DURATION,
.weight = COMMON_WEIGHT,
.active_cooldown = COMMON_ACTIVE_COOLDOWN,
@@ -70,8 +70,8 @@ static const BasicAnimation animation_laptop = {
BUTTHURT_LEVEL(3) | BUTTHURT_LEVEL(4) | BUTTHURT_LEVEL(5)};
static const ActiveAnimation animation_laptop_active = {
.icon = &A_LaptopActive_128x51,
.duration = COMMON_ACTIVE_DURATION(2),
.icon = &A_LaptopActive_128x52,
.duration = COMMON_ACTIVE_DURATION(8),
};
static const BasicAnimation animation_knife = {
@@ -118,15 +118,15 @@ static const ActiveAnimation animation_box_active = {
};
static const BasicAnimation animation_waves = {
.icon = &A_Waves_128x51,
.icon = &A_Waves_128x52,
.duration = COMMON_BASIC_DURATION,
.weight = COMMON_WEIGHT,
.active_cooldown = COMMON_ACTIVE_COOLDOWN,
.butthurt_level_mask = BUTTHURT_LEVEL(0) | BUTTHURT_LEVEL(1) | BUTTHURT_LEVEL(2)};
static const ActiveAnimation animation_waves_active = {
.icon = &A_WavesActive_128x51,
.duration = COMMON_ACTIVE_DURATION(2),
.icon = &A_WavesActive_128x52,
.duration = COMMON_ACTIVE_DURATION(7),
};
// Level Idle Animations