[FL-1995] New dolphin animations (part 1) (#835)

* Desktop Animation (part 1): Ugly naked ohmygod architecture
* fix butthurt, fix locked scene
* Change SD icons, fixes
* Fix level update animation
* Fixes, correct butthurt
* Clean up code
* furi_assert(0) -> furi_crash("msg")
* Gui: rename none layer to desktop, update docs.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2021-11-24 20:21:12 +04:00
committed by GitHub
parent 92c499b41b
commit 9b8a139e2b
235 changed files with 1869 additions and 661 deletions

View File

@@ -6,7 +6,7 @@
#define TAG "FuriHalCompress"
#define FURI_HAL_COMPRESS_ICON_ENCODED_BUFF_SIZE (512)
#define FURI_HAL_COMPRESS_ICON_ENCODED_BUFF_SIZE (2*512)
#define FURI_HAL_COMPRESS_ICON_DECODED_BUFF_SIZE (1024)
#define FURI_HAL_COMPRESS_EXP_BUFF_SIZE (1 << FURI_HAL_COMPRESS_EXP_BUFF_SIZE_LOG)
@@ -59,13 +59,17 @@ void furi_hal_compress_icon_decode(const uint8_t* icon_data, uint8_t** decoded_b
if(header->is_compressed) {
size_t data_processed = 0;
heatshrink_decoder_sink(icon_decoder->decoder, (uint8_t*)&icon_data[4], header->compressed_buff_size, &data_processed);
while(
heatshrink_decoder_poll(
while (1) {
HSD_poll_res res = heatshrink_decoder_poll(
icon_decoder->decoder,
icon_decoder->decoded_buff,
sizeof(icon_decoder->decoded_buff),
&data_processed) == HSDR_POLL_MORE
) {};
&data_processed);
furi_assert((res == HSDR_POLL_EMPTY) || (res == HSDR_POLL_MORE));
if (res != HSDR_POLL_MORE) {
break;
}
}
heatshrink_decoder_reset(icon_decoder->decoder);
memset(icon_decoder->compress_buff, 0, sizeof(icon_decoder->compress_buff));
*decoded_buff = icon_decoder->decoded_buff;