From 92a97a65f93997485f689c3817cd0f56bf3b0e8c Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sun, 21 Dec 2025 12:44:20 +0100
Subject: [PATCH] Berry remove `animate` (#24241)
* Remove tab from json
* Berry 'animate' to be replaced with 'animation' framework
---
CHANGELOG.md | 1 +
lib/libesp32/berry/default/be_modtab.c | 6 -
lib/libesp32/berry/gen.sh | 2 +-
lib/libesp32/berry_animate/library.json | 17 -
lib/libesp32/berry_animate/path.be | 2 -
lib/libesp32/berry_animate/solidify_all.be | 104 --
.../berry_animate/src/be_animate_module.c | 244 ---
.../berry_animate/src/be_berry_leds_frame.cpp | 179 --
.../berry_animate/src/be_leds_frame_lib.c | 41 -
.../berry_animate/src/berry_animate.h | 8 -
.../berry_animate/src/embedded/animate_0.be | 3 -
.../src/embedded/animate_1_core.be | 212 ---
.../src/embedded/animate_2_animate_effects.be | 416 -----
.../src/embedded/animate_9_module.be | 516 ------
.../src/embedded/leds_frame_be_methods.be | 28 -
lib/libesp32/berry_animate/src/solidify/.keep | 0
.../src/solidify/solidified_animate_0.h | 7 -
.../src/solidify/solidified_animate_1_core.h | 825 ---------
.../solidified_animate_2_animate_effects.h | 785 ---------
.../solidify/solidified_animate_9_module.h | 1494 -----------------
.../solidified_leds_frame_be_methods.h | 178 --
.../src/core/frame_buffer_ntv.be | 3 -
pio-tools/gen-berry-structures.py | 2 +-
tasmota/my_user_config.h | 1 -
.../tasmota_xdrv_driver/xdrv_52_9_berry.ino | 3 -
25 files changed, 3 insertions(+), 5074 deletions(-)
delete mode 100644 lib/libesp32/berry_animate/library.json
delete mode 100644 lib/libesp32/berry_animate/path.be
delete mode 100755 lib/libesp32/berry_animate/solidify_all.be
delete mode 100644 lib/libesp32/berry_animate/src/be_animate_module.c
delete mode 100644 lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
delete mode 100644 lib/libesp32/berry_animate/src/be_leds_frame_lib.c
delete mode 100644 lib/libesp32/berry_animate/src/berry_animate.h
delete mode 100644 lib/libesp32/berry_animate/src/embedded/animate_0.be
delete mode 100644 lib/libesp32/berry_animate/src/embedded/animate_1_core.be
delete mode 100644 lib/libesp32/berry_animate/src/embedded/animate_2_animate_effects.be
delete mode 100644 lib/libesp32/berry_animate/src/embedded/animate_9_module.be
delete mode 100644 lib/libesp32/berry_animate/src/embedded/leds_frame_be_methods.be
delete mode 100644 lib/libesp32/berry_animate/src/solidify/.keep
delete mode 100644 lib/libesp32/berry_animate/src/solidify/solidified_animate_0.h
delete mode 100644 lib/libesp32/berry_animate/src/solidify/solidified_animate_1_core.h
delete mode 100644 lib/libesp32/berry_animate/src/solidify/solidified_animate_2_animate_effects.h
delete mode 100644 lib/libesp32/berry_animate/src/solidify/solidified_animate_9_module.h
delete mode 100644 lib/libesp32/berry_animate/src/solidify/solidified_leds_frame_be_methods.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7ba3f130..2a157d30f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
- ESP32-P4 unique MQTT Client based on hosted MCU MAC address
### Removed
+- Berry `animate` to be replaced with `animation` framework
## [Released]
diff --git a/lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c
index 636bc8a00..0f2f064be 100644
--- a/lib/libesp32/berry/default/be_modtab.c
+++ b/lib/libesp32/berry/default/be_modtab.c
@@ -175,12 +175,6 @@ BERRY_LOCAL const bntvmodule_t* const be_module_table[] = {
&be_native_module(unishox),
#endif // USE_UNISHOX_COMPRESSION
-#if defined(USE_WS2812) && !defined(USE_WS2812_FORCE_NEOPIXELBUS)
- #ifdef USE_BERRY_ANIMATE
- &be_native_module(animate),
- #endif // USE_BERRY_ANIMATE
-#endif // USE_WS2812
-
#ifdef USE_LVGL
&be_native_module(lv),
&be_native_module(lv_extra),
diff --git a/lib/libesp32/berry/gen.sh b/lib/libesp32/berry/gen.sh
index 203c660b3..76c7d0e6a 100755
--- a/lib/libesp32/berry/gen.sh
+++ b/lib/libesp32/berry/gen.sh
@@ -5,4 +5,4 @@
# Included in the Platformio build process with `pio-tools/gen-berry-structures.py
#
rm -Rf ./generate/be_*.h
-python3 tools/coc/coc -o generate src default ../berry_tasmota/src ../berry_mapping/src ../berry_int64/src ../../libesp32_lvgl/lv_binding_berry/src ../../libesp32_lvgl/lv_haspmota/src/solidify ../berry_matter/src/solidify ../berry_matter/src ../berry_animate/src/solidify ../berry_animate/src ../berry_animation/src/solidify ../berry_animation/src ../../libesp32_lvgl/lv_binding_berry/src/solidify ../../libesp32_lvgl/lv_binding_berry/generate -c default/berry_conf.h
+python3 tools/coc/coc -o generate src default ../berry_tasmota/src ../berry_mapping/src ../berry_int64/src ../../libesp32_lvgl/lv_binding_berry/src ../../libesp32_lvgl/lv_haspmota/src/solidify ../berry_matter/src/solidify ../berry_matter/src ../berry_animation/src/solidify ../berry_animation/src ../../libesp32_lvgl/lv_binding_berry/src/solidify ../../libesp32_lvgl/lv_binding_berry/generate -c default/berry_conf.h
diff --git a/lib/libesp32/berry_animate/library.json b/lib/libesp32/berry_animate/library.json
deleted file mode 100644
index 3033e8a52..000000000
--- a/lib/libesp32/berry_animate/library.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "Berry animation library for WS2812 leds",
- "version": "0.1",
- "description": "Berry animation library for WS2812 leds",
- "license": "MIT",
- "homepage": "https://github.com/arendst/Tasmota",
- "frameworks": "arduino",
- "platforms": "espressif32",
- "authors":
- {
- "name": "Stephan Hadinger",
- "maintainer": true
- },
- "build": {
- "flags": [ "-I$PROJECT_DIR/include", "-includetasmota_options.h" ]
- }
-}
\ No newline at end of file
diff --git a/lib/libesp32/berry_animate/path.be b/lib/libesp32/berry_animate/path.be
deleted file mode 100644
index afba51adc..000000000
--- a/lib/libesp32/berry_animate/path.be
+++ /dev/null
@@ -1,2 +0,0 @@
-# empty module
-# allows stand-alone `import path`
diff --git a/lib/libesp32/berry_animate/solidify_all.be b/lib/libesp32/berry_animate/solidify_all.be
deleted file mode 100755
index 96862ab6a..000000000
--- a/lib/libesp32/berry_animate/solidify_all.be
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env -S ../berry/berry -s -g
-#
-# Berry solidify files
-
-import os
-import global
-import solidify
-import string as string2
-import re
-
-import sys
-sys.path().push('src/embedded') # allow to import from src/embedded
-
-# globals that need to exist to make compilation succeed
-var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,udp,tcpclientasync,"
- "lv_clock,lv_clock_icon,lv_signal_arcs,lv_signal_bars,lv_wifi_arcs_icon,lv_wifi_arcs,"
- "lv_wifi_bars_icon,lv_wifi_bars,"
- "_lvgl,"
- "int64"
-
-for g:string2.split(globs, ",")
- global.(g) = nil
-end
-
-var prefix_dir = "src/embedded/"
-var prefix_out = "src/solidify/"
-
-def sort(l)
- # insertion sort
- for i:1..size(l)-1
- var k = l[i]
- var j = i
- while (j > 0) && (l[j-1] > k)
- l[j] = l[j-1]
- j -= 1
- end
- l[j] = k
- end
- return l
-end
-
-def clean_directory(dir)
- var file_list = os.listdir(dir)
- for f : file_list
- if f[0] == '.' continue end # ignore files starting with `.`
- os.remove(dir + f)
- end
-end
-
-var pattern = "#@\\s*solidify:([A-Za-z0-9_.,]+)"
-
-def parse_file(fname, prefix_out)
- print("Parsing: ", fname)
- var f = open(prefix_dir + fname)
- var src = f.read()
- f.close()
- # try to compile
- var compiled = compile(src)
- compiled() # run the compile code to instanciate the classes and modules
- # output solidified
- var fname_h = string2.split(fname, '.be')[0] + '.h' # take whatever is before the first '.be'
- var fout = open(prefix_out + "solidified_" + fname_h, "w")
- fout.write(f"/* Solidification of {fname_h} */\n")
- fout.write("/********************************************************************\\\n")
- fout.write("* Generated code, don't edit *\n")
- fout.write("\\********************************************************************/\n")
- fout.write('#include "be_constobj.h"\n')
-
- var directives = re.searchall(pattern, src)
- # print(directives)
-
- for directive : directives
- var object_list = string2.split(directive[1], ',')
- var object_name = object_list[0]
- var weak = (object_list.find('weak') != nil) # do we solidify with weak strings?
- var o = global
- var cl_name = nil
- var obj_name = nil
- for subname : string2.split(object_name, '.')
- o = o.(subname)
- cl_name = obj_name
- obj_name = subname
- if (type(o) == 'class')
- obj_name = 'class_' + obj_name
- elif (type(o) == 'module')
- obj_name = 'module_' + obj_name
- end
- end
- solidify.dump(o, weak, fout, cl_name)
- end
-
- fout.write("/********************************************************************/\n")
- fout.write("/* End of solidification */\n")
- fout.close()
-end
-
-clean_directory(prefix_out)
-
-var src_file_list = os.listdir(prefix_dir)
-src_file_list = sort(src_file_list)
-for src_file : src_file_list
- if src_file[0] == '.' continue end
- parse_file(src_file, prefix_out)
-end
diff --git a/lib/libesp32/berry_animate/src/be_animate_module.c b/lib/libesp32/berry_animate/src/be_animate_module.c
deleted file mode 100644
index 83ba2bb62..000000000
--- a/lib/libesp32/berry_animate/src/be_animate_module.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- be_animate_module.c - implements the animate module for Leds
-
- Copyright (C) 2023 Stephan Hadinger & Theo Arends
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/*******************************************************************\
- * `animate` global module
-\*******************************************************************/
-
-#ifdef USE_BERRY
-#include "be_constobj.h"
-#include "be_mapping.h"
-
-#include "solidify/solidified_animate_1_core.h"
-#include "solidify/solidified_animate_2_animate_effects.h"
-#include "solidify/solidified_animate_9_module.h"
-
-
-/*******************************************************************\
- * standard palettes
-\*******************************************************************/
-static const uint8_t PALETTE_RAINBOW_WHITE[] = {
- 0x50, 0xFF, 0x00, 0x00, // red
- 0x30, 0xFF, 0x00, 0x00, // red
- 0x50, 0xFF, 0xA5, 0x00, // orange
- 0x30, 0xFF, 0xA5, 0x00, // orange
- 0x50, 0xFF, 0xFF, 0x00, // yellow
- 0x30, 0xFF, 0xFF, 0x00, // yellow
- 0x50, 0x00, 0xFF, 0x00, // green
- 0x30, 0x00, 0xFF, 0x00, // green
- 0x50, 0x00, 0x00, 0xFF, // blue
- 0x30, 0x00, 0x00, 0xFF, // blue
- 0x50, 0xFF, 0x00, 0xFF, // indigo
- 0x30, 0xFF, 0x00, 0xFF, // indigo
- 0x50, 0xFF, 0xFF, 0xFF, // white
- 0x30, 0xFF, 0xFF, 0xFF, // white
- 0x00, 0xFF, 0x00, 0x00, // red
-};
-
-static const uint8_t PALETTE_STANDARD_TAG[] = {
- 0x40, 0xFF, 0x00, 0x00, // red
- 0x40, 0xFF, 0xA5, 0x00, // orange
- 0x40, 0xFF, 0xFF, 0x00, // yellow
- 0x40, 0x00, 0xFF, 0x00, // green
- 0x40, 0x00, 0x00, 0xFF, // blue
- 0x40, 0xFF, 0x00, 0xFF, // indigo
- 0x40, 0xEE, 0x44, 0xA5, // violet
- 0x00, 0xFF, 0x00, 0x00, // red
-};
-
-// Gradient palette "ib_jul01_gp", originally from
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/ing/xmas/tn/ib_jul01.png.index.html
-static const uint8_t PALETTE_ib_jul01_gp[] = {
- 0x00, 0xE6, 0x06, 0x11, // rgb(230, 6, 17) 0.000%,
- 0x5E, 0x25, 0x60, 0x5A, // rgb( 37, 96, 90) 37.010%,
- 0x85, 0x90, 0xBD, 0x6A, // rgb(144,189,106) 52.000%,
- 0xFF, 0xBB, 0x03, 0x0D, // rgb(187, 3, 13) 100.000%
-};
-
-// Gradient palette "ib44"
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/ing/general/tn/ib44.png.index.html
-static const uint8_t PALETTE_ib_44[] = {
- 0, 214, 24, 16,
- 64, 227, 115, 78,
- 255, 239, 206, 140,
-};
-
-// Gradient palette "Fire-1"
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/ds/icons/Fire-1.c3g
-static const uint8_t PALETTE_Fire_1[] = {
- 0, 255, 0, 0,
- 128, 255, 128, 0,
- 255, 255, 255, 0,
-};
-
-// Gradient palette "bhw1_sunconure"
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw1/tn/bhw1_sunconure.png.index.html
-static const uint8_t PALETTE_bhw1_sunconure[] = {
- 0, 97, 240, 78,
- 161, 246, 137, 30,
- 255, 246, 45, 30,
-};
-
-// Gradient palette "bhw3_41"
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw3/tn/bhw3_41.png.index.html
-static const uint8_t PALETTE_bhw3_41[] = {
- 0, 0, 0, 128,
- 71, 64, 64, 255,
- 75, 160, 160, 255,
- 76, 255, 255, 255,
- 178, 255, 255, 255,
- 179, 255, 128, 128,
- 196, 255, 0, 0,
- 255, 128, 0, 0,
-};
-
-// Gradient palette "bhw4_089"
-// http://soliton.vm.bytemark.co.uk/pub/cpt-city/bhw/bhw4/tn/bhw4_089.png.index.html
-static const uint8_t PALETTE_bhw4_089[] = {
- 0, 174, 52, 28,
- 28, 224, 154, 133,
- 53, 235, 208, 206,
- 79, 249, 208, 118,
- 109, 228, 95, 50,
- 132, 227, 165, 116,
- 163, 226, 131, 67,
- 184, 252, 213, 118,
- 201, 252, 169, 125,
- 224, 255, 194, 101,
- 255, 215, 80, 35,
-};
-
-static const uint8_t PALETTE_STANDARD_VAL[] = {
- 0x00, 0xFF, 0x00, 0x00, // red
- 0x2A, 0xFF, 0xA5, 0x00, // orange
- 0x55, 0xFF, 0xFF, 0x00, // yellow
- 0x7F, 0x00, 0xFF, 0x00, // green
- 0xAA, 0x00, 0x00, 0xFF, // blue
- 0xD4, 0xFF, 0x00, 0xFF, // indigo
- 0xFF, 0xFF, 0x00, 0x00, // red
-};
-
-static const uint8_t PALETTE_SATURATED_TAG[] = {
- 0x40, 0xFF, 0x00, 0x00, // red
- 0x40, 0xFF, 0xA5, 0x00, // orange
- 0x40, 0xFF, 0xFF, 0x00, // yellow
- 0x40, 0x00, 0xFF, 0x00, // green
- 0x40, 0x00, 0x00, 0xFF, // blue
- 0x40, 0xFF, 0x00, 0xFF, // indigo
- 0x00, 0xFF, 0x00, 0x00, // red
-};
-
-extern const bclass be_class_Leds_frame;
-
-#include "be_fixed_animate.h"
-
-/* @const_object_info_begin
-
-module animate (scope: global, strings: weak) {
- SAWTOOTH, int(1)
- TRIANGLE, int(2)
- SQUARE, int(3)
- COSINE, int(4)
- LASTFORM, int(5)
-
- PALETTE_STANDARD_TAG, comptr(PALETTE_STANDARD_TAG)
- PALETTE_RAINBOW_WHITE, comptr(PALETTE_RAINBOW_WHITE)
- PALETTE_STANDARD_VAL, comptr(PALETTE_STANDARD_VAL)
- PALETTE_SATURATED_TAG, comptr(PALETTE_SATURATED_TAG)
- PALETTE_ib_jul01_gp, comptr(PALETTE_ib_jul01_gp)
- PALETTE_ib_44, comptr(PALETTE_ib_44)
- PALETTE_Fire_1, comptr(PALETTE_Fire_1)
- PALETTE_bhw1_sunconure, comptr(PALETTE_bhw1_sunconure)
- PALETTE_bhw4_089, comptr(PALETTE_bhw4_089)
-
- core, class(be_class_Animate_core)
- animator, class(be_class_Animate_animator)
- frame, class(be_class_Leds_frame)
- pulse, class(be_class_Animate_pulse)
- palette, class(be_class_Animate_palette)
- oscillator, class(be_class_Animate_oscillator)
-}
-
-@const_object_info_end */
-
-/* Unit test for palettes
-
-import animate
-var p, gradient
-p = animate.palette.ptr_to_palette(animate.PALETTE_STANDARD_TAG)
-assert(p == bytes('40FF000040FFA50040FFFF004000FF00400000FF40FF00FF40EE44A500FF0000'))
-gradient = animate.palette.to_css_gradient(p)
-assert(gradient == 'background:linear-gradient(to right,#FF0000 0.0%,#FFA500 14.3%,#FFFF00 28.6%,#00FF00 42.9%,#0000FF 57.1%,#FF00FF 71.4%,#EE44A5 85.7%,#FF0000 100.0%);')
-
-p = animate.palette.ptr_to_palette(animate.PALETTE_STANDARD_VAL)
-assert(p == bytes('00FF00002AFFA50055FFFF007F00FF00AA0000FFD4FF00FFFFFF0000'))
-gradient = animate.palette.to_css_gradient(animate.PALETTE_STANDARD_VAL)
-assert(gradient == 'background:linear-gradient(to right,#FF0000 0.0%,#FFA500 16.5%,#FFFF00 33.3%,#00FF00 49.8%,#0000FF 66.7%,#FF00FF 83.1%,#FF0000 100.0%);')
-
-
-# unit tests
-import animate
-var o = animate.oscillator(-1000, 1000, 3000)
-o.start(1000)
-assert(o.value == -1000)
-assert(o.animate(1500) == -667)
-assert(o.animate(2500) == 0)
-assert(o.animate(3999) == 1000)
-assert(o.animate(4000) == -1000)
-assert(o.animate(4100) == -933)
-
-o = animate.oscillator(-1000, 1000, 6000, animate.TRIANGLE)
-o.start(1000)
-assert(o.value == -1000)
-assert(o.animate(1500) == -667)
-assert(o.animate(2500) == 0)
-assert(o.animate(3999) == 1000)
-assert(o.animate(4000) == 1000)
-assert(o.animate(4100) == 933)
-assert(o.animate(6000) == -334)
-assert(o.animate(7000) == -1000)
-assert(o.animate(7100) == -933)
-
-o = animate.oscillator(-1000, 1000, 6000, animate.SQUARE)
-o.start(1000)
-assert(o.value == -1000)
-assert(o.animate(1500) == -1000)
-assert(o.animate(2500) == -1000)
-assert(o.animate(3999) == -1000)
-assert(o.animate(4000) == 1000)
-assert(o.animate(4100) == 1000)
-assert(o.animate(6000) == 1000)
-assert(o.animate(7000) == -1000)
-assert(o.animate(7100) == -1000)
-
-o = animate.oscillator(-1000, 1000, 6000, animate.COSINE)
-o.start(1000)
-assert(o.animate(1000) == -1000)
-assert(o.animate(1500) == -867)
-assert(o.animate(2000) == -500)
-assert(o.animate(2500) == 0)
-assert(o.animate(4000) == 1000)
-assert(o.animate(5500) == 0)
-assert(o.animate(7000) == -1000)
-
-
-
-*/
-
-#endif // USE_BERRY
diff --git a/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp b/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
deleted file mode 100644
index 65ab158cc..000000000
--- a/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- xdrv_52_3_berry_leds.ino - Berry scripting language, native fucnctions
-
- Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-
-#ifdef USE_BERRY
-
-#include
-
-#ifdef USE_WS2812
-
-extern uint16_t changeUIntScale(uint16_t inum, uint16_t ifrom_min, uint16_t ifrom_max,uint16_t ito_min, uint16_t ito_max);
-extern uint32_t ApplyBriGamma(uint32_t color_a /* 0xRRGGBB */, uint32_t bri /* 0..255 */, bool gamma);
-
-extern "C" {
- // Leds_frame.blend(color1:int, color2:int, alpha:int) -> int
- //
- int32_t be_leds_blend(bvm *vm);
- int32_t be_leds_blend(bvm *vm) {
- int32_t top = be_top(vm); // Get the number of arguments
- if (top >= 3 && be_isint(vm, 1) && be_isint(vm, 2) && be_isint(vm, 3)) {
- uint32_t color_a = be_toint(vm, 1);
- uint32_t color_b = be_toint(vm, 2);
- uint32_t alpha = be_toint(vm, 3);
- uint32_t r = (color_a >> 16) & 0xFF;
- uint32_t g = (color_a >> 8) & 0xFF;
- uint32_t b = (color_a ) & 0xFF;
- uint32_t a = (color_a >> 24) & 0xFF;
- uint32_t r2 = (color_b >> 16) & 0xFF;
- uint32_t g2 = (color_b >> 8) & 0xFF;
- uint32_t b2 = (color_b ) & 0xFF;
- uint32_t a2 = (color_b >> 24) & 0xFF;
- uint8_t r3 = changeUIntScale(alpha, 0, 255, r2, r);
- uint8_t g3 = changeUIntScale(alpha, 0, 255, g2, g);
- uint8_t b3 = changeUIntScale(alpha, 0, 255, b2, b);
- uint8_t a3 = changeUIntScale(alpha, 0, 255, a2, a);
- uint32_t rgb = (a3 << 24) | (r3 << 16) | (g3 << 8) | b3;
- be_pushint(vm, rgb);
- be_return(vm);
- }
- be_raise(vm, "type_error", nullptr);
- }
-
- // Leds_frame.blend_pixels(dest:bytes(), foreground:bytes) -> nil
- // Destination can be the same as foreground or background
- //
- // All calculation are done in `0xAARRGGBB` format, AA=0 if opaque (i.e. ignored)
- // Background has always alpha = 0 (any other value is ignored) - for simplification
- // Size is truncated to smallest of all 3 buffers
- int32_t be_leds_blend_pixels(bvm *vm);
- int32_t be_leds_blend_pixels(bvm *vm) {
- int32_t top = be_top(vm); // Get the number of arguments
- if (top >= 2 && be_isbytes(vm, 2)) {
- size_t dest_len = 0;
- uint32_t * dest_buf = (uint32_t*) be_tobytes(vm, 1, &dest_len);
- // back = dest for now, could be changed in the future
- size_t back_len = 0;
- const uint32_t * back_buf = (const uint32_t*) be_tobytes(vm, 1, &back_len);
- size_t fore_len = 0;
- const uint32_t * fore_buf = (const uint32_t*) be_tobytes(vm, 2, &fore_len);
-
- if (fore_len < dest_len) { dest_len = fore_len; }
- if (back_len < dest_len) { dest_len = back_len; }
- size_t pixels_count = dest_len / 4;
- if (pixels_count > 0) {
- uint32_t * dest = (uint32_t *)dest_buf;
- uint32_t * back = (uint32_t *)back_buf;
- uint32_t * fore = (uint32_t *)fore_buf;
- for (size_t i = 0; i < pixels_count; i++) {
- uint32_t back_argb = back[i];
- uint32_t fore_argb = fore[i];
- uint32_t fore_alpha = (fore_argb >> 24) & 0xFF;
- uint32_t dest_rgb_new = back_argb;
- if (fore_alpha == 0) { // opaque layer, copy value from fore
- dest_rgb_new = fore_argb;
- } else if (fore_alpha == 255) { // fore is transparent, use back
- // nothing to do, dest_rgb_new = back_argb above
- } else {
- uint32_t back_r = (back_argb >> 16) & 0xFF;
- uint32_t fore_r = (fore_argb >> 16) & 0xFF;
- uint32_t back_g = (back_argb >> 8) & 0xFF;
- uint32_t fore_g = (fore_argb >> 8) & 0xFF;
- uint32_t back_b = (back_argb ) & 0xFF;
- uint32_t fore_b = (fore_argb ) & 0xFF;
- uint8_t dest_r_new = changeUIntScale(fore_alpha, 0, 255, fore_r, back_r);
- uint8_t dest_g_new = changeUIntScale(fore_alpha, 0, 255, fore_g, back_g);
- uint8_t dest_b_new = changeUIntScale(fore_alpha, 0, 255, fore_b, back_b);
- dest_rgb_new = (dest_r_new << 16) | (dest_g_new << 8) | dest_b_new;
- }
- dest[i] = dest_rgb_new;
- }
- }
- be_return_nil(vm);
- }
- be_raise(vm, "type_error", nullptr);
- }
-
- // Leds_frame.fill_pixels(dest:bytes(), color:int) -> nil
- //
- // Fill buffer with same color
- int32_t be_leds_fill_pixels(bvm *vm);
- int32_t be_leds_fill_pixels(bvm *vm) {
- int32_t top = be_top(vm); // Get the number of arguments
- if (top >= 2 && be_isint(vm, 2)) {
- size_t dest_len = 0;
- uint32_t * dest_buf = (uint32_t*) be_tobytes(vm, 1, &dest_len);
- uint32_t color = be_toint(vm, 2);
-
- size_t pixels_count = dest_len / 4;
- if (pixels_count > 0) {
- uint32_t * dest = (uint32_t *)dest_buf;
- for (size_t i = 0; i < pixels_count; i++) {
- dest[i] = color;
- }
- }
- be_return_nil(vm);
- }
- be_raise(vm, "type_error", nullptr);
- }
-
- // Leds_frame.paste_pixels(neopixel:bytes(), led_buffer:bytes(), bri:int 0..100, gamma:bool)
- //
- // Copy from ARGB buffer to RGB
- int32_t be_leds_paste_pixels(bvm *vm);
- int32_t be_leds_paste_pixels(bvm *vm) {
- int32_t top = be_top(vm); // Get the number of arguments
- if (top >= 2 && be_isbytes(vm, 2)) {
- size_t src_len = 0;
- uint32_t * src_buf = (uint32_t*) be_tobytes(vm, 1, &src_len);
- size_t dest_len = 0;
- uint8_t * dest_buf = (uint8_t*) be_tobytes(vm, 2, &dest_len);
-
- uint32_t bri255 = 255;
- if (top >= 3 && be_isint(vm, 3)) {
- bri255 = be_toint(vm, 3);
- }
- bool gamma = false;
- if (top >= 4 && be_isbool(vm, 4)) {
- gamma = be_tobool(vm, 4);
- }
-
- size_t pixels_count = src_len / 4;
- if (pixels_count > dest_len / 3) { pixels_count = dest_len / 3; }
- if (pixels_count > 0) {
- for (size_t i = 0; i < pixels_count; i++) {
- uint32_t src_argb = ApplyBriGamma(src_buf[i], bri255, gamma);
- uint32_t src_r = (src_argb >> 16) & 0xFF;
- uint32_t src_g = (src_argb >> 8) & 0xFF;
- uint32_t src_b = (src_argb ) & 0xFF;
- dest_buf[i * 3 + 0] = src_r;
- dest_buf[i * 3 + 1] = src_g;
- dest_buf[i * 3 + 2] = src_b;
- }
- }
- be_return_nil(vm);
- }
- be_raise(vm, "type_error", nullptr);
- }
-
-
-}
-
-#endif // USE_WS2812
-#endif // USE_BERRY
diff --git a/lib/libesp32/berry_animate/src/be_leds_frame_lib.c b/lib/libesp32/berry_animate/src/be_leds_frame_lib.c
deleted file mode 100644
index 8782e1c94..000000000
--- a/lib/libesp32/berry_animate/src/be_leds_frame_lib.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************
- * Berry class `neopixelbus_ntv`
- *
- *******************************************************************/
-
-#ifdef USE_BERRY
-#include "be_constobj.h"
-
-#ifdef USE_WS2812
-
-extern int be_leds_blend(bvm *vm);
-extern int be_leds_blend_pixels(bvm *vm);
-extern int be_leds_fill_pixels(bvm *vm);
-extern int be_leds_paste_pixels(bvm *vm);
-
-BE_EXPORT_VARIABLE extern const bclass be_class_bytes;
-
-#include "solidify/solidified_leds_frame_be_methods.h"
-
-/* @const_object_info_begin
-class be_class_Leds_frame (scope: global, name: Leds_frame, super:be_class_bytes, strings: weak) {
- pixel_size, var
-
- init, closure(class_Leds_frame_be_init_closure)
-
- item, closure(class_Leds_frame_be_item_closure)
- setitem, closure(class_Leds_frame_be_setitem_closure)
- set_pixel, closure(class_Leds_frame_be_set_pixel_closure)
-
- // the following are on buffers
- blend, static_func(be_leds_blend)
- fill_pixels, func(be_leds_fill_pixels)
- blend_pixels, func(be_leds_blend_pixels)
- paste_pixels, func(be_leds_paste_pixels)
-}
-@const_object_info_end */
-
-#include "be_fixed_be_class_Leds_frame.h"
-
-#endif // USE_WS2812
-#endif // USE_BERRY
diff --git a/lib/libesp32/berry_animate/src/berry_animate.h b/lib/libesp32/berry_animate/src/berry_animate.h
deleted file mode 100644
index 87e27bd27..000000000
--- a/lib/libesp32/berry_animate/src/berry_animate.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// force include of module by including this file
-
-#ifndef __BERRY_ANIMATE__
-#define __BERRY_ANIMATE__
-
-
-
-#endif // __BERRY_ANIMATE__
diff --git a/lib/libesp32/berry_animate/src/embedded/animate_0.be b/lib/libesp32/berry_animate/src/embedded/animate_0.be
deleted file mode 100644
index 5c854f6e1..000000000
--- a/lib/libesp32/berry_animate/src/embedded/animate_0.be
+++ /dev/null
@@ -1,3 +0,0 @@
-# prepare for module `animate`
-
-global.animate = module('animate')
\ No newline at end of file
diff --git a/lib/libesp32/berry_animate/src/embedded/animate_1_core.be b/lib/libesp32/berry_animate/src/embedded/animate_1_core.be
deleted file mode 100644
index 190654244..000000000
--- a/lib/libesp32/berry_animate/src/embedded/animate_1_core.be
+++ /dev/null
@@ -1,212 +0,0 @@
-# class Animate_core
-
-##########################################################################################
-#
-# class Animate_core
-#
-# Simple framework to orchestrate all the animations for a led strip or led matrix
-#
-# You should pass a Leds or Leds_segment to push pixels at each tick
-# This version uses `fast_loop` for up to 5ms animation time (200 Hz)
-#
-##########################################################################################
-#@ solidify:Animate_core,weak
-class Animate_core
- var strip # neopixelbus object
- var pixel_count # number of pixels in the strip
- var bri # brightness of the animation, 0..100, default 50
- var running # is the animation running
- var animators # animators list
- var painters # list of objects that paint layers on top of background (with transparency)
- var fast_loop_cb # closure used for fast_loop
- static var FAST_LOOP_MIN = 20
- var fast_loop_next # next time-stamp for fast_loop
- # cb for animation
- var obj # object called at each tick
- var mth # method of object called at each tick
- # frame ojects
- var frame # Leds_frame frame object
- var layer # Leds_frame for layer on top of frame
- # background color management (only for uniform background)
- var back_color # background color RRGGBB
-
- def init(strip, bri)
- import animate
-
- self.strip = strip
- if (bri == nil) bri = 50 end
- self.bri = bri # percentage of brightness 0..100
- self.set_strip_bri()
- self.running = false
- self.pixel_count = strip.pixel_count()
- self.animators = []
- self.painters = []
- #
- self.clear() # clear all leds first
- self.frame = animate.frame(self.pixel_count)
- self.layer = animate.frame(self.pixel_count)
- #
- self.fast_loop_cb = def() self.fast_loop() end
- self.back_color = 0x000000
- #
- self.set_current()
- end
-
- def set_strip_bri()
- self.strip.set_bri(tasmota.scale_uint(self.bri, 0, 100, 0, 255))
- end
-
- # set this animate.core as the current animator for configuration
- def set_current()
- global._cur_anim = self # declare the current animate.core for painters and animators to register
- end
-
- # cb
- def set_back_color(col)
- self.back_color = col
- end
-
- def add_background_animator(anim)
- anim.set_cb(self, self.set_back_color)
- self.add_animator(anim)
- end
-
- def add_animator(anim)
- if self.animators.find(anim) == nil
- self.animators.push(anim)
- end
- end
-
- # remove a specific animator
- # remove all animators if no parameter or nil
- # silently ignores if the animator can't be found
- def remove_animator(anim)
- var animators = self.animators
- if (anim != nil)
- animators.remove(animators.find(anim))
- else
- animators.clear()
- end
- end
-
- def remove_painter(p)
- var painters = self.painters
- if (p != nil)
- painters.remove(painters.find(p))
- else
- painters.clear()
- end
- end
-
-
- def add_painter(painter)
- if self.painters.find(painter) == nil
- self.painters.push(painter)
- end
- end
-
- def clear()
- self.stop()
- self.strip.clear()
- end
- def start()
- # check if the strip had a different animate object, stop it
- var prev_animate = self.strip.get_animate()
- import introspect
- if (prev_animate != nil) && (type(prev_animate) == 'instance') && (prev_animate != self)
- prev_animate.stop()
- end
- self.strip.set_animate(self)
-
- self.running = true
- var animators = self.animators
- var idx = 0
- while idx < size(animators)
- animators[idx].start()
- idx += 1
- end
- self.fast_loop_next = 0 # run immediately
- tasmota.add_fast_loop(self.fast_loop_cb)
- end
-
- def stop()
- self.running = false
- var animators = self.animators
- var idx = 0
- while idx < size(animators)
- animators[idx].stop()
- idx += 1
- end
- tasmota.remove_fast_loop(self.fast_loop_cb)
- end
-
- def set_bri(bri)
- self.bri = bri
- self.set_strip_bri()
- end
- def get_bri(bri)
- return self.bri
- end
-
- def set_cb(obj, method)
- self.obj = obj
- self.mth = method
- end
-
- def fast_loop()
- if self.running && tasmota.time_reached(self.fast_loop_next) && self.strip.can_show()
- # prepare environnement
- self.frame.fill_pixels(self.back_color)
- # run animators first
- var i = 0
- var now = tasmota.millis()
- self.fast_loop_next = now + self.FAST_LOOP_MIN
- while i < size(self.animators)
- self.animators[i].animate(now)
- i += 1
- # var anim = self.animators[i]
- # if anim.is_running()
- # anim.animate(now)
- # i += 1
- # else
- # self.animators.remove(i) # remove any finished animator
- # end
- end
- # apply painters
- i = 0
- var frame = self.frame
- var layer = self.layer
- while i < size(self.painters)
- layer.fill_pixels(0xFF000000) # fill with transparent color
- if (self.painters[i].paint(layer))
-# print(f"frame0 {self.frame.tohex()}")
-# print(f"layer0 {self.layer.tohex()}")
- frame.blend_pixels(layer)
-# print(f"frame1 {self.frame.tohex()}")
- end
- i += 1
- end
- # tirgger animate and display
- var obj = self.obj
- var mth = self.mth
- if (obj && mth)
- mth(obj)
- end
- self.animate()
- # now display the frame
- self.frame.paste_pixels(self.strip.pixels_buffer(), self.strip.get_bri(), self.strip.get_gamma())
- self.strip.dirty()
- self.strip.show()
- end
- end
-
- def animate()
- # placeholder - do nothing by default
- end
-
- def remove()
- self.clear()
- tasmota.remove_fast_loop(self.fast_loop_cb)
- end
-end
-animate.core = global.Animate_core
diff --git a/lib/libesp32/berry_animate/src/embedded/animate_2_animate_effects.be b/lib/libesp32/berry_animate/src/embedded/animate_2_animate_effects.be
deleted file mode 100644
index 6132b406a..000000000
--- a/lib/libesp32/berry_animate/src/embedded/animate_2_animate_effects.be
+++ /dev/null
@@ -1,416 +0,0 @@
-# class Animate_pulse
-
-#@ solidify:Animate_painter,weak
-# painter superclass
-class Animate_painter
-
- def init()
- # register ourselves into the current animate.core
- var core = global._cur_anim
- if (core != nil)
- core.add_painter(self)
- end
- end
-
- # return true if buffer was filled successfully
- #
- # Needs to be overwritten
- def paint(frame)
- end
-
-end
-animate.painter = global.Animate_painter
-
-##########################################################################################
-#
-# class Animate_pulse
-#
-# Display a color pulse
-#
-# pos (1)
-# |
-# v
-# _______
-# / \
-# _______/ \____________
-# | | | |
-# |2| 3 |2|
-#
-# 1: `pos`, start of the pulse (in pixel)
-# 2: `slew_size`, number of pixels to fade from back to fore color, can be `0`
-# 3: `pulse_size`, number of pixels of the pulse
-#
-##########################################################################################
-
-#@ solidify:Animate_pulse,weak
-class Animate_pulse : Animate_painter
- var color
- var back_color
- var pos
- var slew_size
- var pulse_size
-
- def init(color, pulse_size, slew_size)
- super(self).init()
-
- if (color == nil) color = 0xFFFFFF end # white by default
- if (pulse_size == nil) pulse_size = 1 end
- if (slew_size == nil) slew_size = 0 end
-
- self.color = color
- self.back_color = 0xFF000000 # default to transparent
- if pulse_size < 0 pulse_size = 0 end
- self.pulse_size = pulse_size
- if slew_size < 0 slew_size = 0 end
- self.slew_size = slew_size
- self.pos = 0
- end
-
- ##
- ## Setters - to be used as cb for animators
- ##
- def set_color(color)
- self.color = color
- end
-
- def set_back_color(c)
- self.back_color = c
- end
-
- def set_pos(pos)
- self.pos = pos
- end
-
- def set_slew_size(slew_size)
- self.slew_size = slew_size
- end
-
- def set_pulse_size(pulse_size)
- self.pulse_size = pulse_size
- end
-
- # return true if buffer was filled successfully
- def paint(frame)
- var back_color = self.back_color
- if (back_color != 0xFF000000)
- frame.fill_pixels(back_color) # fill with transparent color
- end
- var pos = self.pos
- var slew_size = self.slew_size
- var pulse_size = self.pulse_size
- var color = self.color
- var pixel_size = frame.pixel_size
-
- # var min_index = pos - slew_size
- # var max_index = pos + pulse_size + slew_size - 1
-
- var pulse_min, pulse_max
- pulse_min = pos
- pulse_max = pos + pulse_size
- if (pulse_min < 0) pulse_min = 0 end
- if (pulse_max >= pixel_size) pulse_max = pixel_size end
-
- var i = pulse_min
- while (i < pulse_max)
- frame[i] = color
- i += 1
- end
-
- if (slew_size > 0)
- # check first slew, from `min_index` to `pos - 1`
- # Slew 1
- pulse_min = pos - slew_size
- pulse_max = pos
- if (pulse_min < 0) pulse_min = 0 end
- if (pulse_max >= pixel_size) pulse_max = pixel_size end
- i = pulse_min
- while (i < pulse_max)
- # blend from 255 (back) to 0 (fore)
- frame[i] = frame.blend(back_color, color, tasmota.scale_int(i, pos - slew_size - 1, pos, 255, 0))
- # blend
- i += 1
- end
- # Slew 2
- pulse_min = pos + pulse_size
- pulse_max = pos + pulse_size + slew_size
- if (pulse_min < 0) pulse_min = 0 end
- if (pulse_max >= pixel_size) pulse_max = pixel_size end
- i = pulse_min
- while (i < pulse_max)
- # blend
- frame[i] = frame.blend(back_color, color, tasmota.scale_int(i, pos + pulse_size - 1, pos + pulse_size + slew_size, 0, 255))
- i += 1
- end
- end
-
- return true
- end
-end
-animate.pulse = global.Animate_pulse
-
-##########################################################################################
-#
-# class Animate_crenel
-#
-# Display a color crenel
-#
-# pos (1)
-# |
-# v (*4)
-# ______ ____
-# | | |
-# _________| |_________|
-#
-# | 2 | 3 |
-#
-# 1: `pos`, start of the pulse (in pixel)
-# 2: `pulse_size`, number of pixels of the pulse
-# 3: `low_size`, number of pixel until next pos - full cycle is 3 + 4
-# 4: `nb_pulse`, number of pulses, of `-1` is infinite
-#
-##########################################################################################
-
-#@ solidify:Animate_crenel,weak
-class Animate_crenel : Animate_painter
- var color
- var back_color
- var pos
- var pulse_size
- var low_size
- var nb_pulse
-
- def init(color, pulse_size, low_size, nb_pulse)
- super(self).init()
-
- if (color == nil) color = 0xFFFFFF end # white by default
- if (pulse_size == nil) pulse_size = 1 end
- if (low_size == nil) low_size = 3 end
- if (nb_pulse == nil) nb_pulse = -1 end
-
- self.color = color
- self.back_color = 0xFF000000 # default to transparent
- if pulse_size < 0 pulse_size = 0 end
- self.pulse_size = pulse_size
- if low_size < 0 low_size = 0 end
- self.low_size = low_size
- self.nb_pulse = nb_pulse
- self.pos = 0
- end
-
- ##
- ## Setters - to be used as cb for animators
- ##
- def set_color(color)
- self.color = color
- end
-
- def set_back_color(c)
- self.back_color = c
- end
-
- def set_pos(pos)
- self.pos = pos
- end
-
- def set_pulse_size(pulse_size)
- self.pulse_size = pulse_size
- end
-
- def set_nb_pulse(nb_pulse)
- self.nb_pulse = nb_pulse
- end
-
- def set_low_size(low_size)
- self.low_size = low_size
- end
-
- # return true if buffer was filled successfully
- def paint(frame)
- var back_color = self.back_color
- if (back_color != 0xFF000000)
- frame.fill_pixels(back_color) # fill with transparent color
- end
- var pos = self.pos
- var pulse_size = self.pulse_size
- var low_size = self.low_size
- var color = self.color
- var pixel_size = frame.pixel_size
- var period = int(pulse_size + low_size)
- var nb_pulse = self.nb_pulse
- if (period <= 0) period = 1 end # make sure with have a meaningful period so we can iterate on it
-
- if (nb_pulse == 0) return end # nothing to paint
- if (nb_pulse < 0)
- # in case of infinite number of crenels, we find the position of the first visible falling range `(pos + pulse_size - 1)`
- pos = ((pos + pulse_size - 1) % period) - pulse_size + 1
- else
- while (pos < -period) && (nb_pulse != 0)
- pos += period
- nb_pulse -= 1
- end
- end
-
- while (pos < pixel_size) && (nb_pulse != 0) # we iterate on pos (by `period` ranges)
- var i = 0
- if (pos < 0)
- i = - pos
- end
- # invariant: pos + i >= 0
- if type(self.color) == 'int'
- while (i < pulse_size) && (pos + i < pixel_size)
- frame[pos + i] = color
- i += 1
- end
- elif type(self.color) == 'instance'
- self.color.get_color(tasmota.scale_int(i, 0, pulse_size - 1, 0, 255))
- end
- pos += period
- nb_pulse -= 1
- end
-
- return true
- end
-end
-animate.crenel = global.Animate_crenel
-
-#
-# Unit tests
-#
-if false
-
-import animate
-var frame = animate.frame(10)
-assert(frame.tohex() == '00000000000000000000000000000000000000000000000000000000000000000000000000000000')
-
-var pulse = animate.pulse(0x00FF00, 3, 2)
-pulse.set_pos(5)
-pulse.paint(frame)
-assert(frame.tohex() == '0000000000000000000000000055000000AA000000FF000000FF000000FF000000AA000000550000')
-
-pulse.set_back_color(0x111111)
-pulse.set_slew_size(1)
-pulse.paint(frame)
-assert(frame.tohex() == '111111001111110011111100111111000988090000FF000000FF000000FF00000988090011111100')
-
-pulse.set_back_color(0x00000000)
-pulse.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000007F000000FF000000FF000000FF0000007F000000000000')
-
-pulse.set_pulse_size(0)
-pulse.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000007F0000007F000000000000000000000000000000000000')
-
-pulse.set_slew_size(3)
-pulse.paint(frame)
-assert(frame.tohex() == '000000000000000000400000007F000000BF000000BF0000007F0000004000000000000000000000')
-
-pulse.set_slew_size(0)
-pulse.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000000000000000000000000000000000000000000000000000')
-
-# test for crenel
-
-frame = animate.frame(10)
-assert(frame.tohex() == '00000000000000000000000000000000000000000000000000000000000000000000000000000000')
-
-var crenel = animate.crenel(0x00FF00, 2, 3, -1)
-crenel.paint(frame)
-assert(frame.tohex() == '00FF000000FF000000000000000000000000000000FF000000FF0000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(1)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000FF000000FF000000000000000000000000000000FF000000FF00000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_low_size(1)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000FF000000FF00000000000000FF000000FF00000000000000FF000000FF000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(0)
-crenel.paint(frame)
-assert(frame.tohex() == '00FF000000FF00000000000000FF000000FF00000000000000FF000000FF00000000000000FF0000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_nb_pulse(2)
-crenel.paint(frame)
-assert(frame.tohex() == '00FF000000FF00000000000000FF000000FF00000000000000000000000000000000000000000000')
-
-
-crenel = animate.crenel(0xFFEEDD, 2, 3, 2)
-crenel.set_back_color(0x00000000)
-crenel.paint(frame)
-assert(frame.tohex() == 'DDEEFF00DDEEFF00000000000000000000000000DDEEFF00DDEEFF00000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-1)
-crenel.paint(frame)
-assert(frame.tohex() == 'DDEEFF00000000000000000000000000DDEEFF00DDEEFF0000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-2)
-crenel.paint(frame)
-assert(frame.tohex() == '000000000000000000000000DDEEFF00DDEEFF000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-3)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000000000DDEEFF00DDEEFF00000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-4)
-crenel.paint(frame)
-assert(frame.tohex() == '00000000DDEEFF00DDEEFF0000000000000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-5)
-crenel.paint(frame)
-assert(frame.tohex() == 'DDEEFF00DDEEFF000000000000000000000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-6)
-crenel.paint(frame)
-assert(frame.tohex() == 'DDEEFF00000000000000000000000000000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-7)
-crenel.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(-8)
-crenel.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000000000000000000000000000000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(1)
-crenel.paint(frame)
-assert(frame.tohex() == '00000000DDEEFF00DDEEFF00000000000000000000000000DDEEFF00DDEEFF000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(2)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000000000DDEEFF00DDEEFF00000000000000000000000000DDEEFF00DDEEFF0000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(3)
-crenel.paint(frame)
-assert(frame.tohex() == '000000000000000000000000DDEEFF00DDEEFF00000000000000000000000000DDEEFF00DDEEFF00')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(4)
-crenel.paint(frame)
-assert(frame.tohex() == '00000000000000000000000000000000DDEEFF00DDEEFF00000000000000000000000000DDEEFF00')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pos(5)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000000000000000000000000000000000DDEEFF00DDEEFF00000000000000000000000000')
-
-crenel.set_back_color(0x00000000)
-crenel.set_pulse_size(10)
-crenel.paint(frame)
-assert(frame.tohex() == '0000000000000000000000000000000000000000DDEEFF00DDEEFF00DDEEFF00DDEEFF00DDEEFF00')
-
-end
diff --git a/lib/libesp32/berry_animate/src/embedded/animate_9_module.be b/lib/libesp32/berry_animate/src/embedded/animate_9_module.be
deleted file mode 100644
index 6991f0fde..000000000
--- a/lib/libesp32/berry_animate/src/embedded/animate_9_module.be
+++ /dev/null
@@ -1,516 +0,0 @@
-#
-# class Animate
-#
-# Animation framework
-#
-
-#################################################################################
-# class Animate_palette
-#
-# Animated color palette
-#################################################################################
-
-#################################################################################
-# Palette format compatible
-#
-# Takes a binary array with a set of 4 bytes elements: VRGB
-# V: Value in a range 0..255. The first value must be 0,
-# the last needs to be 255.
-# Numbers must be in strictly increasin numbers.
-# The algorithm maps a 0..255 rotating value to its color
-# in the palette.
-# R: Red component
-# G: Green component
-# B: Blue component
-# Note: RGB is in big Endian to make it more readable, although
-# it's little-endian when in memory. Be aware!
-# RGB values are stored at max brightness and without gamma correction
-#################################################################################
-
-# # Gradient palette "ib_jul01_gp", originally from
-# # http://soliton.vm.bytemark.co.uk/pub/cpt-city/ing/xmas/tn/ib_jul01.png.index.html
-# var PALETTE_ib_jul01_gp = bytes(
-# "00" "E60611"
-# "5E" "25605A"
-# "85" "90BD6A"
-# "FF" "BB030D"
-# )
-# # animate.PALETTE_ib_jul01_gp = PALETTE_ib_jul01_gp
-# # rgb(230, 6, 17) 0.000%,
-# # rgb( 37, 96, 90) 37.010%,
-# # rgb(144,189,106) 52.000%,
-# # rgb(187, 3, 13) 100.000%
-
-# var PALETTE_STANDARD_VAL = bytes(
-# "00" "FF0000" # red
-# "24" "FFA500" # orange
-# "49" "FFFF00" # yellow
-# "6E" "008800" # green
-# "92" "0000FF" # blue
-# "B7" "4B0082" # indigo
-# "DB" "EE82EE" # violet
-# "FF" "FF0000" # red
-# )
-# # animate.PALETTE_STANDARD = PALETTE_STANDARD
-
-# var PALETTE_SATURATED_TAG = bytes(
-# "40" "FF0000" # red
-# "40" "FFA500" # orange
-# "40" "FFFF00" # yellow
-# "40" "00FF00" # green
-# "40" "0000FF" # blue
-# "40" "FF00FF" # indigo
-# "40" "EE44A5" # violet
-# "00" "FF0000" # red
-# )
-
-# var PALETTE_STANDARD_TAG = bytes(
-# "40" "FF0000" # red
-# "40" "FFA500" # orange
-# "40" "FFFF00" # yellow
-# "40" "008800" # green
-# "40" "0000FF" # blue
-# "40" "4B0082" # indigo
-# "40" "EE82EE" # violet
-# "00" "FF0000" # red
-# )
-# # animate.PALETTE_STANDARD = PALETTE_STANDARD
-
-#@ solidify:Animate_animator,weak
-class Animate_animator
- # timing information
- var running # true if running
- var duration_ms # duration_ms of the entire cycle in ms, cannot be `0`
- var origin # origin in ms of the current cycle, as per tasmota.millis() reference
- # callback information
- var obj # object to call
- var mth # object method to call
-
- def init()
- # register ourselves into the current animate.core
- var core = global._cur_anim
- if (core != nil)
- core.add_animator(self)
- end
- end
-
- def set_duration_ms(duration_ms)
- self.duration_ms = duration_ms
- end
-
- def set_cb(obj, mth)
- self.obj = obj
- self.mth = mth
- end
-
- def start(millis)
- if (self.duration_ms == nil) return end
- if millis == nil millis = tasmota.millis() end
- self.origin = millis
- self.running = true
- end
-
- def stop()
- self.origin = nil
- self.running = false
- end
-
- def is_running()
- return bool(self.running)
- end
-
- # called at the end of each cycle
- def beat()
- end
-
-end
-animate.animator = Animate_animator
-
-#@ solidify:Animate_palette,weak
-class Animate_palette : Animate_animator
- ## inherited
- ## timing information
- # var running
- # var duration_ms # duration_ms of the entire cycle in ms, cannot be `0`
- # var origin # origin in ms of the current cycle, as per tasmota.millis() reference
- ## callback information
- # var obj # object to call
- # var mth # object method to call
-
- # parsing of palette
- var palette # raw bytes object
- var slots_arr # constructed array of timestamp slots
- var slots # number of slots
- # range information (when used as range color)
- var range_min # minimum value expected as input
- var range_max # maximum value expected as input, needs (range_min < range_max, can be negative)
- # brightness
- var bri # brightness to be applied to palette 0..100
- # color object to do RGB color calculation
- var color # instance of light_state, used for color calculation (reuse of object)
-
- def init(palette, duration_ms)
- super(self).init()
-
- self.duration_ms = duration_ms
- self.running = false
- self.bri = 100
- self.color = light_state(light_state.RGB)
- #
- self.set_palette(palette)
- end
-
- # load or change palette
- def set_palette(palette)
- if (type(palette) == 'ptr') palette = self.ptr_to_palette(palette) end # convert comptr to palette buffer
- self.palette = palette
- self.slots = size(palette) / 4
- # recompute palette
- if self.duration_ms != nil
- self.set_duration(self.duration_ms)
- elif (self.range_min != nil) && (self.range_max != nil)
- self.set_range(self.range_min, self.range_max)
- end
- end
-
- # setter to be used as cb
- def set_bri(bri)
- self.bri = int(bri)
- end
-
- # convert a comptr to a bytes() for palette
- # parse the raw bytes to find the actual length
- #
- # input: comptr
- # return: bytes() object of palette
- static def ptr_to_palette(p)
- if type(p) == 'ptr'
- var b_raw = bytes(p, 2000) # arbitrary large size
- var idx = 1
- if b_raw[0] != 0
- # palette in tick counts
- while true
- if b_raw[idx * 4] == 0
- break
- end
- idx += 1
- end
- else
- # palette is in value range from 0..255
- while true
- if b_raw[idx * 4] == 0xFF
- break
- end
- idx += 1
- end
- end
- var sz = (idx + 1) * 4
- return bytes(p, sz)
- end
- end
-
- def parse_palette(min, max)
- var arr = []
- var slots = self.slots
- arr.resize(slots)
-
- # check if we have slots or values
- # if first value index is non-zero, it's ticks count
- if self.palette.get(0, 1) != 0
- # palette in tick counts
- # compute the total number of ticks
- var total_ticks = 0
- var idx = 0
- while idx < slots - 1
- total_ticks += self.palette.get(idx * 4, 1)
- idx += 1
- end
- var cur_ticks = 0
- idx = 0
- while idx < slots
- arr[idx] = tasmota.scale_int(cur_ticks, 0, total_ticks, min, max)
- cur_ticks += self.palette.get(idx * 4, 1)
- idx += 1
- end
- else
- # palette is in value range from 0..255
- var idx = 0
- while idx < slots
- var val = self.palette.get(idx * 4, 1)
- arr[idx] = tasmota.scale_int(val, 0, 255, min, max)
- idx += 1
- end
- end
- # print(f"ANM: {arr=}")
- return arr
- end
-
- def set_duration(duration_ms)
- if (duration_ms == nil) return end
- if duration_ms <= 0 raise "value_error", "duration_ms must be positive" end
- self.duration_ms = duration_ms
-
- self.slots_arr = self.parse_palette(0, duration_ms - 1)
- end
-
- def set_range(min, max)
- if (min >= max) raise "value_error", "min must be lower than mex" end
- self.range_min = min
- self.range_max = max
-
- self.slots_arr = self.parse_palette(min, max)
- end
-
- # compute the css linear-gradient description
- #
- # Example: background: linear-gradient(to right, #000000, #e66465 11.0%, #9198e5);
- static def to_css_gradient(palette)
- var p = _class(palette)
- var arr = p.parse_palette(0, 1000)
- var ret = "background:linear-gradient(to right"
- var idx = 0
- while idx < size(arr)
- var prm = arr[idx] # per mile
-
- var bgrt = p.palette.get(idx * 4, 4)
- var r = (bgrt >> 8) & 0xFF
- var g = (bgrt >> 16) & 0xFF
- var b = (bgrt >> 24) & 0xFF
- ret += f",#{r:02X}{g:02X}{b:02X} {prm/10.0:.1f}%"
- idx += 1
- end
- ret += ");"
- return ret
- end
-
- def set_value(value)
- if (self.range_min == nil || self.range_max == nil) return nil end
- var scale_int = tasmota.scale_int
-
- # find slot
- var slots = self.slots
- var idx = slots - 2
- while idx > 0
- if value >= self.slots_arr[idx] break end
- idx -= 1
- end
- var bgrt0 = self.palette.get(idx * 4, 4)
- var bgrt1 = self.palette.get((idx + 1) * 4, 4)
- var t0 = self.slots_arr[idx]
- var t1 = self.slots_arr[idx + 1]
- var r = scale_int(value, t0, t1, (bgrt0 >> 8) & 0xFF, (bgrt1 >> 8) & 0xFF)
- var g = scale_int(value, t0, t1, (bgrt0 >> 16) & 0xFF, (bgrt1 >> 16) & 0xFF)
- var b = scale_int(value, t0, t1, (bgrt0 >> 24) & 0xFF, (bgrt1 >> 24) & 0xFF)
- var rgb = (r << 16) | (g << 8) | b
- #
- var obj = self.obj
- var mth = self.mth
- if (obj && mth)
- mth(obj, rgb)
- end
- # if self.cb != nil
- # self.cb(rgb)
- # end
- #
- # print(f"ANM: {rgb=:%06X}")
- return rgb
- end
-
- def animate(millis)
- if (self.duration_ms == nil) return end
- if millis == nil millis = tasmota.millis() end
- var past = millis - self.origin
- if past < 0
- past = 0
- millis = self.origin
- end
- var duration_ms = self.duration_ms
- var scale_uint = tasmota.scale_uint
- if past >= duration_ms
- self.origin += (past / duration_ms) * duration_ms
- past = past % duration_ms
- end
- # find slot
- var slots = self.slots
- var idx = slots - 2
- while idx > 0
- if past >= self.slots_arr[idx] break end
- idx -= 1
- end
- var bgrt0 = self.palette.get(idx * 4, 4)
- var bgrt1 = self.palette.get((idx + 1) * 4, 4)
- var t0 = self.slots_arr[idx]
- var t1 = self.slots_arr[idx + 1]
- var r = scale_uint(past, t0, t1, (bgrt0 >> 8) & 0xFF, (bgrt1 >> 8) & 0xFF)
- var g = scale_uint(past, t0, t1, (bgrt0 >> 16) & 0xFF, (bgrt1 >> 16) & 0xFF)
- var b = scale_uint(past, t0, t1, (bgrt0 >> 24) & 0xFF, (bgrt1 >> 24) & 0xFF)
-
- var color = self.color
- color.set_rgb((bgrt0 >> 8) & 0xFF, (bgrt0 >> 16) & 0xFF, (bgrt0 >> 24) & 0xFF)
- var bri0 = color.bri
- color.set_rgb((bgrt1 >> 8) & 0xFF, (bgrt1 >> 16) & 0xFF, (bgrt1 >> 24) & 0xFF)
- var bri1 = color.bri
- var bri2 = scale_uint(past, t0, t1, bri0, bri1)
- color.set_rgb(r, g, b)
- color.set_bri(bri2)
-
- r = color.r
- g = color.g
- b = color.b
-
- # apply self.bri if not `100`
- var bri = self.bri
- if bri != 100
- r = tasmota.scale_uint(r, 0, 100, 0, bri)
- g = tasmota.scale_uint(g, 0, 100, 0, bri)
- b = tasmota.scale_uint(b, 0, 100, 0, bri)
- end
-
- # var rgb = (r << 16) | (g << 8) | b
- var rgb = (r << 16) | (g << 8) | b
-
- var obj = self.obj
- var mth = self.mth
- if (obj && mth)
- mth(obj, rgb)
- end
-
- return rgb
- end
-end
-animate.palette = Animate_palette
-
-#-
-
-pal = Animate_palette(PALETTE_STANDARD_TAG, 7000)
-pal = Animate_palette(PALETTE_STANDARD_VAL, 7000)
-
-
-import animate
-var pal = animate.palette(PALETTE_STANDARD_TAG, 7000)
-pal.start(0)
-for t: range(0,8000,200)
- pal.tick(t)
-end
-
--#
-
-animate.SAWTOOTH = 1
-animate.TRIANGLE = 2
-animate.SQUARE = 3
-animate.COSINE = 4
-animate.LASTFOMR = 5 # identify last form
-
-#@ solidify:Animate_oscillator,weak
-class Animate_oscillator : Animate_animator
- ## inherited
- ## timing information
- # var running
- # var duration_ms # duration_ms of the entire cycle in ms, cannot be `0`
- # var origin # origin in ms of the current cycle, as per tasmota.millis() reference
- var phase # 0..100% - phase shift, default 0
- var duty_cycle # 0..100% - duty cycle, default 50%
- ## callback information
- # var obj # object to call
- # var mth # object method to call
- var a # starting value
- var b # end value
- var form # waveform
- # current value
- var value
-
- def init(a, b, duration_ms, form)
- super(self).init()
- self.phase = 0
- self.duty_cycle = 50
- self.a = a
- self.b = b
- self.duration_ms = duration_ms
- self.value = a
- if (form == nil) form = 1 end
- self.form = form
- end
-
- def set_phase(phase)
- if (phase < 0) phase = 0 end
- if (phase > 100) phase = 100 end
- self.phase = phase
- end
-
- def set_duty_cycle(duty_cycle)
- if (duty_cycle < 0) duty_cycle = 0 end
- if (duty_cycle > 100) duty_cycle = 100 end
- self.duty_cycle = duty_cycle
- end
-
- def set_a(a)
- self.a = a
- end
- def set_b(b)
- self.b = b
- end
-
- def set_form(form)
- if (form == nil) form = 1 end
- self.form = form
- end
-
- def animate(millis)
- if (self.duration_ms == nil) return end
- if millis == nil millis = tasmota.millis() end
- var past = millis - self.origin
- if past < 0
- past = 0
- millis = self.origin
- end
- var duration_ms = self.duration_ms
- var duration_ms_mid # mid point considering duty cycle
- duration_ms_mid = tasmota.scale_uint(self.duty_cycle, 0, 100, 0, duration_ms)
- if past >= duration_ms
- self.origin += (past / duration_ms) * duration_ms
- past = past % duration_ms
- # handle end of cycle
- self.beat()
- end
-
- var a = self.a
- var b = self.b
- var value = self.value
- var past_with_phase = past # adjust past with phase
- if self.phase > 0
- past_with_phase += tasmota.scale_uint(self.phase, 0, 100, 0, duration_ms)
- if (past_with_phase > duration_ms) past_with_phase -= duration_ms end # if overflow, take modulus
- end
-
- if self.form == 1 #-SAWTOOTH-#
- value = tasmota.scale_int(past_with_phase, 0, duration_ms - 1, a, b)
- elif self.form == 2 #-TRIANGLE-#
- if past_with_phase < duration_ms_mid
- value = tasmota.scale_int(past_with_phase, 0, duration_ms_mid - 1, a, b)
- else
- value = tasmota.scale_int(past_with_phase, duration_ms_mid, duration_ms - 1, b, a)
- end
- elif self.form == 3 #-SQUARE-#
- if past_with_phase < duration_ms_mid
- value = a
- else
- value = b
- end
- elif (self.form == 4) #-COSINE-#
- # map timing to 0..32767
- var angle = tasmota.scale_int(past_with_phase, 0, duration_ms - 1, 0, 32767)
- var x = tasmota.sine_int(angle - 8192) # -4096 .. 4096, dephase from cosine to sine
- value = tasmota.scale_int(x, -4096, 4096, a, b)
- end
- self.value = value
-
- var obj = self.obj
- var mth = self.mth
- if (obj && mth)
- mth(obj, value)
- end
-
- return value
- end
-end
-global.animate.oscillator = Animate_oscillator
diff --git a/lib/libesp32/berry_animate/src/embedded/leds_frame_be_methods.be b/lib/libesp32/berry_animate/src/embedded/leds_frame_be_methods.be
deleted file mode 100644
index 667ead151..000000000
--- a/lib/libesp32/berry_animate/src/embedded/leds_frame_be_methods.be
+++ /dev/null
@@ -1,28 +0,0 @@
-#- Native code used for code solidification -#
-#- Do not use it -#
-
-tasmota = nil
-#@ solidify:Leds_frame_be
-class Leds_frame_be
-
- def init(pixels)
- if (pixels < 0) pixels = -pixels end
- self.pixel_size = pixels
- super(self).init(pixels * (-4))
- end
-
- def item(i)
- return self.get(i * 4, 4)
- end
-
- def setitem(i, v)
- self.set(i * 4, v, 4)
- end
-
- def set_pixel(i, r, g, b, alpha)
- if (alpha == nil) alpha = 0 end
- var color = ((alpha & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF)
- self.setitem(i, color)
- end
-
-end
diff --git a/lib/libesp32/berry_animate/src/solidify/.keep b/lib/libesp32/berry_animate/src/solidify/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/lib/libesp32/berry_animate/src/solidify/solidified_animate_0.h b/lib/libesp32/berry_animate/src/solidify/solidified_animate_0.h
deleted file mode 100644
index a0a262928..000000000
--- a/lib/libesp32/berry_animate/src/solidify/solidified_animate_0.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Solidification of animate_0.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_animate/src/solidify/solidified_animate_1_core.h b/lib/libesp32/berry_animate/src/solidify/solidified_animate_1_core.h
deleted file mode 100644
index eee5e9752..000000000
--- a/lib/libesp32/berry_animate/src/solidify/solidified_animate_1_core.h
+++ /dev/null
@@ -1,825 +0,0 @@
-/* Solidification of animate_1_core.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-// compact class 'Animate_core' ktab size: 52, total: 104 (saved 416 bytes)
-static const bvalue be_ktab_class_Animate_core[52] = {
- /* K0 */ be_nested_str_weak(stop),
- /* K1 */ be_nested_str_weak(strip),
- /* K2 */ be_nested_str_weak(clear),
- /* K3 */ be_nested_str_weak(set_bri),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(scale_uint),
- /* K6 */ be_nested_str_weak(bri),
- /* K7 */ be_const_int(0),
- /* K8 */ be_nested_str_weak(painters),
- /* K9 */ be_nested_str_weak(remove),
- /* K10 */ be_nested_str_weak(find),
- /* K11 */ be_nested_str_weak(running),
- /* K12 */ be_nested_str_weak(animators),
- /* K13 */ be_const_int(1),
- /* K14 */ be_nested_str_weak(remove_fast_loop),
- /* K15 */ be_nested_str_weak(fast_loop_cb),
- /* K16 */ be_nested_str_weak(set_strip_bri),
- /* K17 */ be_nested_str_weak(push),
- /* K18 */ be_nested_str_weak(time_reached),
- /* K19 */ be_nested_str_weak(fast_loop_next),
- /* K20 */ be_nested_str_weak(can_show),
- /* K21 */ be_nested_str_weak(frame),
- /* K22 */ be_nested_str_weak(fill_pixels),
- /* K23 */ be_nested_str_weak(back_color),
- /* K24 */ be_nested_str_weak(millis),
- /* K25 */ be_nested_str_weak(FAST_LOOP_MIN),
- /* K26 */ be_nested_str_weak(animate),
- /* K27 */ be_nested_str_weak(layer),
- /* K28 */ be_const_int(-16777216),
- /* K29 */ be_nested_str_weak(paint),
- /* K30 */ be_nested_str_weak(blend_pixels),
- /* K31 */ be_nested_str_weak(obj),
- /* K32 */ be_nested_str_weak(mth),
- /* K33 */ be_nested_str_weak(paste_pixels),
- /* K34 */ be_nested_str_weak(pixels_buffer),
- /* K35 */ be_nested_str_weak(get_bri),
- /* K36 */ be_nested_str_weak(get_gamma),
- /* K37 */ be_nested_str_weak(dirty),
- /* K38 */ be_nested_str_weak(show),
- /* K39 */ be_nested_str_weak(global),
- /* K40 */ be_nested_str_weak(_cur_anim),
- /* K41 */ be_nested_str_weak(pixel_count),
- /* K42 */ be_nested_str_weak(set_current),
- /* K43 */ be_nested_str_weak(set_cb),
- /* K44 */ be_nested_str_weak(set_back_color),
- /* K45 */ be_nested_str_weak(add_animator),
- /* K46 */ be_nested_str_weak(get_animate),
- /* K47 */ be_nested_str_weak(introspect),
- /* K48 */ be_nested_str_weak(instance),
- /* K49 */ be_nested_str_weak(set_animate),
- /* K50 */ be_nested_str_weak(start),
- /* K51 */ be_nested_str_weak(add_fast_loop),
-};
-
-
-extern const bclass be_class_Animate_core;
-
-/********************************************************************
-** Solidified function: clear
-********************************************************************/
-be_local_closure(class_Animate_core_clear, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(clear),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x88040101, // 0002 GETMBR R1 R0 K1
- 0x8C040302, // 0003 GETMET R1 R1 K2
- 0x7C040200, // 0004 CALL R1 1
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_strip_bri
-********************************************************************/
-be_local_closure(class_Animate_core_set_strip_bri, /* name */
- be_nested_proto(
- 10, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(set_strip_bri),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88040101, // 0000 GETMBR R1 R0 K1
- 0x8C040303, // 0001 GETMET R1 R1 K3
- 0xB80E0800, // 0002 GETNGBL R3 K4
- 0x8C0C0705, // 0003 GETMET R3 R3 K5
- 0x88140106, // 0004 GETMBR R5 R0 K6
- 0x58180007, // 0005 LDCONST R6 K7
- 0x541E0063, // 0006 LDINT R7 100
- 0x58200007, // 0007 LDCONST R8 K7
- 0x542600FE, // 0008 LDINT R9 255
- 0x7C0C0C00, // 0009 CALL R3 6
- 0x7C040400, // 000A CALL R1 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_painter
-********************************************************************/
-be_local_closure(class_Animate_core_remove_painter, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(remove_painter),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x88080108, // 0000 GETMBR R2 R0 K8
- 0x4C0C0000, // 0001 LDNIL R3
- 0x200C0203, // 0002 NE R3 R1 R3
- 0x780E0005, // 0003 JMPF R3 #000A
- 0x8C0C0509, // 0004 GETMET R3 R2 K9
- 0x8C14050A, // 0005 GETMET R5 R2 K10
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x7C140400, // 0007 CALL R5 2
- 0x7C0C0400, // 0008 CALL R3 2
- 0x70020001, // 0009 JMP #000C
- 0x8C0C0502, // 000A GETMET R3 R2 K2
- 0x7C0C0200, // 000B CALL R3 1
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop
-********************************************************************/
-be_local_closure(class_Animate_core_stop, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(stop),
- &be_const_str_solidified,
- ( &(const binstruction[19]) { /* code */
- 0x50040000, // 0000 LDBOOL R1 0 0
- 0x90021601, // 0001 SETMBR R0 K11 R1
- 0x8804010C, // 0002 GETMBR R1 R0 K12
- 0x58080007, // 0003 LDCONST R2 K7
- 0x600C000C, // 0004 GETGBL R3 G12
- 0x5C100200, // 0005 MOVE R4 R1
- 0x7C0C0200, // 0006 CALL R3 1
- 0x140C0403, // 0007 LT R3 R2 R3
- 0x780E0004, // 0008 JMPF R3 #000E
- 0x940C0202, // 0009 GETIDX R3 R1 R2
- 0x8C0C0700, // 000A GETMET R3 R3 K0
- 0x7C0C0200, // 000B CALL R3 1
- 0x0008050D, // 000C ADD R2 R2 K13
- 0x7001FFF5, // 000D JMP #0004
- 0xB80E0800, // 000E GETNGBL R3 K4
- 0x8C0C070E, // 000F GETMET R3 R3 K14
- 0x8814010F, // 0010 GETMBR R5 R0 K15
- 0x7C0C0400, // 0011 CALL R3 2
- 0x80000000, // 0012 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_bri
-********************************************************************/
-be_local_closure(class_Animate_core_get_bri, /* name */
- be_nested_proto(
- 3, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(get_bri),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88080106, // 0000 GETMBR R2 R0 K6
- 0x80040400, // 0001 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_bri
-********************************************************************/
-be_local_closure(class_Animate_core_set_bri, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(set_bri),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x90020C01, // 0000 SETMBR R0 K6 R1
- 0x8C080110, // 0001 GETMET R2 R0 K16
- 0x7C080200, // 0002 CALL R2 1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: add_painter
-********************************************************************/
-be_local_closure(class_Animate_core_add_painter, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(add_painter),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88080108, // 0000 GETMBR R2 R0 K8
- 0x8C08050A, // 0001 GETMET R2 R2 K10
- 0x5C100200, // 0002 MOVE R4 R1
- 0x7C080400, // 0003 CALL R2 2
- 0x4C0C0000, // 0004 LDNIL R3
- 0x1C080403, // 0005 EQ R2 R2 R3
- 0x780A0003, // 0006 JMPF R2 #000B
- 0x88080108, // 0007 GETMBR R2 R0 K8
- 0x8C080511, // 0008 GETMET R2 R2 K17
- 0x5C100200, // 0009 MOVE R4 R1
- 0x7C080400, // 000A CALL R2 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: fast_loop
-********************************************************************/
-be_local_closure(class_Animate_core_fast_loop, /* name */
- be_nested_proto(
- 13, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(fast_loop),
- &be_const_str_solidified,
- ( &(const binstruction[84]) { /* code */
- 0x8804010B, // 0000 GETMBR R1 R0 K11
- 0x78060050, // 0001 JMPF R1 #0053
- 0xB8060800, // 0002 GETNGBL R1 K4
- 0x8C040312, // 0003 GETMET R1 R1 K18
- 0x880C0113, // 0004 GETMBR R3 R0 K19
- 0x7C040400, // 0005 CALL R1 2
- 0x7806004B, // 0006 JMPF R1 #0053
- 0x88040101, // 0007 GETMBR R1 R0 K1
- 0x8C040314, // 0008 GETMET R1 R1 K20
- 0x7C040200, // 0009 CALL R1 1
- 0x78060047, // 000A JMPF R1 #0053
- 0x88040115, // 000B GETMBR R1 R0 K21
- 0x8C040316, // 000C GETMET R1 R1 K22
- 0x880C0117, // 000D GETMBR R3 R0 K23
- 0x7C040400, // 000E CALL R1 2
- 0x58040007, // 000F LDCONST R1 K7
- 0xB80A0800, // 0010 GETNGBL R2 K4
- 0x8C080518, // 0011 GETMET R2 R2 K24
- 0x7C080200, // 0012 CALL R2 1
- 0x880C0119, // 0013 GETMBR R3 R0 K25
- 0x000C0403, // 0014 ADD R3 R2 R3
- 0x90022603, // 0015 SETMBR R0 K19 R3
- 0x600C000C, // 0016 GETGBL R3 G12
- 0x8810010C, // 0017 GETMBR R4 R0 K12
- 0x7C0C0200, // 0018 CALL R3 1
- 0x140C0203, // 0019 LT R3 R1 R3
- 0x780E0006, // 001A JMPF R3 #0022
- 0x880C010C, // 001B GETMBR R3 R0 K12
- 0x940C0601, // 001C GETIDX R3 R3 R1
- 0x8C0C071A, // 001D GETMET R3 R3 K26
- 0x5C140400, // 001E MOVE R5 R2
- 0x7C0C0400, // 001F CALL R3 2
- 0x0004030D, // 0020 ADD R1 R1 K13
- 0x7001FFF3, // 0021 JMP #0016
- 0x58040007, // 0022 LDCONST R1 K7
- 0x880C0115, // 0023 GETMBR R3 R0 K21
- 0x8810011B, // 0024 GETMBR R4 R0 K27
- 0x6014000C, // 0025 GETGBL R5 G12
- 0x88180108, // 0026 GETMBR R6 R0 K8
- 0x7C140200, // 0027 CALL R5 1
- 0x14140205, // 0028 LT R5 R1 R5
- 0x7816000D, // 0029 JMPF R5 #0038
- 0x8C140916, // 002A GETMET R5 R4 K22
- 0x581C001C, // 002B LDCONST R7 K28
- 0x7C140400, // 002C CALL R5 2
- 0x88140108, // 002D GETMBR R5 R0 K8
- 0x94140A01, // 002E GETIDX R5 R5 R1
- 0x8C140B1D, // 002F GETMET R5 R5 K29
- 0x5C1C0800, // 0030 MOVE R7 R4
- 0x7C140400, // 0031 CALL R5 2
- 0x78160002, // 0032 JMPF R5 #0036
- 0x8C14071E, // 0033 GETMET R5 R3 K30
- 0x5C1C0800, // 0034 MOVE R7 R4
- 0x7C140400, // 0035 CALL R5 2
- 0x0004030D, // 0036 ADD R1 R1 K13
- 0x7001FFEC, // 0037 JMP #0025
- 0x8814011F, // 0038 GETMBR R5 R0 K31
- 0x88180120, // 0039 GETMBR R6 R0 K32
- 0x78160003, // 003A JMPF R5 #003F
- 0x781A0002, // 003B JMPF R6 #003F
- 0x5C1C0C00, // 003C MOVE R7 R6
- 0x5C200A00, // 003D MOVE R8 R5
- 0x7C1C0200, // 003E CALL R7 1
- 0x8C1C011A, // 003F GETMET R7 R0 K26
- 0x7C1C0200, // 0040 CALL R7 1
- 0x881C0115, // 0041 GETMBR R7 R0 K21
- 0x8C1C0F21, // 0042 GETMET R7 R7 K33
- 0x88240101, // 0043 GETMBR R9 R0 K1
- 0x8C241322, // 0044 GETMET R9 R9 K34
- 0x7C240200, // 0045 CALL R9 1
- 0x88280101, // 0046 GETMBR R10 R0 K1
- 0x8C281523, // 0047 GETMET R10 R10 K35
- 0x7C280200, // 0048 CALL R10 1
- 0x882C0101, // 0049 GETMBR R11 R0 K1
- 0x8C2C1724, // 004A GETMET R11 R11 K36
- 0x7C2C0200, // 004B CALL R11 1
- 0x7C1C0800, // 004C CALL R7 4
- 0x881C0101, // 004D GETMBR R7 R0 K1
- 0x8C1C0F25, // 004E GETMET R7 R7 K37
- 0x7C1C0200, // 004F CALL R7 1
- 0x881C0101, // 0050 GETMBR R7 R0 K1
- 0x8C1C0F26, // 0051 GETMET R7 R7 K38
- 0x7C1C0200, // 0052 CALL R7 1
- 0x80000000, // 0053 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_animator
-********************************************************************/
-be_local_closure(class_Animate_core_remove_animator, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(remove_animator),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x8808010C, // 0000 GETMBR R2 R0 K12
- 0x4C0C0000, // 0001 LDNIL R3
- 0x200C0203, // 0002 NE R3 R1 R3
- 0x780E0005, // 0003 JMPF R3 #000A
- 0x8C0C0509, // 0004 GETMET R3 R2 K9
- 0x8C14050A, // 0005 GETMET R5 R2 K10
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x7C140400, // 0007 CALL R5 2
- 0x7C0C0400, // 0008 CALL R3 2
- 0x70020001, // 0009 JMP #000C
- 0x8C0C0502, // 000A GETMET R3 R2 K2
- 0x7C0C0200, // 000B CALL R3 1
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: animate
-********************************************************************/
-be_local_closure(class_Animate_core_animate, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(animate),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_current
-********************************************************************/
-be_local_closure(class_Animate_core_set_current, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(set_current),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0xB8064E00, // 0000 GETNGBL R1 K39
- 0x90065000, // 0001 SETMBR R1 K40 R0
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_core_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 2, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 1]) { /* upvals */
- be_local_const_upval(1, 0),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(fast_loop),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80000000, // 0003 RET 0
- })
- ),
- }),
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
- 0xA40E3400, // 0000 IMPORT R3 K26
- 0x90020201, // 0001 SETMBR R0 K1 R1
- 0x4C100000, // 0002 LDNIL R4
- 0x1C100404, // 0003 EQ R4 R2 R4
- 0x78120000, // 0004 JMPF R4 #0006
- 0x540A0031, // 0005 LDINT R2 50
- 0x90020C02, // 0006 SETMBR R0 K6 R2
- 0x8C100110, // 0007 GETMET R4 R0 K16
- 0x7C100200, // 0008 CALL R4 1
- 0x50100000, // 0009 LDBOOL R4 0 0
- 0x90021604, // 000A SETMBR R0 K11 R4
- 0x8C100329, // 000B GETMET R4 R1 K41
- 0x7C100200, // 000C CALL R4 1
- 0x90025204, // 000D SETMBR R0 K41 R4
- 0x60100012, // 000E GETGBL R4 G18
- 0x7C100000, // 000F CALL R4 0
- 0x90021804, // 0010 SETMBR R0 K12 R4
- 0x60100012, // 0011 GETGBL R4 G18
- 0x7C100000, // 0012 CALL R4 0
- 0x90021004, // 0013 SETMBR R0 K8 R4
- 0x8C100102, // 0014 GETMET R4 R0 K2
- 0x7C100200, // 0015 CALL R4 1
- 0x8C100715, // 0016 GETMET R4 R3 K21
- 0x88180129, // 0017 GETMBR R6 R0 K41
- 0x7C100400, // 0018 CALL R4 2
- 0x90022A04, // 0019 SETMBR R0 K21 R4
- 0x8C100715, // 001A GETMET R4 R3 K21
- 0x88180129, // 001B GETMBR R6 R0 K41
- 0x7C100400, // 001C CALL R4 2
- 0x90023604, // 001D SETMBR R0 K27 R4
- 0x84100000, // 001E CLOSURE R4 P0
- 0x90021E04, // 001F SETMBR R0 K15 R4
- 0x90022F07, // 0020 SETMBR R0 K23 K7
- 0x8C10012A, // 0021 GETMET R4 R0 K42
- 0x7C100200, // 0022 CALL R4 1
- 0xA0000000, // 0023 CLOSE R0
- 0x80000000, // 0024 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_cb
-********************************************************************/
-be_local_closure(class_Animate_core_set_cb, /* name */
- be_nested_proto(
- 3, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(set_cb),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x90023E01, // 0000 SETMBR R0 K31 R1
- 0x90024002, // 0001 SETMBR R0 K32 R2
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_back_color
-********************************************************************/
-be_local_closure(class_Animate_core_set_back_color, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(set_back_color),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90022E01, // 0000 SETMBR R0 K23 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: add_background_animator
-********************************************************************/
-be_local_closure(class_Animate_core_add_background_animator, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(add_background_animator),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x8C08032B, // 0000 GETMET R2 R1 K43
- 0x5C100000, // 0001 MOVE R4 R0
- 0x8814012C, // 0002 GETMBR R5 R0 K44
- 0x7C080600, // 0003 CALL R2 3
- 0x8C08012D, // 0004 GETMET R2 R0 K45
- 0x5C100200, // 0005 MOVE R4 R1
- 0x7C080400, // 0006 CALL R2 2
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: add_animator
-********************************************************************/
-be_local_closure(class_Animate_core_add_animator, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(add_animator),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x8808010C, // 0000 GETMBR R2 R0 K12
- 0x8C08050A, // 0001 GETMET R2 R2 K10
- 0x5C100200, // 0002 MOVE R4 R1
- 0x7C080400, // 0003 CALL R2 2
- 0x4C0C0000, // 0004 LDNIL R3
- 0x1C080403, // 0005 EQ R2 R2 R3
- 0x780A0003, // 0006 JMPF R2 #000B
- 0x8808010C, // 0007 GETMBR R2 R0 K12
- 0x8C080511, // 0008 GETMET R2 R2 K17
- 0x5C100200, // 0009 MOVE R4 R1
- 0x7C080400, // 000A CALL R2 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove
-********************************************************************/
-be_local_closure(class_Animate_core_remove, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(remove),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x8C040102, // 0000 GETMET R1 R0 K2
- 0x7C040200, // 0001 CALL R1 1
- 0xB8060800, // 0002 GETNGBL R1 K4
- 0x8C04030E, // 0003 GETMET R1 R1 K14
- 0x880C010F, // 0004 GETMBR R3 R0 K15
- 0x7C040400, // 0005 CALL R1 2
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start
-********************************************************************/
-be_local_closure(class_Animate_core_start, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_core, /* shared constants */
- be_str_weak(start),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0x88040101, // 0000 GETMBR R1 R0 K1
- 0x8C04032E, // 0001 GETMET R1 R1 K46
- 0x7C040200, // 0002 CALL R1 1
- 0xA40A5E00, // 0003 IMPORT R2 K47
- 0x4C0C0000, // 0004 LDNIL R3
- 0x200C0203, // 0005 NE R3 R1 R3
- 0x780E0008, // 0006 JMPF R3 #0010
- 0x600C0004, // 0007 GETGBL R3 G4
- 0x5C100200, // 0008 MOVE R4 R1
- 0x7C0C0200, // 0009 CALL R3 1
- 0x1C0C0730, // 000A EQ R3 R3 K48
- 0x780E0003, // 000B JMPF R3 #0010
- 0x200C0200, // 000C NE R3 R1 R0
- 0x780E0001, // 000D JMPF R3 #0010
- 0x8C0C0300, // 000E GETMET R3 R1 K0
- 0x7C0C0200, // 000F CALL R3 1
- 0x880C0101, // 0010 GETMBR R3 R0 K1
- 0x8C0C0731, // 0011 GETMET R3 R3 K49
- 0x5C140000, // 0012 MOVE R5 R0
- 0x7C0C0400, // 0013 CALL R3 2
- 0x500C0200, // 0014 LDBOOL R3 1 0
- 0x90021603, // 0015 SETMBR R0 K11 R3
- 0x880C010C, // 0016 GETMBR R3 R0 K12
- 0x58100007, // 0017 LDCONST R4 K7
- 0x6014000C, // 0018 GETGBL R5 G12
- 0x5C180600, // 0019 MOVE R6 R3
- 0x7C140200, // 001A CALL R5 1
- 0x14140805, // 001B LT R5 R4 R5
- 0x78160004, // 001C JMPF R5 #0022
- 0x94140604, // 001D GETIDX R5 R3 R4
- 0x8C140B32, // 001E GETMET R5 R5 K50
- 0x7C140200, // 001F CALL R5 1
- 0x0010090D, // 0020 ADD R4 R4 K13
- 0x7001FFF5, // 0021 JMP #0018
- 0x90022707, // 0022 SETMBR R0 K19 K7
- 0xB8160800, // 0023 GETNGBL R5 K4
- 0x8C140B33, // 0024 GETMET R5 R5 K51
- 0x881C010F, // 0025 GETMBR R7 R0 K15
- 0x7C140400, // 0026 CALL R5 2
- 0x80000000, // 0027 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_core
-********************************************************************/
-be_local_class(Animate_core,
- 13,
- NULL,
- be_nested_map(32,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(set_strip_bri, -1), be_const_closure(class_Animate_core_set_strip_bri_closure) },
- { be_const_key_weak(animators, -1), be_const_var(4) },
- { be_const_key_weak(clear, 0), be_const_closure(class_Animate_core_clear_closure) },
- { be_const_key_weak(remove, -1), be_const_closure(class_Animate_core_remove_closure) },
- { be_const_key_weak(mth, -1), be_const_var(9) },
- { be_const_key_weak(stop, 1), be_const_closure(class_Animate_core_stop_closure) },
- { be_const_key_weak(fast_loop_cb, 30), be_const_var(6) },
- { be_const_key_weak(get_bri, -1), be_const_closure(class_Animate_core_get_bri_closure) },
- { be_const_key_weak(add_animator, -1), be_const_closure(class_Animate_core_add_animator_closure) },
- { be_const_key_weak(add_background_animator, -1), be_const_closure(class_Animate_core_add_background_animator_closure) },
- { be_const_key_weak(fast_loop_next, -1), be_const_var(7) },
- { be_const_key_weak(remove_animator, -1), be_const_closure(class_Animate_core_remove_animator_closure) },
- { be_const_key_weak(add_painter, 28), be_const_closure(class_Animate_core_add_painter_closure) },
- { be_const_key_weak(FAST_LOOP_MIN, -1), be_const_int(20) },
- { be_const_key_weak(fast_loop, -1), be_const_closure(class_Animate_core_fast_loop_closure) },
- { be_const_key_weak(set_back_color, 11), be_const_closure(class_Animate_core_set_back_color_closure) },
- { be_const_key_weak(animate, 8), be_const_closure(class_Animate_core_animate_closure) },
- { be_const_key_weak(strip, 24), be_const_var(0) },
- { be_const_key_weak(layer, -1), be_const_var(11) },
- { be_const_key_weak(init, -1), be_const_closure(class_Animate_core_init_closure) },
- { be_const_key_weak(bri, -1), be_const_var(2) },
- { be_const_key_weak(set_cb, 13), be_const_closure(class_Animate_core_set_cb_closure) },
- { be_const_key_weak(back_color, 18), be_const_var(12) },
- { be_const_key_weak(pixel_count, 15), be_const_var(1) },
- { be_const_key_weak(set_current, -1), be_const_closure(class_Animate_core_set_current_closure) },
- { be_const_key_weak(painters, -1), be_const_var(5) },
- { be_const_key_weak(obj, 10), be_const_var(8) },
- { be_const_key_weak(set_bri, 9), be_const_closure(class_Animate_core_set_bri_closure) },
- { be_const_key_weak(running, -1), be_const_var(3) },
- { be_const_key_weak(remove_painter, 3), be_const_closure(class_Animate_core_remove_painter_closure) },
- { be_const_key_weak(frame, -1), be_const_var(10) },
- { be_const_key_weak(start, -1), be_const_closure(class_Animate_core_start_closure) },
- })),
- be_str_weak(Animate_core)
-);
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_animate/src/solidify/solidified_animate_2_animate_effects.h b/lib/libesp32/berry_animate/src/solidify/solidified_animate_2_animate_effects.h
deleted file mode 100644
index c5200d9b0..000000000
--- a/lib/libesp32/berry_animate/src/solidify/solidified_animate_2_animate_effects.h
+++ /dev/null
@@ -1,785 +0,0 @@
-/* Solidification of animate_2_animate_effects.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-
-extern const bclass be_class_Animate_painter;
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_painter_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(global),
- /* K1 */ be_nested_str_weak(_cur_anim),
- /* K2 */ be_nested_str_weak(add_painter),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x88040301, // 0001 GETMBR R1 R1 K1
- 0x4C080000, // 0002 LDNIL R2
- 0x20080202, // 0003 NE R2 R1 R2
- 0x780A0002, // 0004 JMPF R2 #0008
- 0x8C080302, // 0005 GETMET R2 R1 K2
- 0x5C100000, // 0006 MOVE R4 R0
- 0x7C080400, // 0007 CALL R2 2
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: paint
-********************************************************************/
-be_local_closure(class_Animate_painter_paint, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(paint),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_painter
-********************************************************************/
-be_local_class(Animate_painter,
- 0,
- NULL,
- be_nested_map(2,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(paint, -1), be_const_closure(class_Animate_painter_paint_closure) },
- { be_const_key_weak(init, 0), be_const_closure(class_Animate_painter_init_closure) },
- })),
- be_str_weak(Animate_painter)
-);
-// compact class 'Animate_pulse' ktab size: 15, total: 28 (saved 104 bytes)
-static const bvalue be_ktab_class_Animate_pulse[15] = {
- /* K0 */ be_nested_str_weak(pulse_size),
- /* K1 */ be_nested_str_weak(slew_size),
- /* K2 */ be_nested_str_weak(back_color),
- /* K3 */ be_nested_str_weak(pos),
- /* K4 */ be_nested_str_weak(color),
- /* K5 */ be_nested_str_weak(init),
- /* K6 */ be_const_int(16777215),
- /* K7 */ be_const_int(1),
- /* K8 */ be_const_int(0),
- /* K9 */ be_const_int(-16777216),
- /* K10 */ be_nested_str_weak(fill_pixels),
- /* K11 */ be_nested_str_weak(pixel_size),
- /* K12 */ be_nested_str_weak(blend),
- /* K13 */ be_nested_str_weak(tasmota),
- /* K14 */ be_nested_str_weak(scale_int),
-};
-
-
-extern const bclass be_class_Animate_pulse;
-
-/********************************************************************
-** Solidified function: set_pulse_size
-********************************************************************/
-be_local_closure(class_Animate_pulse_set_pulse_size, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(set_pulse_size),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_slew_size
-********************************************************************/
-be_local_closure(class_Animate_pulse_set_slew_size, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(set_slew_size),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020201, // 0000 SETMBR R0 K1 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_back_color
-********************************************************************/
-be_local_closure(class_Animate_pulse_set_back_color, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(set_back_color),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020401, // 0000 SETMBR R0 K2 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_pos
-********************************************************************/
-be_local_closure(class_Animate_pulse_set_pos, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(set_pos),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020601, // 0000 SETMBR R0 K3 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_color
-********************************************************************/
-be_local_closure(class_Animate_pulse_set_color, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(set_color),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020801, // 0000 SETMBR R0 K4 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_pulse_init, /* name */
- be_nested_proto(
- 6, /* nstack */
- 4, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[29]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100905, // 0003 GETMET R4 R4 K5
- 0x7C100200, // 0004 CALL R4 1
- 0x4C100000, // 0005 LDNIL R4
- 0x1C100204, // 0006 EQ R4 R1 R4
- 0x78120000, // 0007 JMPF R4 #0009
- 0x58040006, // 0008 LDCONST R1 K6
- 0x4C100000, // 0009 LDNIL R4
- 0x1C100404, // 000A EQ R4 R2 R4
- 0x78120000, // 000B JMPF R4 #000D
- 0x58080007, // 000C LDCONST R2 K7
- 0x4C100000, // 000D LDNIL R4
- 0x1C100604, // 000E EQ R4 R3 R4
- 0x78120000, // 000F JMPF R4 #0011
- 0x580C0008, // 0010 LDCONST R3 K8
- 0x90020801, // 0011 SETMBR R0 K4 R1
- 0x90020509, // 0012 SETMBR R0 K2 K9
- 0x14100508, // 0013 LT R4 R2 K8
- 0x78120000, // 0014 JMPF R4 #0016
- 0x58080008, // 0015 LDCONST R2 K8
- 0x90020002, // 0016 SETMBR R0 K0 R2
- 0x14100708, // 0017 LT R4 R3 K8
- 0x78120000, // 0018 JMPF R4 #001A
- 0x580C0008, // 0019 LDCONST R3 K8
- 0x90020203, // 001A SETMBR R0 K1 R3
- 0x90020708, // 001B SETMBR R0 K3 K8
- 0x80000000, // 001C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: paint
-********************************************************************/
-be_local_closure(class_Animate_pulse_paint, /* name */
- be_nested_proto(
- 22, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_pulse, /* shared constants */
- be_str_weak(paint),
- &be_const_str_solidified,
- ( &(const binstruction[91]) { /* code */
- 0x88080102, // 0000 GETMBR R2 R0 K2
- 0x200C0509, // 0001 NE R3 R2 K9
- 0x780E0002, // 0002 JMPF R3 #0006
- 0x8C0C030A, // 0003 GETMET R3 R1 K10
- 0x5C140400, // 0004 MOVE R5 R2
- 0x7C0C0400, // 0005 CALL R3 2
- 0x880C0103, // 0006 GETMBR R3 R0 K3
- 0x88100101, // 0007 GETMBR R4 R0 K1
- 0x88140100, // 0008 GETMBR R5 R0 K0
- 0x88180104, // 0009 GETMBR R6 R0 K4
- 0x881C030B, // 000A GETMBR R7 R1 K11
- 0x4C200000, // 000B LDNIL R8
- 0x4C240000, // 000C LDNIL R9
- 0x5C200600, // 000D MOVE R8 R3
- 0x00280605, // 000E ADD R10 R3 R5
- 0x5C241400, // 000F MOVE R9 R10
- 0x14281108, // 0010 LT R10 R8 K8
- 0x782A0000, // 0011 JMPF R10 #0013
- 0x58200008, // 0012 LDCONST R8 K8
- 0x28281207, // 0013 GE R10 R9 R7
- 0x782A0000, // 0014 JMPF R10 #0016
- 0x5C240E00, // 0015 MOVE R9 R7
- 0x5C281000, // 0016 MOVE R10 R8
- 0x142C1409, // 0017 LT R11 R10 R9
- 0x782E0002, // 0018 JMPF R11 #001C
- 0x98041406, // 0019 SETIDX R1 R10 R6
- 0x00281507, // 001A ADD R10 R10 K7
- 0x7001FFFA, // 001B JMP #0017
- 0x242C0908, // 001C GT R11 R4 K8
- 0x782E003A, // 001D JMPF R11 #0059
- 0x042C0604, // 001E SUB R11 R3 R4
- 0x5C201600, // 001F MOVE R8 R11
- 0x5C240600, // 0020 MOVE R9 R3
- 0x142C1108, // 0021 LT R11 R8 K8
- 0x782E0000, // 0022 JMPF R11 #0024
- 0x58200008, // 0023 LDCONST R8 K8
- 0x282C1207, // 0024 GE R11 R9 R7
- 0x782E0000, // 0025 JMPF R11 #0027
- 0x5C240E00, // 0026 MOVE R9 R7
- 0x5C281000, // 0027 MOVE R10 R8
- 0x142C1409, // 0028 LT R11 R10 R9
- 0x782E000F, // 0029 JMPF R11 #003A
- 0x8C2C030C, // 002A GETMET R11 R1 K12
- 0x5C340400, // 002B MOVE R13 R2
- 0x5C380C00, // 002C MOVE R14 R6
- 0xB83E1A00, // 002D GETNGBL R15 K13
- 0x8C3C1F0E, // 002E GETMET R15 R15 K14
- 0x5C441400, // 002F MOVE R17 R10
- 0x04480604, // 0030 SUB R18 R3 R4
- 0x04482507, // 0031 SUB R18 R18 K7
- 0x5C4C0600, // 0032 MOVE R19 R3
- 0x545200FE, // 0033 LDINT R20 255
- 0x58540008, // 0034 LDCONST R21 K8
- 0x7C3C0C00, // 0035 CALL R15 6
- 0x7C2C0800, // 0036 CALL R11 4
- 0x9804140B, // 0037 SETIDX R1 R10 R11
- 0x00281507, // 0038 ADD R10 R10 K7
- 0x7001FFED, // 0039 JMP #0028
- 0x002C0605, // 003A ADD R11 R3 R5
- 0x5C201600, // 003B MOVE R8 R11
- 0x002C0605, // 003C ADD R11 R3 R5
- 0x002C1604, // 003D ADD R11 R11 R4
- 0x5C241600, // 003E MOVE R9 R11
- 0x142C1108, // 003F LT R11 R8 K8
- 0x782E0000, // 0040 JMPF R11 #0042
- 0x58200008, // 0041 LDCONST R8 K8
- 0x282C1207, // 0042 GE R11 R9 R7
- 0x782E0000, // 0043 JMPF R11 #0045
- 0x5C240E00, // 0044 MOVE R9 R7
- 0x5C281000, // 0045 MOVE R10 R8
- 0x142C1409, // 0046 LT R11 R10 R9
- 0x782E0010, // 0047 JMPF R11 #0059
- 0x8C2C030C, // 0048 GETMET R11 R1 K12
- 0x5C340400, // 0049 MOVE R13 R2
- 0x5C380C00, // 004A MOVE R14 R6
- 0xB83E1A00, // 004B GETNGBL R15 K13
- 0x8C3C1F0E, // 004C GETMET R15 R15 K14
- 0x5C441400, // 004D MOVE R17 R10
- 0x00480605, // 004E ADD R18 R3 R5
- 0x04482507, // 004F SUB R18 R18 K7
- 0x004C0605, // 0050 ADD R19 R3 R5
- 0x004C2604, // 0051 ADD R19 R19 R4
- 0x58500008, // 0052 LDCONST R20 K8
- 0x545600FE, // 0053 LDINT R21 255
- 0x7C3C0C00, // 0054 CALL R15 6
- 0x7C2C0800, // 0055 CALL R11 4
- 0x9804140B, // 0056 SETIDX R1 R10 R11
- 0x00281507, // 0057 ADD R10 R10 K7
- 0x7001FFEC, // 0058 JMP #0046
- 0x502C0200, // 0059 LDBOOL R11 1 0
- 0x80041600, // 005A RET 1 R11
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_pulse
-********************************************************************/
-extern const bclass be_class_Animate_painter;
-be_local_class(Animate_pulse,
- 5,
- &be_class_Animate_painter,
- be_nested_map(12,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(paint, -1), be_const_closure(class_Animate_pulse_paint_closure) },
- { be_const_key_weak(set_slew_size, -1), be_const_closure(class_Animate_pulse_set_slew_size_closure) },
- { be_const_key_weak(pulse_size, -1), be_const_var(4) },
- { be_const_key_weak(set_back_color, 8), be_const_closure(class_Animate_pulse_set_back_color_closure) },
- { be_const_key_weak(color, -1), be_const_var(0) },
- { be_const_key_weak(back_color, -1), be_const_var(1) },
- { be_const_key_weak(set_pos, -1), be_const_closure(class_Animate_pulse_set_pos_closure) },
- { be_const_key_weak(set_color, -1), be_const_closure(class_Animate_pulse_set_color_closure) },
- { be_const_key_weak(init, 7), be_const_closure(class_Animate_pulse_init_closure) },
- { be_const_key_weak(pos, -1), be_const_var(2) },
- { be_const_key_weak(slew_size, 5), be_const_var(3) },
- { be_const_key_weak(set_pulse_size, 0), be_const_closure(class_Animate_pulse_set_pulse_size_closure) },
- })),
- be_str_weak(Animate_pulse)
-);
-// compact class 'Animate_crenel' ktab size: 19, total: 34 (saved 120 bytes)
-static const bvalue be_ktab_class_Animate_crenel[19] = {
- /* K0 */ be_nested_str_weak(pulse_size),
- /* K1 */ be_nested_str_weak(back_color),
- /* K2 */ be_const_int(-16777216),
- /* K3 */ be_nested_str_weak(fill_pixels),
- /* K4 */ be_nested_str_weak(pos),
- /* K5 */ be_nested_str_weak(low_size),
- /* K6 */ be_nested_str_weak(color),
- /* K7 */ be_nested_str_weak(pixel_size),
- /* K8 */ be_nested_str_weak(nb_pulse),
- /* K9 */ be_const_int(0),
- /* K10 */ be_const_int(1),
- /* K11 */ be_nested_str_weak(int),
- /* K12 */ be_nested_str_weak(instance),
- /* K13 */ be_nested_str_weak(get_color),
- /* K14 */ be_nested_str_weak(tasmota),
- /* K15 */ be_nested_str_weak(scale_int),
- /* K16 */ be_nested_str_weak(init),
- /* K17 */ be_const_int(16777215),
- /* K18 */ be_const_int(3),
-};
-
-
-extern const bclass be_class_Animate_crenel;
-
-/********************************************************************
-** Solidified function: set_pulse_size
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_pulse_size, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_pulse_size),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: paint
-********************************************************************/
-be_local_closure(class_Animate_crenel_paint, /* name */
- be_nested_proto(
- 20, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(paint),
- &be_const_str_solidified,
- ( &(const binstruction[83]) { /* code */
- 0x88080101, // 0000 GETMBR R2 R0 K1
- 0x200C0502, // 0001 NE R3 R2 K2
- 0x780E0002, // 0002 JMPF R3 #0006
- 0x8C0C0303, // 0003 GETMET R3 R1 K3
- 0x5C140400, // 0004 MOVE R5 R2
- 0x7C0C0400, // 0005 CALL R3 2
- 0x880C0104, // 0006 GETMBR R3 R0 K4
- 0x88100100, // 0007 GETMBR R4 R0 K0
- 0x88140105, // 0008 GETMBR R5 R0 K5
- 0x88180106, // 0009 GETMBR R6 R0 K6
- 0x881C0307, // 000A GETMBR R7 R1 K7
- 0x60200009, // 000B GETGBL R8 G9
- 0x00240805, // 000C ADD R9 R4 R5
- 0x7C200200, // 000D CALL R8 1
- 0x88240108, // 000E GETMBR R9 R0 K8
- 0x18281109, // 000F LE R10 R8 K9
- 0x782A0000, // 0010 JMPF R10 #0012
- 0x5820000A, // 0011 LDCONST R8 K10
- 0x1C281309, // 0012 EQ R10 R9 K9
- 0x782A0000, // 0013 JMPF R10 #0015
- 0x80001400, // 0014 RET 0
- 0x14281309, // 0015 LT R10 R9 K9
- 0x782A0006, // 0016 JMPF R10 #001E
- 0x00280604, // 0017 ADD R10 R3 R4
- 0x0428150A, // 0018 SUB R10 R10 K10
- 0x10281408, // 0019 MOD R10 R10 R8
- 0x04281404, // 001A SUB R10 R10 R4
- 0x0028150A, // 001B ADD R10 R10 K10
- 0x5C0C1400, // 001C MOVE R3 R10
- 0x70020007, // 001D JMP #0026
- 0x44281000, // 001E NEG R10 R8
- 0x1428060A, // 001F LT R10 R3 R10
- 0x782A0004, // 0020 JMPF R10 #0026
- 0x20281309, // 0021 NE R10 R9 K9
- 0x782A0002, // 0022 JMPF R10 #0026
- 0x000C0608, // 0023 ADD R3 R3 R8
- 0x0424130A, // 0024 SUB R9 R9 K10
- 0x7001FFF7, // 0025 JMP #001E
- 0x14280607, // 0026 LT R10 R3 R7
- 0x782A0028, // 0027 JMPF R10 #0051
- 0x20281309, // 0028 NE R10 R9 K9
- 0x782A0026, // 0029 JMPF R10 #0051
- 0x58280009, // 002A LDCONST R10 K9
- 0x142C0709, // 002B LT R11 R3 K9
- 0x782E0001, // 002C JMPF R11 #002F
- 0x442C0600, // 002D NEG R11 R3
- 0x5C281600, // 002E MOVE R10 R11
- 0x602C0004, // 002F GETGBL R11 G4
- 0x88300106, // 0030 GETMBR R12 R0 K6
- 0x7C2C0200, // 0031 CALL R11 1
- 0x1C2C170B, // 0032 EQ R11 R11 K11
- 0x782E0009, // 0033 JMPF R11 #003E
- 0x142C1404, // 0034 LT R11 R10 R4
- 0x782E0006, // 0035 JMPF R11 #003D
- 0x002C060A, // 0036 ADD R11 R3 R10
- 0x142C1607, // 0037 LT R11 R11 R7
- 0x782E0003, // 0038 JMPF R11 #003D
- 0x002C060A, // 0039 ADD R11 R3 R10
- 0x98041606, // 003A SETIDX R1 R11 R6
- 0x0028150A, // 003B ADD R10 R10 K10
- 0x7001FFF6, // 003C JMP #0034
- 0x7002000F, // 003D JMP #004E
- 0x602C0004, // 003E GETGBL R11 G4
- 0x88300106, // 003F GETMBR R12 R0 K6
- 0x7C2C0200, // 0040 CALL R11 1
- 0x1C2C170C, // 0041 EQ R11 R11 K12
- 0x782E000A, // 0042 JMPF R11 #004E
- 0x882C0106, // 0043 GETMBR R11 R0 K6
- 0x8C2C170D, // 0044 GETMET R11 R11 K13
- 0xB8361C00, // 0045 GETNGBL R13 K14
- 0x8C341B0F, // 0046 GETMET R13 R13 K15
- 0x5C3C1400, // 0047 MOVE R15 R10
- 0x58400009, // 0048 LDCONST R16 K9
- 0x0444090A, // 0049 SUB R17 R4 K10
- 0x58480009, // 004A LDCONST R18 K9
- 0x544E00FE, // 004B LDINT R19 255
- 0x7C340C00, // 004C CALL R13 6
- 0x7C2C0400, // 004D CALL R11 2
- 0x000C0608, // 004E ADD R3 R3 R8
- 0x0424130A, // 004F SUB R9 R9 K10
- 0x7001FFD4, // 0050 JMP #0026
- 0x50280200, // 0051 LDBOOL R10 1 0
- 0x80041400, // 0052 RET 1 R10
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_back_color
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_back_color, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_back_color),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020201, // 0000 SETMBR R0 K1 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_pos
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_pos, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_pos),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020801, // 0000 SETMBR R0 K4 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_color
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_color, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_color),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020C01, // 0000 SETMBR R0 K6 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_low_size
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_low_size, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_low_size),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020A01, // 0000 SETMBR R0 K5 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_crenel_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 5, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[34]) { /* code */
- 0x60140003, // 0000 GETGBL R5 G3
- 0x5C180000, // 0001 MOVE R6 R0
- 0x7C140200, // 0002 CALL R5 1
- 0x8C140B10, // 0003 GETMET R5 R5 K16
- 0x7C140200, // 0004 CALL R5 1
- 0x4C140000, // 0005 LDNIL R5
- 0x1C140205, // 0006 EQ R5 R1 R5
- 0x78160000, // 0007 JMPF R5 #0009
- 0x58040011, // 0008 LDCONST R1 K17
- 0x4C140000, // 0009 LDNIL R5
- 0x1C140405, // 000A EQ R5 R2 R5
- 0x78160000, // 000B JMPF R5 #000D
- 0x5808000A, // 000C LDCONST R2 K10
- 0x4C140000, // 000D LDNIL R5
- 0x1C140605, // 000E EQ R5 R3 R5
- 0x78160000, // 000F JMPF R5 #0011
- 0x580C0012, // 0010 LDCONST R3 K18
- 0x4C140000, // 0011 LDNIL R5
- 0x1C140805, // 0012 EQ R5 R4 R5
- 0x78160000, // 0013 JMPF R5 #0015
- 0x5411FFFE, // 0014 LDINT R4 -1
- 0x90020C01, // 0015 SETMBR R0 K6 R1
- 0x90020302, // 0016 SETMBR R0 K1 K2
- 0x14140509, // 0017 LT R5 R2 K9
- 0x78160000, // 0018 JMPF R5 #001A
- 0x58080009, // 0019 LDCONST R2 K9
- 0x90020002, // 001A SETMBR R0 K0 R2
- 0x14140709, // 001B LT R5 R3 K9
- 0x78160000, // 001C JMPF R5 #001E
- 0x580C0009, // 001D LDCONST R3 K9
- 0x90020A03, // 001E SETMBR R0 K5 R3
- 0x90021004, // 001F SETMBR R0 K8 R4
- 0x90020909, // 0020 SETMBR R0 K4 K9
- 0x80000000, // 0021 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_nb_pulse
-********************************************************************/
-be_local_closure(class_Animate_crenel_set_nb_pulse, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_crenel, /* shared constants */
- be_str_weak(set_nb_pulse),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90021001, // 0000 SETMBR R0 K8 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_crenel
-********************************************************************/
-extern const bclass be_class_Animate_painter;
-be_local_class(Animate_crenel,
- 6,
- &be_class_Animate_painter,
- be_nested_map(14,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(low_size, -1), be_const_var(4) },
- { be_const_key_weak(paint, -1), be_const_closure(class_Animate_crenel_paint_closure) },
- { be_const_key_weak(color, -1), be_const_var(0) },
- { be_const_key_weak(set_pulse_size, 11), be_const_closure(class_Animate_crenel_set_pulse_size_closure) },
- { be_const_key_weak(pulse_size, -1), be_const_var(3) },
- { be_const_key_weak(set_back_color, 10), be_const_closure(class_Animate_crenel_set_back_color_closure) },
- { be_const_key_weak(set_pos, -1), be_const_closure(class_Animate_crenel_set_pos_closure) },
- { be_const_key_weak(back_color, -1), be_const_var(1) },
- { be_const_key_weak(set_low_size, 7), be_const_closure(class_Animate_crenel_set_low_size_closure) },
- { be_const_key_weak(pos, -1), be_const_var(2) },
- { be_const_key_weak(init, -1), be_const_closure(class_Animate_crenel_init_closure) },
- { be_const_key_weak(set_color, 1), be_const_closure(class_Animate_crenel_set_color_closure) },
- { be_const_key_weak(set_nb_pulse, -1), be_const_closure(class_Animate_crenel_set_nb_pulse_closure) },
- { be_const_key_weak(nb_pulse, 0), be_const_var(5) },
- })),
- be_str_weak(Animate_crenel)
-);
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_animate/src/solidify/solidified_animate_9_module.h b/lib/libesp32/berry_animate/src/solidify/solidified_animate_9_module.h
deleted file mode 100644
index 9a05a9cab..000000000
--- a/lib/libesp32/berry_animate/src/solidify/solidified_animate_9_module.h
+++ /dev/null
@@ -1,1494 +0,0 @@
-/* Solidification of animate_9_module.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-// compact class 'Animate_animator' ktab size: 10, total: 14 (saved 32 bytes)
-static const bvalue be_ktab_class_Animate_animator[10] = {
- /* K0 */ be_nested_str_weak(running),
- /* K1 */ be_nested_str_weak(global),
- /* K2 */ be_nested_str_weak(_cur_anim),
- /* K3 */ be_nested_str_weak(add_animator),
- /* K4 */ be_nested_str_weak(origin),
- /* K5 */ be_nested_str_weak(duration_ms),
- /* K6 */ be_nested_str_weak(obj),
- /* K7 */ be_nested_str_weak(mth),
- /* K8 */ be_nested_str_weak(tasmota),
- /* K9 */ be_nested_str_weak(millis),
-};
-
-
-extern const bclass be_class_Animate_animator;
-
-/********************************************************************
-** Solidified function: is_running
-********************************************************************/
-be_local_closure(class_Animate_animator_is_running, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(is_running),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60040017, // 0000 GETGBL R1 G23
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: beat
-********************************************************************/
-be_local_closure(class_Animate_animator_beat, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(beat),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_animator_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0xB8060200, // 0000 GETNGBL R1 K1
- 0x88040302, // 0001 GETMBR R1 R1 K2
- 0x4C080000, // 0002 LDNIL R2
- 0x20080202, // 0003 NE R2 R1 R2
- 0x780A0002, // 0004 JMPF R2 #0008
- 0x8C080303, // 0005 GETMET R2 R1 K3
- 0x5C100000, // 0006 MOVE R4 R0
- 0x7C080400, // 0007 CALL R2 2
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop
-********************************************************************/
-be_local_closure(class_Animate_animator_stop, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(stop),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x4C040000, // 0000 LDNIL R1
- 0x90020801, // 0001 SETMBR R0 K4 R1
- 0x50040000, // 0002 LDBOOL R1 0 0
- 0x90020001, // 0003 SETMBR R0 K0 R1
- 0x80000000, // 0004 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_duration_ms
-********************************************************************/
-be_local_closure(class_Animate_animator_set_duration_ms, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(set_duration_ms),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020A01, // 0000 SETMBR R0 K5 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_cb
-********************************************************************/
-be_local_closure(class_Animate_animator_set_cb, /* name */
- be_nested_proto(
- 3, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(set_cb),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x90020C01, // 0000 SETMBR R0 K6 R1
- 0x90020E02, // 0001 SETMBR R0 K7 R2
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start
-********************************************************************/
-be_local_closure(class_Animate_animator_start, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_animator, /* shared constants */
- be_str_weak(start),
- &be_const_str_solidified,
- ( &(const binstruction[16]) { /* code */
- 0x88080105, // 0000 GETMBR R2 R0 K5
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C080403, // 0002 EQ R2 R2 R3
- 0x780A0000, // 0003 JMPF R2 #0005
- 0x80000400, // 0004 RET 0
- 0x4C080000, // 0005 LDNIL R2
- 0x1C080202, // 0006 EQ R2 R1 R2
- 0x780A0003, // 0007 JMPF R2 #000C
- 0xB80A1000, // 0008 GETNGBL R2 K8
- 0x8C080509, // 0009 GETMET R2 R2 K9
- 0x7C080200, // 000A CALL R2 1
- 0x5C040400, // 000B MOVE R1 R2
- 0x90020801, // 000C SETMBR R0 K4 R1
- 0x50080200, // 000D LDBOOL R2 1 0
- 0x90020002, // 000E SETMBR R0 K0 R2
- 0x80000000, // 000F RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_animator
-********************************************************************/
-be_local_class(Animate_animator,
- 5,
- NULL,
- be_nested_map(12,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(running, 4), be_const_var(0) },
- { be_const_key_weak(is_running, 2), be_const_closure(class_Animate_animator_is_running_closure) },
- { be_const_key_weak(beat, -1), be_const_closure(class_Animate_animator_beat_closure) },
- { be_const_key_weak(init, -1), be_const_closure(class_Animate_animator_init_closure) },
- { be_const_key_weak(mth, -1), be_const_var(4) },
- { be_const_key_weak(stop, -1), be_const_closure(class_Animate_animator_stop_closure) },
- { be_const_key_weak(duration_ms, -1), be_const_var(1) },
- { be_const_key_weak(origin, -1), be_const_var(2) },
- { be_const_key_weak(set_cb, -1), be_const_closure(class_Animate_animator_set_cb_closure) },
- { be_const_key_weak(set_duration_ms, 8), be_const_closure(class_Animate_animator_set_duration_ms_closure) },
- { be_const_key_weak(obj, -1), be_const_var(3) },
- { be_const_key_weak(start, -1), be_const_closure(class_Animate_animator_start_closure) },
- })),
- be_str_weak(Animate_animator)
-);
-extern const bclass be_class_Animate_palette;
-// compact class 'Animate_palette' ktab size: 43, total: 87 (saved 352 bytes)
-static const bvalue be_ktab_class_Animate_palette[43] = {
- /* K0 */ be_const_class(be_class_Animate_palette),
- /* K1 */ be_nested_str_weak(ptr),
- /* K2 */ be_const_int(1),
- /* K3 */ be_const_int(0),
- /* K4 */ be_nested_str_weak(duration_ms),
- /* K5 */ be_nested_str_weak(tasmota),
- /* K6 */ be_nested_str_weak(millis),
- /* K7 */ be_nested_str_weak(origin),
- /* K8 */ be_nested_str_weak(scale_uint),
- /* K9 */ be_nested_str_weak(slots),
- /* K10 */ be_const_int(2),
- /* K11 */ be_nested_str_weak(slots_arr),
- /* K12 */ be_nested_str_weak(palette),
- /* K13 */ be_nested_str_weak(get),
- /* K14 */ be_nested_str_weak(color),
- /* K15 */ be_nested_str_weak(set_rgb),
- /* K16 */ be_nested_str_weak(bri),
- /* K17 */ be_nested_str_weak(set_bri),
- /* K18 */ be_nested_str_weak(r),
- /* K19 */ be_nested_str_weak(g),
- /* K20 */ be_nested_str_weak(b),
- /* K21 */ be_nested_str_weak(obj),
- /* K22 */ be_nested_str_weak(mth),
- /* K23 */ be_nested_str_weak(ptr_to_palette),
- /* K24 */ be_nested_str_weak(set_duration),
- /* K25 */ be_nested_str_weak(range_min),
- /* K26 */ be_nested_str_weak(range_max),
- /* K27 */ be_nested_str_weak(set_range),
- /* K28 */ be_nested_str_weak(parse_palette),
- /* K29 */ be_nested_str_weak(background_X3Alinear_X2Dgradient_X28to_X20right),
- /* K30 */ be_nested_str_weak(_X2C_X23_X2502X_X2502X_X2502X_X20_X25_X2E1f_X25_X25),
- /* K31 */ be_const_real_hex(0x41200000),
- /* K32 */ be_nested_str_weak(_X29_X3B),
- /* K33 */ be_nested_str_weak(resize),
- /* K34 */ be_nested_str_weak(scale_int),
- /* K35 */ be_nested_str_weak(value_error),
- /* K36 */ be_nested_str_weak(min_X20must_X20be_X20lower_X20than_X20mex),
- /* K37 */ be_nested_str_weak(duration_ms_X20must_X20be_X20positive),
- /* K38 */ be_nested_str_weak(init),
- /* K39 */ be_nested_str_weak(running),
- /* K40 */ be_nested_str_weak(light_state),
- /* K41 */ be_nested_str_weak(RGB),
- /* K42 */ be_nested_str_weak(set_palette),
-};
-
-
-extern const bclass be_class_Animate_palette;
-
-/********************************************************************
-** Solidified function: ptr_to_palette
-********************************************************************/
-be_local_closure(class_Animate_palette_ptr_to_palette, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(ptr_to_palette),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 0x60080004, // 0001 GETGBL R2 G4
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C080200, // 0003 CALL R2 1
- 0x1C080501, // 0004 EQ R2 R2 K1
- 0x780A0025, // 0005 JMPF R2 #002C
- 0x60080015, // 0006 GETGBL R2 G21
- 0x5C0C0000, // 0007 MOVE R3 R0
- 0x541207CF, // 0008 LDINT R4 2000
- 0x7C080400, // 0009 CALL R2 2
- 0x580C0002, // 000A LDCONST R3 K2
- 0x94100503, // 000B GETIDX R4 R2 K3
- 0x20100903, // 000C NE R4 R4 K3
- 0x7812000A, // 000D JMPF R4 #0019
- 0x50100200, // 000E LDBOOL R4 1 0
- 0x78120007, // 000F JMPF R4 #0018
- 0x54120003, // 0010 LDINT R4 4
- 0x08100604, // 0011 MUL R4 R3 R4
- 0x94100404, // 0012 GETIDX R4 R2 R4
- 0x1C100903, // 0013 EQ R4 R4 K3
- 0x78120000, // 0014 JMPF R4 #0016
- 0x70020001, // 0015 JMP #0018
- 0x000C0702, // 0016 ADD R3 R3 K2
- 0x7001FFF5, // 0017 JMP #000E
- 0x7002000A, // 0018 JMP #0024
- 0x50100200, // 0019 LDBOOL R4 1 0
- 0x78120008, // 001A JMPF R4 #0024
- 0x54120003, // 001B LDINT R4 4
- 0x08100604, // 001C MUL R4 R3 R4
- 0x94100404, // 001D GETIDX R4 R2 R4
- 0x541600FE, // 001E LDINT R5 255
- 0x1C100805, // 001F EQ R4 R4 R5
- 0x78120000, // 0020 JMPF R4 #0022
- 0x70020001, // 0021 JMP #0024
- 0x000C0702, // 0022 ADD R3 R3 K2
- 0x7001FFF4, // 0023 JMP #0019
- 0x00100702, // 0024 ADD R4 R3 K2
- 0x54160003, // 0025 LDINT R5 4
- 0x08100805, // 0026 MUL R4 R4 R5
- 0x60140015, // 0027 GETGBL R5 G21
- 0x5C180000, // 0028 MOVE R6 R0
- 0x5C1C0800, // 0029 MOVE R7 R4
- 0x7C140400, // 002A CALL R5 2
- 0x80040A00, // 002B RET 1 R5
- 0x80000000, // 002C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: animate
-********************************************************************/
-be_local_closure(class_Animate_palette_animate, /* name */
- be_nested_proto(
- 26, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(animate),
- &be_const_str_solidified,
- ( &(const binstruction[192]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C080403, // 0002 EQ R2 R2 R3
- 0x780A0000, // 0003 JMPF R2 #0005
- 0x80000400, // 0004 RET 0
- 0x4C080000, // 0005 LDNIL R2
- 0x1C080202, // 0006 EQ R2 R1 R2
- 0x780A0003, // 0007 JMPF R2 #000C
- 0xB80A0A00, // 0008 GETNGBL R2 K5
- 0x8C080506, // 0009 GETMET R2 R2 K6
- 0x7C080200, // 000A CALL R2 1
- 0x5C040400, // 000B MOVE R1 R2
- 0x88080107, // 000C GETMBR R2 R0 K7
- 0x04080202, // 000D SUB R2 R1 R2
- 0x140C0503, // 000E LT R3 R2 K3
- 0x780E0001, // 000F JMPF R3 #0012
- 0x58080003, // 0010 LDCONST R2 K3
- 0x88040107, // 0011 GETMBR R1 R0 K7
- 0x880C0104, // 0012 GETMBR R3 R0 K4
- 0xB8120A00, // 0013 GETNGBL R4 K5
- 0x88100908, // 0014 GETMBR R4 R4 K8
- 0x28140403, // 0015 GE R5 R2 R3
- 0x78160005, // 0016 JMPF R5 #001D
- 0x0C180403, // 0017 DIV R6 R2 R3
- 0x08180C03, // 0018 MUL R6 R6 R3
- 0x88140107, // 0019 GETMBR R5 R0 K7
- 0x00140A06, // 001A ADD R5 R5 R6
- 0x90020E05, // 001B SETMBR R0 K7 R5
- 0x10080403, // 001C MOD R2 R2 R3
- 0x88140109, // 001D GETMBR R5 R0 K9
- 0x04180B0A, // 001E SUB R6 R5 K10
- 0x241C0D03, // 001F GT R7 R6 K3
- 0x781E0006, // 0020 JMPF R7 #0028
- 0x881C010B, // 0021 GETMBR R7 R0 K11
- 0x941C0E06, // 0022 GETIDX R7 R7 R6
- 0x281C0407, // 0023 GE R7 R2 R7
- 0x781E0000, // 0024 JMPF R7 #0026
- 0x70020001, // 0025 JMP #0028
- 0x04180D02, // 0026 SUB R6 R6 K2
- 0x7001FFF6, // 0027 JMP #001F
- 0x881C010C, // 0028 GETMBR R7 R0 K12
- 0x8C1C0F0D, // 0029 GETMET R7 R7 K13
- 0x54260003, // 002A LDINT R9 4
- 0x08240C09, // 002B MUL R9 R6 R9
- 0x542A0003, // 002C LDINT R10 4
- 0x7C1C0600, // 002D CALL R7 3
- 0x8820010C, // 002E GETMBR R8 R0 K12
- 0x8C20110D, // 002F GETMET R8 R8 K13
- 0x00280D02, // 0030 ADD R10 R6 K2
- 0x542E0003, // 0031 LDINT R11 4
- 0x0828140B, // 0032 MUL R10 R10 R11
- 0x542E0003, // 0033 LDINT R11 4
- 0x7C200600, // 0034 CALL R8 3
- 0x8824010B, // 0035 GETMBR R9 R0 K11
- 0x94241206, // 0036 GETIDX R9 R9 R6
- 0x00280D02, // 0037 ADD R10 R6 K2
- 0x882C010B, // 0038 GETMBR R11 R0 K11
- 0x9428160A, // 0039 GETIDX R10 R11 R10
- 0x5C2C0800, // 003A MOVE R11 R4
- 0x5C300400, // 003B MOVE R12 R2
- 0x5C341200, // 003C MOVE R13 R9
- 0x5C381400, // 003D MOVE R14 R10
- 0x543E0007, // 003E LDINT R15 8
- 0x3C3C0E0F, // 003F SHR R15 R7 R15
- 0x544200FE, // 0040 LDINT R16 255
- 0x2C3C1E10, // 0041 AND R15 R15 R16
- 0x54420007, // 0042 LDINT R16 8
- 0x3C401010, // 0043 SHR R16 R8 R16
- 0x544600FE, // 0044 LDINT R17 255
- 0x2C402011, // 0045 AND R16 R16 R17
- 0x7C2C0A00, // 0046 CALL R11 5
- 0x5C300800, // 0047 MOVE R12 R4
- 0x5C340400, // 0048 MOVE R13 R2
- 0x5C381200, // 0049 MOVE R14 R9
- 0x5C3C1400, // 004A MOVE R15 R10
- 0x5442000F, // 004B LDINT R16 16
- 0x3C400E10, // 004C SHR R16 R7 R16
- 0x544600FE, // 004D LDINT R17 255
- 0x2C402011, // 004E AND R16 R16 R17
- 0x5446000F, // 004F LDINT R17 16
- 0x3C441011, // 0050 SHR R17 R8 R17
- 0x544A00FE, // 0051 LDINT R18 255
- 0x2C442212, // 0052 AND R17 R17 R18
- 0x7C300A00, // 0053 CALL R12 5
- 0x5C340800, // 0054 MOVE R13 R4
- 0x5C380400, // 0055 MOVE R14 R2
- 0x5C3C1200, // 0056 MOVE R15 R9
- 0x5C401400, // 0057 MOVE R16 R10
- 0x54460017, // 0058 LDINT R17 24
- 0x3C440E11, // 0059 SHR R17 R7 R17
- 0x544A00FE, // 005A LDINT R18 255
- 0x2C442212, // 005B AND R17 R17 R18
- 0x544A0017, // 005C LDINT R18 24
- 0x3C481012, // 005D SHR R18 R8 R18
- 0x544E00FE, // 005E LDINT R19 255
- 0x2C482413, // 005F AND R18 R18 R19
- 0x7C340A00, // 0060 CALL R13 5
- 0x8838010E, // 0061 GETMBR R14 R0 K14
- 0x8C3C1D0F, // 0062 GETMET R15 R14 K15
- 0x54460007, // 0063 LDINT R17 8
- 0x3C440E11, // 0064 SHR R17 R7 R17
- 0x544A00FE, // 0065 LDINT R18 255
- 0x2C442212, // 0066 AND R17 R17 R18
- 0x544A000F, // 0067 LDINT R18 16
- 0x3C480E12, // 0068 SHR R18 R7 R18
- 0x544E00FE, // 0069 LDINT R19 255
- 0x2C482413, // 006A AND R18 R18 R19
- 0x544E0017, // 006B LDINT R19 24
- 0x3C4C0E13, // 006C SHR R19 R7 R19
- 0x545200FE, // 006D LDINT R20 255
- 0x2C4C2614, // 006E AND R19 R19 R20
- 0x7C3C0800, // 006F CALL R15 4
- 0x883C1D10, // 0070 GETMBR R15 R14 K16
- 0x8C401D0F, // 0071 GETMET R16 R14 K15
- 0x544A0007, // 0072 LDINT R18 8
- 0x3C481012, // 0073 SHR R18 R8 R18
- 0x544E00FE, // 0074 LDINT R19 255
- 0x2C482413, // 0075 AND R18 R18 R19
- 0x544E000F, // 0076 LDINT R19 16
- 0x3C4C1013, // 0077 SHR R19 R8 R19
- 0x545200FE, // 0078 LDINT R20 255
- 0x2C4C2614, // 0079 AND R19 R19 R20
- 0x54520017, // 007A LDINT R20 24
- 0x3C501014, // 007B SHR R20 R8 R20
- 0x545600FE, // 007C LDINT R21 255
- 0x2C502815, // 007D AND R20 R20 R21
- 0x7C400800, // 007E CALL R16 4
- 0x88401D10, // 007F GETMBR R16 R14 K16
- 0x5C440800, // 0080 MOVE R17 R4
- 0x5C480400, // 0081 MOVE R18 R2
- 0x5C4C1200, // 0082 MOVE R19 R9
- 0x5C501400, // 0083 MOVE R20 R10
- 0x5C541E00, // 0084 MOVE R21 R15
- 0x5C582000, // 0085 MOVE R22 R16
- 0x7C440A00, // 0086 CALL R17 5
- 0x8C481D0F, // 0087 GETMET R18 R14 K15
- 0x5C501600, // 0088 MOVE R20 R11
- 0x5C541800, // 0089 MOVE R21 R12
- 0x5C581A00, // 008A MOVE R22 R13
- 0x7C480800, // 008B CALL R18 4
- 0x8C481D11, // 008C GETMET R18 R14 K17
- 0x5C502200, // 008D MOVE R20 R17
- 0x7C480400, // 008E CALL R18 2
- 0x882C1D12, // 008F GETMBR R11 R14 K18
- 0x88301D13, // 0090 GETMBR R12 R14 K19
- 0x88341D14, // 0091 GETMBR R13 R14 K20
- 0x88480110, // 0092 GETMBR R18 R0 K16
- 0x544E0063, // 0093 LDINT R19 100
- 0x204C2413, // 0094 NE R19 R18 R19
- 0x784E001A, // 0095 JMPF R19 #00B1
- 0xB84E0A00, // 0096 GETNGBL R19 K5
- 0x8C4C2708, // 0097 GETMET R19 R19 K8
- 0x5C541600, // 0098 MOVE R21 R11
- 0x58580003, // 0099 LDCONST R22 K3
- 0x545E0063, // 009A LDINT R23 100
- 0x58600003, // 009B LDCONST R24 K3
- 0x5C642400, // 009C MOVE R25 R18
- 0x7C4C0C00, // 009D CALL R19 6
- 0x5C2C2600, // 009E MOVE R11 R19
- 0xB84E0A00, // 009F GETNGBL R19 K5
- 0x8C4C2708, // 00A0 GETMET R19 R19 K8
- 0x5C541800, // 00A1 MOVE R21 R12
- 0x58580003, // 00A2 LDCONST R22 K3
- 0x545E0063, // 00A3 LDINT R23 100
- 0x58600003, // 00A4 LDCONST R24 K3
- 0x5C642400, // 00A5 MOVE R25 R18
- 0x7C4C0C00, // 00A6 CALL R19 6
- 0x5C302600, // 00A7 MOVE R12 R19
- 0xB84E0A00, // 00A8 GETNGBL R19 K5
- 0x8C4C2708, // 00A9 GETMET R19 R19 K8
- 0x5C541A00, // 00AA MOVE R21 R13
- 0x58580003, // 00AB LDCONST R22 K3
- 0x545E0063, // 00AC LDINT R23 100
- 0x58600003, // 00AD LDCONST R24 K3
- 0x5C642400, // 00AE MOVE R25 R18
- 0x7C4C0C00, // 00AF CALL R19 6
- 0x5C342600, // 00B0 MOVE R13 R19
- 0x544E000F, // 00B1 LDINT R19 16
- 0x384C1613, // 00B2 SHL R19 R11 R19
- 0x54520007, // 00B3 LDINT R20 8
- 0x38501814, // 00B4 SHL R20 R12 R20
- 0x304C2614, // 00B5 OR R19 R19 R20
- 0x304C260D, // 00B6 OR R19 R19 R13
- 0x88500115, // 00B7 GETMBR R20 R0 K21
- 0x88540116, // 00B8 GETMBR R21 R0 K22
- 0x78520004, // 00B9 JMPF R20 #00BF
- 0x78560003, // 00BA JMPF R21 #00BF
- 0x5C582A00, // 00BB MOVE R22 R21
- 0x5C5C2800, // 00BC MOVE R23 R20
- 0x5C602600, // 00BD MOVE R24 R19
- 0x7C580400, // 00BE CALL R22 2
- 0x80042600, // 00BF RET 1 R19
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_palette
-********************************************************************/
-be_local_closure(class_Animate_palette_set_palette, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(set_palette),
- &be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
- 0x60080004, // 0000 GETGBL R2 G4
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x1C080501, // 0003 EQ R2 R2 K1
- 0x780A0003, // 0004 JMPF R2 #0009
- 0x8C080117, // 0005 GETMET R2 R0 K23
- 0x5C100200, // 0006 MOVE R4 R1
- 0x7C080400, // 0007 CALL R2 2
- 0x5C040400, // 0008 MOVE R1 R2
- 0x90021801, // 0009 SETMBR R0 K12 R1
- 0x6008000C, // 000A GETGBL R2 G12
- 0x5C0C0200, // 000B MOVE R3 R1
- 0x7C080200, // 000C CALL R2 1
- 0x540E0003, // 000D LDINT R3 4
- 0x0C080403, // 000E DIV R2 R2 R3
- 0x90021202, // 000F SETMBR R0 K9 R2
- 0x88080104, // 0010 GETMBR R2 R0 K4
- 0x4C0C0000, // 0011 LDNIL R3
- 0x20080403, // 0012 NE R2 R2 R3
- 0x780A0003, // 0013 JMPF R2 #0018
- 0x8C080118, // 0014 GETMET R2 R0 K24
- 0x88100104, // 0015 GETMBR R4 R0 K4
- 0x7C080400, // 0016 CALL R2 2
- 0x7002000B, // 0017 JMP #0024
- 0x88080119, // 0018 GETMBR R2 R0 K25
- 0x4C0C0000, // 0019 LDNIL R3
- 0x20080403, // 001A NE R2 R2 R3
- 0x780A0007, // 001B JMPF R2 #0024
- 0x8808011A, // 001C GETMBR R2 R0 K26
- 0x4C0C0000, // 001D LDNIL R3
- 0x20080403, // 001E NE R2 R2 R3
- 0x780A0003, // 001F JMPF R2 #0024
- 0x8C08011B, // 0020 GETMET R2 R0 K27
- 0x88100119, // 0021 GETMBR R4 R0 K25
- 0x8814011A, // 0022 GETMBR R5 R0 K26
- 0x7C080600, // 0023 CALL R2 3
- 0x80000000, // 0024 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: to_css_gradient
-********************************************************************/
-be_local_closure(class_Animate_palette_to_css_gradient, /* name */
- be_nested_proto(
- 17, /* nstack */
- 1, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(to_css_gradient),
- &be_const_str_solidified,
- ( &(const binstruction[46]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 0x5C080200, // 0001 MOVE R2 R1
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C080200, // 0003 CALL R2 1
- 0x8C0C051C, // 0004 GETMET R3 R2 K28
- 0x58140003, // 0005 LDCONST R5 K3
- 0x541A03E7, // 0006 LDINT R6 1000
- 0x7C0C0600, // 0007 CALL R3 3
- 0x5810001D, // 0008 LDCONST R4 K29
- 0x58140003, // 0009 LDCONST R5 K3
- 0x6018000C, // 000A GETGBL R6 G12
- 0x5C1C0600, // 000B MOVE R7 R3
- 0x7C180200, // 000C CALL R6 1
- 0x14180A06, // 000D LT R6 R5 R6
- 0x781A001C, // 000E JMPF R6 #002C
- 0x94180605, // 000F GETIDX R6 R3 R5
- 0x881C050C, // 0010 GETMBR R7 R2 K12
- 0x8C1C0F0D, // 0011 GETMET R7 R7 K13
- 0x54260003, // 0012 LDINT R9 4
- 0x08240A09, // 0013 MUL R9 R5 R9
- 0x542A0003, // 0014 LDINT R10 4
- 0x7C1C0600, // 0015 CALL R7 3
- 0x54220007, // 0016 LDINT R8 8
- 0x3C200E08, // 0017 SHR R8 R7 R8
- 0x542600FE, // 0018 LDINT R9 255
- 0x2C201009, // 0019 AND R8 R8 R9
- 0x5426000F, // 001A LDINT R9 16
- 0x3C240E09, // 001B SHR R9 R7 R9
- 0x542A00FE, // 001C LDINT R10 255
- 0x2C24120A, // 001D AND R9 R9 R10
- 0x542A0017, // 001E LDINT R10 24
- 0x3C280E0A, // 001F SHR R10 R7 R10
- 0x542E00FE, // 0020 LDINT R11 255
- 0x2C28140B, // 0021 AND R10 R10 R11
- 0x602C0018, // 0022 GETGBL R11 G24
- 0x5830001E, // 0023 LDCONST R12 K30
- 0x5C341000, // 0024 MOVE R13 R8
- 0x5C381200, // 0025 MOVE R14 R9
- 0x5C3C1400, // 0026 MOVE R15 R10
- 0x0C400D1F, // 0027 DIV R16 R6 K31
- 0x7C2C0A00, // 0028 CALL R11 5
- 0x0010080B, // 0029 ADD R4 R4 R11
- 0x00140B02, // 002A ADD R5 R5 K2
- 0x7001FFDD, // 002B JMP #000A
- 0x00100920, // 002C ADD R4 R4 K32
- 0x80040800, // 002D RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_bri
-********************************************************************/
-be_local_closure(class_Animate_palette_set_bri, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(set_bri),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x90022002, // 0003 SETMBR R0 K16 R2
- 0x80000000, // 0004 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: parse_palette
-********************************************************************/
-be_local_closure(class_Animate_palette_parse_palette, /* name */
- be_nested_proto(
- 15, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(parse_palette),
- &be_const_str_solidified,
- ( &(const binstruction[71]) { /* code */
- 0x600C0012, // 0000 GETGBL R3 G18
- 0x7C0C0000, // 0001 CALL R3 0
- 0x88100109, // 0002 GETMBR R4 R0 K9
- 0x8C140721, // 0003 GETMET R5 R3 K33
- 0x5C1C0800, // 0004 MOVE R7 R4
- 0x7C140400, // 0005 CALL R5 2
- 0x8814010C, // 0006 GETMBR R5 R0 K12
- 0x8C140B0D, // 0007 GETMET R5 R5 K13
- 0x581C0003, // 0008 LDCONST R7 K3
- 0x58200002, // 0009 LDCONST R8 K2
- 0x7C140600, // 000A CALL R5 3
- 0x20140B03, // 000B NE R5 R5 K3
- 0x78160024, // 000C JMPF R5 #0032
- 0x58140003, // 000D LDCONST R5 K3
- 0x58180003, // 000E LDCONST R6 K3
- 0x041C0902, // 000F SUB R7 R4 K2
- 0x141C0C07, // 0010 LT R7 R6 R7
- 0x781E0008, // 0011 JMPF R7 #001B
- 0x881C010C, // 0012 GETMBR R7 R0 K12
- 0x8C1C0F0D, // 0013 GETMET R7 R7 K13
- 0x54260003, // 0014 LDINT R9 4
- 0x08240C09, // 0015 MUL R9 R6 R9
- 0x58280002, // 0016 LDCONST R10 K2
- 0x7C1C0600, // 0017 CALL R7 3
- 0x00140A07, // 0018 ADD R5 R5 R7
- 0x00180D02, // 0019 ADD R6 R6 K2
- 0x7001FFF3, // 001A JMP #000F
- 0x581C0003, // 001B LDCONST R7 K3
- 0x58180003, // 001C LDCONST R6 K3
- 0x14200C04, // 001D LT R8 R6 R4
- 0x78220011, // 001E JMPF R8 #0031
- 0xB8220A00, // 001F GETNGBL R8 K5
- 0x8C201122, // 0020 GETMET R8 R8 K34
- 0x5C280E00, // 0021 MOVE R10 R7
- 0x582C0003, // 0022 LDCONST R11 K3
- 0x5C300A00, // 0023 MOVE R12 R5
- 0x5C340200, // 0024 MOVE R13 R1
- 0x5C380400, // 0025 MOVE R14 R2
- 0x7C200C00, // 0026 CALL R8 6
- 0x980C0C08, // 0027 SETIDX R3 R6 R8
- 0x8820010C, // 0028 GETMBR R8 R0 K12
- 0x8C20110D, // 0029 GETMET R8 R8 K13
- 0x542A0003, // 002A LDINT R10 4
- 0x08280C0A, // 002B MUL R10 R6 R10
- 0x582C0002, // 002C LDCONST R11 K2
- 0x7C200600, // 002D CALL R8 3
- 0x001C0E08, // 002E ADD R7 R7 R8
- 0x00180D02, // 002F ADD R6 R6 K2
- 0x7001FFEB, // 0030 JMP #001D
- 0x70020013, // 0031 JMP #0046
- 0x58140003, // 0032 LDCONST R5 K3
- 0x14180A04, // 0033 LT R6 R5 R4
- 0x781A0010, // 0034 JMPF R6 #0046
- 0x8818010C, // 0035 GETMBR R6 R0 K12
- 0x8C180D0D, // 0036 GETMET R6 R6 K13
- 0x54220003, // 0037 LDINT R8 4
- 0x08200A08, // 0038 MUL R8 R5 R8
- 0x58240002, // 0039 LDCONST R9 K2
- 0x7C180600, // 003A CALL R6 3
- 0xB81E0A00, // 003B GETNGBL R7 K5
- 0x8C1C0F22, // 003C GETMET R7 R7 K34
- 0x5C240C00, // 003D MOVE R9 R6
- 0x58280003, // 003E LDCONST R10 K3
- 0x542E00FE, // 003F LDINT R11 255
- 0x5C300200, // 0040 MOVE R12 R1
- 0x5C340400, // 0041 MOVE R13 R2
- 0x7C1C0C00, // 0042 CALL R7 6
- 0x980C0A07, // 0043 SETIDX R3 R5 R7
- 0x00140B02, // 0044 ADD R5 R5 K2
- 0x7001FFEC, // 0045 JMP #0033
- 0x80040600, // 0046 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_range
-********************************************************************/
-be_local_closure(class_Animate_palette_set_range, /* name */
- be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(set_range),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x280C0202, // 0000 GE R3 R1 R2
- 0x780E0000, // 0001 JMPF R3 #0003
- 0xB0064724, // 0002 RAISE 1 K35 K36
- 0x90023201, // 0003 SETMBR R0 K25 R1
- 0x90023402, // 0004 SETMBR R0 K26 R2
- 0x8C0C011C, // 0005 GETMET R3 R0 K28
- 0x5C140200, // 0006 MOVE R5 R1
- 0x5C180400, // 0007 MOVE R6 R2
- 0x7C0C0600, // 0008 CALL R3 3
- 0x90021603, // 0009 SETMBR R0 K11 R3
- 0x80000000, // 000A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_value
-********************************************************************/
-be_local_closure(class_Animate_palette_set_value, /* name */
- be_nested_proto(
- 18, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(set_value),
- &be_const_str_solidified,
- ( &(const binstruction[95]) { /* code */
- 0x88080119, // 0000 GETMBR R2 R0 K25
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C080403, // 0002 EQ R2 R2 R3
- 0x740A0003, // 0003 JMPT R2 #0008
- 0x8808011A, // 0004 GETMBR R2 R0 K26
- 0x4C0C0000, // 0005 LDNIL R3
- 0x1C080403, // 0006 EQ R2 R2 R3
- 0x780A0001, // 0007 JMPF R2 #000A
- 0x4C080000, // 0008 LDNIL R2
- 0x80040400, // 0009 RET 1 R2
- 0xB80A0A00, // 000A GETNGBL R2 K5
- 0x88080522, // 000B GETMBR R2 R2 K34
- 0x880C0109, // 000C GETMBR R3 R0 K9
- 0x0410070A, // 000D SUB R4 R3 K10
- 0x24140903, // 000E GT R5 R4 K3
- 0x78160006, // 000F JMPF R5 #0017
- 0x8814010B, // 0010 GETMBR R5 R0 K11
- 0x94140A04, // 0011 GETIDX R5 R5 R4
- 0x28140205, // 0012 GE R5 R1 R5
- 0x78160000, // 0013 JMPF R5 #0015
- 0x70020001, // 0014 JMP #0017
- 0x04100902, // 0015 SUB R4 R4 K2
- 0x7001FFF6, // 0016 JMP #000E
- 0x8814010C, // 0017 GETMBR R5 R0 K12
- 0x8C140B0D, // 0018 GETMET R5 R5 K13
- 0x541E0003, // 0019 LDINT R7 4
- 0x081C0807, // 001A MUL R7 R4 R7
- 0x54220003, // 001B LDINT R8 4
- 0x7C140600, // 001C CALL R5 3
- 0x8818010C, // 001D GETMBR R6 R0 K12
- 0x8C180D0D, // 001E GETMET R6 R6 K13
- 0x00200902, // 001F ADD R8 R4 K2
- 0x54260003, // 0020 LDINT R9 4
- 0x08201009, // 0021 MUL R8 R8 R9
- 0x54260003, // 0022 LDINT R9 4
- 0x7C180600, // 0023 CALL R6 3
- 0x881C010B, // 0024 GETMBR R7 R0 K11
- 0x941C0E04, // 0025 GETIDX R7 R7 R4
- 0x00200902, // 0026 ADD R8 R4 K2
- 0x8824010B, // 0027 GETMBR R9 R0 K11
- 0x94201208, // 0028 GETIDX R8 R9 R8
- 0x5C240400, // 0029 MOVE R9 R2
- 0x5C280200, // 002A MOVE R10 R1
- 0x5C2C0E00, // 002B MOVE R11 R7
- 0x5C301000, // 002C MOVE R12 R8
- 0x54360007, // 002D LDINT R13 8
- 0x3C340A0D, // 002E SHR R13 R5 R13
- 0x543A00FE, // 002F LDINT R14 255
- 0x2C341A0E, // 0030 AND R13 R13 R14
- 0x543A0007, // 0031 LDINT R14 8
- 0x3C380C0E, // 0032 SHR R14 R6 R14
- 0x543E00FE, // 0033 LDINT R15 255
- 0x2C381C0F, // 0034 AND R14 R14 R15
- 0x7C240A00, // 0035 CALL R9 5
- 0x5C280400, // 0036 MOVE R10 R2
- 0x5C2C0200, // 0037 MOVE R11 R1
- 0x5C300E00, // 0038 MOVE R12 R7
- 0x5C341000, // 0039 MOVE R13 R8
- 0x543A000F, // 003A LDINT R14 16
- 0x3C380A0E, // 003B SHR R14 R5 R14
- 0x543E00FE, // 003C LDINT R15 255
- 0x2C381C0F, // 003D AND R14 R14 R15
- 0x543E000F, // 003E LDINT R15 16
- 0x3C3C0C0F, // 003F SHR R15 R6 R15
- 0x544200FE, // 0040 LDINT R16 255
- 0x2C3C1E10, // 0041 AND R15 R15 R16
- 0x7C280A00, // 0042 CALL R10 5
- 0x5C2C0400, // 0043 MOVE R11 R2
- 0x5C300200, // 0044 MOVE R12 R1
- 0x5C340E00, // 0045 MOVE R13 R7
- 0x5C381000, // 0046 MOVE R14 R8
- 0x543E0017, // 0047 LDINT R15 24
- 0x3C3C0A0F, // 0048 SHR R15 R5 R15
- 0x544200FE, // 0049 LDINT R16 255
- 0x2C3C1E10, // 004A AND R15 R15 R16
- 0x54420017, // 004B LDINT R16 24
- 0x3C400C10, // 004C SHR R16 R6 R16
- 0x544600FE, // 004D LDINT R17 255
- 0x2C402011, // 004E AND R16 R16 R17
- 0x7C2C0A00, // 004F CALL R11 5
- 0x5432000F, // 0050 LDINT R12 16
- 0x3830120C, // 0051 SHL R12 R9 R12
- 0x54360007, // 0052 LDINT R13 8
- 0x3834140D, // 0053 SHL R13 R10 R13
- 0x3030180D, // 0054 OR R12 R12 R13
- 0x3030180B, // 0055 OR R12 R12 R11
- 0x88340115, // 0056 GETMBR R13 R0 K21
- 0x88380116, // 0057 GETMBR R14 R0 K22
- 0x78360004, // 0058 JMPF R13 #005E
- 0x783A0003, // 0059 JMPF R14 #005E
- 0x5C3C1C00, // 005A MOVE R15 R14
- 0x5C401A00, // 005B MOVE R16 R13
- 0x5C441800, // 005C MOVE R17 R12
- 0x7C3C0400, // 005D CALL R15 2
- 0x80041800, // 005E RET 1 R12
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_duration
-********************************************************************/
-be_local_closure(class_Animate_palette_set_duration, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(set_duration),
- &be_const_str_solidified,
- ( &(const binstruction[14]) { /* code */
- 0x4C080000, // 0000 LDNIL R2
- 0x1C080202, // 0001 EQ R2 R1 R2
- 0x780A0000, // 0002 JMPF R2 #0004
- 0x80000400, // 0003 RET 0
- 0x18080303, // 0004 LE R2 R1 K3
- 0x780A0000, // 0005 JMPF R2 #0007
- 0xB0064725, // 0006 RAISE 1 K35 K37
- 0x90020801, // 0007 SETMBR R0 K4 R1
- 0x8C08011C, // 0008 GETMET R2 R0 K28
- 0x58100003, // 0009 LDCONST R4 K3
- 0x04140302, // 000A SUB R5 R1 K2
- 0x7C080600, // 000B CALL R2 3
- 0x90021602, // 000C SETMBR R0 K11 R2
- 0x80000000, // 000D RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_palette_init, /* name */
- be_nested_proto(
- 6, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_palette, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[19]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0726, // 0003 GETMET R3 R3 K38
- 0x7C0C0200, // 0004 CALL R3 1
- 0x90020802, // 0005 SETMBR R0 K4 R2
- 0x500C0000, // 0006 LDBOOL R3 0 0
- 0x90024E03, // 0007 SETMBR R0 K39 R3
- 0x540E0063, // 0008 LDINT R3 100
- 0x90022003, // 0009 SETMBR R0 K16 R3
- 0xB80E5000, // 000A GETNGBL R3 K40
- 0xB8125000, // 000B GETNGBL R4 K40
- 0x88100929, // 000C GETMBR R4 R4 K41
- 0x7C0C0200, // 000D CALL R3 1
- 0x90021C03, // 000E SETMBR R0 K14 R3
- 0x8C0C012A, // 000F GETMET R3 R0 K42
- 0x5C140200, // 0010 MOVE R5 R1
- 0x7C0C0400, // 0011 CALL R3 2
- 0x80000000, // 0012 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_palette
-********************************************************************/
-extern const bclass be_class_Animate_animator;
-be_local_class(Animate_palette,
- 7,
- &be_class_Animate_animator,
- be_nested_map(17,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(color, 13), be_const_var(6) },
- { be_const_key_weak(slots, -1), be_const_var(2) },
- { be_const_key_weak(animate, 11), be_const_closure(class_Animate_palette_animate_closure) },
- { be_const_key_weak(range_max, 10), be_const_var(4) },
- { be_const_key_weak(set_palette, -1), be_const_closure(class_Animate_palette_set_palette_closure) },
- { be_const_key_weak(set_bri, -1), be_const_closure(class_Animate_palette_set_bri_closure) },
- { be_const_key_weak(bri, -1), be_const_var(5) },
- { be_const_key_weak(to_css_gradient, 12), be_const_static_closure(class_Animate_palette_to_css_gradient_closure) },
- { be_const_key_weak(slots_arr, 1), be_const_var(1) },
- { be_const_key_weak(range_min, 5), be_const_var(3) },
- { be_const_key_weak(set_value, -1), be_const_closure(class_Animate_palette_set_value_closure) },
- { be_const_key_weak(set_range, -1), be_const_closure(class_Animate_palette_set_range_closure) },
- { be_const_key_weak(parse_palette, -1), be_const_closure(class_Animate_palette_parse_palette_closure) },
- { be_const_key_weak(palette, -1), be_const_var(0) },
- { be_const_key_weak(set_duration, -1), be_const_closure(class_Animate_palette_set_duration_closure) },
- { be_const_key_weak(init, -1), be_const_closure(class_Animate_palette_init_closure) },
- { be_const_key_weak(ptr_to_palette, 0), be_const_static_closure(class_Animate_palette_ptr_to_palette_closure) },
- })),
- be_str_weak(Animate_palette)
-);
-// compact class 'Animate_oscillator' ktab size: 21, total: 38 (saved 136 bytes)
-static const bvalue be_ktab_class_Animate_oscillator[21] = {
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(duty_cycle),
- /* K2 */ be_nested_str_weak(a),
- /* K3 */ be_nested_str_weak(b),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(form),
- /* K6 */ be_nested_str_weak(phase),
- /* K7 */ be_nested_str_weak(init),
- /* K8 */ be_nested_str_weak(duration_ms),
- /* K9 */ be_nested_str_weak(value),
- /* K10 */ be_nested_str_weak(tasmota),
- /* K11 */ be_nested_str_weak(millis),
- /* K12 */ be_nested_str_weak(origin),
- /* K13 */ be_nested_str_weak(scale_uint),
- /* K14 */ be_nested_str_weak(beat),
- /* K15 */ be_nested_str_weak(scale_int),
- /* K16 */ be_const_int(2),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(sine_int),
- /* K19 */ be_nested_str_weak(obj),
- /* K20 */ be_nested_str_weak(mth),
-};
-
-
-extern const bclass be_class_Animate_oscillator;
-
-/********************************************************************
-** Solidified function: set_duty_cycle
-********************************************************************/
-be_local_closure(class_Animate_oscillator_set_duty_cycle, /* name */
- be_nested_proto(
- 3, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(set_duty_cycle),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x14080300, // 0000 LT R2 R1 K0
- 0x780A0000, // 0001 JMPF R2 #0003
- 0x58040000, // 0002 LDCONST R1 K0
- 0x540A0063, // 0003 LDINT R2 100
- 0x24080202, // 0004 GT R2 R1 R2
- 0x780A0000, // 0005 JMPF R2 #0007
- 0x54060063, // 0006 LDINT R1 100
- 0x90020201, // 0007 SETMBR R0 K1 R1
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_a
-********************************************************************/
-be_local_closure(class_Animate_oscillator_set_a, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(set_a),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020401, // 0000 SETMBR R0 K2 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_b
-********************************************************************/
-be_local_closure(class_Animate_oscillator_set_b, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(set_b),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x90020601, // 0000 SETMBR R0 K3 R1
- 0x80000000, // 0001 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_form
-********************************************************************/
-be_local_closure(class_Animate_oscillator_set_form, /* name */
- be_nested_proto(
- 3, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(set_form),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x4C080000, // 0000 LDNIL R2
- 0x1C080202, // 0001 EQ R2 R1 R2
- 0x780A0000, // 0002 JMPF R2 #0004
- 0x58040004, // 0003 LDCONST R1 K4
- 0x90020A01, // 0004 SETMBR R0 K5 R1
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_phase
-********************************************************************/
-be_local_closure(class_Animate_oscillator_set_phase, /* name */
- be_nested_proto(
- 3, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(set_phase),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x14080300, // 0000 LT R2 R1 K0
- 0x780A0000, // 0001 JMPF R2 #0003
- 0x58040000, // 0002 LDCONST R1 K0
- 0x540A0063, // 0003 LDINT R2 100
- 0x24080202, // 0004 GT R2 R1 R2
- 0x780A0000, // 0005 JMPF R2 #0007
- 0x54060063, // 0006 LDINT R1 100
- 0x90020C01, // 0007 SETMBR R0 K6 R1
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Animate_oscillator_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 5, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[18]) { /* code */
- 0x60140003, // 0000 GETGBL R5 G3
- 0x5C180000, // 0001 MOVE R6 R0
- 0x7C140200, // 0002 CALL R5 1
- 0x8C140B07, // 0003 GETMET R5 R5 K7
- 0x7C140200, // 0004 CALL R5 1
- 0x90020D00, // 0005 SETMBR R0 K6 K0
- 0x54160031, // 0006 LDINT R5 50
- 0x90020205, // 0007 SETMBR R0 K1 R5
- 0x90020401, // 0008 SETMBR R0 K2 R1
- 0x90020602, // 0009 SETMBR R0 K3 R2
- 0x90021003, // 000A SETMBR R0 K8 R3
- 0x90021201, // 000B SETMBR R0 K9 R1
- 0x4C140000, // 000C LDNIL R5
- 0x1C140805, // 000D EQ R5 R4 R5
- 0x78160000, // 000E JMPF R5 #0010
- 0x58100004, // 000F LDCONST R4 K4
- 0x90020A04, // 0010 SETMBR R0 K5 R4
- 0x80000000, // 0011 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: animate
-********************************************************************/
-be_local_closure(class_Animate_oscillator_animate, /* name */
- be_nested_proto(
- 18, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Animate_oscillator, /* shared constants */
- be_str_weak(animate),
- &be_const_str_solidified,
- ( &(const binstruction[141]) { /* code */
- 0x88080108, // 0000 GETMBR R2 R0 K8
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C080403, // 0002 EQ R2 R2 R3
- 0x780A0000, // 0003 JMPF R2 #0005
- 0x80000400, // 0004 RET 0
- 0x4C080000, // 0005 LDNIL R2
- 0x1C080202, // 0006 EQ R2 R1 R2
- 0x780A0003, // 0007 JMPF R2 #000C
- 0xB80A1400, // 0008 GETNGBL R2 K10
- 0x8C08050B, // 0009 GETMET R2 R2 K11
- 0x7C080200, // 000A CALL R2 1
- 0x5C040400, // 000B MOVE R1 R2
- 0x8808010C, // 000C GETMBR R2 R0 K12
- 0x04080202, // 000D SUB R2 R1 R2
- 0x140C0500, // 000E LT R3 R2 K0
- 0x780E0001, // 000F JMPF R3 #0012
- 0x58080000, // 0010 LDCONST R2 K0
- 0x8804010C, // 0011 GETMBR R1 R0 K12
- 0x880C0108, // 0012 GETMBR R3 R0 K8
- 0x4C100000, // 0013 LDNIL R4
- 0xB8161400, // 0014 GETNGBL R5 K10
- 0x8C140B0D, // 0015 GETMET R5 R5 K13
- 0x881C0101, // 0016 GETMBR R7 R0 K1
- 0x58200000, // 0017 LDCONST R8 K0
- 0x54260063, // 0018 LDINT R9 100
- 0x58280000, // 0019 LDCONST R10 K0
- 0x5C2C0600, // 001A MOVE R11 R3
- 0x7C140C00, // 001B CALL R5 6
- 0x5C100A00, // 001C MOVE R4 R5
- 0x28140403, // 001D GE R5 R2 R3
- 0x78160007, // 001E JMPF R5 #0027
- 0x0C180403, // 001F DIV R6 R2 R3
- 0x08180C03, // 0020 MUL R6 R6 R3
- 0x8814010C, // 0021 GETMBR R5 R0 K12
- 0x00140A06, // 0022 ADD R5 R5 R6
- 0x90021805, // 0023 SETMBR R0 K12 R5
- 0x10080403, // 0024 MOD R2 R2 R3
- 0x8C14010E, // 0025 GETMET R5 R0 K14
- 0x7C140200, // 0026 CALL R5 1
- 0x88140102, // 0027 GETMBR R5 R0 K2
- 0x88180103, // 0028 GETMBR R6 R0 K3
- 0x881C0109, // 0029 GETMBR R7 R0 K9
- 0x5C200400, // 002A MOVE R8 R2
- 0x88240106, // 002B GETMBR R9 R0 K6
- 0x24241300, // 002C GT R9 R9 K0
- 0x7826000B, // 002D JMPF R9 #003A
- 0xB8261400, // 002E GETNGBL R9 K10
- 0x8C24130D, // 002F GETMET R9 R9 K13
- 0x882C0106, // 0030 GETMBR R11 R0 K6
- 0x58300000, // 0031 LDCONST R12 K0
- 0x54360063, // 0032 LDINT R13 100
- 0x58380000, // 0033 LDCONST R14 K0
- 0x5C3C0600, // 0034 MOVE R15 R3
- 0x7C240C00, // 0035 CALL R9 6
- 0x00201009, // 0036 ADD R8 R8 R9
- 0x24241003, // 0037 GT R9 R8 R3
- 0x78260000, // 0038 JMPF R9 #003A
- 0x04201003, // 0039 SUB R8 R8 R3
- 0x88240105, // 003A GETMBR R9 R0 K5
- 0x1C241304, // 003B EQ R9 R9 K4
- 0x78260009, // 003C JMPF R9 #0047
- 0xB8261400, // 003D GETNGBL R9 K10
- 0x8C24130F, // 003E GETMET R9 R9 K15
- 0x5C2C1000, // 003F MOVE R11 R8
- 0x58300000, // 0040 LDCONST R12 K0
- 0x04340704, // 0041 SUB R13 R3 K4
- 0x5C380A00, // 0042 MOVE R14 R5
- 0x5C3C0C00, // 0043 MOVE R15 R6
- 0x7C240C00, // 0044 CALL R9 6
- 0x5C1C1200, // 0045 MOVE R7 R9
- 0x7002003B, // 0046 JMP #0083
- 0x88240105, // 0047 GETMBR R9 R0 K5
- 0x1C241310, // 0048 EQ R9 R9 K16
- 0x78260015, // 0049 JMPF R9 #0060
- 0x14241004, // 004A LT R9 R8 R4
- 0x78260009, // 004B JMPF R9 #0056
- 0xB8261400, // 004C GETNGBL R9 K10
- 0x8C24130F, // 004D GETMET R9 R9 K15
- 0x5C2C1000, // 004E MOVE R11 R8
- 0x58300000, // 004F LDCONST R12 K0
- 0x04340904, // 0050 SUB R13 R4 K4
- 0x5C380A00, // 0051 MOVE R14 R5
- 0x5C3C0C00, // 0052 MOVE R15 R6
- 0x7C240C00, // 0053 CALL R9 6
- 0x5C1C1200, // 0054 MOVE R7 R9
- 0x70020008, // 0055 JMP #005F
- 0xB8261400, // 0056 GETNGBL R9 K10
- 0x8C24130F, // 0057 GETMET R9 R9 K15
- 0x5C2C1000, // 0058 MOVE R11 R8
- 0x5C300800, // 0059 MOVE R12 R4
- 0x04340704, // 005A SUB R13 R3 K4
- 0x5C380C00, // 005B MOVE R14 R6
- 0x5C3C0A00, // 005C MOVE R15 R5
- 0x7C240C00, // 005D CALL R9 6
- 0x5C1C1200, // 005E MOVE R7 R9
- 0x70020022, // 005F JMP #0083
- 0x88240105, // 0060 GETMBR R9 R0 K5
- 0x1C241311, // 0061 EQ R9 R9 K17
- 0x78260005, // 0062 JMPF R9 #0069
- 0x14241004, // 0063 LT R9 R8 R4
- 0x78260001, // 0064 JMPF R9 #0067
- 0x5C1C0A00, // 0065 MOVE R7 R5
- 0x70020000, // 0066 JMP #0068
- 0x5C1C0C00, // 0067 MOVE R7 R6
- 0x70020019, // 0068 JMP #0083
- 0x88240105, // 0069 GETMBR R9 R0 K5
- 0x542A0003, // 006A LDINT R10 4
- 0x1C24120A, // 006B EQ R9 R9 R10
- 0x78260015, // 006C JMPF R9 #0083
- 0xB8261400, // 006D GETNGBL R9 K10
- 0x8C24130F, // 006E GETMET R9 R9 K15
- 0x5C2C1000, // 006F MOVE R11 R8
- 0x58300000, // 0070 LDCONST R12 K0
- 0x04340704, // 0071 SUB R13 R3 K4
- 0x58380000, // 0072 LDCONST R14 K0
- 0x543E7FFE, // 0073 LDINT R15 32767
- 0x7C240C00, // 0074 CALL R9 6
- 0xB82A1400, // 0075 GETNGBL R10 K10
- 0x8C281512, // 0076 GETMET R10 R10 K18
- 0x54321FFF, // 0077 LDINT R12 8192
- 0x0430120C, // 0078 SUB R12 R9 R12
- 0x7C280400, // 0079 CALL R10 2
- 0xB82E1400, // 007A GETNGBL R11 K10
- 0x8C2C170F, // 007B GETMET R11 R11 K15
- 0x5C341400, // 007C MOVE R13 R10
- 0x5439EFFF, // 007D LDINT R14 -4096
- 0x543E0FFF, // 007E LDINT R15 4096
- 0x5C400A00, // 007F MOVE R16 R5
- 0x5C440C00, // 0080 MOVE R17 R6
- 0x7C2C0C00, // 0081 CALL R11 6
- 0x5C1C1600, // 0082 MOVE R7 R11
- 0x90021207, // 0083 SETMBR R0 K9 R7
- 0x88240113, // 0084 GETMBR R9 R0 K19
- 0x88280114, // 0085 GETMBR R10 R0 K20
- 0x78260004, // 0086 JMPF R9 #008C
- 0x782A0003, // 0087 JMPF R10 #008C
- 0x5C2C1400, // 0088 MOVE R11 R10
- 0x5C301200, // 0089 MOVE R12 R9
- 0x5C340E00, // 008A MOVE R13 R7
- 0x7C2C0400, // 008B CALL R11 2
- 0x80040E00, // 008C RET 1 R7
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Animate_oscillator
-********************************************************************/
-extern const bclass be_class_Animate_animator;
-be_local_class(Animate_oscillator,
- 6,
- &be_class_Animate_animator,
- be_nested_map(13,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(animate, -1), be_const_closure(class_Animate_oscillator_animate_closure) },
- { be_const_key_weak(a, -1), be_const_var(2) },
- { be_const_key_weak(init, 11), be_const_closure(class_Animate_oscillator_init_closure) },
- { be_const_key_weak(duty_cycle, 10), be_const_var(1) },
- { be_const_key_weak(b, -1), be_const_var(3) },
- { be_const_key_weak(value, -1), be_const_var(5) },
- { be_const_key_weak(set_duty_cycle, 2), be_const_closure(class_Animate_oscillator_set_duty_cycle_closure) },
- { be_const_key_weak(set_a, -1), be_const_closure(class_Animate_oscillator_set_a_closure) },
- { be_const_key_weak(set_b, -1), be_const_closure(class_Animate_oscillator_set_b_closure) },
- { be_const_key_weak(set_form, -1), be_const_closure(class_Animate_oscillator_set_form_closure) },
- { be_const_key_weak(phase, -1), be_const_var(0) },
- { be_const_key_weak(form, -1), be_const_var(4) },
- { be_const_key_weak(set_phase, 0), be_const_closure(class_Animate_oscillator_set_phase_closure) },
- })),
- be_str_weak(Animate_oscillator)
-);
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_animate/src/solidify/solidified_leds_frame_be_methods.h b/lib/libesp32/berry_animate/src/solidify/solidified_leds_frame_be_methods.h
deleted file mode 100644
index 4e2246ae4..000000000
--- a/lib/libesp32/berry_animate/src/solidify/solidified_leds_frame_be_methods.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Solidification of leds_frame_be_methods.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-// compact class 'Leds_frame_be' ktab size: 6, total: 7 (saved 8 bytes)
-static const bvalue be_ktab_class_Leds_frame_be[6] = {
- /* K0 */ be_nested_str(set),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str(setitem),
- /* K3 */ be_nested_str(get),
- /* K4 */ be_nested_str(pixel_size),
- /* K5 */ be_nested_str(init),
-};
-
-
-extern const bclass be_class_Leds_frame_be;
-
-/********************************************************************
-** Solidified function: setitem
-********************************************************************/
-be_local_closure(class_Leds_frame_be_setitem, /* name */
- be_nested_proto(
- 8, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_frame_be, /* shared constants */
- &be_const_str_setitem,
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x8C0C0100, // 0000 GETMET R3 R0 K0
- 0x54160003, // 0001 LDINT R5 4
- 0x08140205, // 0002 MUL R5 R1 R5
- 0x5C180400, // 0003 MOVE R6 R2
- 0x541E0003, // 0004 LDINT R7 4
- 0x7C0C0800, // 0005 CALL R3 4
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_pixel
-********************************************************************/
-be_local_closure(class_Leds_frame_be_set_pixel, /* name */
- be_nested_proto(
- 11, /* nstack */
- 6, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_frame_be, /* shared constants */
- &be_const_str_set_pixel,
- &be_const_str_solidified,
- ( &(const binstruction[26]) { /* code */
- 0x4C180000, // 0000 LDNIL R6
- 0x1C180A06, // 0001 EQ R6 R5 R6
- 0x781A0000, // 0002 JMPF R6 #0004
- 0x58140001, // 0003 LDCONST R5 K1
- 0x541A00FE, // 0004 LDINT R6 255
- 0x2C180A06, // 0005 AND R6 R5 R6
- 0x541E0017, // 0006 LDINT R7 24
- 0x38180C07, // 0007 SHL R6 R6 R7
- 0x541E00FE, // 0008 LDINT R7 255
- 0x2C1C0407, // 0009 AND R7 R2 R7
- 0x5422000F, // 000A LDINT R8 16
- 0x381C0E08, // 000B SHL R7 R7 R8
- 0x30180C07, // 000C OR R6 R6 R7
- 0x541E00FE, // 000D LDINT R7 255
- 0x2C1C0607, // 000E AND R7 R3 R7
- 0x54220007, // 000F LDINT R8 8
- 0x381C0E08, // 0010 SHL R7 R7 R8
- 0x30180C07, // 0011 OR R6 R6 R7
- 0x541E00FE, // 0012 LDINT R7 255
- 0x2C1C0807, // 0013 AND R7 R4 R7
- 0x30180C07, // 0014 OR R6 R6 R7
- 0x8C1C0102, // 0015 GETMET R7 R0 K2
- 0x5C240200, // 0016 MOVE R9 R1
- 0x5C280C00, // 0017 MOVE R10 R6
- 0x7C1C0600, // 0018 CALL R7 3
- 0x80000000, // 0019 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: item
-********************************************************************/
-be_local_closure(class_Leds_frame_be_item, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_frame_be, /* shared constants */
- &be_const_str_item,
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C080103, // 0000 GETMET R2 R0 K3
- 0x54120003, // 0001 LDINT R4 4
- 0x08100204, // 0002 MUL R4 R1 R4
- 0x54160003, // 0003 LDINT R5 4
- 0x7C080600, // 0004 CALL R2 3
- 0x80040400, // 0005 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Leds_frame_be_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_frame_be, /* shared constants */
- &be_const_str_init,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x14080301, // 0000 LT R2 R1 K1
- 0x780A0000, // 0001 JMPF R2 #0003
- 0x44040200, // 0002 NEG R1 R1
- 0x90020801, // 0003 SETMBR R0 K4 R1
- 0x60080003, // 0004 GETGBL R2 G3
- 0x5C0C0000, // 0005 MOVE R3 R0
- 0x7C080200, // 0006 CALL R2 1
- 0x8C080505, // 0007 GETMET R2 R2 K5
- 0x5411FFFB, // 0008 LDINT R4 -4
- 0x08100204, // 0009 MUL R4 R1 R4
- 0x7C080400, // 000A CALL R2 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Leds_frame_be
-********************************************************************/
-be_local_class(Leds_frame_be,
- 0,
- NULL,
- be_nested_map(4,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key(setitem, 1), be_const_closure(class_Leds_frame_be_setitem_closure) },
- { be_const_key(set_pixel, -1), be_const_closure(class_Leds_frame_be_set_pixel_closure) },
- { be_const_key(item, -1), be_const_closure(class_Leds_frame_be_item_closure) },
- { be_const_key(init, -1), be_const_closure(class_Leds_frame_be_init_closure) },
- })),
- (bstring*) &be_const_str_Leds_frame_be
-);
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_animation/src/core/frame_buffer_ntv.be b/lib/libesp32/berry_animation/src/core/frame_buffer_ntv.be
index bb043b0e7..7455aa1cb 100644
--- a/lib/libesp32/berry_animation/src/core/frame_buffer_ntv.be
+++ b/lib/libesp32/berry_animation/src/core/frame_buffer_ntv.be
@@ -57,9 +57,6 @@ class FrameBufferNtv
# Linear interpolation between two colors using explicit blend factor
# Returns the blended color as a 32-bit integer (ARGB format - 0xAARRGGBB)
#
- # This function matches the original berry_animate frame.blend(color1, color2, blend_factor) behavior
- # Used for creating smooth gradients like beacon slew regions
- #
# color1: destination/background color (ARGB format - 0xAARRGGBB)
# color2: source/foreground color (ARGB format - 0xAARRGGBB)
# blend_factor: blend factor (0-255 integer)
diff --git a/pio-tools/gen-berry-structures.py b/pio-tools/gen-berry-structures.py
index 7d94cfddd..c59360b13 100644
--- a/pio-tools/gen-berry-structures.py
+++ b/pio-tools/gen-berry-structures.py
@@ -16,6 +16,6 @@ for filePath in fileList:
# print("Deleting file : ", filePath)
except:
print("Error while deleting file : ", filePath)
-cmd = (env["PYTHONEXE"],join("tools","coc","coc"),"-o","generate","src","default",join("..","berry_tasmota","src"),join("..","berry_matter","src","solidify"),join("..","berry_matter","src"),join("..","berry_custom","src","solidify"),join("..","berry_custom","src"),join("..","berry_animate","src","solidify"),join("..","berry_animate","src"),join("..","berry_animation","src","solidify"),join("..","berry_animation","src"),join("..","berry_tasmota","src","solidify"),join("..","berry_mapping","src"),join("..","berry_int64","src"),join("..","..","libesp32_lvgl","lv_binding_berry","src"),join("..","..","libesp32_lvgl","lv_binding_berry","src","solidify"),join("..","..","libesp32_lvgl","lv_binding_berry","generate"),join("..","..","libesp32_lvgl","lv_haspmota","src","solidify"),"-c",join("default","berry_conf.h"))
+cmd = (env["PYTHONEXE"],join("tools","coc","coc"),"-o","generate","src","default",join("..","berry_tasmota","src"),join("..","berry_matter","src","solidify"),join("..","berry_matter","src"),join("..","berry_custom","src","solidify"),join("..","berry_custom","src"),join("..","berry_animation","src","solidify"),join("..","berry_animation","src"),join("..","berry_tasmota","src","solidify"),join("..","berry_mapping","src"),join("..","berry_int64","src"),join("..","..","libesp32_lvgl","lv_binding_berry","src"),join("..","..","libesp32_lvgl","lv_binding_berry","src","solidify"),join("..","..","libesp32_lvgl","lv_binding_berry","generate"),join("..","..","libesp32_lvgl","lv_haspmota","src","solidify"),"-c",join("default","berry_conf.h"))
returncode = subprocess.call(cmd, shell=False)
os.chdir(CURRENT_DIR)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index d2e7089bf..bfd940c4f 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -623,7 +623,6 @@
// #define USE_LIGHT_ARTNET // Add support for DMX/ArtNet via UDP on port 6454 (+3.5k code)
#define USE_LIGHT_ARTNET_MCAST 239,255,25,54 // Multicast address used to listen: 239.255.25.54
- #define USE_BERRY_ANIMATE // Legacy tentative for LED animation framework, DEPRECATED
// #define USE_BERRY_ANIMATION // New animation framework with dedicated language (ESP32x only, experimental, 94k not yet optimized)
// #define USE_BERRY_ANIMATION_DSL // DSL transpiler for new animation framework (not mandatory if DSL is transpiled externally, +98k not optimized yet)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino
index 0317472c5..8121e37a3 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino
@@ -32,9 +32,6 @@ extern "C" {
#include "berry_matter.h"
#endif
#ifdef USE_WS2812
- #ifdef USE_BERRY_ANIMATE
- #include "berry_animate.h"
- #endif // USE_BERRY_ANIMATE
#ifdef USE_BERRY_ANIMATION
#include "berry_animation.h"
#endif // USE_BERRY_ANIMATION