From 4d7036db3bfebf5294527a94061e4ca1a80d7fc0 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:18:31 +0100 Subject: [PATCH] HASPmota solidify server-side (#20938) --- .github/workflows/Tasmota_build_devel.yml | 10 +- CHANGELOG.md | 1 + lib/libesp32_lvgl/lv_haspmota/solidify_all.be | 99 + .../lv_haspmota/src/be_lv_haspmota.c | 38 +- .../lv_haspmota/src/embedded/lv_0_module.be | 23 + .../src/embedded/lv_1_constants.be} | 0 .../embedded/{haspmota.be => lv_haspmota.be} | 87 +- .../src/solidify/solidified_lv_0_module.h | 7 + .../src/solidify/solidified_lv_1_constants.h | 7 + ..._solidified.h => solidified_lv_haspmota.h} | 5377 +++++++++-------- 10 files changed, 2899 insertions(+), 2750 deletions(-) create mode 100755 lib/libesp32_lvgl/lv_haspmota/solidify_all.be create mode 100644 lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_0_module.be rename lib/libesp32_lvgl/{lv_binding_berry/tools/lv_constants.be => lv_haspmota/src/embedded/lv_1_constants.be} (100%) rename lib/libesp32_lvgl/lv_haspmota/src/embedded/{haspmota.be => lv_haspmota.be} (98%) create mode 100644 lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_0_module.h create mode 100644 lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_1_constants.h rename lib/libesp32_lvgl/lv_haspmota/src/solidify/{be_lv_haspmota_solidified.h => solidified_lv_haspmota.h} (99%) diff --git a/.github/workflows/Tasmota_build_devel.yml b/.github/workflows/Tasmota_build_devel.yml index bc548de48..97f79b62d 100644 --- a/.github/workflows/Tasmota_build_devel.yml +++ b/.github/workflows/Tasmota_build_devel.yml @@ -46,10 +46,14 @@ jobs: run: | cd lib/libesp32_lvgl/lv_binding_berry ../../libesp32/berry/berry -s -g solidify_all.be + - name: HASPmota Berry Code + run: | + cd lib/libesp32_lvgl/lv_haspmota + ../../libesp32/berry/berry -s -g solidify_all.be - uses: jason2866/upload-artifact@v2.0.3 with: - name: '["berry_tasmota", "berry_matter", "berry_animate", "berry_lvgl", "berry_header"]' - path: '["./lib/libesp32/berry_tasmota/src/solidify", "./lib/libesp32/berry_matter/src/solidify", "./lib/libesp32/berry_animate/src/solidify", "./lib/libesp32_lvgl/lv_binding_berry/src/solidify", "./lib/libesp32/berry/generate"]' + name: '["berry_tasmota", "berry_matter", "berry_animate", "berry_lvgl", "berry_haspmota", "berry_header"]' + path: '["./lib/libesp32/berry_tasmota/src/solidify", "./lib/libesp32/berry_matter/src/solidify", "./lib/libesp32/berry_animate/src/solidify", "./lib/libesp32_lvgl/lv_binding_berry/src/solidify", "./lib/libesp32_lvgl/lv_haspmota/src/solidify", "./lib/libesp32/berry/generate"]' push_solidified: needs: be_solidify @@ -69,12 +73,14 @@ jobs: berry_matter berry_animate berry_lvgl + berry_haspmota berry_header path: | ./lib/libesp32/berry_tasmota/src/solidify ./lib/libesp32/berry_matter/src/solidify ./lib/libesp32/berry_animate/src/solidify ./lib/libesp32_lvgl/lv_binding_berry/src/solidify + ./lib/libesp32_lvgl/lv_haspmota/src/solidify ./lib/libesp32/berry/generate - uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 329fbf4aa..a428dfe5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file. - LVGL optimize fonts and add icons (#20880) - LVGL improved readability of montserrat-10 (#20900) - HASPmota moved to a distinct library `lv_haspmota` +- HASPmota solidify server-side ### Fixed - Berry bug when parsing ternary operator (#20839) diff --git a/lib/libesp32_lvgl/lv_haspmota/solidify_all.be b/lib/libesp32_lvgl/lv_haspmota/solidify_all.be new file mode 100755 index 000000000..32b034922 --- /dev/null +++ b/lib/libesp32_lvgl/lv_haspmota/solidify_all.be @@ -0,0 +1,99 @@ +#!/usr/bin/env -S ../../libesp32/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 + 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_lvgl/lv_haspmota/src/be_lv_haspmota.c b/lib/libesp32_lvgl/lv_haspmota/src/be_lv_haspmota.c index 5a27f2c56..91e0ec7a8 100644 --- a/lib/libesp32_lvgl/lv_haspmota/src/be_lv_haspmota.c +++ b/lib/libesp32_lvgl/lv_haspmota/src/be_lv_haspmota.c @@ -1,2 +1,38 @@ +/******************************************************************** + * Tasmota HASPmota solidified + *******************************************************************/ +#include "be_constobj.h" -#include "solidify/be_lv_haspmota_solidified.h" +#ifdef USE_LVGL +#ifdef USE_LVGL_HASPMOTA + +extern const bclass be_class_lv_page; +extern const bclass be_class_lv_obj; +extern const bclass be_class_lv_scr; +extern const bclass be_class_lv_btn; +extern const bclass be_class_lv_switch; +extern const bclass be_class_lv_checkbox; +extern const bclass be_class_lv_label; +extern const bclass be_class_lv_spinner; +extern const bclass be_class_lv_line; +extern const bclass be_class_lv_img; +extern const bclass be_class_lv_roller; +extern const bclass be_class_lv_btnmatrix; +extern const bclass be_class_lv_bar; +extern const bclass be_class_lv_slider; +extern const bclass be_class_lv_arc; +extern const bclass be_class_lv_led; +extern const bclass be_class_lv_dropdown; +extern const bclass be_class_lv_scale; +extern const bclass be_class_lv_qrcode; +extern const bclass be_class_lv_chart; +extern const bclass be_class_lv_spangroup; +extern const bclass be_class_lv_span; +extern const bclass be_class_lv_button; +extern const bclass be_class_lv_image; +extern const bclass be_class_lv_buttonmatrix; + +#include "solidify/solidified_lv_haspmota.h" + +#endif // USE_LVGL_HASPMOTA +#endif // USE_LVGL diff --git a/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_0_module.be b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_0_module.be new file mode 100644 index 000000000..c393e025a --- /dev/null +++ b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_0_module.be @@ -0,0 +1,23 @@ +# LVGL prepare for lv_haspmota solidification +# mock `lv` module + +lv = module('lv') + +import global +tasmota = nil + +var classes = [ + "page", "obj", "scr", + "btn", "switch", "checkbox", + "label", "spinner", "line", "img", "roller", "btnmatrix", + "bar", "slider", "arc", "textarea", "led", "dropdown", + "scale", + "qrcode", "chart", "spangroup", "span", + # new internal names + "button", "image", "buttonmatrix", + ] + +for cl: classes + var s = f"class lv_{cl} end lv.{cl} = lv_{cl}" + compile(s)() +end diff --git a/lib/libesp32_lvgl/lv_binding_berry/tools/lv_constants.be b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_1_constants.be similarity index 100% rename from lib/libesp32_lvgl/lv_binding_berry/tools/lv_constants.be rename to lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_1_constants.be diff --git a/lib/libesp32_lvgl/lv_haspmota/src/embedded/haspmota.be b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be similarity index 98% rename from lib/libesp32_lvgl/lv_haspmota/src/embedded/haspmota.be rename to lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be index d72ed5f8f..868ae41ac 100644 --- a/lib/libesp32_lvgl/lv_haspmota/src/embedded/haspmota.be +++ b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be @@ -6,15 +6,7 @@ # # rm haspmota.tapp; zip -j -0 haspmota.tapp haspmota_core/* ################################################################################# -# How to solidify (needs an ESP32 with PSRAM) -#- -import path -path.remove("haspmota.bec") -load('haspmota.be') -global.solidify_haspmota() - --# var haspmota = module("haspmota") ################################################################################# @@ -23,6 +15,7 @@ var haspmota = module("haspmota") # Allows to map either a `lv_obj` for LVGL or arbitrary object # ################################################################################# +#@ solidify:lvh_root,weak class lvh_root static var _lv_class = nil # _lv_class refers to the lvgl class encapsulated, and is overriden by subclasses @@ -506,6 +499,7 @@ end # Adds specific virtual members used by HASPmota ################################################################################# ################################################################################# +#@ solidify:lvh_obj,weak class lvh_obj : lvh_root static var _lv_class = lv.obj # _lv_class refers to the lvgl class encapsulated, and is overriden by subclasses static var _lv_part2_selector # selector for secondary part (like knob of arc) @@ -1050,6 +1044,7 @@ end #==================================================================== # label #==================================================================== +#@ solidify:lvh_label,weak class lvh_label : lvh_obj static var _lv_class = lv.label # label do not need a sub-label @@ -1062,6 +1057,7 @@ end #==================================================================== # arc #==================================================================== +#@ solidify:lvh_arc,weak class lvh_arc : lvh_obj static var _lv_class = lv.arc static var _lv_part2_selector = lv.PART_KNOB @@ -1141,6 +1137,7 @@ end #==================================================================== # switch #==================================================================== +#@ solidify:lvh_switch,weak class lvh_switch : lvh_obj static var _lv_class = lv.switch static var _lv_part2_selector = lv.PART_KNOB @@ -1157,6 +1154,7 @@ end #==================================================================== # spinner #==================================================================== +#@ solidify:lvh_spinner,weak class lvh_spinner : lvh_arc static var _lv_class = lv.spinner var _speed, _angle @@ -1183,6 +1181,7 @@ end #==================================================================== # img #==================================================================== +#@ solidify:lvh_img,weak class lvh_img : lvh_obj static var _lv_class = lv.image var _raw # used to store raw image in RAM @@ -1234,6 +1233,7 @@ end #==================================================================== # qrcode #==================================================================== +#@ solidify:lvh_qrcode,weak class lvh_qrcode : lvh_obj static var _lv_class = lv.qrcode var qr_text # any change needs the text to be update again @@ -1271,6 +1271,7 @@ end #==================================================================== # slider #==================================================================== +#@ solidify:lvh_slider,weak class lvh_slider : lvh_obj static var _lv_class = lv.slider @@ -1295,6 +1296,7 @@ end #==================================================================== # roller #==================================================================== +#@ solidify:lvh_roller,weak class lvh_roller : lvh_obj static var _lv_class = lv.roller @@ -1328,6 +1330,7 @@ end #==================================================================== # led #==================================================================== +#@ solidify:lvh_led,weak class lvh_led : lvh_obj static var _lv_class = lv.led @@ -1351,6 +1354,7 @@ end #==================================================================== # dropdown #==================================================================== +#@ solidify:lvh_dropdown,weak class lvh_dropdown : lvh_obj static var _lv_class = lv.dropdown static var _dir = [ lv.DIR_BOTTOM, lv.DIR_TOP, lv.DIR_LEFT, lv.DIR_RIGHT ] # 0 = down, 1 = up, 2 = left, 3 = right @@ -1419,6 +1423,7 @@ end #==================================================================== # bar #==================================================================== +#@ solidify:lvh_bar,weak class lvh_bar : lvh_obj static var _lv_class = lv.bar @@ -1443,6 +1448,7 @@ end #==================================================================== # scale #==================================================================== +#@ solidify:lvh_scale,weak class lvh_scale : lvh_obj static var _lv_class = lv.scale var _options # need to keep the reference alive to avoid GC @@ -1478,6 +1484,7 @@ end #==================================================================== # spangroup #==================================================================== +#@ solidify:lvh_spangroup,weak class lvh_spangroup : lvh_obj static var _lv_class = lv.spangroup # label do not need a sub-label @@ -1495,6 +1502,7 @@ end #==================================================================== # span #==================================================================== +#@ solidify:lvh_span,weak class lvh_span : lvh_root static var _lv_class = nil # label do not need a sub-label @@ -1609,6 +1617,7 @@ end # Special case for lv.chart # Adapted to getting values one after the other ################################################################################# +#@ solidify:lvh_chart,weak class lvh_chart : lvh_obj static var _lv_class = lv.chart # ser1/ser2 contains the first/second series of data @@ -1682,6 +1691,7 @@ end #==================================================================== # line #==================================================================== +#@ solidify:lvh_line,weak class lvh_line : lvh_obj static var _lv_class = lv.line var _lv_points # needs to save to avoid garbage collection @@ -1709,8 +1719,9 @@ end #==================================================================== # btnmatrix #==================================================================== +#@ solidify:lvh_btnmatrix,weak class lvh_btnmatrix : lvh_obj - static var _lv_class = lv.btnmatrix + static var _lv_class = lv.buttonmatrix var _options # need to keep the reference alive to avoid GC var _options_arr # need to keep the reference alive to avoid GC @@ -1734,10 +1745,13 @@ end # and doesn't have any specific behavior # ################################################################################# -class lvh_btn : lvh_obj static var _lv_class = lv.btn end +#@ solidify:lvh_btn,weak +class lvh_btn : lvh_obj static var _lv_class = lv.button end +#@ solidify:lvh_checkbox,weak class lvh_checkbox : lvh_obj static var _lv_class = lv.checkbox end # class lvh_textarea : lvh_obj static var _lv_class = lv.textarea end # special case for scr (which is actually lv_obj) +#@ solidify:lvh_scr,weak class lvh_scr : lvh_obj static var _lv_class = nil end # no class for screen @@ -1748,6 +1762,7 @@ class lvh_scr : lvh_obj static var _lv_class = nil end # n ################################################################################# # # ex of transition: lv.scr_load_anim(scr, lv.SCR_LOAD_ANIM_MOVE_RIGHT, 500, 0, false) +#@ solidify:lvh_page,weak class lvh_page var _obj_id # (map) of `lvh_obj` objects by id numbers var _page_id # (int) id number of this page @@ -2401,56 +2416,6 @@ haspmota.init = def (m) # `init(m)` is called during first `import haspm return oh() end -################################################################################# -# Solidify -################################################################################# -def solidify_haspmota() - import path - path.remove("haspmota.bec") - import solidify - import introspect - - var classes = [ - "root", - "page", "obj", "scr", - "btn", "switch", "checkbox", - "label", "spinner", "line", "img", "roller", "btnmatrix", - "bar", "slider", "arc", #- "textarea", -# "led", "dropdown", - "scale", - "qrcode", "chart", "spangroup", "span", - # new internal names - "button", "image", "buttonmatrix", - ] - var f = open("be_lv_haspmota_solidified.h", "w") - f.write( - '/********************************************************************\n' - ' * Tasmota HASPmota solidified\n' - ' *******************************************************************/\n' - '#include "be_constobj.h"\n' - '\n' - '#ifdef USE_LVGL\n' - '#ifdef USE_LVGL_HASPMOTA\n' - '\n' - ) - for c:classes - f.write(f'extern const bclass be_class_lv_{c};\n') - end - - for c:classes - if introspect.contains(haspmota.HASPmota, "lvh_"+c) - solidify.dump(haspmota.HASPmota.("lvh_"+c), true, f) - end - end - solidify.dump(haspmota, true, f) - - f.write( - '\n' - '#endif // USE_LVGL_HASPMOTA\n' - '#endif // USE_LVGL\n' - ) - f.close() - print("Ok") -end - +#@ solidify:haspmota,weak global.haspmota = haspmota return haspmota diff --git a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_0_module.h b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_0_module.h new file mode 100644 index 000000000..338a10cb6 --- /dev/null +++ b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_0_module.h @@ -0,0 +1,7 @@ +/* Solidification of lv_0_module.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_1_constants.h b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_1_constants.h new file mode 100644 index 000000000..d9aa7a4cc --- /dev/null +++ b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_1_constants.h @@ -0,0 +1,7 @@ +/* Solidification of lv_1_constants.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32_lvgl/lv_haspmota/src/solidify/be_lv_haspmota_solidified.h b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h similarity index 99% rename from lib/libesp32_lvgl/lv_haspmota/src/solidify/be_lv_haspmota_solidified.h rename to lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h index 55ba560e9..fad8632c4 100644 --- a/lib/libesp32_lvgl/lv_haspmota/src/solidify/be_lv_haspmota_solidified.h +++ b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h @@ -1,38 +1,9 @@ -/******************************************************************** - * Tasmota HASPmota solidified - *******************************************************************/ +/* Solidification of lv_haspmota.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ #include "be_constobj.h" -#ifdef USE_LVGL -#ifdef USE_LVGL_HASPMOTA - -extern const bclass be_class_lv_root; -extern const bclass be_class_lv_page; -extern const bclass be_class_lv_obj; -extern const bclass be_class_lv_scr; -extern const bclass be_class_lv_btn; -extern const bclass be_class_lv_switch; -extern const bclass be_class_lv_checkbox; -extern const bclass be_class_lv_label; -extern const bclass be_class_lv_spinner; -extern const bclass be_class_lv_line; -extern const bclass be_class_lv_img; -extern const bclass be_class_lv_roller; -extern const bclass be_class_lv_btnmatrix; -extern const bclass be_class_lv_bar; -extern const bclass be_class_lv_slider; -extern const bclass be_class_lv_arc; -extern const bclass be_class_lv_led; -extern const bclass be_class_lv_dropdown; -extern const bclass be_class_lv_scale; -extern const bclass be_class_lv_qrcode; -extern const bclass be_class_lv_chart; -extern const bclass be_class_lv_spangroup; -extern const bclass be_class_lv_span; -extern const bclass be_class_lv_button; -extern const bclass be_class_lv_image; -extern const bclass be_class_lv_buttonmatrix; - extern const bclass be_class_lvh_root; /******************************************************************** @@ -1503,492 +1474,6 @@ void be_load_lvh_root_class(bvm *vm) { be_pop(vm, 1); } -extern const bclass be_class_lvh_page; - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(lvh_page_init, /* name */ - be_nested_proto( - 10, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(global), - /* K1 */ be_nested_str_weak(_oh), - /* K2 */ be_const_int(1), - /* K3 */ be_nested_str_weak(_page_id), - /* K4 */ be_nested_str_weak(_obj_id), - /* K5 */ be_nested_str_weak(_lv_scr), - /* K6 */ be_nested_str_weak(lv), - /* K7 */ be_nested_str_weak(scr_act), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(layer_top), - /* K10 */ be_nested_str_weak(obj), - /* K11 */ be_nested_str_weak(get_style_bg_color), - /* K12 */ be_nested_str_weak(set_style_bg_color), - /* K13 */ be_nested_str_weak(lvh_scr), - /* K14 */ be_nested_str_weak(p), - /* K15 */ be_nested_str_weak(b0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[66]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x60100009, // 0002 GETGBL R4 G9 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C100200, // 0004 CALL R4 1 - 0x5C040800, // 0005 MOVE R1 R4 - 0x4C100000, // 0006 LDNIL R4 - 0x1C100204, // 0007 EQ R4 R1 R4 - 0x78120000, // 0008 JMPF R4 #000A - 0x58040002, // 0009 LDCONST R1 K2 - 0x90020601, // 000A SETMBR R0 K3 R1 - 0x60100013, // 000B GETGBL R4 G19 - 0x7C100000, // 000C CALL R4 0 - 0x90020804, // 000D SETMBR R0 K4 R4 - 0x1C100302, // 000E EQ R4 R1 K2 - 0x78120004, // 000F JMPF R4 #0015 - 0xB8120C00, // 0010 GETNGBL R4 K6 - 0x8C100907, // 0011 GETMET R4 R4 K7 - 0x7C100200, // 0012 CALL R4 1 - 0x90020A04, // 0013 SETMBR R0 K5 R4 - 0x70020016, // 0014 JMP #002C - 0x1C100308, // 0015 EQ R4 R1 K8 - 0x78120004, // 0016 JMPF R4 #001C - 0xB8120C00, // 0017 GETNGBL R4 K6 - 0x8C100909, // 0018 GETMET R4 R4 K9 - 0x7C100200, // 0019 CALL R4 1 - 0x90020A04, // 001A SETMBR R0 K5 R4 - 0x7002000F, // 001B JMP #002C - 0xB8120C00, // 001C GETNGBL R4 K6 - 0x8C10090A, // 001D GETMET R4 R4 K10 - 0x58180008, // 001E LDCONST R6 K8 - 0x7C100400, // 001F CALL R4 2 - 0x90020A04, // 0020 SETMBR R0 K5 R4 - 0xB8120C00, // 0021 GETNGBL R4 K6 - 0x8C100907, // 0022 GETMET R4 R4 K7 - 0x7C100200, // 0023 CALL R4 1 - 0x8C10090B, // 0024 GETMET R4 R4 K11 - 0x58180008, // 0025 LDCONST R6 K8 - 0x7C100400, // 0026 CALL R4 2 - 0x88140105, // 0027 GETMBR R5 R0 K5 - 0x8C140B0C, // 0028 GETMET R5 R5 K12 - 0x5C1C0800, // 0029 MOVE R7 R4 - 0x58200008, // 002A LDCONST R8 K8 - 0x7C140600, // 002B CALL R5 3 - 0x88100101, // 002C GETMBR R4 R0 K1 - 0x8810090D, // 002D GETMBR R4 R4 K13 - 0x5C140800, // 002E MOVE R5 R4 - 0x4C180000, // 002F LDNIL R6 - 0x5C1C0000, // 0030 MOVE R7 R0 - 0x4C200000, // 0031 LDNIL R8 - 0x88240105, // 0032 GETMBR R9 R0 K5 - 0x7C140800, // 0033 CALL R5 4 - 0x88180104, // 0034 GETMBR R6 R0 K4 - 0x981A1005, // 0035 SETIDX R6 K8 R5 - 0x60180008, // 0036 GETGBL R6 G8 - 0x881C0103, // 0037 GETMBR R7 R0 K3 - 0x7C180200, // 0038 CALL R6 1 - 0x001A1C06, // 0039 ADD R6 K14 R6 - 0x900C0C00, // 003A SETMBR R3 R6 R0 - 0x60180008, // 003B GETGBL R6 G8 - 0x881C0103, // 003C GETMBR R7 R0 K3 - 0x7C180200, // 003D CALL R6 1 - 0x001A1C06, // 003E ADD R6 K14 R6 - 0x00180D0F, // 003F ADD R6 R6 K15 - 0x900C0C05, // 0040 SETMBR R3 R6 R5 - 0x80000000, // 0041 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: show -********************************************************************/ -be_local_closure(lvh_page_show, /* name */ - be_nested_proto( - 13, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 3, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 3), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(publish_rule), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8020000, // 0000 GETNGBL R0 K0 - 0x8C000101, // 0001 GETMET R0 R0 K1 - 0x68080000, // 0002 GETUPV R2 U0 - 0x7C000400, // 0003 CALL R0 2 - 0x80040000, // 0004 RET 1 R0 - }) - ), - be_nested_proto( - 3, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 4), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(publish_rule), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8020000, // 0000 GETNGBL R0 K0 - 0x8C000101, // 0001 GETMET R0 R0 K1 - 0x68080000, // 0002 GETUPV R2 U0 - 0x7C000400, // 0003 CALL R0 2 - 0x80040000, // 0004 RET 1 R0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_scr), - /* K1 */ be_nested_str_weak(_p), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(scr_act), - /* K4 */ be_nested_str_weak(_oh), - /* K5 */ be_nested_str_weak(page_dir_to), - /* K6 */ be_nested_str_weak(id), - /* K7 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D), - /* K8 */ be_nested_str_weak(lvh_page_cur_idx), - /* K9 */ be_nested_str_weak(tasmota), - /* K10 */ be_nested_str_weak(set_timer), - /* K11 */ be_const_int(0), - /* K12 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D), - /* K13 */ be_nested_str_weak(_page_id), - /* K14 */ be_nested_str_weak(show_anim), - /* K15 */ be_nested_str_weak(find), - /* K16 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE), - /* K17 */ be_nested_str_weak(screen_load_anim), - }), - be_str_weak(show), - &be_const_str_solidified, - ( &(const binstruction[66]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x4C100000, // 0001 LDNIL R4 - 0x1C0C0604, // 0002 EQ R3 R3 R4 - 0x780E0001, // 0003 JMPF R3 #0006 - 0x4C0C0000, // 0004 LDNIL R3 - 0x80040600, // 0005 RET 1 R3 - 0x880C0100, // 0006 GETMBR R3 R0 K0 - 0x880C0701, // 0007 GETMBR R3 R3 K1 - 0xB8120400, // 0008 GETNGBL R4 K2 - 0x8C100903, // 0009 GETMET R4 R4 K3 - 0x7C100200, // 000A CALL R4 1 - 0x88100901, // 000B GETMBR R4 R4 K1 - 0x1C0C0604, // 000C EQ R3 R3 R4 - 0x780E0000, // 000D JMPF R3 #000F - 0x80000600, // 000E RET 0 - 0x4C0C0000, // 000F LDNIL R3 - 0x1C0C0403, // 0010 EQ R3 R2 R3 - 0x780E0000, // 0011 JMPF R3 #0013 - 0x540A01F3, // 0012 LDINT R2 500 - 0x4C0C0000, // 0013 LDNIL R3 - 0x1C0C0203, // 0014 EQ R3 R1 R3 - 0x780E0005, // 0015 JMPF R3 #001C - 0x880C0104, // 0016 GETMBR R3 R0 K4 - 0x8C0C0705, // 0017 GETMET R3 R3 K5 - 0x8C140106, // 0018 GETMET R5 R0 K6 - 0x7C140200, // 0019 CALL R5 1 - 0x7C0C0400, // 001A CALL R3 2 - 0x5C040600, // 001B MOVE R1 R3 - 0x600C0018, // 001C GETGBL R3 G24 - 0x58100007, // 001D LDCONST R4 K7 - 0x88140104, // 001E GETMBR R5 R0 K4 - 0x88140B08, // 001F GETMBR R5 R5 K8 - 0x7C0C0400, // 0020 CALL R3 2 - 0xB8121200, // 0021 GETNGBL R4 K9 - 0x8C10090A, // 0022 GETMET R4 R4 K10 - 0x5818000B, // 0023 LDCONST R6 K11 - 0x841C0000, // 0024 CLOSURE R7 P0 - 0x7C100600, // 0025 CALL R4 3 - 0x60100018, // 0026 GETGBL R4 G24 - 0x5814000C, // 0027 LDCONST R5 K12 - 0x8818010D, // 0028 GETMBR R6 R0 K13 - 0x7C100400, // 0029 CALL R4 2 - 0xB8161200, // 002A GETNGBL R5 K9 - 0x8C140B0A, // 002B GETMET R5 R5 K10 - 0x581C000B, // 002C LDCONST R7 K11 - 0x84200001, // 002D CLOSURE R8 P1 - 0x7C140600, // 002E CALL R5 3 - 0x88140104, // 002F GETMBR R5 R0 K4 - 0x8818010D, // 0030 GETMBR R6 R0 K13 - 0x90161006, // 0031 SETMBR R5 K8 R6 - 0x8814010E, // 0032 GETMBR R5 R0 K14 - 0x8C140B0F, // 0033 GETMET R5 R5 K15 - 0x5C1C0200, // 0034 MOVE R7 R1 - 0xB8220400, // 0035 GETNGBL R8 K2 - 0x88201110, // 0036 GETMBR R8 R8 K16 - 0x7C140600, // 0037 CALL R5 3 - 0xB81A0400, // 0038 GETNGBL R6 K2 - 0x8C180D11, // 0039 GETMET R6 R6 K17 - 0x88200100, // 003A GETMBR R8 R0 K0 - 0x5C240A00, // 003B MOVE R9 R5 - 0x5C280400, // 003C MOVE R10 R2 - 0x582C000B, // 003D LDCONST R11 K11 - 0x50300000, // 003E LDBOOL R12 0 0 - 0x7C180C00, // 003F CALL R6 6 - 0xA0000000, // 0040 CLOSE R0 - 0x80000000, // 0041 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: id -********************************************************************/ -be_local_closure(lvh_page_id, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_page_id), - }), - be_str_weak(id), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_scr -********************************************************************/ -be_local_closure(lvh_page_get_scr, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_scr), - }), - be_str_weak(get_scr), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_obj -********************************************************************/ -be_local_closure(lvh_page_get_obj, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_obj_id), - /* K1 */ be_nested_str_weak(find), - }), - be_str_weak(get_obj), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_obj -********************************************************************/ -be_local_closure(lvh_page_add_obj, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_obj_id), - /* K1 */ be_nested_str_weak(p_X25ib_X25i), - /* K2 */ be_nested_str_weak(_page), - /* K3 */ be_nested_str_weak(id), - /* K4 */ be_nested_str_weak(global), - }), - be_str_weak(add_obj), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x980C0202, // 0001 SETIDX R3 R1 R2 - 0x600C0018, // 0002 GETGBL R3 G24 - 0x58100001, // 0003 LDCONST R4 K1 - 0x88140502, // 0004 GETMBR R5 R2 K2 - 0x8C140B03, // 0005 GETMET R5 R5 K3 - 0x7C140200, // 0006 CALL R5 1 - 0x5C180200, // 0007 MOVE R6 R1 - 0x7C0C0600, // 0008 CALL R3 3 - 0xB8120800, // 0009 GETNGBL R4 K4 - 0x90100602, // 000A SETMBR R4 R3 R2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_obj -********************************************************************/ -be_local_closure(lvh_page_remove_obj, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(_obj_id), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(remove), - /* K3 */ be_nested_str_weak(p_X25ib_X25i), - /* K4 */ be_nested_str_weak(_page), - /* K5 */ be_nested_str_weak(id), - /* K6 */ be_nested_str_weak(global), - }), - be_str_weak(remove_obj), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x880C0100, // 0004 GETMBR R3 R0 K0 - 0x8C0C0702, // 0005 GETMET R3 R3 K2 - 0x5C140200, // 0006 MOVE R5 R1 - 0x7C0C0400, // 0007 CALL R3 2 - 0x780A0009, // 0008 JMPF R2 #0013 - 0x600C0018, // 0009 GETGBL R3 G24 - 0x58100003, // 000A LDCONST R4 K3 - 0x88140504, // 000B GETMBR R5 R2 K4 - 0x8C140B05, // 000C GETMET R5 R5 K5 - 0x7C140200, // 000D CALL R5 1 - 0x5C180200, // 000E MOVE R6 R1 - 0x7C0C0600, // 000F CALL R3 3 - 0xB8120C00, // 0010 GETNGBL R4 K6 - 0x4C140000, // 0011 LDNIL R5 - 0x90100605, // 0012 SETMBR R4 R3 R5 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_page -********************************************************************/ -be_local_class(lvh_page, - 7, - NULL, - be_nested_map(15, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(lvh_page_init_closure) }, - { be_const_key_weak(prev, 3), be_const_var(4) }, - { be_const_key_weak(next, -1), be_const_var(5) }, - { be_const_key_weak(back, 4), be_const_var(6) }, - { be_const_key_weak(remove_obj, 7), be_const_closure(lvh_page_remove_obj_closure) }, - { be_const_key_weak(show_anim, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(5, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(0, 3), be_const_int(0) }, - { be_const_key_int(1, -1), be_const_int(5) }, - { be_const_key_int(2, -1), be_const_int(8) }, - { be_const_key_int(-1, -1), be_const_int(6) }, - { be_const_key_int(-2, -1), be_const_int(7) }, - })) ) } )) }, - { be_const_key_weak(id, 5), be_const_closure(lvh_page_id_closure) }, - { be_const_key_weak(_page_id, 11), be_const_var(1) }, - { be_const_key_weak(get_obj, -1), be_const_closure(lvh_page_get_obj_closure) }, - { be_const_key_weak(add_obj, -1), be_const_closure(lvh_page_add_obj_closure) }, - { be_const_key_weak(_obj_id, -1), be_const_var(0) }, - { be_const_key_weak(_lv_scr, 13), be_const_var(2) }, - { be_const_key_weak(_oh, -1), be_const_var(3) }, - { be_const_key_weak(get_scr, 14), be_const_closure(lvh_page_get_scr_closure) }, - { be_const_key_weak(show, -1), be_const_closure(lvh_page_show_closure) }, - })), - be_str_weak(lvh_page) -); -/*******************************************************************/ - -void be_load_lvh_page_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_page); - be_setglobal(vm, "lvh_page"); - be_pop(vm, 1); -} - extern const bclass be_class_lvh_obj; /******************************************************************** @@ -4619,160 +4104,6 @@ void be_load_lvh_obj_class(bvm *vm) { be_pop(vm, 1); } -extern const bclass be_class_lvh_scr; - -/******************************************************************** -** Solidified class: lvh_scr -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_scr, - 0, - &be_class_lvh_obj, - be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_lv_class, -1), be_const_nil() }, - })), - be_str_weak(lvh_scr) -); -/*******************************************************************/ - -void be_load_lvh_scr_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_scr); - be_setglobal(vm, "lvh_scr"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_btn; - -/******************************************************************** -** Solidified class: lvh_btn -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_btn, - 0, - &be_class_lvh_obj, - be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_button) }, - })), - be_str_weak(lvh_btn) -); -/*******************************************************************/ - -void be_load_lvh_btn_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_btn); - be_setglobal(vm, "lvh_btn"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_switch; - -/******************************************************************** -** Solidified function: set_val -********************************************************************/ -be_local_closure(lvh_switch_set_val, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_val), - /* K1 */ be_nested_str_weak(set_toggle), - }), - be_str_weak(set_val), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_val -********************************************************************/ -be_local_closure(lvh_switch_get_val, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(get_toggle), - }), - be_str_weak(get_val), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80040200, // 0002 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_switch -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_switch, - 0, - &be_class_lvh_obj, - be_nested_map(4, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_val, 1), be_const_closure(lvh_switch_get_val_closure) }, - { be_const_key_weak(set_val, -1), be_const_closure(lvh_switch_set_val_closure) }, - { be_const_key_weak(_lv_part2_selector, -1), be_const_int(196608) }, - { be_const_key_weak(_lv_class, 0), be_const_class(be_class_lv_switch) }, - })), - be_str_weak(lvh_switch) -); -/*******************************************************************/ - -void be_load_lvh_switch_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_switch); - be_setglobal(vm, "lvh_switch"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_checkbox; - -/******************************************************************** -** Solidified class: lvh_checkbox -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_checkbox, - 0, - &be_class_lvh_obj, - be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_checkbox) }, - })), - be_str_weak(lvh_checkbox) -); -/*******************************************************************/ - -void be_load_lvh_checkbox_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_checkbox); - be_setglobal(vm, "lvh_checkbox"); - be_pop(vm, 1); -} - extern const bclass be_class_lvh_label; /******************************************************************** @@ -4832,1301 +4163,6 @@ void be_load_lvh_label_class(bvm *vm) { be_pop(vm, 1); } -extern const bclass be_class_lvh_spinner; - -/******************************************************************** -** Solidified function: set_angle -********************************************************************/ -be_local_closure(lvh_spinner_set_angle, /* 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(set_angle), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(lvh_spinner_init, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(_page), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(angle), - /* K3 */ be_nested_str_weak(speed), - /* K4 */ be_nested_str_weak(_lv_obj), - /* K5 */ be_nested_str_weak(lv), - /* K6 */ be_nested_str_weak(spinner), - /* K7 */ be_nested_str_weak(set_anim_params), - /* K8 */ be_nested_str_weak(post_init), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x90020002, // 0000 SETMBR R0 K0 R2 - 0x8C100701, // 0001 GETMET R4 R3 K1 - 0x58180002, // 0002 LDCONST R6 K2 - 0x541E003B, // 0003 LDINT R7 60 - 0x7C100600, // 0004 CALL R4 3 - 0x8C140701, // 0005 GETMET R5 R3 K1 - 0x581C0003, // 0006 LDCONST R7 K3 - 0x542203E7, // 0007 LDINT R8 1000 - 0x7C140600, // 0008 CALL R5 3 - 0xB81A0A00, // 0009 GETNGBL R6 K5 - 0x8C180D06, // 000A GETMET R6 R6 K6 - 0x5C200200, // 000B MOVE R8 R1 - 0x7C180400, // 000C CALL R6 2 - 0x90020806, // 000D SETMBR R0 K4 R6 - 0x88180104, // 000E GETMBR R6 R0 K4 - 0x8C180D07, // 000F GETMET R6 R6 K7 - 0x5C200A00, // 0010 MOVE R8 R5 - 0x5C240800, // 0011 MOVE R9 R4 - 0x7C180600, // 0012 CALL R6 3 - 0x8C180108, // 0013 GETMET R6 R0 K8 - 0x7C180200, // 0014 CALL R6 1 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_speed -********************************************************************/ -be_local_closure(lvh_spinner_get_speed, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_speed), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_angle -********************************************************************/ -be_local_closure(lvh_spinner_get_angle, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_angle), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_speed -********************************************************************/ -be_local_closure(lvh_spinner_set_speed, /* 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(set_speed), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_spinner -********************************************************************/ -extern const bclass be_class_lvh_arc; -be_local_class(lvh_spinner, - 2, - &be_class_lvh_arc, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_speed, 4), be_const_closure(lvh_spinner_set_speed_closure) }, - { be_const_key_weak(_speed, -1), be_const_var(0) }, - { be_const_key_weak(get_angle, 6), be_const_closure(lvh_spinner_get_angle_closure) }, - { be_const_key_weak(init, 2), be_const_closure(lvh_spinner_init_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_spinner) }, - { be_const_key_weak(_angle, -1), be_const_var(1) }, - { be_const_key_weak(get_speed, -1), be_const_closure(lvh_spinner_get_speed_closure) }, - { be_const_key_weak(set_angle, 0), be_const_closure(lvh_spinner_set_angle_closure) }, - })), - be_str_weak(lvh_spinner) -); -/*******************************************************************/ - -void be_load_lvh_spinner_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_spinner); - be_setglobal(vm, "lvh_spinner"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_line; - -/******************************************************************** -** Solidified function: set_points -********************************************************************/ -be_local_closure(lvh_line_set_points, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_const_int(2), - /* K1 */ be_nested_str_weak(lv), - /* K2 */ be_nested_str_weak(point), - /* K3 */ be_nested_str_weak(x), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(y), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_weak(push), - /* K8 */ be_nested_str_weak(stop_iteration), - /* K9 */ be_nested_str_weak(point_arr), - /* K10 */ be_nested_str_weak(_lv_points), - /* K11 */ be_nested_str_weak(_lv_obj), - /* K12 */ be_nested_str_weak(set_points), - /* K13 */ be_nested_str_weak(HSP_X3A_X20_X27line_X27_X20wrong_X20format_X20for_X20_X27points_X27_X20_X25s), - }), - be_str_weak(set_points), - &be_const_str_solidified, - ( &(const binstruction[61]) { /* code */ - 0x6008000F, // 0000 GETGBL R2 G15 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x60100012, // 0002 GETGBL R4 G18 - 0x7C080400, // 0003 CALL R2 2 - 0x780A0030, // 0004 JMPF R2 #0036 - 0x60080012, // 0005 GETGBL R2 G18 - 0x7C080000, // 0006 CALL R2 0 - 0x600C0010, // 0007 GETGBL R3 G16 - 0x5C100200, // 0008 MOVE R4 R1 - 0x7C0C0200, // 0009 CALL R3 1 - 0xA802001A, // 000A EXBLK 0 #0026 - 0x5C100600, // 000B MOVE R4 R3 - 0x7C100000, // 000C CALL R4 0 - 0x6014000F, // 000D GETGBL R5 G15 - 0x5C180800, // 000E MOVE R6 R4 - 0x601C0012, // 000F GETGBL R7 G18 - 0x7C140400, // 0010 CALL R5 2 - 0x78160012, // 0011 JMPF R5 #0025 - 0x6014000C, // 0012 GETGBL R5 G12 - 0x5C180800, // 0013 MOVE R6 R4 - 0x7C140200, // 0014 CALL R5 1 - 0x1C140B00, // 0015 EQ R5 R5 K0 - 0x7816000D, // 0016 JMPF R5 #0025 - 0xB8160200, // 0017 GETNGBL R5 K1 - 0x8C140B02, // 0018 GETMET R5 R5 K2 - 0x7C140200, // 0019 CALL R5 1 - 0x60180009, // 001A GETGBL R6 G9 - 0x941C0904, // 001B GETIDX R7 R4 K4 - 0x7C180200, // 001C CALL R6 1 - 0x90160606, // 001D SETMBR R5 K3 R6 - 0x60180009, // 001E GETGBL R6 G9 - 0x941C0906, // 001F GETIDX R7 R4 K6 - 0x7C180200, // 0020 CALL R6 1 - 0x90160A06, // 0021 SETMBR R5 K5 R6 - 0x8C180507, // 0022 GETMET R6 R2 K7 - 0x5C200A00, // 0023 MOVE R8 R5 - 0x7C180400, // 0024 CALL R6 2 - 0x7001FFE4, // 0025 JMP #000B - 0x580C0008, // 0026 LDCONST R3 K8 - 0xAC0C0200, // 0027 CATCH R3 1 0 - 0xB0080000, // 0028 RAISE 2 R0 R0 - 0xB80E0200, // 0029 GETNGBL R3 K1 - 0x8C0C0709, // 002A GETMET R3 R3 K9 - 0x5C140400, // 002B MOVE R5 R2 - 0x7C0C0400, // 002C CALL R3 2 - 0x90021403, // 002D SETMBR R0 K10 R3 - 0x8810010B, // 002E GETMBR R4 R0 K11 - 0x8C10090C, // 002F GETMET R4 R4 K12 - 0x5C180600, // 0030 MOVE R6 R3 - 0x601C000C, // 0031 GETGBL R7 G12 - 0x5C200400, // 0032 MOVE R8 R2 - 0x7C1C0200, // 0033 CALL R7 1 - 0x7C100600, // 0034 CALL R4 3 - 0x70020005, // 0035 JMP #003C - 0x60080001, // 0036 GETGBL R2 G1 - 0x600C0018, // 0037 GETGBL R3 G24 - 0x5810000D, // 0038 LDCONST R4 K13 - 0x5C140200, // 0039 MOVE R5 R1 - 0x7C0C0400, // 003A CALL R3 2 - 0x7C080200, // 003B CALL R2 1 - 0x80000000, // 003C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_line -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_line, - 1, - &be_class_lvh_obj, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_lv_points, -1), be_const_var(0) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_line) }, - { be_const_key_weak(set_points, -1), be_const_closure(lvh_line_set_points_closure) }, - })), - be_str_weak(lvh_line) -); -/*******************************************************************/ - -void be_load_lvh_line_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_line); - be_setglobal(vm, "lvh_line"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_img; - -/******************************************************************** -** Solidified function: set_src -********************************************************************/ -be_local_closure(lvh_img_set_src, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_logo), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(set_tasmota_logo), - /* K3 */ be_nested_str_weak(set_src), - }), - be_str_weak(set_src), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x1C080300, // 0000 EQ R2 R1 K0 - 0x780A0003, // 0001 JMPF R2 #0006 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x70020003, // 0005 JMP #000A - 0x88080101, // 0006 GETMBR R2 R0 K1 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x5C100200, // 0008 MOVE R4 R1 - 0x7C080400, // 0009 CALL R2 2 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_auto_size -********************************************************************/ -be_local_closure(lvh_img_get_auto_size, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_auto_size), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_auto_size -********************************************************************/ -be_local_closure(lvh_img_set_auto_size, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_inner_align), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(IMAGE_ALIGN_STRETCH), - }), - be_str_weak(set_auto_size), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x78060004, // 0000 JMPF R1 #0006 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x8C080501, // 0002 GETMET R2 R2 K1 - 0xB8120400, // 0003 GETNGBL R4 K2 - 0x88100903, // 0004 GETMBR R4 R4 K3 - 0x7C080400, // 0005 CALL R2 2 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_angle -********************************************************************/ -be_local_closure(lvh_img_set_angle, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_angle), - }), - be_str_weak(set_angle), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C040400, // 0003 MOVE R1 R2 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x8C080501, // 0005 GETMET R2 R2 K1 - 0x5C100200, // 0006 MOVE R4 R1 - 0x7C080400, // 0007 CALL R2 2 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_angle -********************************************************************/ -be_local_closure(lvh_img_get_angle, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_angle), - }), - be_str_weak(get_angle), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_raw -********************************************************************/ -be_local_closure(lvh_img_set_raw, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(_raw), - /* K1 */ be_nested_str_weak(fromb64), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(lv_image_dsc), - /* K4 */ be_nested_str_weak(header_cf), - /* K5 */ be_nested_str_weak(COLOR_FORMAT_RAW), - /* K6 */ be_nested_str_weak(data_size), - /* K7 */ be_nested_str_weak(data), - /* K8 */ be_nested_str_weak(_buffer), - /* K9 */ be_nested_str_weak(_imd_dsc), - /* K10 */ be_nested_str_weak(_lv_obj), - /* K11 */ be_nested_str_weak(set_src), - }), - be_str_weak(set_raw), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0x60080015, // 0000 GETGBL R2 G21 - 0x7C080000, // 0001 CALL R2 0 - 0x8C080501, // 0002 GETMET R2 R2 K1 - 0x5C100200, // 0003 MOVE R4 R1 - 0x7C080400, // 0004 CALL R2 2 - 0x90020002, // 0005 SETMBR R0 K0 R2 - 0xB80A0400, // 0006 GETNGBL R2 K2 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x7C080200, // 0008 CALL R2 1 - 0xB80E0400, // 0009 GETNGBL R3 K2 - 0x880C0705, // 000A GETMBR R3 R3 K5 - 0x900A0803, // 000B SETMBR R2 K4 R3 - 0x600C000C, // 000C GETGBL R3 G12 - 0x88100100, // 000D GETMBR R4 R0 K0 - 0x7C0C0200, // 000E CALL R3 1 - 0x900A0C03, // 000F SETMBR R2 K6 R3 - 0x880C0100, // 0010 GETMBR R3 R0 K0 - 0x8C0C0708, // 0011 GETMET R3 R3 K8 - 0x7C0C0200, // 0012 CALL R3 1 - 0x900A0E03, // 0013 SETMBR R2 K7 R3 - 0x90021202, // 0014 SETMBR R0 K9 R2 - 0x880C010A, // 0015 GETMBR R3 R0 K10 - 0x8C0C070B, // 0016 GETMET R3 R3 K11 - 0x5C140400, // 0017 MOVE R5 R2 - 0x7C0C0400, // 0018 CALL R3 2 - 0x80000000, // 0019 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_img -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_img, - 2, - &be_class_lvh_obj, - be_nested_map(9, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_raw, -1), be_const_closure(lvh_img_set_raw_closure) }, - { be_const_key_weak(get_angle, 8), be_const_closure(lvh_img_get_angle_closure) }, - { be_const_key_weak(get_auto_size, -1), be_const_closure(lvh_img_get_auto_size_closure) }, - { be_const_key_weak(_raw, -1), be_const_var(0) }, - { be_const_key_weak(_imd_dsc, 5), be_const_var(1) }, - { be_const_key_weak(set_auto_size, -1), be_const_closure(lvh_img_set_auto_size_closure) }, - { be_const_key_weak(set_angle, 0), be_const_closure(lvh_img_set_angle_closure) }, - { be_const_key_weak(set_src, 1), be_const_closure(lvh_img_set_src_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_image) }, - })), - be_str_weak(lvh_img) -); -/*******************************************************************/ - -void be_load_lvh_img_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_img); - be_setglobal(vm, "lvh_img"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_roller; - -/******************************************************************** -** Solidified function: set_options -********************************************************************/ -be_local_closure(lvh_roller_set_options, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_options), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(ROLLER_MODE_NORMAL), - }), - be_str_weak(set_options), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0xB8160400, // 0003 GETNGBL R5 K2 - 0x88140B03, // 0004 GETMBR R5 R5 K3 - 0x7C080600, // 0005 CALL R2 3 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_text -********************************************************************/ -be_local_closure(lvh_roller_get_text, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(resize), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(get_selected_str), - /* K3 */ be_nested_str_weak(_buffer), - /* K4 */ be_nested_str_weak(remove_trailing_zeroes), - /* K5 */ be_nested_str_weak(asstring), - }), - be_str_weak(get_text), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x60040015, // 0000 GETGBL R1 G21 - 0x7C040000, // 0001 CALL R1 0 - 0x8C040300, // 0002 GETMET R1 R1 K0 - 0x540E00FF, // 0003 LDINT R3 256 - 0x7C040400, // 0004 CALL R1 2 - 0x88080101, // 0005 GETMBR R2 R0 K1 - 0x8C080502, // 0006 GETMET R2 R2 K2 - 0x8C100303, // 0007 GETMET R4 R1 K3 - 0x7C100200, // 0008 CALL R4 1 - 0x541600FF, // 0009 LDINT R5 256 - 0x7C080600, // 000A CALL R2 3 - 0x8C080104, // 000B GETMET R2 R0 K4 - 0x5C100200, // 000C MOVE R4 R1 - 0x7C080400, // 000D CALL R2 2 - 0x5C040400, // 000E MOVE R1 R2 - 0x8C080305, // 000F GETMET R2 R1 K5 - 0x7C080200, // 0010 CALL R2 1 - 0x80040400, // 0011 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_options -********************************************************************/ -be_local_closure(lvh_roller_get_options, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_options), - }), - be_str_weak(get_options), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_val -********************************************************************/ -be_local_closure(lvh_roller_set_val, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_val), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(set_selected), - /* K3 */ be_const_int(0), - }), - be_str_weak(set_val), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100200, // 0003 MOVE R4 R1 - 0x58140003, // 0004 LDCONST R5 K3 - 0x7C080600, // 0005 CALL R2 3 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_text -********************************************************************/ -be_local_closure(lvh_roller_set_text, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_error), - /* K1 */ be_nested_str_weak(set_text_X20unsupported_X20on_X20roller), - }), - be_str_weak(set_text), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0xB0060101, // 0000 RAISE 1 K0 K1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_val -********************************************************************/ -be_local_closure(lvh_roller_get_val, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_selected), - }), - be_str_weak(get_val), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_roller -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_roller, - 0, - &be_class_lvh_obj, - be_nested_map(7, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_options, 2), be_const_closure(lvh_roller_set_options_closure) }, - { be_const_key_weak(get_text, -1), be_const_closure(lvh_roller_get_text_closure) }, - { be_const_key_weak(get_options, -1), be_const_closure(lvh_roller_get_options_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_roller) }, - { be_const_key_weak(set_text, -1), be_const_closure(lvh_roller_set_text_closure) }, - { be_const_key_weak(set_val, 4), be_const_closure(lvh_roller_set_val_closure) }, - { be_const_key_weak(get_val, -1), be_const_closure(lvh_roller_get_val_closure) }, - })), - be_str_weak(lvh_roller) -); -/*******************************************************************/ - -void be_load_lvh_roller_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_roller); - be_setglobal(vm, "lvh_roller"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_btnmatrix; - -/******************************************************************** -** Solidified function: set_options -********************************************************************/ -be_local_closure(lvh_btnmatrix_set_options, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(_options), - /* K1 */ be_nested_str_weak(_options_arr), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(str_arr), - /* K4 */ be_nested_str_weak(_lv_obj), - /* K5 */ be_nested_str_weak(set_map), - /* K6 */ be_nested_str_weak(HTP_X3A_X20_X27btnmatrix_X27_X20needs_X20_X27options_X27_X20to_X20be_X20a_X20list_X20of_X20strings), - }), - be_str_weak(set_options), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x6008000F, // 0000 GETGBL R2 G15 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x60100012, // 0002 GETGBL R4 G18 - 0x7C080400, // 0003 CALL R2 2 - 0x780A000A, // 0004 JMPF R2 #0010 - 0x90020001, // 0005 SETMBR R0 K0 R1 - 0xB80A0400, // 0006 GETNGBL R2 K2 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x5C100200, // 0008 MOVE R4 R1 - 0x7C080400, // 0009 CALL R2 2 - 0x90020202, // 000A SETMBR R0 K1 R2 - 0x88080104, // 000B GETMBR R2 R0 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x88100101, // 000D GETMBR R4 R0 K1 - 0x7C080400, // 000E CALL R2 2 - 0x70020002, // 000F JMP #0013 - 0x60080001, // 0010 GETGBL R2 G1 - 0x580C0006, // 0011 LDCONST R3 K6 - 0x7C080200, // 0012 CALL R2 1 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_options -********************************************************************/ -be_local_closure(lvh_btnmatrix_get_options, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_options), - }), - be_str_weak(get_options), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_btnmatrix -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_btnmatrix, - 2, - &be_class_lvh_obj, - be_nested_map(5, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_options, 1), be_const_var(0) }, - { be_const_key_weak(set_options, -1), be_const_closure(lvh_btnmatrix_set_options_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_buttonmatrix) }, - { be_const_key_weak(_options_arr, -1), be_const_var(1) }, - { be_const_key_weak(get_options, -1), be_const_closure(lvh_btnmatrix_get_options_closure) }, - })), - be_str_weak(lvh_btnmatrix) -); -/*******************************************************************/ - -void be_load_lvh_btnmatrix_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_btnmatrix); - be_setglobal(vm, "lvh_btnmatrix"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_bar; - -/******************************************************************** -** Solidified function: set_max -********************************************************************/ -be_local_closure(lvh_bar_set_max, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_range), - /* K2 */ be_nested_str_weak(get_min_value), - }), - be_str_weak(set_max), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x88100100, // 0002 GETMBR R4 R0 K0 - 0x8C100902, // 0003 GETMET R4 R4 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x60140009, // 0005 GETGBL R5 G9 - 0x5C180200, // 0006 MOVE R6 R1 - 0x7C140200, // 0007 CALL R5 1 - 0x7C080600, // 0008 CALL R2 3 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_min -********************************************************************/ -be_local_closure(lvh_bar_get_min, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_min_value), - }), - be_str_weak(get_min), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_val -********************************************************************/ -be_local_closure(lvh_bar_set_val, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_val), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(set_value), - /* K3 */ be_nested_str_weak(lv), - /* K4 */ be_nested_str_weak(ANIM_OFF), - }), - be_str_weak(set_val), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100200, // 0003 MOVE R4 R1 - 0xB8160600, // 0004 GETNGBL R5 K3 - 0x88140B04, // 0005 GETMBR R5 R5 K4 - 0x7C080600, // 0006 CALL R2 3 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_max -********************************************************************/ -be_local_closure(lvh_bar_get_max, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_max_value), - }), - be_str_weak(get_max), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_min -********************************************************************/ -be_local_closure(lvh_bar_set_min, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_range), - /* K2 */ be_nested_str_weak(get_max_value), - }), - be_str_weak(set_min), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x60100009, // 0002 GETGBL R4 G9 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C100200, // 0004 CALL R4 1 - 0x88140100, // 0005 GETMBR R5 R0 K0 - 0x8C140B02, // 0006 GETMET R5 R5 K2 - 0x7C140200, // 0007 CALL R5 1 - 0x7C080600, // 0008 CALL R2 3 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_bar -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_bar, - 0, - &be_class_lvh_obj, - be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_min, 5), be_const_closure(lvh_bar_set_min_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_bar) }, - { be_const_key_weak(get_min, -1), be_const_closure(lvh_bar_get_min_closure) }, - { be_const_key_weak(set_val, -1), be_const_closure(lvh_bar_set_val_closure) }, - { be_const_key_weak(set_max, 0), be_const_closure(lvh_bar_set_max_closure) }, - { be_const_key_weak(get_max, -1), be_const_closure(lvh_bar_get_max_closure) }, - })), - be_str_weak(lvh_bar) -); -/*******************************************************************/ - -void be_load_lvh_bar_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_bar); - be_setglobal(vm, "lvh_bar"); - be_pop(vm, 1); -} - -extern const bclass be_class_lvh_slider; - -/******************************************************************** -** Solidified function: set_max -********************************************************************/ -be_local_closure(lvh_slider_set_max, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_range), - /* K2 */ be_nested_str_weak(get_min), - }), - be_str_weak(set_max), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x7C100200, // 0003 CALL R4 1 - 0x60140009, // 0004 GETGBL R5 G9 - 0x5C180200, // 0005 MOVE R6 R1 - 0x7C140200, // 0006 CALL R5 1 - 0x7C080600, // 0007 CALL R2 3 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_min -********************************************************************/ -be_local_closure(lvh_slider_get_min, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_min_value), - }), - be_str_weak(get_min), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_val -********************************************************************/ -be_local_closure(lvh_slider_set_val, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_val), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(set_value), - /* K3 */ be_const_int(0), - }), - be_str_weak(set_val), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100200, // 0003 MOVE R4 R1 - 0x58140003, // 0004 LDCONST R5 K3 - 0x7C080600, // 0005 CALL R2 3 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_max -********************************************************************/ -be_local_closure(lvh_slider_get_max, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(get_max_value), - }), - be_str_weak(get_max), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_min -********************************************************************/ -be_local_closure(lvh_slider_set_min, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_range), - /* K2 */ be_nested_str_weak(get_max), - }), - be_str_weak(set_min), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x60100009, // 0002 GETGBL R4 G9 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C100200, // 0004 CALL R4 1 - 0x8C140102, // 0005 GETMET R5 R0 K2 - 0x7C140200, // 0006 CALL R5 1 - 0x7C080600, // 0007 CALL R2 3 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_slider -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_slider, - 0, - &be_class_lvh_obj, - be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_min, 5), be_const_closure(lvh_slider_set_min_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_slider) }, - { be_const_key_weak(get_min, -1), be_const_closure(lvh_slider_get_min_closure) }, - { be_const_key_weak(set_val, -1), be_const_closure(lvh_slider_set_val_closure) }, - { be_const_key_weak(set_max, 0), be_const_closure(lvh_slider_set_max_closure) }, - { be_const_key_weak(get_max, -1), be_const_closure(lvh_slider_get_max_closure) }, - })), - be_str_weak(lvh_slider) -); -/*******************************************************************/ - -void be_load_lvh_slider_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_slider); - be_setglobal(vm, "lvh_slider"); - be_pop(vm, 1); -} - extern const bclass be_class_lvh_arc; /******************************************************************** @@ -6714,6 +4750,1488 @@ void be_load_lvh_arc_class(bvm *vm) { be_pop(vm, 1); } +extern const bclass be_class_lvh_switch; + +/******************************************************************** +** Solidified function: set_val +********************************************************************/ +be_local_closure(lvh_switch_set_val, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_val), + /* K1 */ be_nested_str_weak(set_toggle), + }), + be_str_weak(set_val), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_val +********************************************************************/ +be_local_closure(lvh_switch_get_val, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(get_toggle), + }), + be_str_weak(get_val), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x80040200, // 0002 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_switch +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_switch, + 0, + &be_class_lvh_obj, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(get_val, 1), be_const_closure(lvh_switch_get_val_closure) }, + { be_const_key_weak(set_val, -1), be_const_closure(lvh_switch_set_val_closure) }, + { be_const_key_weak(_lv_part2_selector, -1), be_const_int(196608) }, + { be_const_key_weak(_lv_class, 0), be_const_class(be_class_lv_switch) }, + })), + be_str_weak(lvh_switch) +); +/*******************************************************************/ + +void be_load_lvh_switch_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_switch); + be_setglobal(vm, "lvh_switch"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_spinner; + +/******************************************************************** +** Solidified function: set_angle +********************************************************************/ +be_local_closure(lvh_spinner_set_angle, /* 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(set_angle), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(lvh_spinner_init, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(_page), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(angle), + /* K3 */ be_nested_str_weak(speed), + /* K4 */ be_nested_str_weak(_lv_obj), + /* K5 */ be_nested_str_weak(lv), + /* K6 */ be_nested_str_weak(spinner), + /* K7 */ be_nested_str_weak(set_anim_params), + /* K8 */ be_nested_str_weak(post_init), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x90020002, // 0000 SETMBR R0 K0 R2 + 0x8C100701, // 0001 GETMET R4 R3 K1 + 0x58180002, // 0002 LDCONST R6 K2 + 0x541E003B, // 0003 LDINT R7 60 + 0x7C100600, // 0004 CALL R4 3 + 0x8C140701, // 0005 GETMET R5 R3 K1 + 0x581C0003, // 0006 LDCONST R7 K3 + 0x542203E7, // 0007 LDINT R8 1000 + 0x7C140600, // 0008 CALL R5 3 + 0xB81A0A00, // 0009 GETNGBL R6 K5 + 0x8C180D06, // 000A GETMET R6 R6 K6 + 0x5C200200, // 000B MOVE R8 R1 + 0x7C180400, // 000C CALL R6 2 + 0x90020806, // 000D SETMBR R0 K4 R6 + 0x88180104, // 000E GETMBR R6 R0 K4 + 0x8C180D07, // 000F GETMET R6 R6 K7 + 0x5C200A00, // 0010 MOVE R8 R5 + 0x5C240800, // 0011 MOVE R9 R4 + 0x7C180600, // 0012 CALL R6 3 + 0x8C180108, // 0013 GETMET R6 R0 K8 + 0x7C180200, // 0014 CALL R6 1 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_speed +********************************************************************/ +be_local_closure(lvh_spinner_get_speed, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_speed), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_angle +********************************************************************/ +be_local_closure(lvh_spinner_get_angle, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_angle), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_speed +********************************************************************/ +be_local_closure(lvh_spinner_set_speed, /* 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(set_speed), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_spinner +********************************************************************/ +extern const bclass be_class_lvh_arc; +be_local_class(lvh_spinner, + 2, + &be_class_lvh_arc, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_speed, 4), be_const_closure(lvh_spinner_set_speed_closure) }, + { be_const_key_weak(_speed, -1), be_const_var(0) }, + { be_const_key_weak(get_angle, 6), be_const_closure(lvh_spinner_get_angle_closure) }, + { be_const_key_weak(init, 2), be_const_closure(lvh_spinner_init_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_spinner) }, + { be_const_key_weak(_angle, -1), be_const_var(1) }, + { be_const_key_weak(get_speed, -1), be_const_closure(lvh_spinner_get_speed_closure) }, + { be_const_key_weak(set_angle, 0), be_const_closure(lvh_spinner_set_angle_closure) }, + })), + be_str_weak(lvh_spinner) +); +/*******************************************************************/ + +void be_load_lvh_spinner_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_spinner); + be_setglobal(vm, "lvh_spinner"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_img; + +/******************************************************************** +** Solidified function: set_src +********************************************************************/ +be_local_closure(lvh_img_set_src, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_logo), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(set_tasmota_logo), + /* K3 */ be_nested_str_weak(set_src), + }), + be_str_weak(set_src), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x1C080300, // 0000 EQ R2 R1 K0 + 0x780A0003, // 0001 JMPF R2 #0006 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x8C080502, // 0003 GETMET R2 R2 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x70020003, // 0005 JMP #000A + 0x88080101, // 0006 GETMBR R2 R0 K1 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x5C100200, // 0008 MOVE R4 R1 + 0x7C080400, // 0009 CALL R2 2 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_auto_size +********************************************************************/ +be_local_closure(lvh_img_get_auto_size, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_auto_size), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_auto_size +********************************************************************/ +be_local_closure(lvh_img_set_auto_size, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_inner_align), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(IMAGE_ALIGN_STRETCH), + }), + be_str_weak(set_auto_size), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x78060004, // 0000 JMPF R1 #0006 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x8C080501, // 0002 GETMET R2 R2 K1 + 0xB8120400, // 0003 GETNGBL R4 K2 + 0x88100903, // 0004 GETMBR R4 R4 K3 + 0x7C080400, // 0005 CALL R2 2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_angle +********************************************************************/ +be_local_closure(lvh_img_set_angle, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_angle), + }), + be_str_weak(set_angle), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C040400, // 0003 MOVE R1 R2 + 0x88080100, // 0004 GETMBR R2 R0 K0 + 0x8C080501, // 0005 GETMET R2 R2 K1 + 0x5C100200, // 0006 MOVE R4 R1 + 0x7C080400, // 0007 CALL R2 2 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_angle +********************************************************************/ +be_local_closure(lvh_img_get_angle, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_angle), + }), + be_str_weak(get_angle), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_raw +********************************************************************/ +be_local_closure(lvh_img_set_raw, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(_raw), + /* K1 */ be_nested_str_weak(fromb64), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(lv_image_dsc), + /* K4 */ be_nested_str_weak(header_cf), + /* K5 */ be_nested_str_weak(COLOR_FORMAT_RAW), + /* K6 */ be_nested_str_weak(data_size), + /* K7 */ be_nested_str_weak(data), + /* K8 */ be_nested_str_weak(_buffer), + /* K9 */ be_nested_str_weak(_imd_dsc), + /* K10 */ be_nested_str_weak(_lv_obj), + /* K11 */ be_nested_str_weak(set_src), + }), + be_str_weak(set_raw), + &be_const_str_solidified, + ( &(const binstruction[26]) { /* code */ + 0x60080015, // 0000 GETGBL R2 G21 + 0x7C080000, // 0001 CALL R2 0 + 0x8C080501, // 0002 GETMET R2 R2 K1 + 0x5C100200, // 0003 MOVE R4 R1 + 0x7C080400, // 0004 CALL R2 2 + 0x90020002, // 0005 SETMBR R0 K0 R2 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x7C080200, // 0008 CALL R2 1 + 0xB80E0400, // 0009 GETNGBL R3 K2 + 0x880C0705, // 000A GETMBR R3 R3 K5 + 0x900A0803, // 000B SETMBR R2 K4 R3 + 0x600C000C, // 000C GETGBL R3 G12 + 0x88100100, // 000D GETMBR R4 R0 K0 + 0x7C0C0200, // 000E CALL R3 1 + 0x900A0C03, // 000F SETMBR R2 K6 R3 + 0x880C0100, // 0010 GETMBR R3 R0 K0 + 0x8C0C0708, // 0011 GETMET R3 R3 K8 + 0x7C0C0200, // 0012 CALL R3 1 + 0x900A0E03, // 0013 SETMBR R2 K7 R3 + 0x90021202, // 0014 SETMBR R0 K9 R2 + 0x880C010A, // 0015 GETMBR R3 R0 K10 + 0x8C0C070B, // 0016 GETMET R3 R3 K11 + 0x5C140400, // 0017 MOVE R5 R2 + 0x7C0C0400, // 0018 CALL R3 2 + 0x80000000, // 0019 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_img +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_img, + 2, + &be_class_lvh_obj, + be_nested_map(9, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_raw, -1), be_const_closure(lvh_img_set_raw_closure) }, + { be_const_key_weak(get_angle, 8), be_const_closure(lvh_img_get_angle_closure) }, + { be_const_key_weak(get_auto_size, -1), be_const_closure(lvh_img_get_auto_size_closure) }, + { be_const_key_weak(_raw, -1), be_const_var(0) }, + { be_const_key_weak(_imd_dsc, 5), be_const_var(1) }, + { be_const_key_weak(set_auto_size, -1), be_const_closure(lvh_img_set_auto_size_closure) }, + { be_const_key_weak(set_angle, 0), be_const_closure(lvh_img_set_angle_closure) }, + { be_const_key_weak(set_src, 1), be_const_closure(lvh_img_set_src_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_image) }, + })), + be_str_weak(lvh_img) +); +/*******************************************************************/ + +void be_load_lvh_img_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_img); + be_setglobal(vm, "lvh_img"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_qrcode; + +/******************************************************************** +** Solidified function: get_qr_dark_color +********************************************************************/ +be_local_closure(lvh_qrcode_get_qr_dark_color, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_qr_dark_color), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_qr_text +********************************************************************/ +be_local_closure(lvh_qrcode_set_qr_text, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(qr_text), + /* K1 */ be_nested_str_weak(_update), + }), + be_str_weak(set_qr_text), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60080008, // 0000 GETGBL R2 G8 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x8C080101, // 0004 GETMET R2 R0 K1 + 0x7C080200, // 0005 CALL R2 1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_light_color +********************************************************************/ +be_local_closure(lvh_qrcode_set_light_color, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_light_color), + /* K2 */ be_nested_str_weak(parse_color), + /* K3 */ be_nested_str_weak(_update), + }), + be_str_weak(set_light_color), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C100400, // 0004 CALL R4 2 + 0x7C080400, // 0005 CALL R2 2 + 0x8C080103, // 0006 GETMET R2 R0 K3 + 0x7C080200, // 0007 CALL R2 1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_dark_color +********************************************************************/ +be_local_closure(lvh_qrcode_get_dark_color, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_dark_color), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_qr_light_color +********************************************************************/ +be_local_closure(lvh_qrcode_set_qr_light_color, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_light_color), + /* K2 */ be_nested_str_weak(parse_color), + /* K3 */ be_nested_str_weak(_update), + }), + be_str_weak(set_qr_light_color), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C100400, // 0004 CALL R4 2 + 0x7C080400, // 0005 CALL R2 2 + 0x8C080103, // 0006 GETMET R2 R0 K3 + 0x7C080200, // 0007 CALL R2 1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_qr_light_color +********************************************************************/ +be_local_closure(lvh_qrcode_get_qr_light_color, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_qr_light_color), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_qr_size +********************************************************************/ +be_local_closure(lvh_qrcode_set_qr_size, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_size), + /* K2 */ be_nested_str_weak(_update), + }), + be_str_weak(set_qr_size), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x7C080200, // 0005 CALL R2 1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_light_color +********************************************************************/ +be_local_closure(lvh_qrcode_get_light_color, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_light_color), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_size +********************************************************************/ +be_local_closure(lvh_qrcode_set_size, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_size), + /* K2 */ be_nested_str_weak(_update), + }), + be_str_weak(set_size), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x7C080200, // 0005 CALL R2 1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_qr_dark_color +********************************************************************/ +be_local_closure(lvh_qrcode_set_qr_dark_color, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_dark_color), + /* K2 */ be_nested_str_weak(parse_color), + /* K3 */ be_nested_str_weak(_update), + }), + be_str_weak(set_qr_dark_color), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C100400, // 0004 CALL R4 2 + 0x7C080400, // 0005 CALL R2 2 + 0x8C080103, // 0006 GETMET R2 R0 K3 + 0x7C080200, // 0007 CALL R2 1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_qr_text +********************************************************************/ +be_local_closure(lvh_qrcode_get_qr_text, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_qr_text), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_dark_color +********************************************************************/ +be_local_closure(lvh_qrcode_set_dark_color, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_dark_color), + /* K2 */ be_nested_str_weak(parse_color), + /* K3 */ be_nested_str_weak(_update), + }), + be_str_weak(set_dark_color), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C100400, // 0004 CALL R4 2 + 0x7C080400, // 0005 CALL R2 2 + 0x8C080103, // 0006 GETMET R2 R0 K3 + 0x7C080200, // 0007 CALL R2 1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_size +********************************************************************/ +be_local_closure(lvh_qrcode_get_size, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_size), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: post_config +********************************************************************/ +be_local_closure(lvh_qrcode_post_config, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(post_config), + /* K1 */ be_nested_str_weak(_update), + }), + be_str_weak(post_config), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x8C040101, // 0005 GETMET R1 R0 K1 + 0x7C040200, // 0006 CALL R1 1 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update +********************************************************************/ +be_local_closure(lvh_qrcode__update, /* name */ + be_nested_proto( + 7, /* 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(qr_text), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(update), + }), + be_str_weak(_update), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20080202, // 0002 NE R2 R1 R2 + 0x780A0006, // 0003 JMPF R2 #000B + 0x88080101, // 0004 GETMBR R2 R0 K1 + 0x8C080502, // 0005 GETMET R2 R2 K2 + 0x5C100200, // 0006 MOVE R4 R1 + 0x6014000C, // 0007 GETGBL R5 G12 + 0x5C180200, // 0008 MOVE R6 R1 + 0x7C140200, // 0009 CALL R5 1 + 0x7C080600, // 000A CALL R2 3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_qr_size +********************************************************************/ +be_local_closure(lvh_qrcode_get_qr_size, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* 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(get_qr_size), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_qrcode +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_qrcode, + 1, + &be_class_lvh_obj, + be_nested_map(18, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(get_qr_dark_color, 5), be_const_closure(lvh_qrcode_get_qr_dark_color_closure) }, + { be_const_key_weak(get_qr_size, -1), be_const_closure(lvh_qrcode_get_qr_size_closure) }, + { be_const_key_weak(qr_text, 4), be_const_var(0) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_qrcode) }, + { be_const_key_weak(set_qr_light_color, -1), be_const_closure(lvh_qrcode_set_qr_light_color_closure) }, + { be_const_key_weak(get_qr_light_color, -1), be_const_closure(lvh_qrcode_get_qr_light_color_closure) }, + { be_const_key_weak(get_size, -1), be_const_closure(lvh_qrcode_get_size_closure) }, + { be_const_key_weak(set_qr_size, 3), be_const_closure(lvh_qrcode_set_qr_size_closure) }, + { be_const_key_weak(get_light_color, -1), be_const_closure(lvh_qrcode_get_light_color_closure) }, + { be_const_key_weak(set_size, -1), be_const_closure(lvh_qrcode_set_size_closure) }, + { be_const_key_weak(set_qr_dark_color, -1), be_const_closure(lvh_qrcode_set_qr_dark_color_closure) }, + { be_const_key_weak(get_qr_text, 6), be_const_closure(lvh_qrcode_get_qr_text_closure) }, + { be_const_key_weak(set_light_color, 13), be_const_closure(lvh_qrcode_set_light_color_closure) }, + { be_const_key_weak(set_dark_color, 16), be_const_closure(lvh_qrcode_set_dark_color_closure) }, + { be_const_key_weak(post_config, -1), be_const_closure(lvh_qrcode_post_config_closure) }, + { be_const_key_weak(_update, -1), be_const_closure(lvh_qrcode__update_closure) }, + { be_const_key_weak(get_dark_color, -1), be_const_closure(lvh_qrcode_get_dark_color_closure) }, + { be_const_key_weak(set_qr_text, 1), be_const_closure(lvh_qrcode_set_qr_text_closure) }, + })), + be_str_weak(lvh_qrcode) +); +/*******************************************************************/ + +void be_load_lvh_qrcode_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_qrcode); + be_setglobal(vm, "lvh_qrcode"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_slider; + +/******************************************************************** +** Solidified function: set_max +********************************************************************/ +be_local_closure(lvh_slider_set_max, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_range), + /* K2 */ be_nested_str_weak(get_min), + }), + be_str_weak(set_max), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x7C100200, // 0003 CALL R4 1 + 0x60140009, // 0004 GETGBL R5 G9 + 0x5C180200, // 0005 MOVE R6 R1 + 0x7C140200, // 0006 CALL R5 1 + 0x7C080600, // 0007 CALL R2 3 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_min +********************************************************************/ +be_local_closure(lvh_slider_get_min, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_min_value), + }), + be_str_weak(get_min), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_val +********************************************************************/ +be_local_closure(lvh_slider_set_val, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_val), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(set_value), + /* K3 */ be_const_int(0), + }), + be_str_weak(set_val), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100200, // 0003 MOVE R4 R1 + 0x58140003, // 0004 LDCONST R5 K3 + 0x7C080600, // 0005 CALL R2 3 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_max +********************************************************************/ +be_local_closure(lvh_slider_get_max, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_max_value), + }), + be_str_weak(get_max), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_min +********************************************************************/ +be_local_closure(lvh_slider_set_min, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_range), + /* K2 */ be_nested_str_weak(get_max), + }), + be_str_weak(set_min), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100009, // 0002 GETGBL R4 G9 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C100200, // 0004 CALL R4 1 + 0x8C140102, // 0005 GETMET R5 R0 K2 + 0x7C140200, // 0006 CALL R5 1 + 0x7C080600, // 0007 CALL R2 3 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_slider +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_slider, + 0, + &be_class_lvh_obj, + be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_min, 5), be_const_closure(lvh_slider_set_min_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_slider) }, + { be_const_key_weak(get_min, -1), be_const_closure(lvh_slider_get_min_closure) }, + { be_const_key_weak(set_val, -1), be_const_closure(lvh_slider_set_val_closure) }, + { be_const_key_weak(set_max, 0), be_const_closure(lvh_slider_set_max_closure) }, + { be_const_key_weak(get_max, -1), be_const_closure(lvh_slider_get_max_closure) }, + })), + be_str_weak(lvh_slider) +); +/*******************************************************************/ + +void be_load_lvh_slider_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_slider); + be_setglobal(vm, "lvh_slider"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_roller; + +/******************************************************************** +** Solidified function: set_options +********************************************************************/ +be_local_closure(lvh_roller_set_options, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_options), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(ROLLER_MODE_NORMAL), + }), + be_str_weak(set_options), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0xB8160400, // 0003 GETNGBL R5 K2 + 0x88140B03, // 0004 GETMBR R5 R5 K3 + 0x7C080600, // 0005 CALL R2 3 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_text +********************************************************************/ +be_local_closure(lvh_roller_get_text, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(resize), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(get_selected_str), + /* K3 */ be_nested_str_weak(_buffer), + /* K4 */ be_nested_str_weak(remove_trailing_zeroes), + /* K5 */ be_nested_str_weak(asstring), + }), + be_str_weak(get_text), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x60040015, // 0000 GETGBL R1 G21 + 0x7C040000, // 0001 CALL R1 0 + 0x8C040300, // 0002 GETMET R1 R1 K0 + 0x540E00FF, // 0003 LDINT R3 256 + 0x7C040400, // 0004 CALL R1 2 + 0x88080101, // 0005 GETMBR R2 R0 K1 + 0x8C080502, // 0006 GETMET R2 R2 K2 + 0x8C100303, // 0007 GETMET R4 R1 K3 + 0x7C100200, // 0008 CALL R4 1 + 0x541600FF, // 0009 LDINT R5 256 + 0x7C080600, // 000A CALL R2 3 + 0x8C080104, // 000B GETMET R2 R0 K4 + 0x5C100200, // 000C MOVE R4 R1 + 0x7C080400, // 000D CALL R2 2 + 0x5C040400, // 000E MOVE R1 R2 + 0x8C080305, // 000F GETMET R2 R1 K5 + 0x7C080200, // 0010 CALL R2 1 + 0x80040400, // 0011 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_options +********************************************************************/ +be_local_closure(lvh_roller_get_options, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_options), + }), + be_str_weak(get_options), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_val +********************************************************************/ +be_local_closure(lvh_roller_set_val, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_val), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(set_selected), + /* K3 */ be_const_int(0), + }), + be_str_weak(set_val), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100200, // 0003 MOVE R4 R1 + 0x58140003, // 0004 LDCONST R5 K3 + 0x7C080600, // 0005 CALL R2 3 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_text +********************************************************************/ +be_local_closure(lvh_roller_set_text, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_error), + /* K1 */ be_nested_str_weak(set_text_X20unsupported_X20on_X20roller), + }), + be_str_weak(set_text), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0xB0060101, // 0000 RAISE 1 K0 K1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_val +********************************************************************/ +be_local_closure(lvh_roller_get_val, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_selected), + }), + be_str_weak(get_val), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_roller +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_roller, + 0, + &be_class_lvh_obj, + be_nested_map(7, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_options, 2), be_const_closure(lvh_roller_set_options_closure) }, + { be_const_key_weak(get_text, -1), be_const_closure(lvh_roller_get_text_closure) }, + { be_const_key_weak(get_options, -1), be_const_closure(lvh_roller_get_options_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_roller) }, + { be_const_key_weak(set_text, -1), be_const_closure(lvh_roller_set_text_closure) }, + { be_const_key_weak(set_val, 4), be_const_closure(lvh_roller_set_val_closure) }, + { be_const_key_weak(get_val, -1), be_const_closure(lvh_roller_get_val_closure) }, + })), + be_str_weak(lvh_roller) +); +/*******************************************************************/ + +void be_load_lvh_roller_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_roller); + be_setglobal(vm, "lvh_roller"); + be_pop(vm, 1); +} + extern const bclass be_class_lvh_led; /******************************************************************** @@ -7270,6 +6788,205 @@ void be_load_lvh_dropdown_class(bvm *vm) { be_pop(vm, 1); } +extern const bclass be_class_lvh_bar; + +/******************************************************************** +** Solidified function: set_max +********************************************************************/ +be_local_closure(lvh_bar_set_max, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_range), + /* K2 */ be_nested_str_weak(get_min_value), + }), + be_str_weak(set_max), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x88100100, // 0002 GETMBR R4 R0 K0 + 0x8C100902, // 0003 GETMET R4 R4 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x60140009, // 0005 GETGBL R5 G9 + 0x5C180200, // 0006 MOVE R6 R1 + 0x7C140200, // 0007 CALL R5 1 + 0x7C080600, // 0008 CALL R2 3 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_min +********************************************************************/ +be_local_closure(lvh_bar_get_min, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_min_value), + }), + be_str_weak(get_min), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_val +********************************************************************/ +be_local_closure(lvh_bar_set_val, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_val), + /* K1 */ be_nested_str_weak(_lv_obj), + /* K2 */ be_nested_str_weak(set_value), + /* K3 */ be_nested_str_weak(lv), + /* K4 */ be_nested_str_weak(ANIM_OFF), + }), + be_str_weak(set_val), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100200, // 0003 MOVE R4 R1 + 0xB8160600, // 0004 GETNGBL R5 K3 + 0x88140B04, // 0005 GETMBR R5 R5 K4 + 0x7C080600, // 0006 CALL R2 3 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_max +********************************************************************/ +be_local_closure(lvh_bar_get_max, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(get_max_value), + }), + be_str_weak(get_max), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_min +********************************************************************/ +be_local_closure(lvh_bar_set_min, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* 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(_lv_obj), + /* K1 */ be_nested_str_weak(set_range), + /* K2 */ be_nested_str_weak(get_max_value), + }), + be_str_weak(set_min), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100009, // 0002 GETGBL R4 G9 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C100200, // 0004 CALL R4 1 + 0x88140100, // 0005 GETMBR R5 R0 K0 + 0x8C140B02, // 0006 GETMET R5 R5 K2 + 0x7C140200, // 0007 CALL R5 1 + 0x7C080600, // 0008 CALL R2 3 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_bar +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_bar, + 0, + &be_class_lvh_obj, + be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_min, 5), be_const_closure(lvh_bar_set_min_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_bar) }, + { be_const_key_weak(get_min, -1), be_const_closure(lvh_bar_get_min_closure) }, + { be_const_key_weak(set_val, -1), be_const_closure(lvh_bar_set_val_closure) }, + { be_const_key_weak(set_max, 0), be_const_closure(lvh_bar_set_max_closure) }, + { be_const_key_weak(get_max, -1), be_const_closure(lvh_bar_get_max_closure) }, + })), + be_str_weak(lvh_bar) +); +/*******************************************************************/ + +void be_load_lvh_bar_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_bar); + be_setglobal(vm, "lvh_bar"); + be_pop(vm, 1); +} + extern const bclass be_class_lvh_scale; /******************************************************************** @@ -7513,413 +7230,324 @@ void be_load_lvh_scale_class(bvm *vm) { be_pop(vm, 1); } -extern const bclass be_class_lvh_qrcode; +extern const bclass be_class_lvh_spangroup; /******************************************************************** -** Solidified function: _update +** Solidified function: post_init ********************************************************************/ -be_local_closure(lvh_qrcode__update, /* name */ - be_nested_proto( - 7, /* 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(qr_text), - /* K1 */ be_nested_str_weak(_lv_obj), - /* K2 */ be_nested_str_weak(update), - }), - be_str_weak(_update), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20080202, // 0002 NE R2 R1 R2 - 0x780A0006, // 0003 JMPF R2 #000B - 0x88080101, // 0004 GETMBR R2 R0 K1 - 0x8C080502, // 0005 GETMET R2 R2 K2 - 0x5C100200, // 0006 MOVE R4 R1 - 0x6014000C, // 0007 GETGBL R5 G12 - 0x5C180200, // 0008 MOVE R6 R1 - 0x7C140200, // 0009 CALL R5 1 - 0x7C080600, // 000A CALL R2 3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_qr_size -********************************************************************/ -be_local_closure(lvh_qrcode_get_qr_size, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_qr_size), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_light_color -********************************************************************/ -be_local_closure(lvh_qrcode_set_light_color, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_light_color), - /* K2 */ be_nested_str_weak(parse_color), - /* K3 */ be_nested_str_weak(_update), - }), - be_str_weak(set_light_color), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C100400, // 0004 CALL R4 2 - 0x7C080400, // 0005 CALL R2 2 - 0x8C080103, // 0006 GETMET R2 R0 K3 - 0x7C080200, // 0007 CALL R2 1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_dark_color -********************************************************************/ -be_local_closure(lvh_qrcode_set_dark_color, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_dark_color), - /* K2 */ be_nested_str_weak(parse_color), - /* K3 */ be_nested_str_weak(_update), - }), - be_str_weak(set_dark_color), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C100400, // 0004 CALL R4 2 - 0x7C080400, // 0005 CALL R2 2 - 0x8C080103, // 0006 GETMET R2 R0 K3 - 0x7C080200, // 0007 CALL R2 1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_size -********************************************************************/ -be_local_closure(lvh_qrcode_get_size, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_size), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_qr_text -********************************************************************/ -be_local_closure(lvh_qrcode_get_qr_text, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_qr_text), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_qr_size -********************************************************************/ -be_local_closure(lvh_qrcode_set_qr_size, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_size), - /* K2 */ be_nested_str_weak(_update), - }), - be_str_weak(set_qr_size), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x7C080200, // 0005 CALL R2 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_qr_dark_color -********************************************************************/ -be_local_closure(lvh_qrcode_set_qr_dark_color, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_dark_color), - /* K2 */ be_nested_str_weak(parse_color), - /* K3 */ be_nested_str_weak(_update), - }), - be_str_weak(set_qr_dark_color), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C100400, // 0004 CALL R4 2 - 0x7C080400, // 0005 CALL R2 2 - 0x8C080103, // 0006 GETMET R2 R0 K3 - 0x7C080200, // 0007 CALL R2 1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_qr_light_color -********************************************************************/ -be_local_closure(lvh_qrcode_set_qr_light_color, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_light_color), - /* K2 */ be_nested_str_weak(parse_color), - /* K3 */ be_nested_str_weak(_update), - }), - be_str_weak(set_qr_light_color), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C100400, // 0004 CALL R4 2 - 0x7C080400, // 0005 CALL R2 2 - 0x8C080103, // 0006 GETMET R2 R0 K3 - 0x7C080200, // 0007 CALL R2 1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_dark_color -********************************************************************/ -be_local_closure(lvh_qrcode_get_dark_color, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_dark_color), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_size -********************************************************************/ -be_local_closure(lvh_qrcode_set_size, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* 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(_lv_obj), - /* K1 */ be_nested_str_weak(set_size), - /* K2 */ be_nested_str_weak(_update), - }), - be_str_weak(set_size), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x7C080200, // 0005 CALL R2 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_qr_dark_color -********************************************************************/ -be_local_closure(lvh_qrcode_get_qr_dark_color, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_qr_dark_color), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_qr_light_color -********************************************************************/ -be_local_closure(lvh_qrcode_get_qr_light_color, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_qr_light_color), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_qr_text -********************************************************************/ -be_local_closure(lvh_qrcode_set_qr_text, /* name */ +be_local_closure(lvh_spangroup_post_init, /* name */ be_nested_proto( 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_mode), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(SPAN_MODE_BREAK), + /* K4 */ be_nested_str_weak(refr_mode), + /* K5 */ be_nested_str_weak(post_init), + }), + be_str_weak(post_init), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x880C0703, // 0003 GETMBR R3 R3 K3 + 0x7C040400, // 0004 CALL R1 2 + 0x88040100, // 0005 GETMBR R1 R0 K0 + 0x8C040304, // 0006 GETMET R1 R1 K4 + 0x7C040200, // 0007 CALL R1 1 + 0x60040003, // 0008 GETGBL R1 G3 + 0x5C080000, // 0009 MOVE R2 R0 + 0x7C040200, // 000A CALL R1 1 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x7C040200, // 000C CALL R1 1 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: refr_mode +********************************************************************/ +be_local_closure(lvh_spangroup_refr_mode, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(refr_mode), + }), + be_str_weak(refr_mode), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_spangroup +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_spangroup, + 0, + &be_class_lvh_obj, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(refr_mode, -1), be_const_closure(lvh_spangroup_refr_mode_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_spangroup) }, + { be_const_key_weak(post_init, 0), be_const_closure(lvh_spangroup_post_init_closure) }, + })), + be_str_weak(lvh_spangroup) +); +/*******************************************************************/ + +void be_load_lvh_spangroup_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_spangroup); + be_setglobal(vm, "lvh_spangroup"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_span; + +/******************************************************************** +** Solidified function: setmember +********************************************************************/ +be_local_closure(lvh_span_setmember, /* name */ + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(introspect), + /* K2 */ be_nested_str_weak(startswith), + /* K3 */ be_nested_str_weak(set_), + /* K4 */ be_nested_str_weak(get_), + /* K5 */ be_nested_str_weak(_attr_ignore), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(get), + /* K8 */ be_nested_str_weak(function), + /* K9 */ be_nested_str_weak(_style), + /* K10 */ be_nested_str_weak(is_color_attribute), + /* K11 */ be_nested_str_weak(parse_color), + /* K12 */ be_nested_str_weak(_parent_lvh), + /* K13 */ be_nested_str_weak(refr_mode), + /* K14 */ be_nested_str_weak(_X20for_X20), + /* K15 */ be_nested_str_weak(HSP_X3A_X20Could_X20not_X20find_X20function_X20set_), + }), + be_str_weak(setmember), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0x8C140702, // 0002 GETMET R5 R3 K2 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x58200003, // 0004 LDCONST R8 K3 + 0x7C140600, // 0005 CALL R5 3 + 0x74160004, // 0006 JMPT R5 #000C + 0x8C140702, // 0007 GETMET R5 R3 K2 + 0x5C1C0200, // 0008 MOVE R7 R1 + 0x58200004, // 0009 LDCONST R8 K4 + 0x7C140600, // 000A CALL R5 3 + 0x78160000, // 000B JMPF R5 #000D + 0x80000A00, // 000C RET 0 + 0x88140105, // 000D GETMBR R5 R0 K5 + 0x8C140B06, // 000E GETMET R5 R5 K6 + 0x5C1C0200, // 000F MOVE R7 R1 + 0x7C140400, // 0010 CALL R5 2 + 0x4C180000, // 0011 LDNIL R6 + 0x20140A06, // 0012 NE R5 R5 R6 + 0x78160000, // 0013 JMPF R5 #0015 + 0x80000A00, // 0014 RET 0 + 0x8C140907, // 0015 GETMET R5 R4 K7 + 0x5C1C0000, // 0016 MOVE R7 R0 + 0x00220601, // 0017 ADD R8 K3 R1 + 0x7C140600, // 0018 CALL R5 3 + 0x60180004, // 0019 GETGBL R6 G4 + 0x5C1C0A00, // 001A MOVE R7 R5 + 0x7C180200, // 001B CALL R6 1 + 0x1C180D08, // 001C EQ R6 R6 K8 + 0x781A0004, // 001D JMPF R6 #0023 + 0x5C180A00, // 001E MOVE R6 R5 + 0x5C1C0000, // 001F MOVE R7 R0 + 0x5C200400, // 0020 MOVE R8 R2 + 0x7C180400, // 0021 CALL R6 2 + 0x80000C00, // 0022 RET 0 + 0x8C180907, // 0023 GETMET R6 R4 K7 + 0x88200109, // 0024 GETMBR R8 R0 K9 + 0x00260601, // 0025 ADD R9 K3 R1 + 0x7C180600, // 0026 CALL R6 3 + 0x5C140C00, // 0027 MOVE R5 R6 + 0x60180004, // 0028 GETGBL R6 G4 + 0x5C1C0A00, // 0029 MOVE R7 R5 + 0x7C180200, // 002A CALL R6 1 + 0x1C180D08, // 002B EQ R6 R6 K8 + 0x781A001B, // 002C JMPF R6 #0049 + 0x8C18010A, // 002D GETMET R6 R0 K10 + 0x5C200200, // 002E MOVE R8 R1 + 0x7C180400, // 002F CALL R6 2 + 0x781A0003, // 0030 JMPF R6 #0035 + 0x8C18010B, // 0031 GETMET R6 R0 K11 + 0x5C200400, // 0032 MOVE R8 R2 + 0x7C180400, // 0033 CALL R6 2 + 0x5C080C00, // 0034 MOVE R2 R6 + 0xA8020008, // 0035 EXBLK 0 #003F + 0x5C180A00, // 0036 MOVE R6 R5 + 0x881C0109, // 0037 GETMBR R7 R0 K9 + 0x5C200400, // 0038 MOVE R8 R2 + 0x7C180400, // 0039 CALL R6 2 + 0x8818010C, // 003A GETMBR R6 R0 K12 + 0x8C180D0D, // 003B GETMET R6 R6 K13 + 0x7C180200, // 003C CALL R6 1 + 0xA8040001, // 003D EXBLK 1 1 + 0x70020006, // 003E JMP #0046 + 0xAC180002, // 003F CATCH R6 0 2 + 0x70020003, // 0040 JMP #0045 + 0x00200F0E, // 0041 ADD R8 R7 K14 + 0x00201001, // 0042 ADD R8 R8 R1 + 0xB0040C08, // 0043 RAISE 1 R6 R8 + 0x70020000, // 0044 JMP #0046 + 0xB0080000, // 0045 RAISE 2 R0 R0 + 0x4C180000, // 0046 LDNIL R6 + 0x80040C00, // 0047 RET 1 R6 + 0x70020002, // 0048 JMP #004C + 0x60180001, // 0049 GETGBL R6 G1 + 0x001E1E01, // 004A ADD R7 K15 R1 + 0x7C180200, // 004B CALL R6 1 + 0x80000000, // 004C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: post_init +********************************************************************/ +be_local_closure(lvh_span_post_init, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(_parent_lvh), + /* K2 */ be_nested_str_weak(_page), + /* K3 */ be_nested_str_weak(_oh), + /* K4 */ be_nested_str_weak(lvh_spangroup), + /* K5 */ be_nested_str_weak(new_span), + /* K6 */ be_nested_str_weak(_style), + /* K7 */ be_nested_str_weak(get_style), + }), + be_str_weak(post_init), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x6004000F, // 0002 GETGBL R1 G15 + 0x88080101, // 0003 GETMBR R2 R0 K1 + 0x880C0102, // 0004 GETMBR R3 R0 K2 + 0x880C0703, // 0005 GETMBR R3 R3 K3 + 0x880C0704, // 0006 GETMBR R3 R3 K4 + 0x7C040400, // 0007 CALL R1 2 + 0x78060008, // 0008 JMPF R1 #0012 + 0x88040101, // 0009 GETMBR R1 R0 K1 + 0x88040300, // 000A GETMBR R1 R1 K0 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x7C040200, // 000C CALL R1 1 + 0x90020001, // 000D SETMBR R0 K0 R1 + 0x88040100, // 000E GETMBR R1 R0 K0 + 0x8C040307, // 000F GETMET R1 R1 K7 + 0x7C040200, // 0010 CALL R1 1 + 0x90020C01, // 0011 SETMBR R0 K6 R1 + 0x80000000, // 0012 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_text_font +********************************************************************/ +be_local_closure(lvh_span_set_text_font, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_font), + /* K1 */ be_nested_str_weak(_style), + /* K2 */ be_nested_str_weak(set_text_font), + /* K3 */ be_nested_str_weak(_parent_lvh), + /* K4 */ be_nested_str_weak(refr_mode), + }), + be_str_weak(set_text_font), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E0006, // 0005 JMPF R3 #000D + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x8C0C0702, // 0007 GETMET R3 R3 K2 + 0x5C140400, // 0008 MOVE R5 R2 + 0x7C0C0400, // 0009 CALL R3 2 + 0x880C0103, // 000A GETMBR R3 R0 K3 + 0x8C0C0704, // 000B GETMET R3 R3 K4 + 0x7C0C0200, // 000C CALL R3 1 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_text +********************************************************************/ +be_local_closure(lvh_span_set_text, /* name */ + be_nested_proto( + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -7928,18 +7556,18 @@ be_local_closure(lvh_qrcode_set_qr_text, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(qr_text), - /* K1 */ be_nested_str_weak(_update), + /* K0 */ be_nested_str_weak(_lv_obj), + /* K1 */ be_nested_str_weak(set_text), }), - be_str_weak(set_qr_text), + be_str_weak(set_text), &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ - 0x60080008, // 0000 GETGBL R2 G8 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x8C080101, // 0004 GETMET R2 R0 K1 - 0x7C080200, // 0005 CALL R2 1 + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100008, // 0002 GETGBL R4 G8 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C100200, // 0004 CALL R4 1 + 0x7C080400, // 0005 CALL R2 2 0x80000000, // 0006 RET 0 }) ) @@ -7948,63 +7576,28 @@ be_local_closure(lvh_qrcode_set_qr_text, /* name */ /******************************************************************** -** Solidified function: get_light_color +** Solidified class: lvh_span ********************************************************************/ -be_local_closure(lvh_qrcode_get_light_color, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* 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(get_light_color), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_qrcode -********************************************************************/ -extern const bclass be_class_lvh_obj; -be_local_class(lvh_qrcode, +extern const bclass be_class_lvh_root; +be_local_class(lvh_span, 1, - &be_class_lvh_obj, - be_nested_map(17, + &be_class_lvh_root, + be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_qr_text, -1), be_const_closure(lvh_qrcode_get_qr_text_closure) }, - { be_const_key_weak(get_qr_size, -1), be_const_closure(lvh_qrcode_get_qr_size_closure) }, - { be_const_key_weak(set_qr_size, -1), be_const_closure(lvh_qrcode_set_qr_size_closure) }, - { be_const_key_weak(get_qr_light_color, -1), be_const_closure(lvh_qrcode_get_qr_light_color_closure) }, - { be_const_key_weak(get_size, 11), be_const_closure(lvh_qrcode_get_size_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_qrcode) }, - { be_const_key_weak(set_light_color, 0), be_const_closure(lvh_qrcode_set_light_color_closure) }, - { be_const_key_weak(set_dark_color, 2), be_const_closure(lvh_qrcode_set_dark_color_closure) }, - { be_const_key_weak(qr_text, 3), be_const_var(0) }, - { be_const_key_weak(set_qr_dark_color, -1), be_const_closure(lvh_qrcode_set_qr_dark_color_closure) }, - { be_const_key_weak(get_qr_dark_color, 14), be_const_closure(lvh_qrcode_get_qr_dark_color_closure) }, - { be_const_key_weak(get_dark_color, -1), be_const_closure(lvh_qrcode_get_dark_color_closure) }, - { be_const_key_weak(set_size, -1), be_const_closure(lvh_qrcode_set_size_closure) }, - { be_const_key_weak(_update, 10), be_const_closure(lvh_qrcode__update_closure) }, - { be_const_key_weak(set_qr_light_color, -1), be_const_closure(lvh_qrcode_set_qr_light_color_closure) }, - { be_const_key_weak(set_qr_text, -1), be_const_closure(lvh_qrcode_set_qr_text_closure) }, - { be_const_key_weak(get_light_color, -1), be_const_closure(lvh_qrcode_get_light_color_closure) }, + { be_const_key_weak(setmember, -1), be_const_closure(lvh_span_setmember_closure) }, + { be_const_key_weak(_lv_class, 4), be_const_nil() }, + { be_const_key_weak(post_init, -1), be_const_closure(lvh_span_post_init_closure) }, + { be_const_key_weak(set_text_font, -1), be_const_closure(lvh_span_set_text_font_closure) }, + { be_const_key_weak(_style, 0), be_const_var(0) }, + { be_const_key_weak(set_text, -1), be_const_closure(lvh_span_set_text_closure) }, })), - be_str_weak(lvh_qrcode) + be_str_weak(lvh_span) ); /*******************************************************************/ -void be_load_lvh_qrcode_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_qrcode); - be_setglobal(vm, "lvh_qrcode"); +void be_load_lvh_span_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_span); + be_setglobal(vm, "lvh_span"); be_pop(vm, 1); } @@ -8517,46 +8110,101 @@ void be_load_lvh_chart_class(bvm *vm) { be_pop(vm, 1); } -extern const bclass be_class_lvh_spangroup; +extern const bclass be_class_lvh_line; /******************************************************************** -** Solidified function: post_init +** Solidified function: set_points ********************************************************************/ -be_local_closure(lvh_spangroup_post_init, /* name */ +be_local_closure(lvh_line_set_points, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ + 9, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_mode), - /* K2 */ be_nested_str_weak(lv), - /* K3 */ be_nested_str_weak(SPAN_MODE_BREAK), - /* K4 */ be_nested_str_weak(refr_mode), - /* K5 */ be_nested_str_weak(post_init), + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_const_int(2), + /* K1 */ be_nested_str_weak(lv), + /* K2 */ be_nested_str_weak(point), + /* K3 */ be_nested_str_weak(x), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(y), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(push), + /* K8 */ be_nested_str_weak(stop_iteration), + /* K9 */ be_nested_str_weak(point_arr), + /* K10 */ be_nested_str_weak(_lv_points), + /* K11 */ be_nested_str_weak(_lv_obj), + /* K12 */ be_nested_str_weak(set_points), + /* K13 */ be_nested_str_weak(HSP_X3A_X20_X27line_X27_X20wrong_X20format_X20for_X20_X27points_X27_X20_X25s), }), - be_str_weak(post_init), + be_str_weak(set_points), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0xB80E0400, // 0002 GETNGBL R3 K2 - 0x880C0703, // 0003 GETMBR R3 R3 K3 - 0x7C040400, // 0004 CALL R1 2 - 0x88040100, // 0005 GETMBR R1 R0 K0 - 0x8C040304, // 0006 GETMET R1 R1 K4 - 0x7C040200, // 0007 CALL R1 1 - 0x60040003, // 0008 GETGBL R1 G3 - 0x5C080000, // 0009 MOVE R2 R0 - 0x7C040200, // 000A CALL R1 1 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x7C040200, // 000C CALL R1 1 - 0x80000000, // 000D RET 0 + ( &(const binstruction[61]) { /* code */ + 0x6008000F, // 0000 GETGBL R2 G15 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x60100012, // 0002 GETGBL R4 G18 + 0x7C080400, // 0003 CALL R2 2 + 0x780A0030, // 0004 JMPF R2 #0036 + 0x60080012, // 0005 GETGBL R2 G18 + 0x7C080000, // 0006 CALL R2 0 + 0x600C0010, // 0007 GETGBL R3 G16 + 0x5C100200, // 0008 MOVE R4 R1 + 0x7C0C0200, // 0009 CALL R3 1 + 0xA802001A, // 000A EXBLK 0 #0026 + 0x5C100600, // 000B MOVE R4 R3 + 0x7C100000, // 000C CALL R4 0 + 0x6014000F, // 000D GETGBL R5 G15 + 0x5C180800, // 000E MOVE R6 R4 + 0x601C0012, // 000F GETGBL R7 G18 + 0x7C140400, // 0010 CALL R5 2 + 0x78160012, // 0011 JMPF R5 #0025 + 0x6014000C, // 0012 GETGBL R5 G12 + 0x5C180800, // 0013 MOVE R6 R4 + 0x7C140200, // 0014 CALL R5 1 + 0x1C140B00, // 0015 EQ R5 R5 K0 + 0x7816000D, // 0016 JMPF R5 #0025 + 0xB8160200, // 0017 GETNGBL R5 K1 + 0x8C140B02, // 0018 GETMET R5 R5 K2 + 0x7C140200, // 0019 CALL R5 1 + 0x60180009, // 001A GETGBL R6 G9 + 0x941C0904, // 001B GETIDX R7 R4 K4 + 0x7C180200, // 001C CALL R6 1 + 0x90160606, // 001D SETMBR R5 K3 R6 + 0x60180009, // 001E GETGBL R6 G9 + 0x941C0906, // 001F GETIDX R7 R4 K6 + 0x7C180200, // 0020 CALL R6 1 + 0x90160A06, // 0021 SETMBR R5 K5 R6 + 0x8C180507, // 0022 GETMET R6 R2 K7 + 0x5C200A00, // 0023 MOVE R8 R5 + 0x7C180400, // 0024 CALL R6 2 + 0x7001FFE4, // 0025 JMP #000B + 0x580C0008, // 0026 LDCONST R3 K8 + 0xAC0C0200, // 0027 CATCH R3 1 0 + 0xB0080000, // 0028 RAISE 2 R0 R0 + 0xB80E0200, // 0029 GETNGBL R3 K1 + 0x8C0C0709, // 002A GETMET R3 R3 K9 + 0x5C140400, // 002B MOVE R5 R2 + 0x7C0C0400, // 002C CALL R3 2 + 0x90021403, // 002D SETMBR R0 K10 R3 + 0x8810010B, // 002E GETMBR R4 R0 K11 + 0x8C10090C, // 002F GETMET R4 R4 K12 + 0x5C180600, // 0030 MOVE R6 R3 + 0x601C000C, // 0031 GETGBL R7 G12 + 0x5C200400, // 0032 MOVE R8 R2 + 0x7C1C0200, // 0033 CALL R7 1 + 0x7C100600, // 0034 CALL R4 3 + 0x70020005, // 0035 JMP #003C + 0x60080001, // 0036 GETGBL R2 G1 + 0x600C0018, // 0037 GETGBL R3 G24 + 0x5810000D, // 0038 LDCONST R4 K13 + 0x5C140200, // 0039 MOVE R5 R1 + 0x7C0C0400, // 003A CALL R3 2 + 0x7C080200, // 003B CALL R2 1 + 0x80000000, // 003C RET 0 }) ) ); @@ -8564,64 +8212,208 @@ be_local_closure(lvh_spangroup_post_init, /* name */ /******************************************************************** -** Solidified function: refr_mode -********************************************************************/ -be_local_closure(lvh_spangroup_refr_mode, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(refr_mode), - }), - be_str_weak(refr_mode), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lvh_spangroup +** Solidified class: lvh_line ********************************************************************/ extern const bclass be_class_lvh_obj; -be_local_class(lvh_spangroup, - 0, +be_local_class(lvh_line, + 1, &be_class_lvh_obj, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(refr_mode, -1), be_const_closure(lvh_spangroup_refr_mode_closure) }, - { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_spangroup) }, - { be_const_key_weak(post_init, 0), be_const_closure(lvh_spangroup_post_init_closure) }, + { be_const_key_weak(_lv_points, -1), be_const_var(0) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_line) }, + { be_const_key_weak(set_points, -1), be_const_closure(lvh_line_set_points_closure) }, })), - be_str_weak(lvh_spangroup) + be_str_weak(lvh_line) ); /*******************************************************************/ -void be_load_lvh_spangroup_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_spangroup); - be_setglobal(vm, "lvh_spangroup"); +void be_load_lvh_line_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_line); + be_setglobal(vm, "lvh_line"); be_pop(vm, 1); } -extern const bclass be_class_lvh_span; +extern const bclass be_class_lvh_btnmatrix; /******************************************************************** -** Solidified function: setmember +** Solidified function: set_options ********************************************************************/ -be_local_closure(lvh_span_setmember, /* name */ +be_local_closure(lvh_btnmatrix_set_options, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(_options), + /* K1 */ be_nested_str_weak(_options_arr), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(str_arr), + /* K4 */ be_nested_str_weak(_lv_obj), + /* K5 */ be_nested_str_weak(set_map), + /* K6 */ be_nested_str_weak(HTP_X3A_X20_X27btnmatrix_X27_X20needs_X20_X27options_X27_X20to_X20be_X20a_X20list_X20of_X20strings), + }), + be_str_weak(set_options), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x6008000F, // 0000 GETGBL R2 G15 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x60100012, // 0002 GETGBL R4 G18 + 0x7C080400, // 0003 CALL R2 2 + 0x780A000A, // 0004 JMPF R2 #0010 + 0x90020001, // 0005 SETMBR R0 K0 R1 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x5C100200, // 0008 MOVE R4 R1 + 0x7C080400, // 0009 CALL R2 2 + 0x90020202, // 000A SETMBR R0 K1 R2 + 0x88080104, // 000B GETMBR R2 R0 K4 + 0x8C080505, // 000C GETMET R2 R2 K5 + 0x88100101, // 000D GETMBR R4 R0 K1 + 0x7C080400, // 000E CALL R2 2 + 0x70020002, // 000F JMP #0013 + 0x60080001, // 0010 GETGBL R2 G1 + 0x580C0006, // 0011 LDCONST R3 K6 + 0x7C080200, // 0012 CALL R2 1 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_options +********************************************************************/ +be_local_closure(lvh_btnmatrix_get_options, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_options), + }), + be_str_weak(get_options), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_btnmatrix +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_btnmatrix, + 2, + &be_class_lvh_obj, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_options, 1), be_const_var(0) }, + { be_const_key_weak(set_options, -1), be_const_closure(lvh_btnmatrix_set_options_closure) }, + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_buttonmatrix) }, + { be_const_key_weak(_options_arr, -1), be_const_var(1) }, + { be_const_key_weak(get_options, -1), be_const_closure(lvh_btnmatrix_get_options_closure) }, + })), + be_str_weak(lvh_btnmatrix) +); +/*******************************************************************/ + +void be_load_lvh_btnmatrix_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_btnmatrix); + be_setglobal(vm, "lvh_btnmatrix"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_btn; + +/******************************************************************** +** Solidified class: lvh_btn +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_btn, + 0, + &be_class_lvh_obj, + be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_button) }, + })), + be_str_weak(lvh_btn) +); +/*******************************************************************/ + +void be_load_lvh_btn_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_btn); + be_setglobal(vm, "lvh_btn"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_checkbox; + +/******************************************************************** +** Solidified class: lvh_checkbox +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_checkbox, + 0, + &be_class_lvh_obj, + be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_checkbox) }, + })), + be_str_weak(lvh_checkbox) +); +/*******************************************************************/ + +void be_load_lvh_checkbox_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_checkbox); + be_setglobal(vm, "lvh_checkbox"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_scr; + +/******************************************************************** +** Solidified class: lvh_scr +********************************************************************/ +extern const bclass be_class_lvh_obj; +be_local_class(lvh_scr, + 0, + &be_class_lvh_obj, + be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_lv_class, -1), be_const_nil() }, + })), + be_str_weak(lvh_scr) +); +/*******************************************************************/ + +void be_load_lvh_scr_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_scr); + be_setglobal(vm, "lvh_scr"); + be_pop(vm, 1); +} + +extern const bclass be_class_lvh_page; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(lvh_page_init, /* name */ be_nested_proto( 10, /* nstack */ 3, /* argc */ @@ -8632,103 +8424,92 @@ be_local_closure(lvh_span_setmember, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(introspect), - /* K2 */ be_nested_str_weak(startswith), - /* K3 */ be_nested_str_weak(set_), - /* K4 */ be_nested_str_weak(get_), - /* K5 */ be_nested_str_weak(_attr_ignore), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(get), - /* K8 */ be_nested_str_weak(function), - /* K9 */ be_nested_str_weak(_style), - /* K10 */ be_nested_str_weak(is_color_attribute), - /* K11 */ be_nested_str_weak(parse_color), - /* K12 */ be_nested_str_weak(_parent_lvh), - /* K13 */ be_nested_str_weak(refr_mode), - /* K14 */ be_nested_str_weak(_X20for_X20), - /* K15 */ be_nested_str_weak(HSP_X3A_X20Could_X20not_X20find_X20function_X20set_), + /* K0 */ be_nested_str_weak(global), + /* K1 */ be_nested_str_weak(_oh), + /* K2 */ be_const_int(1), + /* K3 */ be_nested_str_weak(_page_id), + /* K4 */ be_nested_str_weak(_obj_id), + /* K5 */ be_nested_str_weak(_lv_scr), + /* K6 */ be_nested_str_weak(lv), + /* K7 */ be_nested_str_weak(scr_act), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(layer_top), + /* K10 */ be_nested_str_weak(obj), + /* K11 */ be_nested_str_weak(get_style_bg_color), + /* K12 */ be_nested_str_weak(set_style_bg_color), + /* K13 */ be_nested_str_weak(lvh_scr), + /* K14 */ be_nested_str_weak(p), + /* K15 */ be_nested_str_weak(b0), }), - be_str_weak(setmember), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[77]) { /* code */ + ( &(const binstruction[66]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 - 0xA4120200, // 0001 IMPORT R4 K1 - 0x8C140702, // 0002 GETMET R5 R3 K2 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x58200003, // 0004 LDCONST R8 K3 - 0x7C140600, // 0005 CALL R5 3 - 0x74160004, // 0006 JMPT R5 #000C - 0x8C140702, // 0007 GETMET R5 R3 K2 - 0x5C1C0200, // 0008 MOVE R7 R1 - 0x58200004, // 0009 LDCONST R8 K4 - 0x7C140600, // 000A CALL R5 3 - 0x78160000, // 000B JMPF R5 #000D - 0x80000A00, // 000C RET 0 - 0x88140105, // 000D GETMBR R5 R0 K5 - 0x8C140B06, // 000E GETMET R5 R5 K6 - 0x5C1C0200, // 000F MOVE R7 R1 - 0x7C140400, // 0010 CALL R5 2 - 0x4C180000, // 0011 LDNIL R6 - 0x20140A06, // 0012 NE R5 R5 R6 - 0x78160000, // 0013 JMPF R5 #0015 - 0x80000A00, // 0014 RET 0 - 0x8C140907, // 0015 GETMET R5 R4 K7 - 0x5C1C0000, // 0016 MOVE R7 R0 - 0x00220601, // 0017 ADD R8 K3 R1 - 0x7C140600, // 0018 CALL R5 3 - 0x60180004, // 0019 GETGBL R6 G4 - 0x5C1C0A00, // 001A MOVE R7 R5 - 0x7C180200, // 001B CALL R6 1 - 0x1C180D08, // 001C EQ R6 R6 K8 - 0x781A0004, // 001D JMPF R6 #0023 - 0x5C180A00, // 001E MOVE R6 R5 - 0x5C1C0000, // 001F MOVE R7 R0 - 0x5C200400, // 0020 MOVE R8 R2 - 0x7C180400, // 0021 CALL R6 2 - 0x80000C00, // 0022 RET 0 - 0x8C180907, // 0023 GETMET R6 R4 K7 - 0x88200109, // 0024 GETMBR R8 R0 K9 - 0x00260601, // 0025 ADD R9 K3 R1 - 0x7C180600, // 0026 CALL R6 3 - 0x5C140C00, // 0027 MOVE R5 R6 - 0x60180004, // 0028 GETGBL R6 G4 - 0x5C1C0A00, // 0029 MOVE R7 R5 - 0x7C180200, // 002A CALL R6 1 - 0x1C180D08, // 002B EQ R6 R6 K8 - 0x781A001B, // 002C JMPF R6 #0049 - 0x8C18010A, // 002D GETMET R6 R0 K10 - 0x5C200200, // 002E MOVE R8 R1 - 0x7C180400, // 002F CALL R6 2 - 0x781A0003, // 0030 JMPF R6 #0035 - 0x8C18010B, // 0031 GETMET R6 R0 K11 - 0x5C200400, // 0032 MOVE R8 R2 - 0x7C180400, // 0033 CALL R6 2 - 0x5C080C00, // 0034 MOVE R2 R6 - 0xA8020008, // 0035 EXBLK 0 #003F - 0x5C180A00, // 0036 MOVE R6 R5 - 0x881C0109, // 0037 GETMBR R7 R0 K9 - 0x5C200400, // 0038 MOVE R8 R2 - 0x7C180400, // 0039 CALL R6 2 - 0x8818010C, // 003A GETMBR R6 R0 K12 - 0x8C180D0D, // 003B GETMET R6 R6 K13 - 0x7C180200, // 003C CALL R6 1 - 0xA8040001, // 003D EXBLK 1 1 - 0x70020006, // 003E JMP #0046 - 0xAC180002, // 003F CATCH R6 0 2 - 0x70020003, // 0040 JMP #0045 - 0x00200F0E, // 0041 ADD R8 R7 K14 - 0x00201001, // 0042 ADD R8 R8 R1 - 0xB0040C08, // 0043 RAISE 1 R6 R8 - 0x70020000, // 0044 JMP #0046 - 0xB0080000, // 0045 RAISE 2 R0 R0 - 0x4C180000, // 0046 LDNIL R6 - 0x80040C00, // 0047 RET 1 R6 - 0x70020002, // 0048 JMP #004C - 0x60180001, // 0049 GETGBL R6 G1 - 0x001E1E01, // 004A ADD R7 K15 R1 - 0x7C180200, // 004B CALL R6 1 - 0x80000000, // 004C RET 0 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x60100009, // 0002 GETGBL R4 G9 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C100200, // 0004 CALL R4 1 + 0x5C040800, // 0005 MOVE R1 R4 + 0x4C100000, // 0006 LDNIL R4 + 0x1C100204, // 0007 EQ R4 R1 R4 + 0x78120000, // 0008 JMPF R4 #000A + 0x58040002, // 0009 LDCONST R1 K2 + 0x90020601, // 000A SETMBR R0 K3 R1 + 0x60100013, // 000B GETGBL R4 G19 + 0x7C100000, // 000C CALL R4 0 + 0x90020804, // 000D SETMBR R0 K4 R4 + 0x1C100302, // 000E EQ R4 R1 K2 + 0x78120004, // 000F JMPF R4 #0015 + 0xB8120C00, // 0010 GETNGBL R4 K6 + 0x8C100907, // 0011 GETMET R4 R4 K7 + 0x7C100200, // 0012 CALL R4 1 + 0x90020A04, // 0013 SETMBR R0 K5 R4 + 0x70020016, // 0014 JMP #002C + 0x1C100308, // 0015 EQ R4 R1 K8 + 0x78120004, // 0016 JMPF R4 #001C + 0xB8120C00, // 0017 GETNGBL R4 K6 + 0x8C100909, // 0018 GETMET R4 R4 K9 + 0x7C100200, // 0019 CALL R4 1 + 0x90020A04, // 001A SETMBR R0 K5 R4 + 0x7002000F, // 001B JMP #002C + 0xB8120C00, // 001C GETNGBL R4 K6 + 0x8C10090A, // 001D GETMET R4 R4 K10 + 0x58180008, // 001E LDCONST R6 K8 + 0x7C100400, // 001F CALL R4 2 + 0x90020A04, // 0020 SETMBR R0 K5 R4 + 0xB8120C00, // 0021 GETNGBL R4 K6 + 0x8C100907, // 0022 GETMET R4 R4 K7 + 0x7C100200, // 0023 CALL R4 1 + 0x8C10090B, // 0024 GETMET R4 R4 K11 + 0x58180008, // 0025 LDCONST R6 K8 + 0x7C100400, // 0026 CALL R4 2 + 0x88140105, // 0027 GETMBR R5 R0 K5 + 0x8C140B0C, // 0028 GETMET R5 R5 K12 + 0x5C1C0800, // 0029 MOVE R7 R4 + 0x58200008, // 002A LDCONST R8 K8 + 0x7C140600, // 002B CALL R5 3 + 0x88100101, // 002C GETMBR R4 R0 K1 + 0x8810090D, // 002D GETMBR R4 R4 K13 + 0x5C140800, // 002E MOVE R5 R4 + 0x4C180000, // 002F LDNIL R6 + 0x5C1C0000, // 0030 MOVE R7 R0 + 0x4C200000, // 0031 LDNIL R8 + 0x88240105, // 0032 GETMBR R9 R0 K5 + 0x7C140800, // 0033 CALL R5 4 + 0x88180104, // 0034 GETMBR R6 R0 K4 + 0x981A1005, // 0035 SETIDX R6 K8 R5 + 0x60180008, // 0036 GETGBL R6 G8 + 0x881C0103, // 0037 GETMBR R7 R0 K3 + 0x7C180200, // 0038 CALL R6 1 + 0x001A1C06, // 0039 ADD R6 K14 R6 + 0x900C0C00, // 003A SETMBR R3 R6 R0 + 0x60180008, // 003B GETGBL R6 G8 + 0x881C0103, // 003C GETMBR R7 R0 K3 + 0x7C180200, // 003D CALL R6 1 + 0x001A1C06, // 003E ADD R6 K14 R6 + 0x00180D0F, // 003F ADD R6 R6 K15 + 0x900C0C05, // 0040 SETMBR R3 R6 R5 + 0x80000000, // 0041 RET 0 }) ) ); @@ -8736,11 +8517,170 @@ be_local_closure(lvh_span_setmember, /* name */ /******************************************************************** -** Solidified function: post_init +** Solidified function: show ********************************************************************/ -be_local_closure(lvh_span_post_init, /* name */ +be_local_closure(lvh_page_show, /* name */ be_nested_proto( - 4, /* nstack */ + 13, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 3, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 3), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(publish_rule), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8020000, // 0000 GETNGBL R0 K0 + 0x8C000101, // 0001 GETMET R0 R0 K1 + 0x68080000, // 0002 GETUPV R2 U0 + 0x7C000400, // 0003 CALL R0 2 + 0x80040000, // 0004 RET 1 R0 + }) + ), + be_nested_proto( + 3, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 4), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(publish_rule), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8020000, // 0000 GETNGBL R0 K0 + 0x8C000101, // 0001 GETMET R0 R0 K1 + 0x68080000, // 0002 GETUPV R2 U0 + 0x7C000400, // 0003 CALL R0 2 + 0x80040000, // 0004 RET 1 R0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_scr), + /* K1 */ be_nested_str_weak(_p), + /* K2 */ be_nested_str_weak(lv), + /* K3 */ be_nested_str_weak(scr_act), + /* K4 */ be_nested_str_weak(_oh), + /* K5 */ be_nested_str_weak(page_dir_to), + /* K6 */ be_nested_str_weak(id), + /* K7 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D), + /* K8 */ be_nested_str_weak(lvh_page_cur_idx), + /* K9 */ be_nested_str_weak(tasmota), + /* K10 */ be_nested_str_weak(set_timer), + /* K11 */ be_const_int(0), + /* K12 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D), + /* K13 */ be_nested_str_weak(_page_id), + /* K14 */ be_nested_str_weak(show_anim), + /* K15 */ be_nested_str_weak(find), + /* K16 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE), + /* K17 */ be_nested_str_weak(screen_load_anim), + }), + be_str_weak(show), + &be_const_str_solidified, + ( &(const binstruction[66]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x4C100000, // 0001 LDNIL R4 + 0x1C0C0604, // 0002 EQ R3 R3 R4 + 0x780E0001, // 0003 JMPF R3 #0006 + 0x4C0C0000, // 0004 LDNIL R3 + 0x80040600, // 0005 RET 1 R3 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x880C0701, // 0007 GETMBR R3 R3 K1 + 0xB8120400, // 0008 GETNGBL R4 K2 + 0x8C100903, // 0009 GETMET R4 R4 K3 + 0x7C100200, // 000A CALL R4 1 + 0x88100901, // 000B GETMBR R4 R4 K1 + 0x1C0C0604, // 000C EQ R3 R3 R4 + 0x780E0000, // 000D JMPF R3 #000F + 0x80000600, // 000E RET 0 + 0x4C0C0000, // 000F LDNIL R3 + 0x1C0C0403, // 0010 EQ R3 R2 R3 + 0x780E0000, // 0011 JMPF R3 #0013 + 0x540A01F3, // 0012 LDINT R2 500 + 0x4C0C0000, // 0013 LDNIL R3 + 0x1C0C0203, // 0014 EQ R3 R1 R3 + 0x780E0005, // 0015 JMPF R3 #001C + 0x880C0104, // 0016 GETMBR R3 R0 K4 + 0x8C0C0705, // 0017 GETMET R3 R3 K5 + 0x8C140106, // 0018 GETMET R5 R0 K6 + 0x7C140200, // 0019 CALL R5 1 + 0x7C0C0400, // 001A CALL R3 2 + 0x5C040600, // 001B MOVE R1 R3 + 0x600C0018, // 001C GETGBL R3 G24 + 0x58100007, // 001D LDCONST R4 K7 + 0x88140104, // 001E GETMBR R5 R0 K4 + 0x88140B08, // 001F GETMBR R5 R5 K8 + 0x7C0C0400, // 0020 CALL R3 2 + 0xB8121200, // 0021 GETNGBL R4 K9 + 0x8C10090A, // 0022 GETMET R4 R4 K10 + 0x5818000B, // 0023 LDCONST R6 K11 + 0x841C0000, // 0024 CLOSURE R7 P0 + 0x7C100600, // 0025 CALL R4 3 + 0x60100018, // 0026 GETGBL R4 G24 + 0x5814000C, // 0027 LDCONST R5 K12 + 0x8818010D, // 0028 GETMBR R6 R0 K13 + 0x7C100400, // 0029 CALL R4 2 + 0xB8161200, // 002A GETNGBL R5 K9 + 0x8C140B0A, // 002B GETMET R5 R5 K10 + 0x581C000B, // 002C LDCONST R7 K11 + 0x84200001, // 002D CLOSURE R8 P1 + 0x7C140600, // 002E CALL R5 3 + 0x88140104, // 002F GETMBR R5 R0 K4 + 0x8818010D, // 0030 GETMBR R6 R0 K13 + 0x90161006, // 0031 SETMBR R5 K8 R6 + 0x8814010E, // 0032 GETMBR R5 R0 K14 + 0x8C140B0F, // 0033 GETMET R5 R5 K15 + 0x5C1C0200, // 0034 MOVE R7 R1 + 0xB8220400, // 0035 GETNGBL R8 K2 + 0x88201110, // 0036 GETMBR R8 R8 K16 + 0x7C140600, // 0037 CALL R5 3 + 0xB81A0400, // 0038 GETNGBL R6 K2 + 0x8C180D11, // 0039 GETMET R6 R6 K17 + 0x88200100, // 003A GETMBR R8 R0 K0 + 0x5C240A00, // 003B MOVE R9 R5 + 0x5C280400, // 003C MOVE R10 R2 + 0x582C000B, // 003D LDCONST R11 K11 + 0x50300000, // 003E LDBOOL R12 0 0 + 0x7C180C00, // 003F CALL R6 6 + 0xA0000000, // 0040 CLOSE R0 + 0x80000000, // 0041 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: id +********************************************************************/ +be_local_closure(lvh_page_id, /* name */ + be_nested_proto( + 2, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -8748,38 +8688,14 @@ be_local_closure(lvh_span_post_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(_parent_lvh), - /* K2 */ be_nested_str_weak(_page), - /* K3 */ be_nested_str_weak(_oh), - /* K4 */ be_nested_str_weak(lvh_spangroup), - /* K5 */ be_nested_str_weak(new_span), - /* K6 */ be_nested_str_weak(_style), - /* K7 */ be_nested_str_weak(get_style), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_page_id), }), - be_str_weak(post_init), + be_str_weak(id), &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x4C040000, // 0000 LDNIL R1 - 0x90020001, // 0001 SETMBR R0 K0 R1 - 0x6004000F, // 0002 GETGBL R1 G15 - 0x88080101, // 0003 GETMBR R2 R0 K1 - 0x880C0102, // 0004 GETMBR R3 R0 K2 - 0x880C0703, // 0005 GETMBR R3 R3 K3 - 0x880C0704, // 0006 GETMBR R3 R3 K4 - 0x7C040400, // 0007 CALL R1 2 - 0x78060008, // 0008 JMPF R1 #0012 - 0x88040101, // 0009 GETMBR R1 R0 K1 - 0x88040300, // 000A GETMBR R1 R1 K0 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x7C040200, // 000C CALL R1 1 - 0x90020001, // 000D SETMBR R0 K0 R1 - 0x88040100, // 000E GETMBR R1 R0 K0 - 0x8C040307, // 000F GETMET R1 R1 K7 - 0x7C040200, // 0010 CALL R1 1 - 0x90020C01, // 0011 SETMBR R0 K6 R1 - 0x80000000, // 0012 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -8787,42 +8703,26 @@ be_local_closure(lvh_span_post_init, /* name */ /******************************************************************** -** Solidified function: set_text_font +** Solidified function: get_scr ********************************************************************/ -be_local_closure(lvh_span_set_text_font, /* name */ +be_local_closure(lvh_page_get_scr, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_font), - /* K1 */ be_nested_str_weak(_style), - /* K2 */ be_nested_str_weak(set_text_font), - /* K3 */ be_nested_str_weak(_parent_lvh), - /* K4 */ be_nested_str_weak(refr_mode), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_lv_scr), }), - be_str_weak(set_text_font), + be_str_weak(get_scr), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0403, // 0004 NE R3 R2 R3 - 0x780E0006, // 0005 JMPF R3 #000D - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x8C0C0702, // 0007 GETMET R3 R3 K2 - 0x5C140400, // 0008 MOVE R5 R2 - 0x7C0C0400, // 0009 CALL R3 2 - 0x880C0103, // 000A GETMBR R3 R0 K3 - 0x8C0C0704, // 000B GETMET R3 R3 K4 - 0x7C0C0200, // 000C CALL R3 1 - 0x80000000, // 000D RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -8830,11 +8730,11 @@ be_local_closure(lvh_span_set_text_font, /* name */ /******************************************************************** -** Solidified function: set_text +** Solidified function: get_obj ********************************************************************/ -be_local_closure(lvh_span_set_text, /* name */ +be_local_closure(lvh_page_get_obj, /* name */ be_nested_proto( - 6, /* nstack */ + 5, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -8843,19 +8743,17 @@ be_local_closure(lvh_span_set_text, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_lv_obj), - /* K1 */ be_nested_str_weak(set_text), + /* K0 */ be_nested_str_weak(_obj_id), + /* K1 */ be_nested_str_weak(find), }), - be_str_weak(set_text), + be_str_weak(get_obj), &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ + ( &(const binstruction[ 5]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x60100008, // 0002 GETGBL R4 G8 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C100200, // 0004 CALL R4 1 - 0x7C080400, // 0005 CALL R2 2 - 0x80000000, // 0006 RET 0 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); @@ -8863,28 +8761,136 @@ be_local_closure(lvh_span_set_text, /* name */ /******************************************************************** -** Solidified class: lvh_span +** Solidified function: add_obj ********************************************************************/ -extern const bclass be_class_lvh_root; -be_local_class(lvh_span, - 1, - &be_class_lvh_root, - be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(setmember, -1), be_const_closure(lvh_span_setmember_closure) }, - { be_const_key_weak(_lv_class, 4), be_const_nil() }, - { be_const_key_weak(post_init, -1), be_const_closure(lvh_span_post_init_closure) }, - { be_const_key_weak(set_text_font, -1), be_const_closure(lvh_span_set_text_font_closure) }, - { be_const_key_weak(_style, 0), be_const_var(0) }, - { be_const_key_weak(set_text, -1), be_const_closure(lvh_span_set_text_closure) }, - })), - be_str_weak(lvh_span) +be_local_closure(lvh_page_add_obj, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_obj_id), + /* K1 */ be_nested_str_weak(p_X25ib_X25i), + /* K2 */ be_nested_str_weak(_page), + /* K3 */ be_nested_str_weak(id), + /* K4 */ be_nested_str_weak(global), + }), + be_str_weak(add_obj), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x980C0202, // 0001 SETIDX R3 R1 R2 + 0x600C0018, // 0002 GETGBL R3 G24 + 0x58100001, // 0003 LDCONST R4 K1 + 0x88140502, // 0004 GETMBR R5 R2 K2 + 0x8C140B03, // 0005 GETMET R5 R5 K3 + 0x7C140200, // 0006 CALL R5 1 + 0x5C180200, // 0007 MOVE R6 R1 + 0x7C0C0600, // 0008 CALL R3 3 + 0xB8120800, // 0009 GETNGBL R4 K4 + 0x90100602, // 000A SETMBR R4 R3 R2 + 0x80000000, // 000B RET 0 + }) + ) ); /*******************************************************************/ -void be_load_lvh_span_class(bvm *vm) { - be_pushntvclass(vm, &be_class_lvh_span); - be_setglobal(vm, "lvh_span"); + +/******************************************************************** +** Solidified function: remove_obj +********************************************************************/ +be_local_closure(lvh_page_remove_obj, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(_obj_id), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(remove), + /* K3 */ be_nested_str_weak(p_X25ib_X25i), + /* K4 */ be_nested_str_weak(_page), + /* K5 */ be_nested_str_weak(id), + /* K6 */ be_nested_str_weak(global), + }), + be_str_weak(remove_obj), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x880C0100, // 0004 GETMBR R3 R0 K0 + 0x8C0C0702, // 0005 GETMET R3 R3 K2 + 0x5C140200, // 0006 MOVE R5 R1 + 0x7C0C0400, // 0007 CALL R3 2 + 0x780A0009, // 0008 JMPF R2 #0013 + 0x600C0018, // 0009 GETGBL R3 G24 + 0x58100003, // 000A LDCONST R4 K3 + 0x88140504, // 000B GETMBR R5 R2 K4 + 0x8C140B05, // 000C GETMET R5 R5 K5 + 0x7C140200, // 000D CALL R5 1 + 0x5C180200, // 000E MOVE R6 R1 + 0x7C0C0600, // 000F CALL R3 3 + 0xB8120C00, // 0010 GETNGBL R4 K6 + 0x4C140000, // 0011 LDNIL R5 + 0x90100605, // 0012 SETMBR R4 R3 R5 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lvh_page +********************************************************************/ +be_local_class(lvh_page, + 7, + NULL, + be_nested_map(15, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(lvh_page_init_closure) }, + { be_const_key_weak(prev, 3), be_const_var(4) }, + { be_const_key_weak(next, -1), be_const_var(5) }, + { be_const_key_weak(back, 4), be_const_var(6) }, + { be_const_key_weak(remove_obj, 7), be_const_closure(lvh_page_remove_obj_closure) }, + { be_const_key_weak(show_anim, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(0, 3), be_const_int(0) }, + { be_const_key_int(1, -1), be_const_int(5) }, + { be_const_key_int(2, -1), be_const_int(8) }, + { be_const_key_int(-1, -1), be_const_int(6) }, + { be_const_key_int(-2, -1), be_const_int(7) }, + })) ) } )) }, + { be_const_key_weak(id, 5), be_const_closure(lvh_page_id_closure) }, + { be_const_key_weak(_page_id, 11), be_const_var(1) }, + { be_const_key_weak(get_obj, -1), be_const_closure(lvh_page_get_obj_closure) }, + { be_const_key_weak(add_obj, -1), be_const_closure(lvh_page_add_obj_closure) }, + { be_const_key_weak(_obj_id, -1), be_const_var(0) }, + { be_const_key_weak(_lv_scr, 13), be_const_var(2) }, + { be_const_key_weak(_oh, -1), be_const_var(3) }, + { be_const_key_weak(get_scr, 14), be_const_closure(lvh_page_get_scr_closure) }, + { be_const_key_weak(show, -1), be_const_closure(lvh_page_show_closure) }, + })), + be_str_weak(lvh_page) +); +/*******************************************************************/ + +void be_load_lvh_page_class(bvm *vm) { + be_pushntvclass(vm, &be_class_lvh_page); + be_setglobal(vm, "lvh_page"); be_pop(vm, 1); } @@ -10301,6 +10307,5 @@ be_local_module(haspmota, ); BE_EXPORT_VARIABLE be_define_const_native_module(haspmota); /********************************************************************/ - -#endif // USE_LVGL_HASPMOTA -#endif // USE_LVGL +/********************************************************************/ +/* End of solidification */