2021-10-07 16:32:37 +03:00
|
|
|
#include "desktop_animation.h"
|
|
|
|
|
2021-11-12 16:04:35 +03:00
|
|
|
#define TAG "DesktopAnimation"
|
|
|
|
|
2021-10-07 16:32:37 +03:00
|
|
|
static const Icon* idle_scenes[] = {&A_Wink_128x64, &A_WatchingTV_128x64};
|
|
|
|
|
|
|
|
const Icon* desktop_get_icon() {
|
|
|
|
uint8_t new = 0;
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
// checking dolphin state here to choose appropriate animation
|
|
|
|
|
|
|
|
Dolphin* dolphin = furi_record_open("dolphin");
|
|
|
|
DolphinStats stats = dolphin_stats(dolphin);
|
|
|
|
float timediff = fabs(difftime(stats.timestamp, dolphin_state_timestamp()));
|
|
|
|
|
2021-11-12 16:04:35 +03:00
|
|
|
FURI_LOG_I(TAG, "background change");
|
|
|
|
FURI_LOG_I(TAG, "icounter: %d", stats.icounter);
|
|
|
|
FURI_LOG_I(TAG, "butthurt: %d", stats.butthurt);
|
|
|
|
FURI_LOG_I(TAG, "time since deeed: %.0f", timediff);
|
2021-10-07 16:32:37 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
if((random() % 100) > 50) { // temp rnd selection
|
|
|
|
new = random() % COUNT_OF(idle_scenes);
|
|
|
|
}
|
|
|
|
|
|
|
|
return idle_scenes[new];
|
|
|
|
}
|