From 9426df28f9fb62762c5de13658f73464b208c208 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 29 Aug 2025 11:11:01 +0200 Subject: [PATCH] Berry animation fix and improve sequence (#23849) --- lib/libesp32/berry_animation/README.md | 3 +- .../anim_examples/compiled/aurora_borealis.be | 25 +- .../anim_examples/compiled/cylon_rainbow.be | 80 + .../anim_examples/compiled/palette_demo.be | 26 +- .../compiled/palette_showcase.be | 38 +- .../compiled/property_assignment_demo.be | 34 +- .../anim_examples/compiled/rainbow_cycle.be | 9 +- .../compiled/sequence_assignments_demo.be | 226 + .../anim_examples/compiled/simple_palette.be | 9 +- .../anim_examples/compiled/swipe_rainbow.be | 56 + .../anim_examples/cylon_rainbow.anim | 30 + .../anim_examples/palette_demo.anim | 3 +- .../anim_examples/palette_showcase.anim | 3 +- .../property_assignment_demo.anim | 3 +- .../anim_examples/rainbow_cycle.anim | 4 +- .../sequence_assignments_demo.anim | 109 + .../anim_examples/swipe_rainbow.anim | 27 + .../docs/ANIMATION_CLASS_HIERARCHY.md | 30 +- .../docs/ANIMATION_DEVELOPMENT.md | 1 + .../berry_animation/docs/DSL_REFERENCE.md | 164 +- lib/libesp32/berry_animation/docs/EXAMPLES.md | 170 +- .../berry_animation/docs/QUICK_START.md | 19 +- .../berry_animation/docs/TROUBLESHOOTING.md | 78 +- lib/libesp32/berry_animation/src/animation.be | 2 +- .../berry_animation/src/animation_dsl.be | 2 + .../src/core/animation_base.be | 2 +- .../src/core/animation_engine.be | 21 +- .../src/core/parameterized_object.be | 7 + .../src/core/sequence_manager.be | 277 +- .../berry_animation/src/dsl/runtime.be | 2 +- .../berry_animation/src/dsl/transpiler.be | 571 +- .../providers/color_cycle_color_provider.be | 179 +- .../providers/rich_palette_color_provider.be | 68 +- .../src/solidify/solidified_animation.h | 16980 ++++++++-------- .../src/solidify/solidified_animation_dsl.h | 12731 ++++++------ .../src/tests/bytes_type_test.be | 92 + .../src/tests/color_cycle_animation_test.be | 12 +- .../src/tests/color_cycle_bytes_test.be | 155 + .../src/tests/crenel_position_color_test.be | 2 +- .../src/tests/dsl_core_processing_test.be | 11 +- .../src/tests/dsl_runtime_test.be | 12 +- .../src/tests/dsl_transpiler_test.be | 200 +- .../src/tests/filled_animation_test.be | 2 +- .../src/tests/palette_dsl_test.be | 537 +- .../tests/sequence_manager_layering_test.be | 71 +- .../src/tests/sequence_manager_test.be | 216 +- .../src/tests/symbol_registry_test.be | 2 +- .../berry_animation/src/tests/test_all.be | 2 + .../berry_animation/src/user_functions.be | 51 + 49 files changed, 18311 insertions(+), 15043 deletions(-) create mode 100644 lib/libesp32/berry_animation/anim_examples/compiled/cylon_rainbow.be create mode 100644 lib/libesp32/berry_animation/anim_examples/compiled/sequence_assignments_demo.be create mode 100644 lib/libesp32/berry_animation/anim_examples/compiled/swipe_rainbow.be create mode 100644 lib/libesp32/berry_animation/anim_examples/cylon_rainbow.anim create mode 100644 lib/libesp32/berry_animation/anim_examples/sequence_assignments_demo.anim create mode 100644 lib/libesp32/berry_animation/anim_examples/swipe_rainbow.anim create mode 100644 lib/libesp32/berry_animation/src/tests/bytes_type_test.be create mode 100644 lib/libesp32/berry_animation/src/tests/color_cycle_bytes_test.be diff --git a/lib/libesp32/berry_animation/README.md b/lib/libesp32/berry_animation/README.md index 6c7333455..747ba8389 100644 --- a/lib/libesp32/berry_animation/README.md +++ b/lib/libesp32/berry_animation/README.md @@ -77,10 +77,11 @@ sequence rgb_show { wait 500ms play blue_pulse for 3s - repeat 2 times: + repeat 2 times { play red_pulse for 1s play green_pulse for 1s play blue_pulse for 1s + } } run rgb_show diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/aurora_borealis.be b/lib/libesp32/berry_animation/anim_examples/compiled/aurora_borealis.be index 5435a9eed..4532c3476 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/aurora_borealis.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/aurora_borealis.be @@ -22,13 +22,8 @@ aurora_base_.palette = aurora_colors_ # palette aurora_base_.cycle_period = 10000 # cycle period aurora_base_.transition_type = animation.SINE # transition type (explicit for clarity) aurora_base_.brightness = 180 # brightness (dimmed for aurora effect) -var demo_ = (def (engine) - var steps = [] - steps.push(animation.create_play_step(animation.global('aurora_base_'), 0)) # infinite duration (no 'for' clause) - var seq_manager = animation.SequenceManager(engine) - seq_manager.start_sequence(steps) - return seq_manager -end)(engine) +var demo_ = animation.SequenceManager(engine) + .push_play_step(aurora_base_, nil) # infinite duration (no 'for' clause) engine.add_sequence_manager(demo_) engine.start() @@ -41,19 +36,19 @@ engine.start() # Define aurora color palette palette aurora_colors = [ - (0, 0x000022), # Dark night sky - (64, 0x004400), # Dark green - (128, 0x00AA44), # Aurora green - (192, 0x44AA88), # Light green + (0, 0x000022) # Dark night sky + (64, 0x004400) # Dark green + (128, 0x00AA44) # Aurora green + (192, 0x44AA88) # Light green (255, 0x88FFAA) # Bright aurora ] # Secondary purple palette palette aurora_purple = [ - (0, 0x220022), # Dark purple - (64, 0x440044), # Medium purple - (128, 0x8800AA), # Bright purple - (192, 0xAA44CC), # Light purple + (0, 0x220022) # Dark purple + (64, 0x440044) # Medium purple + (128, 0x8800AA) # Bright purple + (192, 0xAA44CC) # Light purple (255, 0xCCAAFF) # Pale purple ] diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/cylon_rainbow.be b/lib/libesp32/berry_animation/anim_examples/compiled/cylon_rainbow.be new file mode 100644 index 000000000..d221052a9 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/compiled/cylon_rainbow.be @@ -0,0 +1,80 @@ +# Generated Berry code from Animation DSL +# Source: cylon_rainbow.anim +# +# This file was automatically generated by compile_all_examples.sh +# Do not edit manually - changes will be overwritten + +import animation + +# Cylon Rainbow +# Alternat between COSINE and TRIANGLE then shift to next color +# Auto-generated strip initialization (using Tasmota configuration) +var engine = animation.init_strip() + +var strip_len_ = animation.strip_length(engine) +var eye_duration_ = 5000 # duration for a cylon eye cycle +var eye_palette_ = bytes("FFFF0000" "FFFFFF00" "FF008000" "FFEE82EE") +var eye_color_ = animation.color_cycle(engine) +eye_color_.palette = eye_palette_ +eye_color_.cycle_period = 0 +var cosine_val_ = (def (engine) + var provider = animation.cosine_osc(engine) + provider.min_value = 0 + provider.max_value = animation.create_closure_value(engine, def (self) return self.resolve(strip_len_) - 2 end) + provider.duration = eye_duration_ + return provider +end)(engine) +var triangle_val_ = (def (engine) + var provider = animation.triangle(engine) + provider.min_value = 0 + provider.max_value = animation.create_closure_value(engine, def (self) return self.resolve(strip_len_) - 2 end) + provider.duration = eye_duration_ + return provider +end)(engine) +var red_eye_ = animation.beacon_animation(engine) +red_eye_.color = eye_color_ # palette that will advance when we do `eye_color.next = 1` +red_eye_.pos = cosine_val_ # oscillator for position +red_eye_.beacon_size = 3 # small 3 pixels eye +red_eye_.slew_size = 2 # with 2 pixel shading around +var cylon_eye_ = animation.SequenceManager(engine, -1) + .push_play_step(red_eye_, eye_duration_) # use COSINE movement + .push_assign_step(def (engine) red_eye_.pos = triangle_val_ end) # switch to TRIANGLE + .push_play_step(red_eye_, eye_duration_) + .push_assign_step(def (engine) red_eye_.pos = cosine_val_ end) # switch back to COSINE for next iteration + .push_assign_step(def (engine) eye_color_.next = 1 end) # advance to next color +engine.add_sequence_manager(cylon_eye_) +engine.start() + + +#- Original DSL source: +# Cylon Rainbow +# Alternat between COSINE and TRIANGLE then shift to next color + +set strip_len = strip_length() + +set eye_duration = 5s # duration for a cylon eye cycle + +palette eye_palette = [ red, yellow, green, violet ] + +color eye_color = color_cycle(palette=eye_palette, cycle_period=0) + +set cosine_val = cosine_osc(min_value = 0, max_value = strip_len - 2, duration = eye_duration) +set triangle_val = triangle(min_value = 0, max_value = strip_len - 2, duration = eye_duration) + +animation red_eye = beacon_animation( + color = eye_color # palette that will advance when we do `eye_color.next = 1` + pos = cosine_val # oscillator for position + beacon_size = 3 # small 3 pixels eye + slew_size = 2 # with 2 pixel shading around +) + +sequence cylon_eye forever { + play red_eye for eye_duration # use COSINE movement + red_eye.pos = triangle_val # switch to TRIANGLE + play red_eye for eye_duration + red_eye.pos = cosine_val # switch back to COSINE for next iteration + eye_color.next = 1 # advance to next color +} + +run cylon_eye +-# diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/palette_demo.be b/lib/libesp32/berry_animation/anim_examples/compiled/palette_demo.be index cecf445af..b139cee78 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/palette_demo.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/palette_demo.be @@ -24,20 +24,15 @@ var ocean_anim_ = animation.rich_palette_animation(engine) ocean_anim_.palette = ocean_colors_ ocean_anim_.cycle_period = 8000 # Sequence to show both palettes -var palette_demo_ = (def (engine) - var steps = [] - steps.push(animation.create_play_step(animation.global('fire_anim_'), 10000)) - steps.push(animation.create_wait_step(1000)) - steps.push(animation.create_play_step(animation.global('ocean_anim_'), 10000)) - steps.push(animation.create_wait_step(1000)) - for repeat_i : 0..2-1 - steps.push(animation.create_play_step(animation.global('fire_anim_'), 3000)) - steps.push(animation.create_play_step(animation.global('ocean_anim_'), 3000)) - end - var seq_manager = animation.SequenceManager(engine) - seq_manager.start_sequence(steps) - return seq_manager -end)(engine) +var palette_demo_ = animation.SequenceManager(engine) + .push_play_step(fire_anim_, 10000) + .push_wait_step(1000) + .push_play_step(ocean_anim_, 10000) + .push_wait_step(1000) + .push_repeat_subsequence(animation.SequenceManager(engine, 2) + .push_play_step(fire_anim_, 3000) + .push_play_step(ocean_anim_, 3000) + ) engine.add_sequence_manager(palette_demo_) engine.start() @@ -77,9 +72,10 @@ sequence palette_demo { wait 1s play ocean_anim for 10s wait 1s - repeat 2 times: + repeat 2 times { play fire_anim for 3s play ocean_anim for 3s + } } run palette_demo diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/palette_showcase.be b/lib/libesp32/berry_animation/anim_examples/compiled/palette_showcase.be index 4707e6257..46b4591c3 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/palette_showcase.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/palette_showcase.be @@ -40,31 +40,26 @@ sunset_glow_.cycle_period = 6000 sunset_glow_.transition_type = animation.SINE sunset_glow_.brightness = 220 # Sequence to showcase all palettes -var palette_showcase_ = (def (engine) - var steps = [] +var palette_showcase_ = animation.SequenceManager(engine) # Fire effect - steps.push(animation.create_play_step(animation.global('fire_effect_'), 8000)) - steps.push(animation.create_wait_step(1000)) + .push_play_step(fire_effect_, 8000) + .push_wait_step(1000) # Ocean waves - steps.push(animation.create_play_step(animation.global('ocean_waves_'), 8000)) - steps.push(animation.create_wait_step(1000)) + .push_play_step(ocean_waves_, 8000) + .push_wait_step(1000) # Aurora borealis - steps.push(animation.create_play_step(animation.global('aurora_lights_'), 8000)) - steps.push(animation.create_wait_step(1000)) + .push_play_step(aurora_lights_, 8000) + .push_wait_step(1000) # Sunset - steps.push(animation.create_play_step(animation.global('sunset_glow_'), 8000)) - steps.push(animation.create_wait_step(1000)) + .push_play_step(sunset_glow_, 8000) + .push_wait_step(1000) # Quick cycle through all - for repeat_i : 0..3-1 - steps.push(animation.create_play_step(animation.global('fire_effect_'), 2000)) - steps.push(animation.create_play_step(animation.global('ocean_waves_'), 2000)) - steps.push(animation.create_play_step(animation.global('aurora_lights_'), 2000)) - steps.push(animation.create_play_step(animation.global('sunset_glow_'), 2000)) - end - var seq_manager = animation.SequenceManager(engine) - seq_manager.start_sequence(steps) - return seq_manager -end)(engine) + .push_repeat_subsequence(animation.SequenceManager(engine, 3) + .push_play_step(fire_effect_, 2000) + .push_play_step(ocean_waves_, 2000) + .push_play_step(aurora_lights_, 2000) + .push_play_step(sunset_glow_, 2000) + ) engine.add_sequence_manager(palette_showcase_) engine.start() @@ -143,11 +138,12 @@ sequence palette_showcase { wait 1s # Quick cycle through all - repeat 3 times: + repeat 3 times { play fire_effect for 2s play ocean_waves for 2s play aurora_lights for 2s play sunset_glow for 2s + } } run palette_showcase diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/property_assignment_demo.be b/lib/libesp32/berry_animation/anim_examples/compiled/property_assignment_demo.be index 8b77929f9..4bdbb95df 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/property_assignment_demo.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/property_assignment_demo.be @@ -41,25 +41,20 @@ left_pulse_.priority = 10 center_pulse_.priority = 15 # Center has highest priority right_pulse_.priority = 5 # Create a sequence that shows all three -var demo_ = (def (engine) - var steps = [] - steps.push(animation.create_play_step(animation.global('left_pulse_'), 3000)) - steps.push(animation.create_wait_step(500)) - steps.push(animation.create_play_step(animation.global('center_pulse_'), 3000)) - steps.push(animation.create_wait_step(500)) - steps.push(animation.create_play_step(animation.global('right_pulse_'), 3000)) - steps.push(animation.create_wait_step(500)) +var demo_ = animation.SequenceManager(engine) + .push_play_step(left_pulse_, 3000) + .push_wait_step(500) + .push_play_step(center_pulse_, 3000) + .push_wait_step(500) + .push_play_step(right_pulse_, 3000) + .push_wait_step(500) # Play all together for final effect - for repeat_i : 0..3-1 - steps.push(animation.create_play_step(animation.global('left_pulse_'), 2000)) - steps.push(animation.create_play_step(animation.global('center_pulse_'), 2000)) - steps.push(animation.create_play_step(animation.global('right_pulse_'), 2000)) - steps.push(animation.create_wait_step(1000)) - end - var seq_manager = animation.SequenceManager(engine) - seq_manager.start_sequence(steps) - return seq_manager -end)(engine) + .push_repeat_subsequence(animation.SequenceManager(engine, -1) + .push_play_step(left_pulse_, 2000) + .push_play_step(center_pulse_, 2000) + .push_play_step(right_pulse_, 2000) + .push_wait_step(1000) + ) engine.add_sequence_manager(demo_) engine.start() @@ -100,11 +95,12 @@ sequence demo { wait 500ms # Play all together for final effect - repeat 3 times: + repeat forever { play left_pulse for 2s play center_pulse for 2s play right_pulse for 2s wait 1s + } } run demo diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/rainbow_cycle.be b/lib/libesp32/berry_animation/anim_examples/compiled/rainbow_cycle.be index d4108e508..2e708a9bf 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/rainbow_cycle.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/rainbow_cycle.be @@ -9,12 +9,13 @@ import animation # Rainbow Cycle - Classic WLED effect # Smooth rainbow colors cycling across the strip #strip length 60 -# Create smooth rainbow cycle animation # Auto-generated strip initialization (using Tasmota configuration) var engine = animation.init_strip() +var rainbow_palette_ = bytes("FFFF0000" "FFFF8000" "FFFFFF00" "FF00FF00" "FF0000FF" "FF8000FF" "FFFF00FF") # rainbow colors +# Create smooth rainbow cycle animation var rainbow_cycle_ = animation.color_cycle(engine) -rainbow_cycle_.palette = [0xFFFF0000, 0xFFFF8000, 0xFFFFFF00, 0xFF00FF00, 0xFF0000FF, 0xFF8000FF, 0xFFFF00FF] # rainbow colors +rainbow_cycle_.palette = rainbow_palette_ rainbow_cycle_.cycle_period = 5000 # cycle period var rainbow_animation_ = animation.solid(engine) rainbow_animation_.color = rainbow_cycle_ @@ -29,9 +30,11 @@ engine.start() #strip length 60 +palette rainbow_palette = [0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF] # rainbow colors + # Create smooth rainbow cycle animation color rainbow_cycle = color_cycle( - palette=[0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF] # rainbow colors + palette=rainbow_palette cycle_period=5s # cycle period ) animation rainbow_animation = solid(color=rainbow_cycle) diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/sequence_assignments_demo.be b/lib/libesp32/berry_animation/anim_examples/compiled/sequence_assignments_demo.be new file mode 100644 index 000000000..2929946dd --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/compiled/sequence_assignments_demo.be @@ -0,0 +1,226 @@ +# Generated Berry code from Animation DSL +# Source: sequence_assignments_demo.anim +# +# This file was automatically generated by compile_all_examples.sh +# Do not edit manually - changes will be overwritten + +import animation + +# Sequence Assignments Demo +# Demonstrates dynamic property changes within sequences +# Set up strip length and value providers +# Auto-generated strip initialization (using Tasmota configuration) +var engine = animation.init_strip() + +var strip_len_ = animation.strip_length(engine) +var triangle_val_ = (def (engine) + var provider = animation.triangle(engine) + provider.min_value = 0 + provider.max_value = animation.create_closure_value(engine, def (self) return self.resolve(strip_len_) - 2 end) + provider.duration = 5000 + return provider +end)(engine) +var cosine_val_ = (def (engine) + var provider = animation.cosine_osc(engine) + provider.min_value = 0 + provider.max_value = animation.create_closure_value(engine, def (self) return self.resolve(strip_len_) - 2 end) + provider.duration = 5000 + return provider +end)(engine) +var brightness_high_ = 255 +var brightness_low_ = 64 +# Create color palette and cycling color +var eye_palette_ = bytes("FFFF0000" "FFFFFF00" "FF008000" "FFEE82EE") +var eye_color_ = animation.color_cycle(engine) +eye_color_.palette = eye_palette_ +eye_color_.cycle_period = 0 +# Create animations +var red_eye_ = animation.beacon_animation(engine) +red_eye_.color = eye_color_ +red_eye_.pos = cosine_val_ +red_eye_.beacon_size = 3 +red_eye_.slew_size = 2 +red_eye_.priority = 10 +var pulse_demo_ = animation.pulsating_animation(engine) +pulse_demo_.color = 0xFF0000FF +pulse_demo_.period = 2000 +pulse_demo_.priority = 5 +# Sequence 1: Cylon Eye with Position Changes +var cylon_eye_ = animation.SequenceManager(engine) + .push_play_step(red_eye_, 3000) + .push_assign_step(def (engine) red_eye_.pos = triangle_val_ end) # Change to triangle oscillator + .push_play_step(red_eye_, 3000) + .push_assign_step(def (engine) red_eye_.pos = cosine_val_ end) # Change back to cosine + .push_assign_step(def (engine) eye_color_.next = 1 end) # Advance to next color + .push_play_step(red_eye_, 2000) +# Sequence 2: Brightness Control Demo +var brightness_demo_ = animation.SequenceManager(engine) + .push_play_step(pulse_demo_, 2000) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_low_ end) # Dim the animation + .push_play_step(pulse_demo_, 2000) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_high_ end) # Brighten again + .push_play_step(pulse_demo_, 2000) +# Sequence 3: Multiple Property Changes +var multi_change_ = animation.SequenceManager(engine) + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.color = 0xFFFF0000 end) # Change color + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_low_ end) # And brightness + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.color = 0xFF008000 end) # Change color again + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_high_ end) # Full brightness + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.color = 0xFF0000FF end) # Back to blue +# Sequence 4: Assignments in Repeat Blocks +var repeat_demo_ = animation.SequenceManager(engine) + .push_repeat_subsequence(animation.SequenceManager(engine, 3) + .push_play_step(red_eye_, 1000) + .push_assign_step(def (engine) red_eye_.pos = triangle_val_ end) # Change oscillator + .push_play_step(red_eye_, 1000) + .push_assign_step(def (engine) red_eye_.pos = cosine_val_ end) # Change back + .push_assign_step(def (engine) eye_color_.next = 1 end) # Next color + ) +# Main demo sequence combining all examples +var main_demo_ = animation.SequenceManager(engine) + # Run cylon eye demo + .push_play_step(red_eye_, 1000) + .push_wait_step(500) + # Demonstrate position changes + .push_assign_step(def (engine) red_eye_.pos = triangle_val_ end) + .push_play_step(red_eye_, 2000) + .push_assign_step(def (engine) red_eye_.pos = cosine_val_ end) + .push_play_step(red_eye_, 2000) + # Color cycling + .push_assign_step(def (engine) eye_color_.next = 1 end) + .push_play_step(red_eye_, 1000) + .push_assign_step(def (engine) eye_color_.next = 1 end) + .push_play_step(red_eye_, 1000) + .push_wait_step(1000) + # Brightness demo with pulse + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_low_ end) + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_high_ end) + .push_play_step(pulse_demo_, 1000) + # Multi-property changes + .push_assign_step(def (engine) pulse_demo_.color = 0xFFFF0000 end) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_low_ end) + .push_play_step(pulse_demo_, 1000) + .push_assign_step(def (engine) pulse_demo_.color = 0xFF008000 end) + .push_assign_step(def (engine) pulse_demo_.opacity = brightness_high_ end) + .push_play_step(pulse_demo_, 1000) +# Run the main demo +engine.add_sequence_manager(main_demo_) +engine.start() + + +#- Original DSL source: +# Sequence Assignments Demo +# Demonstrates dynamic property changes within sequences + +# Set up strip length and value providers +set strip_len = strip_length() +set triangle_val = triangle(min_value=0, max_value=strip_len - 2, duration=5s) +set cosine_val = cosine_osc(min_value=0, max_value=strip_len - 2, duration=5s) +set brightness_high = 255 +set brightness_low = 64 + +# Create color palette and cycling color +palette eye_palette = [red, yellow, green, violet] +color eye_color = color_cycle(palette=eye_palette, cycle_period=0) + +# Create animations +animation red_eye = beacon_animation( + color=eye_color + pos=cosine_val + beacon_size=3 + slew_size=2 + priority=10 +) + +animation pulse_demo = pulsating_animation( + color=blue + period=2s + priority=5 +) + +# Sequence 1: Cylon Eye with Position Changes +sequence cylon_eye { + play red_eye for 3s + red_eye.pos = triangle_val # Change to triangle oscillator + play red_eye for 3s + red_eye.pos = cosine_val # Change back to cosine + eye_color.next = 1 # Advance to next color + play red_eye for 2s +} + +# Sequence 2: Brightness Control Demo +sequence brightness_demo { + play pulse_demo for 2s + pulse_demo.opacity = brightness_low # Dim the animation + play pulse_demo for 2s + pulse_demo.opacity = brightness_high # Brighten again + play pulse_demo for 2s +} + +# Sequence 3: Multiple Property Changes +sequence multi_change { + play pulse_demo for 1s + pulse_demo.color = red # Change color + pulse_demo.opacity = brightness_low # And brightness + play pulse_demo for 1s + pulse_demo.color = green # Change color again + pulse_demo.opacity = brightness_high # Full brightness + play pulse_demo for 1s + pulse_demo.color = blue # Back to blue +} + +# Sequence 4: Assignments in Repeat Blocks +sequence repeat_demo { + repeat 3 times { + play red_eye for 1s + red_eye.pos = triangle_val # Change oscillator + play red_eye for 1s + red_eye.pos = cosine_val # Change back + eye_color.next = 1 # Next color + } +} + +# Main demo sequence combining all examples +sequence main_demo { + # Run cylon eye demo + play red_eye for 1s + wait 500ms + + # Demonstrate position changes + red_eye.pos = triangle_val + play red_eye for 2s + red_eye.pos = cosine_val + play red_eye for 2s + + # Color cycling + eye_color.next = 1 + play red_eye for 1s + eye_color.next = 1 + play red_eye for 1s + + wait 1s + + # Brightness demo with pulse + play pulse_demo for 1s + pulse_demo.opacity = brightness_low + play pulse_demo for 1s + pulse_demo.opacity = brightness_high + play pulse_demo for 1s + + # Multi-property changes + pulse_demo.color = red + pulse_demo.opacity = brightness_low + play pulse_demo for 1s + pulse_demo.color = green + pulse_demo.opacity = brightness_high + play pulse_demo for 1s +} + +# Run the main demo +run main_demo +-# diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/simple_palette.be b/lib/libesp32/berry_animation/anim_examples/compiled/simple_palette.be index ec0210612..849d19e5c 100644 --- a/lib/libesp32/berry_animation/anim_examples/compiled/simple_palette.be +++ b/lib/libesp32/berry_animation/anim_examples/compiled/simple_palette.be @@ -19,13 +19,8 @@ var rainbow_cycle_ = animation.rich_palette_animation(engine) rainbow_cycle_.palette = rainbow_ rainbow_cycle_.cycle_period = 3000 # Simple sequence -var demo_ = (def (engine) - var steps = [] - steps.push(animation.create_play_step(animation.global('rainbow_cycle_'), 15000)) - var seq_manager = animation.SequenceManager(engine) - seq_manager.start_sequence(steps) - return seq_manager -end)(engine) +var demo_ = animation.SequenceManager(engine) + .push_play_step(rainbow_cycle_, 15000) engine.add_sequence_manager(demo_) engine.start() diff --git a/lib/libesp32/berry_animation/anim_examples/compiled/swipe_rainbow.be b/lib/libesp32/berry_animation/anim_examples/compiled/swipe_rainbow.be new file mode 100644 index 000000000..c940700b5 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/compiled/swipe_rainbow.be @@ -0,0 +1,56 @@ +# Generated Berry code from Animation DSL +# Source: swipe_rainbow.anim +# +# This file was automatically generated by compile_all_examples.sh +# Do not edit manually - changes will be overwritten + +import animation + +# Swipe Rainbow +# Auto-generated strip initialization (using Tasmota configuration) +var engine = animation.init_strip() + +var strip_len_ = animation.strip_length(engine) +var palette_olivary_ = bytes("FFFF0000" "FFFFA500" "FFFFFF00" "FF008000" "FF0000FF" "FF4B0082" "FFEE82EE" "FFFFFFFF") +var olivary_ = animation.color_cycle(engine) +olivary_.palette = palette_olivary_ +olivary_.cycle_period = 0 +var swipe_animation_ = animation.solid(engine) +swipe_animation_.color = olivary_ +var slide_colors_ = animation.SequenceManager(engine) + .push_play_step(swipe_animation_, 1000) + .push_assign_step(def (engine) olivary_.next = 1 end) +engine.add_sequence_manager(slide_colors_) +engine.start() + + +#- Original DSL source: +# Swipe Rainbow + +set strip_len = strip_length() + +palette palette_olivary = [ + red, + orange, + yellow, + green, + blue, + indigo, + violet, + white +] + +color olivary = color_cycle(palette=palette_olivary, cycle_period=0) + +animation swipe_animation = solid( + color = olivary +) + +sequence slide_colors { + play swipe_animation for 1s + olivary.next = 1 +} + +run slide_colors + +-# diff --git a/lib/libesp32/berry_animation/anim_examples/cylon_rainbow.anim b/lib/libesp32/berry_animation/anim_examples/cylon_rainbow.anim new file mode 100644 index 000000000..fb7d3a905 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/cylon_rainbow.anim @@ -0,0 +1,30 @@ +# Cylon Rainbow +# Alternat between COSINE and TRIANGLE then shift to next color + +set strip_len = strip_length() + +set eye_duration = 5s # duration for a cylon eye cycle + +palette eye_palette = [ red, yellow, green, violet ] + +color eye_color = color_cycle(palette=eye_palette, cycle_period=0) + +set cosine_val = cosine_osc(min_value = 0, max_value = strip_len - 2, duration = eye_duration) +set triangle_val = triangle(min_value = 0, max_value = strip_len - 2, duration = eye_duration) + +animation red_eye = beacon_animation( + color = eye_color # palette that will advance when we do `eye_color.next = 1` + pos = cosine_val # oscillator for position + beacon_size = 3 # small 3 pixels eye + slew_size = 2 # with 2 pixel shading around +) + +sequence cylon_eye forever { + play red_eye for eye_duration # use COSINE movement + red_eye.pos = triangle_val # switch to TRIANGLE + play red_eye for eye_duration + red_eye.pos = cosine_val # switch back to COSINE for next iteration + eye_color.next = 1 # advance to next color +} + +run cylon_eye \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_examples/palette_demo.anim b/lib/libesp32/berry_animation/anim_examples/palette_demo.anim index 4780898db..cf58d0882 100644 --- a/lib/libesp32/berry_animation/anim_examples/palette_demo.anim +++ b/lib/libesp32/berry_animation/anim_examples/palette_demo.anim @@ -32,9 +32,10 @@ sequence palette_demo { wait 1s play ocean_anim for 10s wait 1s - repeat 2 times: + repeat 2 times { play fire_anim for 3s play ocean_anim for 3s + } } run palette_demo \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_examples/palette_showcase.anim b/lib/libesp32/berry_animation/anim_examples/palette_showcase.anim index fcf1fc0a8..3dc5128a1 100644 --- a/lib/libesp32/berry_animation/anim_examples/palette_showcase.anim +++ b/lib/libesp32/berry_animation/anim_examples/palette_showcase.anim @@ -71,11 +71,12 @@ sequence palette_showcase { wait 1s # Quick cycle through all - repeat 3 times: + repeat 3 times { play fire_effect for 2s play ocean_waves for 2s play aurora_lights for 2s play sunset_glow for 2s + } } run palette_showcase \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_examples/property_assignment_demo.anim b/lib/libesp32/berry_animation/anim_examples/property_assignment_demo.anim index 06a51f6e2..b7e312292 100644 --- a/lib/libesp32/berry_animation/anim_examples/property_assignment_demo.anim +++ b/lib/libesp32/berry_animation/anim_examples/property_assignment_demo.anim @@ -33,11 +33,12 @@ sequence demo { wait 500ms # Play all together for final effect - repeat 3 times: + repeat forever { play left_pulse for 2s play center_pulse for 2s play right_pulse for 2s wait 1s + } } run demo \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_examples/rainbow_cycle.anim b/lib/libesp32/berry_animation/anim_examples/rainbow_cycle.anim index fadc82557..5c288af4a 100644 --- a/lib/libesp32/berry_animation/anim_examples/rainbow_cycle.anim +++ b/lib/libesp32/berry_animation/anim_examples/rainbow_cycle.anim @@ -3,9 +3,11 @@ #strip length 60 +palette rainbow_palette = [0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF] # rainbow colors + # Create smooth rainbow cycle animation color rainbow_cycle = color_cycle( - palette=[0xFF0000, 0xFF8000, 0xFFFF00, 0x00FF00, 0x0000FF, 0x8000FF, 0xFF00FF] # rainbow colors + palette=rainbow_palette cycle_period=5s # cycle period ) animation rainbow_animation = solid(color=rainbow_cycle) diff --git a/lib/libesp32/berry_animation/anim_examples/sequence_assignments_demo.anim b/lib/libesp32/berry_animation/anim_examples/sequence_assignments_demo.anim new file mode 100644 index 000000000..5079759f0 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/sequence_assignments_demo.anim @@ -0,0 +1,109 @@ +# Sequence Assignments Demo +# Demonstrates dynamic property changes within sequences + +# Set up strip length and value providers +set strip_len = strip_length() +set triangle_val = triangle(min_value=0, max_value=strip_len - 2, duration=5s) +set cosine_val = cosine_osc(min_value=0, max_value=strip_len - 2, duration=5s) +set brightness_high = 255 +set brightness_low = 64 + +# Create color palette and cycling color +palette eye_palette = [red, yellow, green, violet] +color eye_color = color_cycle(palette=eye_palette, cycle_period=0) + +# Create animations +animation red_eye = beacon_animation( + color=eye_color + pos=cosine_val + beacon_size=3 + slew_size=2 + priority=10 +) + +animation pulse_demo = pulsating_animation( + color=blue + period=2s + priority=5 +) + +# Sequence 1: Cylon Eye with Position Changes +sequence cylon_eye { + play red_eye for 3s + red_eye.pos = triangle_val # Change to triangle oscillator + play red_eye for 3s + red_eye.pos = cosine_val # Change back to cosine + eye_color.next = 1 # Advance to next color + play red_eye for 2s +} + +# Sequence 2: Brightness Control Demo +sequence brightness_demo { + play pulse_demo for 2s + pulse_demo.opacity = brightness_low # Dim the animation + play pulse_demo for 2s + pulse_demo.opacity = brightness_high # Brighten again + play pulse_demo for 2s +} + +# Sequence 3: Multiple Property Changes +sequence multi_change { + play pulse_demo for 1s + pulse_demo.color = red # Change color + pulse_demo.opacity = brightness_low # And brightness + play pulse_demo for 1s + pulse_demo.color = green # Change color again + pulse_demo.opacity = brightness_high # Full brightness + play pulse_demo for 1s + pulse_demo.color = blue # Back to blue +} + +# Sequence 4: Assignments in Repeat Blocks +sequence repeat_demo { + repeat 3 times { + play red_eye for 1s + red_eye.pos = triangle_val # Change oscillator + play red_eye for 1s + red_eye.pos = cosine_val # Change back + eye_color.next = 1 # Next color + } +} + +# Main demo sequence combining all examples +sequence main_demo { + # Run cylon eye demo + play red_eye for 1s + wait 500ms + + # Demonstrate position changes + red_eye.pos = triangle_val + play red_eye for 2s + red_eye.pos = cosine_val + play red_eye for 2s + + # Color cycling + eye_color.next = 1 + play red_eye for 1s + eye_color.next = 1 + play red_eye for 1s + + wait 1s + + # Brightness demo with pulse + play pulse_demo for 1s + pulse_demo.opacity = brightness_low + play pulse_demo for 1s + pulse_demo.opacity = brightness_high + play pulse_demo for 1s + + # Multi-property changes + pulse_demo.color = red + pulse_demo.opacity = brightness_low + play pulse_demo for 1s + pulse_demo.color = green + pulse_demo.opacity = brightness_high + play pulse_demo for 1s +} + +# Run the main demo +run main_demo \ No newline at end of file diff --git a/lib/libesp32/berry_animation/anim_examples/swipe_rainbow.anim b/lib/libesp32/berry_animation/anim_examples/swipe_rainbow.anim new file mode 100644 index 000000000..e24556e50 --- /dev/null +++ b/lib/libesp32/berry_animation/anim_examples/swipe_rainbow.anim @@ -0,0 +1,27 @@ +# Swipe Rainbow + +set strip_len = strip_length() + +palette palette_olivary = [ + red, + orange, + yellow, + green, + blue, + indigo, + violet, + white +] + +color olivary = color_cycle(palette=palette_olivary, cycle_period=0) + +animation swipe_animation = solid( + color = olivary +) + +sequence slide_colors { + play swipe_animation for 1s + olivary.next = 1 +} + +run slide_colors diff --git a/lib/libesp32/berry_animation/docs/ANIMATION_CLASS_HIERARCHY.md b/lib/libesp32/berry_animation/docs/ANIMATION_CLASS_HIERARCHY.md index 911942bb8..0ca12a4bc 100644 --- a/lib/libesp32/berry_animation/docs/ANIMATION_CLASS_HIERARCHY.md +++ b/lib/libesp32/berry_animation/docs/ANIMATION_CLASS_HIERARCHY.md @@ -241,41 +241,35 @@ color static_accent = solid(color=accent) ### ColorCycleColorProvider -Cycles through a custom list of colors with smooth transitions. Inherits from `ColorProvider`. +Cycles through a palette of colors with brutal switching. Inherits from `ColorProvider`. | Parameter | Type | Default | Constraints | Description | |-----------|------|---------|-------------|-------------| -| `palette` | list | [0xFF0000FF, 0xFF00FF00, 0xFFFF0000] | - | List of colors to cycle through | +| `palette` | bytes | default palette | - | Palette bytes in AARRGGBB format | | `cycle_period` | int | 5000 | min: 0 | Cycle time in ms (0 = manual only) | -| `transition_type` | int | 1 | enum: [0,1] | 0=linear, 1=sine/smooth | -| `next` | int | 0 | - | Write 1 to move to next color manually | +| `next` | int | 0 | - | Write 1 to move to next color manually, or any number to go forward or backwars by `n` colors | **Modes**: Auto-cycle (`cycle_period > 0`) or Manual-only (`cycle_period = 0`) #### Usage Examples ```berry -# RGB cycle with smooth transitions +# RGB cycle with brutal switching color rgb_cycle = color_cycle( - palette=[red, green, blue], - cycle_period=4s, - transition_type=1 + palette=bytes("FF0000FF" "FF00FF00" "FFFF0000"), + cycle_period=4s ) # Custom warm colors -color warm_red = 0xFF4500 -color warm_orange = 0xFF8C00 color warm_cycle = color_cycle( - palette=[warm_red, warm_orange, yellow], - cycle_period=3s, - transition_type=1 + palette=bytes("FF4500FF" "FF8C00FF" "FFFF00"), + cycle_period=3s ) -# Mixed predefined and custom colors +# Mixed colors in AARRGGBB format color mixed_cycle = color_cycle( - palette=[0xFF0000, green, 0x0000FF], - cycle_period=2s, - transition_type=0 + palette=bytes("FFFF0000" "FF00FF00" "FF0000FF"), + cycle_period=2s ) ``` @@ -382,7 +376,7 @@ color deep_breath = breathe_color( ) # Using dynamic base color -color rainbow_cycle = color_cycle(palette=[red, green, blue], cycle_period=5s) +color rainbow_cycle = color_cycle(palette=bytes("FF0000FF" "FF00FF00" "FFFF0000"), cycle_period=5s) color breathing_rainbow = breathe_color( base_color=rainbow_cycle, min_brightness=30, diff --git a/lib/libesp32/berry_animation/docs/ANIMATION_DEVELOPMENT.md b/lib/libesp32/berry_animation/docs/ANIMATION_DEVELOPMENT.md index 5adac192c..2e66e0ade 100644 --- a/lib/libesp32/berry_animation/docs/ANIMATION_DEVELOPMENT.md +++ b/lib/libesp32/berry_animation/docs/ANIMATION_DEVELOPMENT.md @@ -99,6 +99,7 @@ static var PARAMS = { - **`"int"`** - Integer values (default if not specified) - **`"string"`** - String values - **`"bool"`** - Boolean values (true/false) +- **`"bytes"`** - Bytes objects (validated using isinstance()) - **`"instance"`** - Object instances - **`"any"`** - Any type (no type validation) diff --git a/lib/libesp32/berry_animation/docs/DSL_REFERENCE.md b/lib/libesp32/berry_animation/docs/DSL_REFERENCE.md index 918053015..0ff94fb9f 100644 --- a/lib/libesp32/berry_animation/docs/DSL_REFERENCE.md +++ b/lib/libesp32/berry_animation/docs/DSL_REFERENCE.md @@ -220,7 +220,7 @@ color my_white = white # Reference to predefined color # Color providers for dynamic colors color rainbow_cycle = color_cycle( - palette=[red, green, blue] + palette=bytes("FFFF0000" "FF00FF00" "FF0000FF") cycle_period=5s ) color breathing_red = breathe_color( @@ -491,7 +491,9 @@ The following user functions are available by default (see [User Functions Guide ## Sequences -Sequences orchestrate multiple animations with timing control: +Sequences orchestrate multiple animations with timing control. The DSL supports two syntaxes for sequences with repeat functionality: + +### Basic Sequence Syntax ```berry sequence demo { @@ -499,14 +501,43 @@ sequence demo { wait 1s play blue_animation for 2s - repeat 3 times: + repeat 3 times { play flash_effect for 200ms wait 300ms + } play final_animation } ``` +### Repeat Sequence Syntax + +For sequences that are primarily repeating patterns, you can use the alternative syntax: + +```berry +# Option 1: Traditional syntax with repeat sub-sequence +sequence cylon_eye { + repeat forever { + play red_eye for 3s + red_eye.pos = triangle_val + play red_eye for 3s + red_eye.pos = cosine_val + eye_color.next = 1 + } +} + +# Option 2: Alternative syntax - sequence with repeat modifier +sequence cylon_eye repeat forever { + play red_eye for 3s + red_eye.pos = triangle_val + play red_eye for 3s + red_eye.pos = cosine_val + eye_color.next = 1 +} +``` + +**Note**: Both syntaxes are functionally equivalent. The second syntax creates an outer sequence (runs once) containing an inner repeat sub-sequence. + ### Sequence Statements #### Play Statement @@ -514,6 +545,7 @@ sequence demo { ```berry play animation_name # Play indefinitely play animation_name for 5s # Play for specific duration +play animation_name for duration_var # Play for variable duration ``` #### Wait Statement @@ -521,22 +553,119 @@ play animation_name for 5s # Play for specific duration ```berry wait 1s # Wait for 1 second wait 500ms # Wait for 500 milliseconds +wait duration_var # Wait for variable duration +``` + +#### Duration Support + +Both `play` and `wait` statements support flexible duration specifications: + +**Literal Time Values:** +```berry +play animation for 5s # 5 seconds +play animation for 2000ms # 2000 milliseconds +play animation for 1m # 1 minute +``` + +**Variable References:** +```berry +set short_time = 2s +set long_time = 10s + +sequence demo { + play animation for short_time # Use variable duration + wait long_time # Variables work in wait too +} +``` + +**Value Providers (Dynamic Duration):** +```berry +set dynamic_duration = triangle(min_value=1000, max_value=5000, period=10s) + +sequence demo { + play animation for dynamic_duration # Duration changes over time +} +``` + +**Examples:** +```berry +# Cylon eye with variable duration +set eye_duration = 5s + +sequence cylon_eye forever { + play red_eye for eye_duration # Use variable for consistent timing + red_eye.pos = triangle_val + play red_eye for eye_duration # Same duration for both phases + red_eye.pos = cosine_val + eye_color.next = 1 +} ``` #### Repeat Statement -```berry -repeat 5 times: - play effect for 1s - wait 500ms +Repeat statements create runtime sub-sequences that execute repeatedly: -# Nested repeats are supported -repeat 3 times: - play intro for 2s - repeat 2 times: - play flash for 100ms - wait 200ms - play outro for 1s +```berry +repeat 3 times { # Repeat exactly 3 times + play animation for 1s + wait 500ms +} + +repeat forever { # Repeat indefinitely until parent sequence stops + play animation for 1s + wait 500ms +} +``` + +**Repeat Behavior:** +- **Runtime Execution**: Repeats are executed at runtime, not expanded at compile time +- **Sub-sequences**: Each repeat block creates a sub-sequence that manages its own iteration state +- **Nested Repeats**: Supports nested repeats with multiplication (e.g., `repeat 3 times { repeat 2 times { ... } }` executes 6 times total) +- **Forever Loops**: `repeat forever` continues until the parent sequence is stopped +- **Efficient**: No memory overhead for large repeat counts + +#### Assignment Statement + +Property assignments can be performed within sequences to dynamically modify animation parameters during playback: + +```berry +sequence demo { + play red_eye for 3s + red_eye.pos = triangle_val # Change position to triangle oscillator + play red_eye for 3s + red_eye.pos = cosine_val # Change position to cosine oscillator + eye_color.next = 1 # Advance color cycle to next color +} +``` + +**Assignment Semantics:** +- Assignments in sequences have exactly the same semantics as assignments outside sequences +- They can assign static values, value providers, or computed expressions +- Assignments are executed instantly when the sequence step is reached +- The assignment is wrapped in a closure: `def (engine) end` + +**Examples:** +```berry +sequence dynamic_show { + play pulse_anim for 2s + pulse_anim.opacity = 128 # Set static opacity + play pulse_anim for 2s + pulse_anim.opacity = brightness # Use value provider + play pulse_anim for 2s + pulse_anim.color = next_color # Change color provider + play pulse_anim for 2s +} + +# Assignments work in repeat blocks too +sequence cylon_eye { + repeat 3 times { + play red_eye for 1s + red_eye.pos = triangle_val # Change oscillator pattern + play red_eye for 1s + red_eye.pos = cosine_val # Change back + eye_color.next = 1 # Advance color + } +} ``` ## Execution Statements @@ -828,13 +957,14 @@ animation_def = "animation" identifier "=" animation_expression ; property_assignment = identifier "." identifier "=" expression ; (* Sequences *) -sequence = "sequence" identifier "{" sequence_body "}" ; +sequence = "sequence" identifier [ "repeat" ( number "times" | "forever" ) ] "{" sequence_body "}" ; sequence_body = { sequence_statement } ; -sequence_statement = play_stmt | wait_stmt | repeat_stmt ; +sequence_statement = play_stmt | wait_stmt | repeat_stmt | sequence_assignment ; play_stmt = "play" identifier [ "for" time_expression ] ; wait_stmt = "wait" time_expression ; -repeat_stmt = "repeat" number "times" ":" sequence_body ; +repeat_stmt = "repeat" ( number "times" | "forever" ) "{" sequence_body "}" ; +sequence_assignment = identifier "." identifier "=" expression ; (* Execution *) execution_stmt = "run" identifier ; diff --git a/lib/libesp32/berry_animation/docs/EXAMPLES.md b/lib/libesp32/berry_animation/docs/EXAMPLES.md index 12580b1c5..d972f5722 100644 --- a/lib/libesp32/berry_animation/docs/EXAMPLES.md +++ b/lib/libesp32/berry_animation/docs/EXAMPLES.md @@ -96,9 +96,98 @@ sequence sunrise_show { run sunrise_show ``` +### 8.1. Variable Duration Sequences +```berry +# Define timing variables for consistent durations +set short_duration = 2s +set long_duration = 5s +set fade_time = 1s + +animation red_anim = solid(color=red) +animation green_anim = solid(color=green) +animation blue_anim = solid(color=blue) + +sequence timed_show forever { + play red_anim for short_duration # Use variable duration + wait fade_time # Variable wait time + play green_anim for long_duration # Different variable duration + wait fade_time + play blue_anim for short_duration # Reuse timing variable +} +run timed_show +``` + +## Sequence Assignments + +### 9. Dynamic Property Changes +```berry +# Create oscillators for dynamic position +set triangle_val = triangle(min_value=0, max_value=27, duration=5s) +set cosine_val = cosine_osc(min_value=0, max_value=27, duration=5s) + +# Create color cycle +palette eye_palette = [red, yellow, green, violet] +color eye_color = color_cycle(palette=eye_palette, cycle_period=0) + +# Create beacon animation +animation red_eye = beacon_animation( + color=eye_color + pos=cosine_val + beacon_size=3 + slew_size=2 + priority=10 +) + +# Sequence with property assignments +sequence cylon_eye { + play red_eye for 3s + red_eye.pos = triangle_val # Change to triangle oscillator + play red_eye for 3s + red_eye.pos = cosine_val # Change back to cosine + eye_color.next = 1 # Advance to next color +} +run cylon_eye +``` + +### 10. Multiple Assignments in Sequence +```berry +set high_brightness = 255 +set low_brightness = 64 +color my_blue = 0x0000FF + +animation test = solid(color=red) +test.opacity = high_brightness + +sequence demo { + play test for 1s + test.opacity = low_brightness # Dim the animation + test.color = my_blue # Change color to blue + play test for 1s + test.opacity = high_brightness # Brighten again + play test for 1s +} +run demo +``` + +### 11. Assignments in Repeat Blocks +```berry +set brightness = smooth(min_value=50, max_value=255, period=2s) +animation pulse = pulsating_animation(color=white, period=1s) + +sequence breathing_cycle { + repeat 3 times { + play pulse for 500ms + pulse.opacity = brightness # Apply breathing effect + wait 200ms + pulse.opacity = 255 # Reset to full brightness + } +} +run breathing_cycle +``` + ## User Functions in Computed Parameters -### 9. Simple User Function +### 12. Simple User Function ```berry # Simple user function in computed parameter animation random_base = solid(color=blue, priority=10) @@ -106,7 +195,7 @@ random_base.opacity = rand_demo() run random_base ``` -### 10. User Function with Math Operations +### 13. User Function with Math Operations ```berry # Mix user functions with mathematical functions animation random_bounded = solid( @@ -117,7 +206,7 @@ animation random_bounded = solid( run random_bounded ``` -### 11. User Function in Arithmetic Expression +### 14. User Function in Arithmetic Expression ```berry # Use user function in arithmetic expressions animation random_variation = solid( @@ -130,9 +219,80 @@ run random_variation See `anim_examples/user_functions_demo.anim` for a complete working example. +## New Repeat System Examples + +### 15. Runtime Repeat with Forever Loop +```berry +color red = 0xFF0000 +color blue = 0x0000FF +animation red_anim = solid(color=red) +animation blue_anim = solid(color=blue) + +# Traditional syntax with repeat sub-sequence +sequence cylon_effect { + repeat forever { + play red_anim for 1s + play blue_anim for 1s + } +} + +# Alternative syntax - sequence with repeat modifier +sequence cylon_effect_alt repeat forever { + play red_anim for 1s + play blue_anim for 1s +} + +run cylon_effect +``` + +### 16. Nested Repeats (Multiplication) +```berry +color green = 0x00FF00 +color yellow = 0xFFFF00 +animation green_anim = solid(color=green) +animation yellow_anim = solid(color=yellow) + +# Nested repeats: 3 × 2 = 6 total iterations +sequence nested_pattern { + repeat 3 times { + repeat 2 times { + play green_anim for 200ms + play yellow_anim for 200ms + } + wait 500ms # Pause between outer iterations + } +} +run nested_pattern +``` + +### 17. Repeat with Property Assignments +```berry +set triangle_pos = triangle(min_value=0, max_value=29, period=3s) +set cosine_pos = cosine_osc(min_value=0, max_value=29, period=3s) + +color eye_color = color_cycle(palette=[red, yellow, green, blue], cycle_period=0) +animation moving_eye = beacon_animation( + color=eye_color + pos=triangle_pos + beacon_size=2 + slew_size=1 +) + +sequence dynamic_cylon { + repeat 5 times { + play moving_eye for 2s + moving_eye.pos = cosine_pos # Switch to cosine movement + play moving_eye for 2s + moving_eye.pos = triangle_pos # Switch back to triangle + eye_color.next = 1 # Next color + } +} +run dynamic_cylon +``` + ## Advanced Examples -### 13. Dynamic Position +### 18. Dynamic Position ```berry strip length 60 @@ -148,7 +308,7 @@ animation moving_pulse = beacon_animation( run moving_pulse ``` -### 14. Multi-Layer Effect +### 19. Multi-Layer Effect ```berry # Base layer - slow breathing set breathing = smooth(min_value=100, max_value=255, period=4s) diff --git a/lib/libesp32/berry_animation/docs/QUICK_START.md b/lib/libesp32/berry_animation/docs/QUICK_START.md index d5124240e..621b54ee3 100644 --- a/lib/libesp32/berry_animation/docs/QUICK_START.md +++ b/lib/libesp32/berry_animation/docs/QUICK_START.md @@ -77,15 +77,32 @@ sequence rgb_show { wait 500ms play blue_pulse for 3s - repeat 2 times: + repeat 2 times { play red_pulse for 1s play green_pulse for 1s play blue_pulse for 1s + } } run rgb_show ``` +**Pro Tip: Variable Durations** +Use variables for consistent timing: + +```berry +# Define timing variables +set short_time = 1s +set long_time = 3s + +sequence timed_show { + play red_pulse for long_time # Use variable duration + wait 500ms + play green_pulse for short_time # Different timing + play blue_pulse for long_time # Reuse timing +} +``` + ## Step 5: Dynamic Effects Add movement and variation to your animations: diff --git a/lib/libesp32/berry_animation/docs/TROUBLESHOOTING.md b/lib/libesp32/berry_animation/docs/TROUBLESHOOTING.md index 86801780b..d963b27ce 100644 --- a/lib/libesp32/berry_animation/docs/TROUBLESHOOTING.md +++ b/lib/libesp32/berry_animation/docs/TROUBLESHOOTING.md @@ -250,6 +250,24 @@ end animation pulse_anim = pulsating_animation(color=red, period=2s) ``` +6. **Variable Duration Support:** + ```berry + # Now supported - variables in play/wait durations + set eye_duration = 5s + + sequence cylon_eye { + play red_eye for eye_duration # ✓ Variables now work + wait eye_duration # ✓ Variables work in wait too + } + + # Also supported - value providers for dynamic duration + set dynamic_time = triangle(min_value=1000, max_value=3000, period=10s) + + sequence demo { + play animation for dynamic_time # ✓ Dynamic duration + } + ``` + 6. **Parameter Constraint Violations:** ```berry # Wrong - negative period not allowed @@ -265,6 +283,41 @@ end animation good_comet = comet_animation(color=red, direction=1) ``` +7. **Repeat Syntax Errors:** + ```berry + # Wrong - old colon syntax no longer supported + sequence bad_demo { + repeat 3 times: # Error: Expected '{' after 'times' + play anim for 1s + } + + # Wrong - missing braces + sequence bad_demo2 { + repeat 3 times + play anim for 1s # Error: Expected '{' after 'times' + } + + # Correct - use braces for repeat blocks + sequence good_demo { + repeat 3 times { + play anim for 1s + } + } + + # Also correct - alternative syntax + sequence good_demo_alt repeat 3 times { + play anim for 1s + } + + # Correct - forever syntax + sequence infinite_demo { + repeat forever { + play anim for 1s + wait 500ms + } + } + ``` + ### DSL Runtime Errors **Problem:** DSL compiles but fails at runtime @@ -281,7 +334,28 @@ end run red_anim ``` -2. **Sequence Issues:** +2. **Repeat Performance Issues:** + ```berry + # Efficient - runtime repeats don't expand at compile time + sequence efficient { + repeat 1000 times { # No memory overhead for large counts + play anim for 100ms + wait 50ms + } + } + + # Nested repeats work efficiently + sequence nested { + repeat 100 times { + repeat 50 times { # Total: 5000 iterations, but efficient + play quick_flash for 10ms + } + wait 100ms + } + } + ``` + +3. **Sequence Issues:** ```berry # Make sure animations are defined before sequences color red = 0xFF0000 @@ -294,7 +368,7 @@ end run demo ``` -3. **Undefined References:** +4. **Undefined References:** ```berry # Wrong - using undefined animation in sequence sequence bad_demo { diff --git a/lib/libesp32/berry_animation/src/animation.be b/lib/libesp32/berry_animation/src/animation.be index d9ea7a742..279675fce 100644 --- a/lib/libesp32/berry_animation/src/animation.be +++ b/lib/libesp32/berry_animation/src/animation.be @@ -73,7 +73,7 @@ register_to_animation(animation_base) import "core/sequence_manager" as sequence_manager register_to_animation(sequence_manager) -# Unified animation engine - central controller for all animations +# Unified animation engine - central engine for all animations # Provides priority-based layering, automatic blending, and performance optimization import "core/animation_engine" as animation_engine register_to_animation(animation_engine) diff --git a/lib/libesp32/berry_animation/src/animation_dsl.be b/lib/libesp32/berry_animation/src/animation_dsl.be index 2b303a79a..8dd93e25c 100644 --- a/lib/libesp32/berry_animation/src/animation_dsl.be +++ b/lib/libesp32/berry_animation/src/animation_dsl.be @@ -19,6 +19,8 @@ # import global +import animation + # Requires to first `import animation` # We don't include it to not create a closure, but use the global instead diff --git a/lib/libesp32/berry_animation/src/core/animation_base.be b/lib/libesp32/berry_animation/src/core/animation_base.be index 69ad42441..03b525421 100644 --- a/lib/libesp32/berry_animation/src/core/animation_base.be +++ b/lib/libesp32/berry_animation/src/core/animation_base.be @@ -91,7 +91,7 @@ class Animation : animation.parameterized_object end # Update animation state based on current time - # This method should be called regularly by the animation controller + # This method should be called regularly by the animation engine # # @param time_ms: int - Current time in milliseconds # @return bool - True if animation is still running, false if completed diff --git a/lib/libesp32/berry_animation/src/core/animation_engine.be b/lib/libesp32/berry_animation/src/core/animation_engine.be index bb56a2a83..75f5ab32f 100644 --- a/lib/libesp32/berry_animation/src/core/animation_engine.be +++ b/lib/libesp32/berry_animation/src/core/animation_engine.be @@ -1,8 +1,5 @@ # Unified Animation Engine -# Combines AnimationController, AnimationManager, and Renderer into a single efficient class # -# This unified approach eliminates redundancy and provides a simpler, more efficient -# animation system for Tasmota LED control. class AnimationEngine # Core properties @@ -61,6 +58,12 @@ class AnimationEngine self.animations[i].start(now) i += 1 end + + i = 0 + while (i < size(self.sequence_managers)) + self.sequence_managers[i].start(now) + i += 1 + end tasmota.add_fast_loop(self.fast_loop_closure) end @@ -126,7 +129,7 @@ class AnimationEngine self.animations = [] var i = 0 while i < size(self.sequence_managers) - self.sequence_managers[i].stop_sequence() + self.sequence_managers[i].stop() i += 1 end self.sequence_managers = [] @@ -190,7 +193,7 @@ class AnimationEngine # Update sequence managers var i = 0 while i < size(self.sequence_managers) - self.sequence_managers[i].update() + self.sequence_managers[i].update(current_time) i += 1 end @@ -423,11 +426,5 @@ def create_engine(strip) return animation.animation_engine(strip) end -# Compatibility function for legacy examples -def animation_controller(strip) - return animation.animation_engine(strip) -end - return {'animation_engine': AnimationEngine, - 'create_engine': create_engine, - 'animation_controller': animation_controller} \ No newline at end of file + 'create_engine': create_engine} \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/core/parameterized_object.be b/lib/libesp32/berry_animation/src/core/parameterized_object.be index 2c8f6f739..a72053bf3 100644 --- a/lib/libesp32/berry_animation/src/core/parameterized_object.be +++ b/lib/libesp32/berry_animation/src/core/parameterized_object.be @@ -227,6 +227,13 @@ class ParameterizedObject import math value = int(math.round(value)) actual_type = "int" + # Special case: check for bytes type using isinstance() + elif expected_type == "bytes" + if actual_type == "instance" && isinstance(value, bytes) + actual_type = "bytes" + elif actual_type != "instance" || !isinstance(value, bytes) + raise "value_error", f"Parameter '{name}' expects type '{expected_type}' but got '{actual_type}' (value: {value})" + end elif expected_type != actual_type raise "value_error", f"Parameter '{name}' expects type '{expected_type}' but got '{actual_type}' (value: {value})" end diff --git a/lib/libesp32/berry_animation/src/core/sequence_manager.be b/lib/libesp32/berry_animation/src/core/sequence_manager.be index f56c2fcd2..e3dd71dd4 100644 --- a/lib/libesp32/berry_animation/src/core/sequence_manager.be +++ b/lib/libesp32/berry_animation/src/core/sequence_manager.be @@ -1,8 +1,9 @@ # Sequence Manager for Animation DSL # Handles async execution of animation sequences without blocking delays +# Supports sub-sequences and repeat logic through recursive composition class SequenceManager - var controller # Animation controller reference + var engine # Animation engine reference var active_sequence # Currently running sequence var sequence_state # Current sequence execution state var step_index # Current step in the sequence @@ -10,64 +11,169 @@ class SequenceManager var steps # List of sequence steps var is_running # Whether sequence is active - def init(controller) - self.controller = controller + # Repeat-specific properties + var repeat_count # Number of times to repeat this sequence (-1 for forever, 0 for no repeat) + var current_iteration # Current iteration (0-based) + var is_repeat_sequence # Whether this is a repeat sub-sequence + + def init(engine, repeat_count) + self.engine = engine self.active_sequence = nil self.sequence_state = {} self.step_index = 0 self.step_start_time = 0 self.steps = [] self.is_running = false + + # Repeat logic + self.repeat_count = repeat_count != nil ? repeat_count : 1 # Default: run once + self.current_iteration = 0 + self.is_repeat_sequence = repeat_count != nil && repeat_count != 1 end - # Start a new sequence - def start_sequence(steps) - self.stop_sequence() # Stop any current sequence - - self.steps = steps - self.step_index = 0 - self.step_start_time = self.controller.time_ms - self.is_running = true - - if size(self.steps) > 0 - self.execute_current_step() - end + # Add a step to this sequence + def push_step(step) + self.steps.push(step) + return self end - # Stop the current sequence - def stop_sequence() + # Add a play step directly + def push_play_step(animation_ref, duration) + self.steps.push({ + "type": "play", + "animation": animation_ref, + "duration": duration != nil ? duration : 0 + }) + return self + end + + # Add a wait step directly + def push_wait_step(duration) + self.steps.push({ + "type": "wait", + "duration": duration + }) + return self + end + + # Add an assignment step directly + def push_assign_step(closure) + self.steps.push({ + "type": "assign", + "closure": closure + }) + return self + end + + # Add a repeat subsequence step directly + def push_repeat_subsequence(sequence_manager) + self.steps.push({ + "type": "subsequence", + "sequence_manager": sequence_manager + }) + return self + end + + # Start this sequence + def start(time_ms) + # Stop any current sequence if self.is_running self.is_running = false - self.controller.clear() + self.engine.clear() + # Stop any sub-sequences + self.stop_all_subsequences() end + + # Initialize sequence state + self.step_index = 0 + self.step_start_time = time_ms + self.current_iteration = 0 + self.is_running = true + + # Start executing if we have steps + if size(self.steps) > 0 + self.execute_current_step(time_ms) + end + + return self + end + + # Stop this sequence manager + def stop() + if self.is_running + self.is_running = false + + # Stop any currently playing animations + if self.step_index < size(self.steps) + var current_step = self.steps[self.step_index] + if current_step["type"] == "play" + var anim = current_step["animation"] + self.engine.remove_animation(anim) + elif current_step["type"] == "subsequence" + var sub_seq = current_step["sequence_manager"] + sub_seq.stop() + end + end + + # Clear engine and stop all sub-sequences + self.engine.clear() + self.stop_all_subsequences() + end + return self + end + + # Stop all sub-sequences in our steps + def stop_all_subsequences() + for step : self.steps + if step["type"] == "subsequence" + var sub_seq = step["sequence_manager"] + sub_seq.stop() + end + end + return self end # Update sequence state - called from fast_loop - def update() + # Returns true if still running, false if completed + def update(current_time) if !self.is_running || size(self.steps) == 0 - return + return false end - var current_time = self.controller.time_ms var current_step = self.steps[self.step_index] - # Check if current step has completed - if current_step.contains("duration") && current_step["duration"] > 0 - var elapsed = current_time - self.step_start_time - if elapsed >= current_step["duration"] - self.advance_to_next_step() + # Handle different step types + if current_step["type"] == "subsequence" + # Handle sub-sequence (including repeat sequences) + var sub_seq = current_step["sequence_manager"] + if !sub_seq.update(current_time) + # Sub-sequence finished, advance to next step + self.advance_to_next_step(current_time) end + elif current_step["type"] == "assign" + # Assign steps are handled in batches by advance_to_next_step + # This should not happen in normal flow, but handle it just in case + self.execute_assign_steps_batch(current_time) else - # Steps without duration (like stop steps) complete immediately - # Advance to next step on next update cycle - self.advance_to_next_step() + # Handle regular steps with duration + if current_step.contains("duration") && current_step["duration"] > 0 + var elapsed = current_time - self.step_start_time + if elapsed >= current_step["duration"] + self.advance_to_next_step(current_time) + end + else + # Steps without duration complete immediately + self.advance_to_next_step(current_time) + end end + + return self.is_running end # Execute the current step - def execute_current_step() + def execute_current_step(current_time) if self.step_index >= size(self.steps) - self.is_running = false + self.complete_iteration(current_time) return end @@ -75,13 +181,8 @@ class SequenceManager if step["type"] == "play" var anim = step["animation"] - self.controller.add_animation(anim) - anim.start() - - # Set duration if specified - if step.contains("duration") && step["duration"] > 0 - anim.duration = step["duration"] - end + self.engine.add_animation(anim) + anim.start(current_time) elif step["type"] == "wait" # Wait steps are handled by the update loop checking duration @@ -89,29 +190,82 @@ class SequenceManager elif step["type"] == "stop" var anim = step["animation"] - self.controller.remove_animation(anim) + self.engine.remove_animation(anim) + + elif step["type"] == "assign" + # Assign steps should be handled in batches by execute_assign_steps_batch + # This should not happen in normal flow, but handle it for safety + var assign_closure = step["closure"] + if assign_closure != nil + assign_closure(self.engine) + end + + elif step["type"] == "subsequence" + # Start sub-sequence (including repeat sequences) + var sub_seq = step["sequence_manager"] + sub_seq.start() end - self.step_start_time = self.controller.time_ms + self.step_start_time = current_time end # Advance to the next step in the sequence - def advance_to_next_step() + def advance_to_next_step(current_time) # Stop current animations if step had duration var current_step = self.steps[self.step_index] if current_step["type"] == "play" && current_step.contains("duration") var anim = current_step["animation"] - self.controller.remove_animation(anim) + self.engine.remove_animation(anim) end self.step_index += 1 if self.step_index >= size(self.steps) - self.is_running = false - return + self.complete_iteration(current_time) + else + # Execute all consecutive assign steps atomically + self.execute_assign_steps_batch(current_time) + end + end + + # Execute all consecutive assign steps in a batch to avoid black frames + def execute_assign_steps_batch(current_time) + # Execute all consecutive assign steps + while self.step_index < size(self.steps) + var step = self.steps[self.step_index] + if step["type"] == "assign" + # Execute assignment closure + var assign_closure = step["closure"] + if assign_closure != nil + assign_closure(self.engine) + end + self.step_index += 1 + else + break + end end - self.execute_current_step() + # Now execute the next non-assign step + if self.step_index < size(self.steps) + self.execute_current_step(current_time) + else + self.complete_iteration(current_time) + end + end + + # Complete current iteration and check if we should repeat + def complete_iteration(current_time) + self.current_iteration += 1 + + # Check if we should continue repeating + if self.repeat_count == -1 || self.current_iteration < self.repeat_count + # Start next iteration + self.step_index = 0 + self.execute_current_step(current_time) + else + # All iterations complete + self.is_running = false + end end # Check if sequence is running @@ -129,35 +283,12 @@ class SequenceManager "step_index": self.step_index, "total_steps": size(self.steps), "current_step": self.steps[self.step_index], - "elapsed_ms": self.controller.time_ms - self.step_start_time + "elapsed_ms": self.engine.time_ms - self.step_start_time, + "repeat_count": self.repeat_count, + "current_iteration": self.current_iteration, + "is_repeat_sequence": self.is_repeat_sequence } end end -# Helper function to create sequence steps -def create_play_step(animation, duration) - return { - "type": "play", - "animation": animation, - "duration": duration - } -end - -def create_wait_step(duration) - return { - "type": "wait", - "duration": duration - } -end - -def create_stop_step(animation) - return { - "type": "stop", - "animation": animation - } -end - -return {'SequenceManager': SequenceManager, - 'create_play_step': create_play_step, - 'create_wait_step': create_wait_step, - 'create_stop_step': create_stop_step} \ No newline at end of file +return {'SequenceManager': SequenceManager} \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/dsl/runtime.be b/lib/libesp32/berry_animation/src/dsl/runtime.be index 2d448c013..7bc559f22 100644 --- a/lib/libesp32/berry_animation/src/dsl/runtime.be +++ b/lib/libesp32/berry_animation/src/dsl/runtime.be @@ -148,7 +148,7 @@ class DSLRuntime # Get current engine for external access - def get_controller() + def get_engine() return self.engine end diff --git a/lib/libesp32/berry_animation/src/dsl/transpiler.be b/lib/libesp32/berry_animation/src/dsl/transpiler.be index 9c0bef8e9..1a5378334 100644 --- a/lib/libesp32/berry_animation/src/dsl/transpiler.be +++ b/lib/libesp32/berry_animation/src/dsl/transpiler.be @@ -26,6 +26,7 @@ class SimpleDSLTranspiler var strip_initialized # Track if strip was initialized var sequence_names # Track which names are sequences var symbol_table # Track created objects: name -> instance + var indent_level # Track current indentation level for nested sequences # Static color mapping for named colors (helps with solidification) static var named_colors = { @@ -54,6 +55,18 @@ class SimpleDSLTranspiler self.strip_initialized = false # Track if strip was initialized self.sequence_names = {} # Track which names are sequences self.symbol_table = {} # Track created objects: name -> instance + self.indent_level = 0 # Track current indentation level + end + + # Get current indentation string + def get_indent() + # return " " * (self.indent_level + 1) # Base indentation is 2 spaces - string multiplication not supported + var indent = "" + var spaces_needed = (self.indent_level + 1) * 2 # Base indentation is 2 spaces + for i : 0..spaces_needed-1 + indent += " " + end + return indent end # Main transpilation method - single pass @@ -226,7 +239,7 @@ class SimpleDSLTranspiler end end - # Process palette definition: palette aurora_colors = [(0, #000022), (64, #004400), ...] + # Process palette definition: palette aurora_colors = [(0, #000022), (64, #004400), ...] or [red, 0x008000, blue, 0x112233] def process_palette() self.next() # skip 'palette' var name = self.expect_identifier() @@ -239,10 +252,23 @@ class SimpleDSLTranspiler self.expect_assign() - # Expect array literal with tuples + # Expect array literal self.expect_left_bracket() var palette_entries = [] + # Detect syntax type by looking at the first entry + self.skip_whitespace_including_newlines() + + if self.check_right_bracket() + # Empty palette - not allowed + self.error("Empty palettes are not allowed. A palette must contain at least one color entry.") + self.skip_statement() + return + end + + # Check if first entry starts with '(' (tuple syntax) or not (alternative syntax) + var is_tuple_syntax = self.current() != nil && self.current().type == animation_dsl.Token.LEFT_PAREN + while !self.at_end() && !self.check_right_bracket() self.skip_whitespace_including_newlines() @@ -250,16 +276,41 @@ class SimpleDSLTranspiler break end - # Parse tuple (value, color) - self.expect_left_paren() - var value = self.expect_number() - self.expect_comma() - var color = self.process_value("color") # Reuse existing color parsing - self.expect_right_paren() - - # Convert to VRGB format entry - var vrgb_entry = self.convert_to_vrgb(value, color) - palette_entries.push(f'"{vrgb_entry}"') + if is_tuple_syntax + # Parse tuple (value, color) - original syntax + # Check if we accidentally have alternative syntax in tuple mode + if self.current() != nil && self.current().type != animation_dsl.Token.LEFT_PAREN + self.error("Cannot mix alternative syntax [color1, color2, ...] with tuple syntax (value, color). Use only one syntax per palette.") + self.skip_statement() + return + end + + self.expect_left_paren() + var value = self.expect_number() + self.expect_comma() + var color = self.process_value("color") # Reuse existing color parsing + self.expect_right_paren() + + # Convert to VRGB format entry and store as integer + var vrgb_entry = self.convert_to_vrgb(value, color) + var vrgb_int = int(f"0x{vrgb_entry}") + palette_entries.push(vrgb_int) + else + # Parse color only - alternative syntax + # Check if we accidentally have a tuple in alternative syntax mode + if self.current() != nil && self.current().type == animation_dsl.Token.LEFT_PAREN + self.error("Cannot mix tuple syntax (value, color) with alternative syntax [color1, color2, ...]. Use only one syntax per palette.") + self.skip_statement() + return + end + + var color = self.process_value("color") # Reuse existing color parsing + + # Convert to VRGB format entry and store as integer after setting alpha to 0xFF + var vrgb_entry = self.convert_to_vrgb(0xFF, color) + var vrgb_int = int(f"0x{vrgb_entry}") + palette_entries.push(vrgb_int) + end # Skip whitespace but preserve newlines for separator detection while !self.at_end() @@ -288,13 +339,15 @@ class SimpleDSLTranspiler self.expect_right_bracket() var inline_comment = self.collect_inline_comment() - # Generate Berry bytes object + # Generate Berry bytes object - convert integers to hex strings for bytes() constructor var palette_data = "" for i : 0..size(palette_entries)-1 if i > 0 palette_data += " " end - palette_data += palette_entries[i] + # Convert integer back to hex string for bytes() constructor + var hex_str = format("%08X", palette_entries[i]) + palette_data += f'"{hex_str}"' end self.add(f"var {name}_ = bytes({palette_data}){inline_comment}") @@ -410,9 +463,13 @@ class SimpleDSLTranspiler var value = self.process_value("variable") var inline_comment = self.collect_inline_comment() self.add(f"var {name}_ = {value}{inline_comment}") + + # Add variable to symbol table for validation + # Use a string marker to indicate this is a variable (not an instance) + self.symbol_table[name] = "variable" end - # Process sequence definition: sequence demo { ... } + # Process sequence definition: sequence demo { ... } or sequence demo repeat N times { ... } def process_sequence() self.next() # skip 'sequence' var name = self.expect_identifier() @@ -430,26 +487,67 @@ class SimpleDSLTranspiler # We use a string marker since sequences don't have real instances self.symbol_table[name] = "sequence" - self.expect_left_brace() + # Check for second syntax: sequence name repeat N times { ... } or sequence name forever { ... } + var is_repeat_syntax = false + var repeat_count = "1" - # Generate anonymous closure that creates and returns sequence manager - self.add(f"var {name}_ = (def (engine)") - self.add(f" var steps = []") - - # Process sequence body - while !self.at_end() && !self.check_right_brace() - self.process_sequence_statement() + var current_tok = self.current() + if current_tok != nil && current_tok.type == animation_dsl.Token.KEYWORD + if current_tok.value == "repeat" + is_repeat_syntax = true + self.next() # skip 'repeat' + + # Parse repeat count: either number or "forever" + var tok_after_repeat = self.current() + if tok_after_repeat != nil && tok_after_repeat.type == animation_dsl.Token.KEYWORD && tok_after_repeat.value == "forever" + self.next() # skip 'forever' + repeat_count = "-1" # -1 means forever + else + var count = self.expect_number() + self.expect_keyword("times") + repeat_count = str(count) + end + elif current_tok.value == "forever" + # New syntax: sequence name forever { ... } (repeat is optional) + is_repeat_syntax = true + self.next() # skip 'forever' + repeat_count = "-1" # -1 means forever + end + elif current_tok != nil && current_tok.type == animation_dsl.Token.NUMBER + # New syntax: sequence name N times { ... } (repeat is optional) + is_repeat_syntax = true + var count = self.expect_number() + self.expect_keyword("times") + repeat_count = str(count) + end + + self.expect_left_brace() + + if is_repeat_syntax + # Second syntax: sequence name repeat N times { ... } + # Create a single SequenceManager with fluent interface + self.add(f"var {name}_ = animation.SequenceManager(engine, {repeat_count})") + + # Process sequence body - add steps using fluent interface + while !self.at_end() && !self.check_right_brace() + self.process_sequence_statement() + end + else + # First syntax: sequence demo { ... } + # Use fluent interface for regular sequences too (no repeat count = default) + self.add(f"var {name}_ = animation.SequenceManager(engine)") + + # Process sequence body - add steps using fluent interface + while !self.at_end() && !self.check_right_brace() + self.process_sequence_statement() + end end - self.add(f" var seq_manager = animation.SequenceManager(engine)") - self.add(f" seq_manager.start_sequence(steps)") - self.add(f" return seq_manager") - self.add(f"end)(engine)") self.expect_right_brace() end - # Process statements inside sequences - def process_sequence_statement() + # Process statements inside sequences using push_step() + def process_sequence_statement_for_manager(manager_name) var tok = self.current() if tok == nil || tok.type == animation_dsl.Token.EOF return @@ -469,109 +567,321 @@ class SimpleDSLTranspiler end if tok.type == animation_dsl.Token.KEYWORD && tok.value == "play" - self.next() # skip 'play' - - # Check if this is a function call or an identifier - var anim_ref = "" - var current_tok = self.current() - if current_tok != nil && (current_tok.type == animation_dsl.Token.IDENTIFIER || current_tok.type == animation_dsl.Token.KEYWORD) && - self.peek() != nil && self.peek().type == animation_dsl.Token.LEFT_PAREN - # This is a function call - process it as a nested function call - anim_ref = self.process_nested_function_call() - else - # This is an identifier reference - sequences need runtime resolution - var anim_name = self.expect_identifier() - - # Validate that the referenced object exists - self._validate_object_reference(anim_name, "sequence play") - - anim_ref = f"animation.global('{anim_name}_')" - end - - # Handle optional 'for duration' - var duration = "0" - if self.current() != nil && self.current().type == animation_dsl.Token.KEYWORD && self.current().value == "for" - self.next() # skip 'for' - duration = str(self.process_time_value()) - end - - var inline_comment = self.collect_inline_comment() - self.add(f" steps.push(animation.create_play_step({anim_ref}, {duration})){inline_comment}") + self.process_play_statement_for_manager(manager_name) elif tok.type == animation_dsl.Token.KEYWORD && tok.value == "wait" - self.next() # skip 'wait' - var duration = self.process_time_value() - var inline_comment = self.collect_inline_comment() - self.add(f" steps.push(animation.create_wait_step({duration})){inline_comment}") + self.process_wait_statement_for_manager(manager_name) elif tok.type == animation_dsl.Token.KEYWORD && tok.value == "repeat" self.next() # skip 'repeat' - var count = self.expect_number() - self.expect_keyword("times") - self.expect_colon() - self.add(f" for repeat_i : 0..{count}-1") - - # Process repeat body - while !self.at_end() && !self.check_right_brace() - var inner_tok = self.current() - if inner_tok == nil || inner_tok.type == animation_dsl.Token.EOF - break - end - if inner_tok.type == animation_dsl.Token.COMMENT - self.add(" " + inner_tok.value) # Add comment with repeat body indentation - self.next() - continue - end - if inner_tok.type == animation_dsl.Token.NEWLINE - self.next() - continue - end - if inner_tok.type == animation_dsl.Token.KEYWORD && inner_tok.value == "play" - self.next() # skip 'play' - - # Check if this is a function call or an identifier - var anim_ref = "" - var current_tok = self.current() - if current_tok != nil && (current_tok.type == animation_dsl.Token.IDENTIFIER || current_tok.type == animation_dsl.Token.KEYWORD) && - self.peek() != nil && self.peek().type == animation_dsl.Token.LEFT_PAREN - # This is a function call - process it as a nested function call - anim_ref = self.process_nested_function_call() - else - # This is an identifier reference - sequences need runtime resolution - var anim_name = self.expect_identifier() - - # Validate that the referenced object exists - self._validate_object_reference(anim_name, "sequence play") - - anim_ref = f"animation.global('{anim_name}_')" - end - - var duration = "0" - if self.current() != nil && self.current().type == animation_dsl.Token.KEYWORD && self.current().value == "for" - self.next() # skip 'for' - duration = str(self.process_time_value()) - end - - var inline_comment = self.collect_inline_comment() - self.add(f" steps.push(animation.create_play_step({anim_ref}, {duration})){inline_comment}") - - elif inner_tok.type == animation_dsl.Token.KEYWORD && inner_tok.value == "wait" - self.next() # skip 'wait' - var duration = self.process_time_value() - var inline_comment = self.collect_inline_comment() - self.add(f" steps.push(animation.create_wait_step({duration})){inline_comment}") - else - break # Exit repeat body - end + # Parse repeat count: either number or "forever" + var repeat_count = "1" + var tok_after_repeat = self.current() + if tok_after_repeat != nil && tok_after_repeat.type == animation_dsl.Token.KEYWORD && tok_after_repeat.value == "forever" + self.next() # skip 'forever' + repeat_count = "-1" # -1 means forever + else + var count = self.expect_number() + self.expect_keyword("times") + repeat_count = str(count) end - self.add(f" end") + self.expect_left_brace() + + # Create repeat sub-sequence + self.add(f" var repeat_seq = animation.SequenceManager(engine, {repeat_count})") + + # Process repeat body - add steps directly to repeat sequence + while !self.at_end() && !self.check_right_brace() + self.process_sequence_statement_for_manager("repeat_seq") + end + + self.expect_right_brace() + + # Add the repeat sub-sequence step to main sequence + self.add(f" {manager_name}.push_repeat_subsequence(repeat_seq.steps, {repeat_count})") + elif tok.type == animation_dsl.Token.IDENTIFIER + # Check if this is a property assignment (identifier.property = value) + if self.peek() != nil && self.peek().type == animation_dsl.Token.DOT + self.process_sequence_assignment_for_manager(" ", manager_name) # Pass indentation and manager name + else + self.skip_statement() + end else self.skip_statement() end end + + + # Process statements inside sequences using fluent interface + def process_sequence_statement() + var tok = self.current() + if tok == nil || tok.type == animation_dsl.Token.EOF + return + end + + # Handle comments - preserve them in generated code with proper indentation + if tok.type == animation_dsl.Token.COMMENT + self.add(self.get_indent() + tok.value) # Add comment with fluent indentation + self.next() + return + end + + # Skip whitespace (newlines) + if tok.type == animation_dsl.Token.NEWLINE + self.next() + return + end + + if tok.type == animation_dsl.Token.KEYWORD && tok.value == "play" + self.process_play_statement_fluent() + + elif tok.type == animation_dsl.Token.KEYWORD && tok.value == "wait" + self.process_wait_statement_fluent() + + elif tok.type == animation_dsl.Token.KEYWORD && tok.value == "repeat" + self.next() # skip 'repeat' + + # Parse repeat count: either number or "forever" + var repeat_count = "1" + var tok_after_repeat = self.current() + if tok_after_repeat != nil && tok_after_repeat.type == animation_dsl.Token.KEYWORD && tok_after_repeat.value == "forever" + self.next() # skip 'forever' + repeat_count = "-1" # -1 means forever + else + var count = self.expect_number() + self.expect_keyword("times") + repeat_count = str(count) + end + + self.expect_left_brace() + + # Create a nested sub-sequence using recursive processing + self.add(f"{self.get_indent()}.push_repeat_subsequence(animation.SequenceManager(engine, {repeat_count})") + + # Increase indentation level for nested content + self.indent_level += 1 + + # Process repeat body recursively - just call the same method + while !self.at_end() && !self.check_right_brace() + self.process_sequence_statement() + end + + self.expect_right_brace() + + # Decrease indentation level and close the sub-sequence + self.add(f"{self.get_indent()})") + self.indent_level -= 1 + + elif tok.type == animation_dsl.Token.IDENTIFIER + # Check if this is a property assignment (identifier.property = value) + if self.peek() != nil && self.peek().type == animation_dsl.Token.DOT + self.process_sequence_assignment_fluent() + else + self.skip_statement() + end + else + self.skip_statement() + end + end + + # Process property assignment using fluent style + def process_sequence_assignment_fluent() + var object_name = self.expect_identifier() + self.expect_dot() + var property_name = self.expect_identifier() + self.expect_assign() + var value = self.process_value("property") + var inline_comment = self.collect_inline_comment() + + # Create assignment step using fluent style + var closure_code = f"def (engine) {object_name}_.{property_name} = {value} end" + self.add(f"{self.get_indent()}.push_assign_step({closure_code}){inline_comment}") + end + + # Process property assignment inside sequences: object.property = value (legacy) + def process_sequence_assignment(indent) + self.process_sequence_assignment_generic(indent, "steps") + end + + # Generic method to process sequence assignment with configurable target array + def process_sequence_assignment_generic(indent, target_array) + var object_name = self.expect_identifier() + + # Check if next token is a dot + if self.current() != nil && self.current().type == animation_dsl.Token.DOT + self.next() # skip '.' + var property_name = self.expect_identifier() + + # Validate parameter if we have this object in our symbol table + if self.symbol_table.contains(object_name) + var instance = self.symbol_table[object_name] + + # Only validate parameters for actual instances, not sequence markers + if type(instance) != "string" + var class_name = classname(instance) + + # Use the existing parameter validation logic + self._validate_single_parameter(class_name, property_name, instance) + else + # This is a sequence marker - sequences don't have properties + self.error(f"Sequences like '{object_name}' do not have properties. Property assignments are only valid for animations and color providers.") + return + end + end + + self.expect_assign() + var value = self.process_value("property") + var inline_comment = self.collect_inline_comment() + + # Generate assignment step with closure + # The closure receives the engine as parameter and performs the assignment + import introspect + var object_ref = "" + if introspect.contains(animation, object_name) + # Symbol exists in animation module, use it directly + object_ref = f"animation.{object_name}" + else + # Symbol doesn't exist in animation module, use underscore suffix + object_ref = f"{object_name}_" + end + + # Create closure that performs the assignment + var closure_code = f"def (engine) {object_ref}.{property_name} = {value} end" + self.add(f"{indent}{target_array}.push(animation.create_assign_step({closure_code})){inline_comment}") + else + # Not a property assignment, this shouldn't happen since we checked for dot + self.error(f"Expected property assignment for '{object_name}' but found no dot") + self.skip_statement() + end + end + + + + # Helper method to process play statement using fluent style + def process_play_statement_fluent() + self.next() # skip 'play' + + # Check if this is a function call or an identifier + var anim_ref = "" + var current_tok = self.current() + if current_tok != nil && (current_tok.type == animation_dsl.Token.IDENTIFIER || current_tok.type == animation_dsl.Token.KEYWORD) && + self.peek() != nil && self.peek().type == animation_dsl.Token.LEFT_PAREN + # This is a function call - process it as a nested function call + anim_ref = self.process_nested_function_call() + else + # This is an identifier reference + var anim_name = self.expect_identifier() + + # Validate that the referenced object exists + self._validate_object_reference(anim_name, "sequence play") + + anim_ref = f"{anim_name}_" + end + + # Handle optional 'for duration' + var duration = "nil" + if self.current() != nil && self.current().type == animation_dsl.Token.KEYWORD && self.current().value == "for" + self.next() # skip 'for' + duration = str(self.process_time_value()) + end + + var inline_comment = self.collect_inline_comment() + self.add(f"{self.get_indent()}.push_play_step({anim_ref}, {duration}){inline_comment}") + end + + # Helper method to process wait statement using fluent style + def process_wait_statement_fluent() + self.next() # skip 'wait' + var duration = self.process_time_value() + var inline_comment = self.collect_inline_comment() + self.add(f"{self.get_indent()}.push_wait_step({duration}){inline_comment}") + end + + # Helper method to process play statement with configurable target array (legacy) + def process_play_statement(target_array) + self.next() # skip 'play' + + # Check if this is a function call or an identifier + var anim_ref = "" + var current_tok = self.current() + if current_tok != nil && (current_tok.type == animation_dsl.Token.IDENTIFIER || current_tok.type == animation_dsl.Token.KEYWORD) && + self.peek() != nil && self.peek().type == animation_dsl.Token.LEFT_PAREN + # This is a function call - process it as a nested function call + anim_ref = self.process_nested_function_call() + else + # This is an identifier reference - sequences need runtime resolution + var anim_name = self.expect_identifier() + + # Validate that the referenced object exists + self._validate_object_reference(anim_name, "sequence play") + + anim_ref = f"animation.global('{anim_name}_')" + end + + # Handle optional 'for duration' + var duration = "0" + if self.current() != nil && self.current().type == animation_dsl.Token.KEYWORD && self.current().value == "for" + self.next() # skip 'for' + duration = str(self.process_time_value()) + end + + var inline_comment = self.collect_inline_comment() + self.add(f" {target_array}.push(animation.create_play_step({anim_ref}, {duration})){inline_comment}") + end + + # Helper method to process wait statement with configurable target array (legacy) + def process_wait_statement(target_array) + self.next() # skip 'wait' + var duration = self.process_time_value() + var inline_comment = self.collect_inline_comment() + self.add(f" {target_array}.push(animation.create_wait_step({duration})){inline_comment}") + end + + # Generic method to process sequence statements with configurable target array + def process_sequence_statement_generic(target_array) + var tok = self.current() + if tok == nil || tok.type == animation_dsl.Token.EOF + return + end + + # Handle comments - preserve them in generated code with proper indentation + if tok.type == animation_dsl.Token.COMMENT + self.add(" " + tok.value) # Add comment with sequence indentation + self.next() + return + end + + # Skip whitespace (newlines) + if tok.type == animation_dsl.Token.NEWLINE + self.next() + return + end + + if tok.type == animation_dsl.Token.KEYWORD && tok.value == "play" + self.process_play_statement(target_array) + + elif tok.type == animation_dsl.Token.KEYWORD && tok.value == "wait" + self.process_wait_statement(target_array) + + elif tok.type == animation_dsl.Token.IDENTIFIER + # Check if this is a property assignment (identifier.property = value) + if self.peek() != nil && self.peek().type == animation_dsl.Token.DOT + self.process_sequence_assignment_generic(" ", target_array) # Pass indentation and target array + else + self.skip_statement() + end + else + self.skip_statement() + end + end + + + + + # Process run statement: run demo def process_run() self.next() # skip 'run' @@ -640,11 +950,6 @@ class SimpleDSLTranspiler # Process any value - unified approach def process_value(context) - return self.process_expression(context) # This calls process_additive_expression with is_top_level=true - end - - # Process expressions with arithmetic operations - def process_expression(context) return self.process_additive_expression(context, true) # true = top-level expression end @@ -1188,6 +1493,15 @@ class SimpleDSLTranspiler var num = tok.value self.next() return int(real(num)) * 1000 # assume seconds + elif tok != nil && tok.type == animation_dsl.Token.IDENTIFIER + # Handle variable references for time values + var var_name = tok.value + + # Validate that the variable exists before processing + self._validate_object_reference(var_name, "duration") + + var expr = self.process_primary_expression("time", true) + return expr else self.error("Expected time value") return 1000 @@ -1779,6 +2093,15 @@ class SimpleDSLTranspiler end end + def expect_dot() + var tok = self.current() + if tok != nil && tok.type == animation_dsl.Token.DOT + self.next() + else + self.error("Expected '.'") + end + end + def expect_left_bracket() var tok = self.current() if tok != nil && tok.type == animation_dsl.Token.LEFT_BRACKET diff --git a/lib/libesp32/berry_animation/src/providers/color_cycle_color_provider.be b/lib/libesp32/berry_animation/src/providers/color_cycle_color_provider.be index a97e16e48..9c8af5ded 100644 --- a/lib/libesp32/berry_animation/src/providers/color_cycle_color_provider.be +++ b/lib/libesp32/berry_animation/src/providers/color_cycle_color_provider.be @@ -19,7 +19,13 @@ class ColorCycleColorProvider : animation.color_provider # Parameter definitions static var PARAMS = { - "palette": {"default": [0xFF0000FF, 0xFF00FF00, 0xFFFF0000], "type": "instance"}, # Default RGB palette + "palette": {"type": "bytes", "default": + bytes( # Palette bytes in AARRGGBB format + "FF0000FF" # Blue + "FF00FF00" # Green + "FFFF0000" # Red + ) + }, "cycle_period": {"min": 0, "default": 5000}, # 0 = manual only, >0 = auto cycle time in ms "next": {"default": 0} # Write 1 to move to next color } @@ -31,11 +37,46 @@ class ColorCycleColorProvider : animation.color_provider super(self).init(engine) # Initialize parameter system # Initialize non-parameter instance variables - var default_palette = self.palette # Get default palette - self.current_color = default_palette[0] # Start with first color in palette + var palette_bytes = self._get_palette_bytes() + self.current_color = self._get_color_at_index(0) # Start with first color in palette self.current_index = 0 # Start at first color end + # Get palette bytes from parameter with default fallback + def _get_palette_bytes() + var palette_bytes = self.palette + if palette_bytes == nil + # Get default from PARAMS + var param_def = self._get_param_def("palette") + if param_def != nil && param_def.contains("default") + palette_bytes = param_def["default"] + end + end + return palette_bytes + end + + # Get color at a specific index from bytes palette + # We force alpha channel to 0xFF to force opaque colors + def _get_color_at_index(idx) + var palette_bytes = self._get_palette_bytes() + var palette_size = size(palette_bytes) / 4 # Each color is 4 bytes (AARRGGBB) + + if palette_size == 0 || idx < 0 || idx >= palette_size + return 0xFFFFFFFF # Default to white + end + + # Read 4 bytes in big-endian format (AARRGGBB) + var color = palette_bytes.get(idx * 4, -4) # Big endian + color = color | 0xFF000000 + return color + end + + # Get the number of colors in the palette + def _get_palette_size() + var palette_bytes = self._get_palette_bytes() + return size(palette_bytes) / 4 # Each color is 4 bytes + end + # Handle parameter changes # # @param name: string - Name of the parameter that changed @@ -43,20 +84,24 @@ class ColorCycleColorProvider : animation.color_provider def on_param_changed(name, value) if name == "palette" # When palette changes, update current_color if current_index is valid - var palette = value - if size(palette) > 0 + var palette_size = self._get_palette_size() + if palette_size > 0 # Clamp current_index to valid range - if self.current_index >= size(palette) + if self.current_index >= palette_size self.current_index = 0 end - self.current_color = palette[self.current_index] + self.current_color = self._get_color_at_index(self.current_index) end - elif name == "next" && value == 1 - # Move to next color in palette - var palette = self.palette - if size(palette) > 0 - self.current_index = (self.current_index + 1) % size(palette) - self.current_color = palette[self.current_index] + elif name == "next" && value != 0 + # Add to color index + var palette_size = self._get_palette_size() + if palette_size > 0 + var current_index = (self.current_index + value) % palette_size + if current_index < 0 + current_index += palette_size + end + self.current_index = current_index + self.current_color = self._get_color_at_index(self.current_index) end # Reset the next parameter back to 0 self.set_param("next", 0) @@ -70,18 +115,17 @@ class ColorCycleColorProvider : animation.color_provider # @return int - Color in ARGB format (0xAARRGGBB) def produce_value(name, time_ms) # Get parameter values using virtual member access - var palette = self.palette var cycle_period = self.cycle_period # Get the number of colors in the palette - var palette_size = size(palette) + var palette_size = self._get_palette_size() if palette_size == 0 return 0xFFFFFFFF # Default to white if no colors end if palette_size == 1 # If only one color, just return it - self.current_color = palette[0] + self.current_color = self._get_color_at_index(0) return self.current_color end @@ -103,7 +147,7 @@ class ColorCycleColorProvider : animation.color_provider # Update current state and return the color self.current_index = color_index - self.current_color = palette[color_index] + self.current_color = self._get_color_at_index(color_index) return self.current_color end @@ -115,17 +159,14 @@ class ColorCycleColorProvider : animation.color_provider # @param time_ms: int - Current time in milliseconds (ignored for value-based color) # @return int - Color in ARGB format (0xAARRGGBB) def get_color_for_value(value, time_ms) - # Get parameter values using virtual member access - var palette = self.palette - # Get the number of colors in the palette - var palette_size = size(palette) + var palette_size = self._get_palette_size() if palette_size == 0 return 0xFFFFFFFF # Default to white if no colors end if palette_size == 1 - return palette[0] # If only one color, just return it + return self._get_color_at_index(0) # If only one color, just return it end # Clamp value to 0-100 @@ -143,108 +184,24 @@ class ColorCycleColorProvider : animation.color_provider color_index = palette_size - 1 end - return palette[color_index] + return self._get_color_at_index(color_index) end - # Add a color to the palette - # - # @param color: int - Color to add (32-bit ARGB value) - # @return self for method chaining - def add_color(color) - var current_palette = self.palette - var new_palette = current_palette.copy() - new_palette.push(color) - self.palette = new_palette - return self - end - + # String representation of the provider def tostring() try var mode = self.cycle_period == 0 ? "manual" : "auto" - return f"ColorCycleColorProvider(palette_size={size(self.palette)}, cycle_period={self.cycle_period}, mode={mode}, current_index={self.current_index})" + var palette_size = self._get_palette_size() + return f"ColorCycleColorProvider(palette_size={palette_size}, cycle_period={self.cycle_period}, mode={mode}, current_index={self.current_index})" except .. return "ColorCycleColorProvider(uninitialized)" end end end -# Factory function for custom palette -# -# @param engine: AnimationEngine - Animation engine reference -# @param palette: list - List of colors to cycle through (32-bit ARGB values) -# @param cycle_period: int - Time for one complete cycle in milliseconds -# @return ColorCycleColorProvider - A new color cycle color provider instance -def color_cycle_from_palette(engine, palette, cycle_period) - var provider = animation.color_cycle(engine) - if palette != nil - provider.palette = palette - end - if cycle_period != nil - provider.cycle_period = cycle_period - end - return provider -end -# Factory function for rainbow palette -# -# @param engine: AnimationEngine - Animation engine reference -# @param num_colors: int - Number of colors in the rainbow (default: 6) -# @param cycle_period: int - Time for one complete cycle in milliseconds -# @return ColorCycleColorProvider - A new color cycle color provider instance -def color_cycle_rainbow(engine, num_colors, cycle_period) - # Default parameters - if num_colors == nil || num_colors < 2 - num_colors = 6 - end - - # Create a rainbow palette - var palette = [] - var i = 0 - while i < num_colors - # Calculate hue (0 to 360 degrees) - var hue = tasmota.scale_uint(i, 0, num_colors, 0, 360) - - # Convert HSV to RGB (simplified conversion) - var r, g, b - var h_section = (hue / 60) % 6 - var f = (hue / 60) - h_section - var v = 255 # Value (brightness) - var p = 0 # Saturation is 100%, so p = 0 - var q = int(v * (1 - f)) - var t = int(v * f) - - if h_section == 0 - r = v; g = t; b = p - elif h_section == 1 - r = q; g = v; b = p - elif h_section == 2 - r = p; g = v; b = t - elif h_section == 3 - r = p; g = q; b = v - elif h_section == 4 - r = t; g = p; b = v - else - r = v; g = p; b = q - end - - # Create ARGB color (fully opaque) - var color = (255 << 24) | (r << 16) | (g << 8) | b - palette.push(color) - i += 1 - end - - # Create and return a new color cycle color provider with the rainbow palette - var provider = animation.color_cycle(engine) - provider.palette = palette - if cycle_period != nil - provider.cycle_period = cycle_period - end - return provider -end -return {'color_cycle': ColorCycleColorProvider, - 'color_cycle_from_palette': color_cycle_from_palette, - 'color_cycle_rainbow': color_cycle_rainbow} \ No newline at end of file +return {'color_cycle': ColorCycleColorProvider} \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/providers/rich_palette_color_provider.be b/lib/libesp32/berry_animation/src/providers/rich_palette_color_provider.be index 9bd02040b..df68747bc 100644 --- a/lib/libesp32/berry_animation/src/providers/rich_palette_color_provider.be +++ b/lib/libesp32/berry_animation/src/providers/rich_palette_color_provider.be @@ -18,7 +18,7 @@ class RichPaletteColorProvider : animation.color_provider # Parameter definitions static var PARAMS = { - "palette": {"type": "instance", "default": nil}, # Palette bytes or predefined palette constant + "palette": {"type": "bytes", "default": nil}, # Palette bytes or predefined palette constant "cycle_period": {"min": 0, "default": 5000}, # 5 seconds default, 0 = value-based only "transition_type": {"enum": [animation.LINEAR, animation.SINE], "default": animation.SINE}, "brightness": {"min": 0, "max": 255, "default": 255}, @@ -91,26 +91,18 @@ class RichPaletteColorProvider : animation.color_provider # Get palette bytes from parameter with default fallback def _get_palette_bytes() var palette_bytes = self.palette - - if palette_bytes == nil - # Default rainbow palette (reusing format from Animate_palette) - palette_bytes = bytes( - "00FF0000" # Red (value 0) - "24FFA500" # Orange (value 36) - "49FFFF00" # Yellow (value 73) - "6E00FF00" # Green (value 110) - "920000FF" # Blue (value 146) - "B74B0082" # Indigo (value 183) - "DBEE82EE" # Violet (value 219) - "FFFF0000" # Red (value 255) - ) - end - - # Convert comptr to palette buffer if needed (from Animate_palette) - if type(palette_bytes) == 'ptr' palette_bytes = self._ptr_to_palette(palette_bytes) end - - return palette_bytes + return (palette_bytes != nil) ? palette_bytes : self._DEFAULT_PALETTE end + static _DEFAULT_PALETTE = bytes( + "00FF0000" # Red (value 0) + "24FFA500" # Orange (value 36) + "49FFFF00" # Yellow (value 73) + "6E00FF00" # Green (value 110) + "920000FF" # Blue (value 146) + "B74B0082" # Indigo (value 183) + "DBEE82EE" # Violet (value 219) + "FFFF0000" # Red (value 255) + ) # Recompute palette slots and metadata def _recompute_palette() @@ -136,33 +128,6 @@ class RichPaletteColorProvider : animation.color_provider return self end - # Convert comptr to bytes (reused from Animate_palette.ptr_to_palette) - def _ptr_to_palette(p) - if type(p) == 'ptr' - var b_raw = bytes(p, 2000) # arbitrary large size - var idx = 1 - if b_raw[0] != 0 - # palette in tick counts - while true - if b_raw[idx * 4] == 0 - break - end - idx += 1 - end - else - # palette is in value range from 0..255 - while true - if b_raw[idx * 4] == 0xFF - break - end - idx += 1 - end - end - var sz = (idx + 1) * 4 - return bytes(p, sz) - end - end - # Parse the palette and create slots array (reused from Animate_palette) # # @param min: int - Minimum value for the range @@ -212,12 +177,9 @@ class RichPaletteColorProvider : animation.color_provider end var palette_bytes = self._get_palette_bytes() - var bgrt = palette_bytes.get(idx * 4, 4) - var r = (bgrt >> 8) & 0xFF - var g = (bgrt >> 16) & 0xFF - var b = (bgrt >> 24) & 0xFF - - return (0xFF << 24) | (r << 16) | (g << 8) | b + var trgb = palette_bytes.get(idx * 4, -4) # Big Endian + trgb = trgb | 0xFF000000 # set alpha channel to full opaque + return trgb end # Produce a color value for any parameter name (optimized version from Animate_palette) diff --git a/lib/libesp32/berry_animation/src/solidify/solidified_animation.h b/lib/libesp32/berry_animation/src/solidify/solidified_animation.h index 4ca045f44..c7c2ed83d 100644 --- a/lib/libesp32/berry_animation/src/solidify/solidified_animation.h +++ b/lib/libesp32/berry_animation/src/solidify/solidified_animation.h @@ -3,38 +3,6 @@ * Generated code, don't edit * \********************************************************************/ #include "be_constobj.h" - -/******************************************************************** -** Solidified function: create_stop_step -********************************************************************/ -be_local_closure(create_stop_step, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 0, /* 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(type), - /* K1 */ be_nested_str_weak(stop), - /* K2 */ be_nested_str_weak(animation), - }), - be_str_weak(create_stop_step), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60040013, // 0000 GETGBL R1 G19 - 0x7C040000, // 0001 CALL R1 0 - 0x98060101, // 0002 SETIDX R1 K0 K1 - 0x98060400, // 0003 SETIDX R1 K2 R0 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - // compact class 'BreatheAnimation' ktab size: 17, total: 24 (saved 56 bytes) static const bvalue be_ktab_class_BreatheAnimation[17] = { /* K0 */ be_nested_str_weak(base_color), @@ -346,11 +314,11 @@ be_local_closure(triangle, /* name */ /******************************************************************** -** Solidified function: create_closure_value +** Solidified function: set_event_active ********************************************************************/ -be_local_closure(create_closure_value, /* name */ +be_local_closure(set_event_active, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 2, /* argc */ 0, /* varg */ 0, /* has upvals */ @@ -360,18 +328,97 @@ be_local_closure(create_closure_value, /* name */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(closure_value), - /* K2 */ be_nested_str_weak(closure), + /* K1 */ be_nested_str_weak(event_manager), + /* K2 */ be_nested_str_weak(set_event_active), }), - be_str_weak(create_closure_value), + be_str_weak(set_event_active), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ + ( &(const binstruction[ 7]) { /* code */ 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100000, // 0002 MOVE R4 R0 - 0x7C080400, // 0003 CALL R2 2 - 0x900A0401, // 0004 SETMBR R2 K2 R1 - 0x80040400, // 0005 RET 1 R2 + 0x88080501, // 0001 GETMBR R2 R2 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100000, // 0003 MOVE R4 R0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x7C080600, // 0005 CALL R2 3 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + +// compact class 'SparkleAnimation' ktab size: 42, total: 76 (saved 272 bytes) +static const bvalue be_ktab_class_SparkleAnimation[42] = { + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(_random), + /* K2 */ be_nested_str_weak(init), + /* K3 */ be_nested_str_weak(random_seed), + /* K4 */ be_nested_str_weak(engine), + /* K5 */ be_nested_str_weak(time_ms), + /* K6 */ be_nested_str_weak(current_colors), + /* K7 */ be_nested_str_weak(sparkle_states), + /* K8 */ be_nested_str_weak(sparkle_ages), + /* K9 */ be_nested_str_weak(last_update), + /* K10 */ be_nested_str_weak(_initialize_buffers), + /* K11 */ be_nested_str_weak(update), + /* K12 */ be_nested_str_weak(_update_sparkles), + /* K13 */ be_nested_str_weak(get_param), + /* K14 */ be_nested_str_weak(color), + /* K15 */ be_nested_str_weak(animation), + /* K16 */ be_nested_str_weak(is_value_provider), + /* K17 */ be_nested_str_weak(0x_X2508x), + /* K18 */ be_nested_str_weak(SparkleAnimation_X28color_X3D_X25s_X2C_X20density_X3D_X25s_X2C_X20fade_speed_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), + /* K19 */ be_nested_str_weak(density), + /* K20 */ be_nested_str_weak(fade_speed), + /* K21 */ be_nested_str_weak(priority), + /* K22 */ be_nested_str_weak(is_running), + /* K23 */ be_nested_str_weak(get_strip_length), + /* K24 */ be_nested_str_weak(sparkle_duration), + /* K25 */ be_nested_str_weak(min_brightness), + /* K26 */ be_nested_str_weak(max_brightness), + /* K27 */ be_nested_str_weak(back_color), + /* K28 */ be_const_int(1), + /* K29 */ be_nested_str_weak(tasmota), + /* K30 */ be_nested_str_weak(scale_uint), + /* K31 */ be_nested_str_weak(_update_sparkle_color), + /* K32 */ be_nested_str_weak(_random_range), + /* K33 */ be_const_int(1103515245), + /* K34 */ be_const_int(2147483647), + /* K35 */ be_nested_str_weak(resize), + /* K36 */ be_nested_str_weak(width), + /* K37 */ be_nested_str_weak(set_pixel_color), + /* K38 */ be_nested_str_weak(is_color_provider), + /* K39 */ be_nested_str_weak(get_color_for_value), + /* K40 */ be_nested_str_weak(get_param_value), + /* K41 */ be_nested_str_weak(start), +}; + + +extern const bclass be_class_SparkleAnimation; + +/******************************************************************** +** Solidified function: _random_range +********************************************************************/ +be_local_closure(class_SparkleAnimation__random_range, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(_random_range), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x18080300, // 0000 LE R2 R1 K0 + 0x780A0000, // 0001 JMPF R2 #0003 + 0x80060000, // 0002 RET 1 K0 + 0x8C080101, // 0003 GETMET R2 R0 K1 + 0x7C080200, // 0004 CALL R2 1 + 0x10080401, // 0005 MOD R2 R2 R1 + 0x80040400, // 0006 RET 1 R2 }) ) ); @@ -379,9 +426,656 @@ be_local_closure(create_closure_value, /* name */ /******************************************************************** -** Solidified function: bounce_gravity +** Solidified function: init ********************************************************************/ -be_local_closure(bounce_gravity, /* name */ +be_local_closure(class_SparkleAnimation_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080502, // 0003 GETMET R2 R2 K2 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x88080104, // 0006 GETMBR R2 R0 K4 + 0x88080505, // 0007 GETMBR R2 R2 K5 + 0x540EFFFF, // 0008 LDINT R3 65536 + 0x10080403, // 0009 MOD R2 R2 R3 + 0x90020602, // 000A SETMBR R0 K3 R2 + 0x60080012, // 000B GETGBL R2 G18 + 0x7C080000, // 000C CALL R2 0 + 0x90020C02, // 000D SETMBR R0 K6 R2 + 0x60080012, // 000E GETGBL R2 G18 + 0x7C080000, // 000F CALL R2 0 + 0x90020E02, // 0010 SETMBR R0 K7 R2 + 0x60080012, // 0011 GETGBL R2 G18 + 0x7C080000, // 0012 CALL R2 0 + 0x90021002, // 0013 SETMBR R0 K8 R2 + 0x90021300, // 0014 SETMBR R0 K9 K0 + 0x8C08010A, // 0015 GETMET R2 R0 K10 + 0x7C080200, // 0016 CALL R2 1 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update +********************************************************************/ +be_local_closure(class_SparkleAnimation_update, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C08050B, // 0003 GETMET R2 R2 K11 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x540A0020, // 0006 LDINT R2 33 + 0x880C0109, // 0007 GETMBR R3 R0 K9 + 0x040C0203, // 0008 SUB R3 R1 R3 + 0x140C0602, // 0009 LT R3 R3 R2 + 0x780E0001, // 000A JMPF R3 #000D + 0x500C0200, // 000B LDBOOL R3 1 0 + 0x80040600, // 000C RET 1 R3 + 0x90021201, // 000D SETMBR R0 K9 R1 + 0x8C0C010C, // 000E GETMET R3 R0 K12 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x500C0200, // 0011 LDBOOL R3 1 0 + 0x80040600, // 0012 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_SparkleAnimation_tostring, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x8C04010D, // 0000 GETMET R1 R0 K13 + 0x580C000E, // 0001 LDCONST R3 K14 + 0x7C040400, // 0002 CALL R1 2 + 0x4C080000, // 0003 LDNIL R2 + 0xB80E1E00, // 0004 GETNGBL R3 K15 + 0x8C0C0710, // 0005 GETMET R3 R3 K16 + 0x5C140200, // 0006 MOVE R5 R1 + 0x7C0C0400, // 0007 CALL R3 2 + 0x780E0004, // 0008 JMPF R3 #000E + 0x600C0008, // 0009 GETGBL R3 G8 + 0x5C100200, // 000A MOVE R4 R1 + 0x7C0C0200, // 000B CALL R3 1 + 0x5C080600, // 000C MOVE R2 R3 + 0x70020004, // 000D JMP #0013 + 0x600C0018, // 000E GETGBL R3 G24 + 0x58100011, // 000F LDCONST R4 K17 + 0x8814010E, // 0010 GETMBR R5 R0 K14 + 0x7C0C0400, // 0011 CALL R3 2 + 0x5C080600, // 0012 MOVE R2 R3 + 0x600C0018, // 0013 GETGBL R3 G24 + 0x58100012, // 0014 LDCONST R4 K18 + 0x5C140400, // 0015 MOVE R5 R2 + 0x88180113, // 0016 GETMBR R6 R0 K19 + 0x881C0114, // 0017 GETMBR R7 R0 K20 + 0x88200115, // 0018 GETMBR R8 R0 K21 + 0x88240116, // 0019 GETMBR R9 R0 K22 + 0x7C0C0C00, // 001A CALL R3 6 + 0x80040600, // 001B RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update_sparkles +********************************************************************/ +be_local_closure(class_SparkleAnimation__update_sparkles, /* name */ + be_nested_proto( + 19, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(_update_sparkles), + &be_const_str_solidified, + ( &(const binstruction[100]) { /* code */ + 0x88080104, // 0000 GETMBR R2 R0 K4 + 0x8C080517, // 0001 GETMET R2 R2 K23 + 0x7C080200, // 0002 CALL R2 1 + 0x880C0118, // 0003 GETMBR R3 R0 K24 + 0x88100114, // 0004 GETMBR R4 R0 K20 + 0x88140113, // 0005 GETMBR R5 R0 K19 + 0x88180119, // 0006 GETMBR R6 R0 K25 + 0x881C011A, // 0007 GETMBR R7 R0 K26 + 0x8820011B, // 0008 GETMBR R8 R0 K27 + 0x58240000, // 0009 LDCONST R9 K0 + 0x14281202, // 000A LT R10 R9 R2 + 0x782A0056, // 000B JMPF R10 #0063 + 0x88280107, // 000C GETMBR R10 R0 K7 + 0x94281409, // 000D GETIDX R10 R10 R9 + 0x24281500, // 000E GT R10 R10 K0 + 0x782A003A, // 000F JMPF R10 #004B + 0x88280108, // 0010 GETMBR R10 R0 K8 + 0x942C1409, // 0011 GETIDX R11 R10 R9 + 0x002C171C, // 0012 ADD R11 R11 K28 + 0x9828120B, // 0013 SETIDX R10 R9 R11 + 0x88280108, // 0014 GETMBR R10 R0 K8 + 0x94281409, // 0015 GETIDX R10 R10 R9 + 0x28281403, // 0016 GE R10 R10 R3 + 0x782A0006, // 0017 JMPF R10 #001F + 0x88280107, // 0018 GETMBR R10 R0 K7 + 0x98281300, // 0019 SETIDX R10 R9 K0 + 0x88280108, // 001A GETMBR R10 R0 K8 + 0x98281300, // 001B SETIDX R10 R9 K0 + 0x88280106, // 001C GETMBR R10 R0 K6 + 0x98281208, // 001D SETIDX R10 R9 R8 + 0x7002002A, // 001E JMP #004A + 0xB82A3A00, // 001F GETNGBL R10 K29 + 0x8C28151E, // 0020 GETMET R10 R10 K30 + 0x88300108, // 0021 GETMBR R12 R0 K8 + 0x94301809, // 0022 GETIDX R12 R12 R9 + 0x58340000, // 0023 LDCONST R13 K0 + 0x5C380600, // 0024 MOVE R14 R3 + 0x583C0000, // 0025 LDCONST R15 K0 + 0x544200FE, // 0026 LDINT R16 255 + 0x7C280C00, // 0027 CALL R10 6 + 0x542E00FE, // 0028 LDINT R11 255 + 0xB8323A00, // 0029 GETNGBL R12 K29 + 0x8C30191E, // 002A GETMET R12 R12 K30 + 0x5C381400, // 002B MOVE R14 R10 + 0x583C0000, // 002C LDCONST R15 K0 + 0x544200FE, // 002D LDINT R16 255 + 0x58440000, // 002E LDCONST R17 K0 + 0x5C480800, // 002F MOVE R18 R4 + 0x7C300C00, // 0030 CALL R12 6 + 0x042C160C, // 0031 SUB R11 R11 R12 + 0xB8323A00, // 0032 GETNGBL R12 K29 + 0x8C30191E, // 0033 GETMET R12 R12 K30 + 0x88380107, // 0034 GETMBR R14 R0 K7 + 0x94381C09, // 0035 GETIDX R14 R14 R9 + 0x583C0000, // 0036 LDCONST R15 K0 + 0x544200FE, // 0037 LDINT R16 255 + 0x58440000, // 0038 LDCONST R17 K0 + 0x5C481600, // 0039 MOVE R18 R11 + 0x7C300C00, // 003A CALL R12 6 + 0x54360009, // 003B LDINT R13 10 + 0x1434180D, // 003C LT R13 R12 R13 + 0x78360006, // 003D JMPF R13 #0045 + 0x88340107, // 003E GETMBR R13 R0 K7 + 0x98341300, // 003F SETIDX R13 R9 K0 + 0x88340108, // 0040 GETMBR R13 R0 K8 + 0x98341300, // 0041 SETIDX R13 R9 K0 + 0x88340106, // 0042 GETMBR R13 R0 K6 + 0x98341208, // 0043 SETIDX R13 R9 R8 + 0x70020004, // 0044 JMP #004A + 0x8C34011F, // 0045 GETMET R13 R0 K31 + 0x5C3C1200, // 0046 MOVE R15 R9 + 0x5C401800, // 0047 MOVE R16 R12 + 0x5C440200, // 0048 MOVE R17 R1 + 0x7C340800, // 0049 CALL R13 4 + 0x70020015, // 004A JMP #0061 + 0x8C280120, // 004B GETMET R10 R0 K32 + 0x543200FF, // 004C LDINT R12 256 + 0x7C280400, // 004D CALL R10 2 + 0x14281405, // 004E LT R10 R10 R5 + 0x782A000E, // 004F JMPF R10 #005F + 0x8C280120, // 0050 GETMET R10 R0 K32 + 0x04300E06, // 0051 SUB R12 R7 R6 + 0x0030191C, // 0052 ADD R12 R12 K28 + 0x7C280400, // 0053 CALL R10 2 + 0x00280C0A, // 0054 ADD R10 R6 R10 + 0x882C0107, // 0055 GETMBR R11 R0 K7 + 0x982C120A, // 0056 SETIDX R11 R9 R10 + 0x882C0108, // 0057 GETMBR R11 R0 K8 + 0x982C1300, // 0058 SETIDX R11 R9 K0 + 0x8C2C011F, // 0059 GETMET R11 R0 K31 + 0x5C341200, // 005A MOVE R13 R9 + 0x5C381400, // 005B MOVE R14 R10 + 0x5C3C0200, // 005C MOVE R15 R1 + 0x7C2C0800, // 005D CALL R11 4 + 0x70020001, // 005E JMP #0061 + 0x88280106, // 005F GETMBR R10 R0 K6 + 0x98281208, // 0060 SETIDX R10 R9 R8 + 0x0024131C, // 0061 ADD R9 R9 K28 + 0x7001FFA6, // 0062 JMP #000A + 0x80000000, // 0063 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _random +********************************************************************/ +be_local_closure(class_SparkleAnimation__random, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(_random), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88040103, // 0000 GETMBR R1 R0 K3 + 0x08040321, // 0001 MUL R1 R1 K33 + 0x540A3038, // 0002 LDINT R2 12345 + 0x00040202, // 0003 ADD R1 R1 R2 + 0x2C040322, // 0004 AND R1 R1 K34 + 0x90020601, // 0005 SETMBR R0 K3 R1 + 0x88040103, // 0006 GETMBR R1 R0 K3 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _initialize_buffers +********************************************************************/ +be_local_closure(class_SparkleAnimation__initialize_buffers, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(_initialize_buffers), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x88040104, // 0000 GETMBR R1 R0 K4 + 0x8C040317, // 0001 GETMET R1 R1 K23 + 0x7C040200, // 0002 CALL R1 1 + 0x88080106, // 0003 GETMBR R2 R0 K6 + 0x8C080523, // 0004 GETMET R2 R2 K35 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x88080107, // 0007 GETMBR R2 R0 K7 + 0x8C080523, // 0008 GETMET R2 R2 K35 + 0x5C100200, // 0009 MOVE R4 R1 + 0x7C080400, // 000A CALL R2 2 + 0x88080108, // 000B GETMBR R2 R0 K8 + 0x8C080523, // 000C GETMET R2 R2 K35 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x8808011B, // 000F GETMBR R2 R0 K27 + 0x580C0000, // 0010 LDCONST R3 K0 + 0x14100601, // 0011 LT R4 R3 R1 + 0x78120007, // 0012 JMPF R4 #001B + 0x88100106, // 0013 GETMBR R4 R0 K6 + 0x98100602, // 0014 SETIDX R4 R3 R2 + 0x88100107, // 0015 GETMBR R4 R0 K7 + 0x98100700, // 0016 SETIDX R4 R3 K0 + 0x88100108, // 0017 GETMBR R4 R0 K8 + 0x98100700, // 0018 SETIDX R4 R3 K0 + 0x000C071C, // 0019 ADD R3 R3 K28 + 0x7001FFF5, // 001A JMP #0011 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_SparkleAnimation_render, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x880C0116, // 0000 GETMBR R3 R0 K22 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0203, // 0003 EQ R3 R1 R3 + 0x780E0001, // 0004 JMPF R3 #0007 + 0x500C0000, // 0005 LDBOOL R3 0 0 + 0x80040600, // 0006 RET 1 R3 + 0x880C0104, // 0007 GETMBR R3 R0 K4 + 0x8C0C0717, // 0008 GETMET R3 R3 K23 + 0x7C0C0200, // 0009 CALL R3 1 + 0x58100000, // 000A LDCONST R4 K0 + 0x14140803, // 000B LT R5 R4 R3 + 0x78160009, // 000C JMPF R5 #0017 + 0x88140324, // 000D GETMBR R5 R1 K36 + 0x14140805, // 000E LT R5 R4 R5 + 0x78160004, // 000F JMPF R5 #0015 + 0x8C140325, // 0010 GETMET R5 R1 K37 + 0x5C1C0800, // 0011 MOVE R7 R4 + 0x88200106, // 0012 GETMBR R8 R0 K6 + 0x94201004, // 0013 GETIDX R8 R8 R4 + 0x7C140600, // 0014 CALL R5 3 + 0x0010091C, // 0015 ADD R4 R4 K28 + 0x7001FFF3, // 0016 JMP #000B + 0x50140200, // 0017 LDBOOL R5 1 0 + 0x80040A00, // 0018 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update_sparkle_color +********************************************************************/ +be_local_closure(class_SparkleAnimation__update_sparkle_color, /* name */ + be_nested_proto( + 17, /* nstack */ + 4, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(_update_sparkle_color), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* code */ + 0x5411FFFE, // 0000 LDINT R4 -1 + 0x8814010E, // 0001 GETMBR R5 R0 K14 + 0xB81A1E00, // 0002 GETNGBL R6 K15 + 0x8C180D26, // 0003 GETMET R6 R6 K38 + 0x5C200A00, // 0004 MOVE R8 R5 + 0x7C180400, // 0005 CALL R6 2 + 0x781A0009, // 0006 JMPF R6 #0011 + 0x88180B27, // 0007 GETMBR R6 R5 K39 + 0x4C1C0000, // 0008 LDNIL R7 + 0x20180C07, // 0009 NE R6 R6 R7 + 0x781A0005, // 000A JMPF R6 #0011 + 0x8C180B27, // 000B GETMET R6 R5 K39 + 0x5C200400, // 000C MOVE R8 R2 + 0x58240000, // 000D LDCONST R9 K0 + 0x7C180600, // 000E CALL R6 3 + 0x5C100C00, // 000F MOVE R4 R6 + 0x70020006, // 0010 JMP #0018 + 0x8C180128, // 0011 GETMET R6 R0 K40 + 0x5820000E, // 0012 LDCONST R8 K14 + 0x54260009, // 0013 LDINT R9 10 + 0x08240209, // 0014 MUL R9 R1 R9 + 0x00240609, // 0015 ADD R9 R3 R9 + 0x7C180600, // 0016 CALL R6 3 + 0x5C100C00, // 0017 MOVE R4 R6 + 0x541A0017, // 0018 LDINT R6 24 + 0x3C180806, // 0019 SHR R6 R4 R6 + 0x541E00FE, // 001A LDINT R7 255 + 0x2C180C07, // 001B AND R6 R6 R7 + 0x541E000F, // 001C LDINT R7 16 + 0x3C1C0807, // 001D SHR R7 R4 R7 + 0x542200FE, // 001E LDINT R8 255 + 0x2C1C0E08, // 001F AND R7 R7 R8 + 0x54220007, // 0020 LDINT R8 8 + 0x3C200808, // 0021 SHR R8 R4 R8 + 0x542600FE, // 0022 LDINT R9 255 + 0x2C201009, // 0023 AND R8 R8 R9 + 0x542600FE, // 0024 LDINT R9 255 + 0x2C240809, // 0025 AND R9 R4 R9 + 0xB82A3A00, // 0026 GETNGBL R10 K29 + 0x8C28151E, // 0027 GETMET R10 R10 K30 + 0x5C300400, // 0028 MOVE R12 R2 + 0x58340000, // 0029 LDCONST R13 K0 + 0x543A00FE, // 002A LDINT R14 255 + 0x583C0000, // 002B LDCONST R15 K0 + 0x5C400E00, // 002C MOVE R16 R7 + 0x7C280C00, // 002D CALL R10 6 + 0x5C1C1400, // 002E MOVE R7 R10 + 0xB82A3A00, // 002F GETNGBL R10 K29 + 0x8C28151E, // 0030 GETMET R10 R10 K30 + 0x5C300400, // 0031 MOVE R12 R2 + 0x58340000, // 0032 LDCONST R13 K0 + 0x543A00FE, // 0033 LDINT R14 255 + 0x583C0000, // 0034 LDCONST R15 K0 + 0x5C401000, // 0035 MOVE R16 R8 + 0x7C280C00, // 0036 CALL R10 6 + 0x5C201400, // 0037 MOVE R8 R10 + 0xB82A3A00, // 0038 GETNGBL R10 K29 + 0x8C28151E, // 0039 GETMET R10 R10 K30 + 0x5C300400, // 003A MOVE R12 R2 + 0x58340000, // 003B LDCONST R13 K0 + 0x543A00FE, // 003C LDINT R14 255 + 0x583C0000, // 003D LDCONST R15 K0 + 0x5C401200, // 003E MOVE R16 R9 + 0x7C280C00, // 003F CALL R10 6 + 0x5C241400, // 0040 MOVE R9 R10 + 0x88280106, // 0041 GETMBR R10 R0 K6 + 0x542E0017, // 0042 LDINT R11 24 + 0x382C0C0B, // 0043 SHL R11 R6 R11 + 0x5432000F, // 0044 LDINT R12 16 + 0x38300E0C, // 0045 SHL R12 R7 R12 + 0x302C160C, // 0046 OR R11 R11 R12 + 0x54320007, // 0047 LDINT R12 8 + 0x3830100C, // 0048 SHL R12 R8 R12 + 0x302C160C, // 0049 OR R11 R11 R12 + 0x302C1609, // 004A OR R11 R11 R9 + 0x9828020B, // 004B SETIDX R10 R1 R11 + 0x80000000, // 004C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start +********************************************************************/ +be_local_closure(class_SparkleAnimation_start, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SparkleAnimation, /* shared constants */ + be_str_weak(start), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080529, // 0003 GETMET R2 R2 K41 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x88080104, // 0006 GETMBR R2 R0 K4 + 0x88080505, // 0007 GETMBR R2 R2 K5 + 0x540EFFFF, // 0008 LDINT R3 65536 + 0x10080403, // 0009 MOD R2 R2 R3 + 0x90020602, // 000A SETMBR R0 K3 R2 + 0x8C08010A, // 000B GETMET R2 R0 K10 + 0x7C080200, // 000C CALL R2 1 + 0x80040000, // 000D RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: SparkleAnimation +********************************************************************/ +extern const bclass be_class_Animation; +be_local_class(SparkleAnimation, + 5, + &be_class_Animation, + be_nested_map(16, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(sparkle_states, -1), be_const_var(1) }, + { be_const_key_weak(start, -1), be_const_closure(class_SparkleAnimation_start_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_SparkleAnimation_init_closure) }, + { be_const_key_weak(PARAMS, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(7, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(fade_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(50) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(density, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(30) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(color, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-1) }, + })) ) } )) }, + { be_const_key_weak(max_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(255) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(sparkle_duration, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(60) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(back_color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-16777216) }, + })) ) } )) }, + { be_const_key_weak(min_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(100) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(update, -1), be_const_closure(class_SparkleAnimation_update_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_SparkleAnimation_tostring_closure) }, + { be_const_key_weak(sparkle_ages, -1), be_const_var(2) }, + { be_const_key_weak(current_colors, -1), be_const_var(0) }, + { be_const_key_weak(last_update, -1), be_const_var(4) }, + { be_const_key_weak(_random, -1), be_const_closure(class_SparkleAnimation__random_closure) }, + { be_const_key_weak(random_seed, -1), be_const_var(3) }, + { be_const_key_weak(_update_sparkles, 8), be_const_closure(class_SparkleAnimation__update_sparkles_closure) }, + { be_const_key_weak(_initialize_buffers, -1), be_const_closure(class_SparkleAnimation__initialize_buffers_closure) }, + { be_const_key_weak(render, -1), be_const_closure(class_SparkleAnimation_render_closure) }, + { be_const_key_weak(_update_sparkle_color, -1), be_const_closure(class_SparkleAnimation__update_sparkle_color_closure) }, + { be_const_key_weak(_random_range, 1), be_const_closure(class_SparkleAnimation__random_range_closure) }, + })), + be_str_weak(SparkleAnimation) +); + +/******************************************************************** +** Solidified function: shift_fast_scroll +********************************************************************/ +be_local_closure(shift_fast_scroll, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(shift_animation), + /* K2 */ be_nested_str_weak(direction), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(shift_speed), + /* K5 */ be_nested_str_weak(wrap_around), + }), + be_str_weak(shift_fast_scroll), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A00C7, // 0005 LDINT R2 200 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x50080200, // 0007 LDBOOL R2 1 0 + 0x90060A02, // 0008 SETMBR R1 K5 R2 + 0x80040200, // 0009 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: bounce_basic +********************************************************************/ +be_local_closure(bounce_basic, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -400,24 +1094,23 @@ be_local_closure(bounce_gravity, /* name */ /* K5 */ be_nested_str_weak(damping), /* K6 */ be_nested_str_weak(gravity), /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(bounce_gravity), + /* K8 */ be_nested_str_weak(bounce_basic), }), - be_str_weak(bounce_gravity), + be_str_weak(bounce_basic), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ + ( &(const binstruction[12]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0x540A0063, // 0004 LDINT R2 100 + 0x540A007F, // 0004 LDINT R2 128 0x90060402, // 0005 SETMBR R1 K2 R2 0x90060704, // 0006 SETMBR R1 K3 K4 - 0x540A00EF, // 0007 LDINT R2 240 + 0x540A00F9, // 0007 LDINT R2 250 0x90060A02, // 0008 SETMBR R1 K5 R2 - 0x540A007F, // 0009 LDINT R2 128 - 0x90060C02, // 000A SETMBR R1 K6 R2 - 0x90060F08, // 000B SETMBR R1 K7 K8 - 0x80040200, // 000C RET 1 R1 + 0x90060D04, // 0009 SETMBR R1 K6 K4 + 0x90060F08, // 000A SETMBR R1 K7 K8 + 0x80040200, // 000B RET 1 R1 }) ) ); @@ -744,109 +1437,9 @@ be_local_class(RichPaletteAnimation, ); /******************************************************************** -** Solidified function: set_event_active +** Solidified function: jitter_brightness ********************************************************************/ -be_local_closure(set_event_active, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(event_manager), - /* K2 */ be_nested_str_weak(set_event_active), - }), - be_str_weak(set_event_active), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x88080501, // 0001 GETMBR R2 R2 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100000, // 0003 MOVE R4 R0 - 0x5C140200, // 0004 MOVE R5 R1 - 0x7C080600, // 0005 CALL R2 3 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: noise_rainbow -********************************************************************/ -be_local_closure(noise_rainbow, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(noise_animation), - /* K2 */ be_nested_str_weak(rich_palette), - /* K3 */ be_nested_str_weak(palette), - /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), - /* K5 */ be_nested_str_weak(cycle_period), - /* K6 */ be_nested_str_weak(transition_type), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(brightness), - /* K9 */ be_nested_str_weak(range_min), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(range_max), - /* K12 */ be_nested_str_weak(color), - /* K13 */ be_nested_str_weak(scale), - /* K14 */ be_nested_str_weak(speed), - /* K15 */ be_nested_str_weak(octaves), - }), - be_str_weak(noise_rainbow), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x8C080502, // 0005 GETMET R2 R2 K2 - 0x5C100000, // 0006 MOVE R4 R0 - 0x7C080400, // 0007 CALL R2 2 - 0xB80E0000, // 0008 GETNGBL R3 K0 - 0x880C0704, // 0009 GETMBR R3 R3 K4 - 0x900A0603, // 000A SETMBR R2 K3 R3 - 0x540E1387, // 000B LDINT R3 5000 - 0x900A0A03, // 000C SETMBR R2 K5 R3 - 0x900A0D07, // 000D SETMBR R2 K6 K7 - 0x540E00FE, // 000E LDINT R3 255 - 0x900A1003, // 000F SETMBR R2 K8 R3 - 0x900A130A, // 0010 SETMBR R2 K9 K10 - 0x540E00FE, // 0011 LDINT R3 255 - 0x900A1603, // 0012 SETMBR R2 K11 R3 - 0x90061802, // 0013 SETMBR R1 K12 R2 - 0x540E0031, // 0014 LDINT R3 50 - 0x90061A03, // 0015 SETMBR R1 K13 R3 - 0x540E001D, // 0016 LDINT R3 30 - 0x90061C03, // 0017 SETMBR R1 K14 R3 - 0x90061F07, // 0018 SETMBR R1 K15 K7 - 0x80040200, // 0019 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: bounce_basic -********************************************************************/ -be_local_closure(bounce_basic, /* name */ +be_local_closure(jitter_brightness, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -856,98 +1449,24 @@ be_local_closure(bounce_basic, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(bounce_animation), - /* K2 */ be_nested_str_weak(bounce_speed), - /* K3 */ be_nested_str_weak(bounce_range), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(damping), - /* K6 */ be_nested_str_weak(gravity), - /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(bounce_basic), + /* K1 */ be_nested_str_weak(jitter_animation), + /* K2 */ be_nested_str_weak(jitter_type), + /* K3 */ be_const_int(2), + /* K4 */ be_nested_str_weak(brightness_range), }), - be_str_weak(bounce_basic), + be_str_weak(jitter_brightness), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ + ( &(const binstruction[ 8]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0x540A007F, // 0004 LDINT R2 128 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x90060704, // 0006 SETMBR R1 K3 K4 - 0x540A00F9, // 0007 LDINT R2 250 - 0x90060A02, // 0008 SETMBR R1 K5 R2 - 0x90060D04, // 0009 SETMBR R1 K6 K4 - 0x90060F08, // 000A SETMBR R1 K7 K8 - 0x80040200, // 000B RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: create_wait_step -********************************************************************/ -be_local_closure(create_wait_step, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 0, /* 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(type), - /* K1 */ be_nested_str_weak(wait), - /* K2 */ be_nested_str_weak(duration), - }), - be_str_weak(create_wait_step), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60040013, // 0000 GETGBL R1 G19 - 0x7C040000, // 0001 CALL R1 0 - 0x98060101, // 0002 SETIDX R1 K0 K1 - 0x98060400, // 0003 SETIDX R1 K2 R0 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: create_play_step -********************************************************************/ -be_local_closure(create_play_step, /* name */ - be_nested_proto( - 3, /* nstack */ - 2, /* argc */ - 0, /* 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(type), - /* K1 */ be_nested_str_weak(play), - /* K2 */ be_nested_str_weak(animation), - /* K3 */ be_nested_str_weak(duration), - }), - be_str_weak(create_play_step), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x60080013, // 0000 GETGBL R2 G19 - 0x7C080000, // 0001 CALL R2 0 - 0x980A0101, // 0002 SETIDX R2 K0 K1 - 0x980A0400, // 0003 SETIDX R2 K2 R0 - 0x980A0601, // 0004 SETIDX R2 K3 R1 - 0x80040400, // 0005 RET 1 R2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A0027, // 0005 LDINT R2 40 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x80040200, // 0007 RET 1 R1 }) ) ); @@ -1035,77 +1554,49 @@ be_local_closure(get_user_function, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: animation_controller -********************************************************************/ -be_local_closure(animation_controller, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(animation_engine), - }), - be_str_weak(animation_controller), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - -// compact class 'SequenceManager' ktab size: 27, total: 69 (saved 336 bytes) -static const bvalue be_ktab_class_SequenceManager[27] = { - /* K0 */ be_nested_str_weak(controller), - /* K1 */ be_nested_str_weak(active_sequence), - /* K2 */ be_nested_str_weak(sequence_state), - /* K3 */ be_nested_str_weak(step_index), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(step_start_time), - /* K6 */ be_nested_str_weak(steps), - /* K7 */ be_nested_str_weak(is_running), - /* K8 */ be_nested_str_weak(type), - /* K9 */ be_nested_str_weak(play), - /* K10 */ be_nested_str_weak(animation), - /* K11 */ be_nested_str_weak(add_animation), - /* K12 */ be_nested_str_weak(start), - /* K13 */ be_nested_str_weak(contains), - /* K14 */ be_nested_str_weak(duration), - /* K15 */ be_nested_str_weak(wait), - /* K16 */ be_nested_str_weak(stop), - /* K17 */ be_nested_str_weak(remove_animation), - /* K18 */ be_nested_str_weak(time_ms), - /* K19 */ be_nested_str_weak(clear), - /* K20 */ be_nested_str_weak(total_steps), - /* K21 */ be_nested_str_weak(current_step), - /* K22 */ be_nested_str_weak(elapsed_ms), - /* K23 */ be_nested_str_weak(stop_sequence), - /* K24 */ be_nested_str_weak(execute_current_step), - /* K25 */ be_nested_str_weak(advance_to_next_step), - /* K26 */ be_const_int(1), +// compact class 'EventManager' ktab size: 30, total: 61 (saved 248 bytes) +static const bvalue be_ktab_class_EventManager[30] = { + /* K0 */ be_nested_str_weak(event_name), + /* K1 */ be_nested_str_weak(_X2A), + /* K2 */ be_nested_str_weak(global_handlers), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(remove), + /* K5 */ be_nested_str_weak(handlers), + /* K6 */ be_nested_str_weak(set_active), + /* K7 */ be_nested_str_weak(stop_iteration), + /* K8 */ be_nested_str_weak(push), + /* K9 */ be_nested_str_weak(get_info), + /* K10 */ be_nested_str_weak(keys), + /* K11 */ be_nested_str_weak(event_queue), + /* K12 */ be_nested_str_weak(is_processing), + /* K13 */ be_nested_str_weak(clear), + /* K14 */ be_const_int(1), + /* K15 */ be_const_int(0), + /* K16 */ be_nested_str_weak(priority), + /* K17 */ be_nested_str_weak(animation), + /* K18 */ be_nested_str_weak(event_handler), + /* K19 */ be_nested_str_weak(_sort_handlers), + /* K20 */ be_nested_str_weak(contains), + /* K21 */ be_nested_str_weak(name), + /* K22 */ be_nested_str_weak(data), + /* K23 */ be_nested_str_weak(is_active), + /* K24 */ be_nested_str_weak(execute), + /* K25 */ be_nested_str_weak(Event_X20processing_X20error_X3A), + /* K26 */ be_nested_str_weak(_process_queued_events), + /* K27 */ be_nested_str_weak(size), + /* K28 */ be_nested_str_weak(pop), + /* K29 */ be_nested_str_weak(trigger_event), }; -extern const bclass be_class_SequenceManager; +extern const bclass be_class_EventManager; /******************************************************************** -** Solidified function: init +** Solidified function: unregister_handler ********************************************************************/ -be_local_closure(class_SequenceManager_init, /* name */ +be_local_closure(class_EventManager_unregister_handler, /* name */ be_nested_proto( - 3, /* nstack */ + 7, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -1113,24 +1604,609 @@ be_local_closure(class_SequenceManager_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_SequenceManager, /* shared constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(unregister_handler), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x1C080501, // 0001 EQ R2 R2 K1 + 0x780A000B, // 0002 JMPF R2 #000F + 0x88080102, // 0003 GETMBR R2 R0 K2 + 0x8C080503, // 0004 GETMET R2 R2 K3 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0003, // 0009 JMPF R3 #000E + 0x880C0102, // 000A GETMBR R3 R0 K2 + 0x8C0C0704, // 000B GETMET R3 R3 K4 + 0x5C140400, // 000C MOVE R5 R2 + 0x7C0C0400, // 000D CALL R3 2 + 0x7002000F, // 000E JMP #001F + 0x88080105, // 000F GETMBR R2 R0 K5 + 0x8C080503, // 0010 GETMET R2 R2 K3 + 0x88100300, // 0011 GETMBR R4 R1 K0 + 0x7C080400, // 0012 CALL R2 2 + 0x4C0C0000, // 0013 LDNIL R3 + 0x200C0403, // 0014 NE R3 R2 R3 + 0x780E0008, // 0015 JMPF R3 #001F + 0x8C0C0503, // 0016 GETMET R3 R2 K3 + 0x5C140200, // 0017 MOVE R5 R1 + 0x7C0C0400, // 0018 CALL R3 2 + 0x4C100000, // 0019 LDNIL R4 + 0x20100604, // 001A NE R4 R3 R4 + 0x78120002, // 001B JMPF R4 #001F + 0x8C100504, // 001C GETMET R4 R2 K4 + 0x5C180600, // 001D MOVE R6 R3 + 0x7C100400, // 001E CALL R4 2 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_event_active +********************************************************************/ +be_local_closure(class_EventManager_set_event_active, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(set_event_active), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x880C0105, // 0000 GETMBR R3 R0 K5 + 0x8C0C0703, // 0001 GETMET R3 R3 K3 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x20100604, // 0005 NE R4 R3 R4 + 0x7812000C, // 0006 JMPF R4 #0014 + 0x60100010, // 0007 GETGBL R4 G16 + 0x5C140600, // 0008 MOVE R5 R3 + 0x7C100200, // 0009 CALL R4 1 + 0xA8020005, // 000A EXBLK 0 #0011 + 0x5C140800, // 000B MOVE R5 R4 + 0x7C140000, // 000C CALL R5 0 + 0x8C180B06, // 000D GETMET R6 R5 K6 + 0x5C200400, // 000E MOVE R8 R2 + 0x7C180400, // 000F CALL R6 2 + 0x7001FFF9, // 0010 JMP #000B + 0x58100007, // 0011 LDCONST R4 K7 + 0xAC100200, // 0012 CATCH R4 1 0 + 0xB0080000, // 0013 RAISE 2 R0 R0 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_handlers +********************************************************************/ +be_local_closure(class_EventManager_get_handlers, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(get_handlers), + &be_const_str_solidified, + ( &(const binstruction[38]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x88100102, // 0003 GETMBR R4 R0 K2 + 0x7C0C0200, // 0004 CALL R3 1 + 0xA8020006, // 0005 EXBLK 0 #000D + 0x5C100600, // 0006 MOVE R4 R3 + 0x7C100000, // 0007 CALL R4 0 + 0x8C140508, // 0008 GETMET R5 R2 K8 + 0x8C1C0909, // 0009 GETMET R7 R4 K9 + 0x7C1C0200, // 000A CALL R7 1 + 0x7C140400, // 000B CALL R5 2 + 0x7001FFF8, // 000C JMP #0006 + 0x580C0007, // 000D LDCONST R3 K7 + 0xAC0C0200, // 000E CATCH R3 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x880C0105, // 0010 GETMBR R3 R0 K5 + 0x8C0C0703, // 0011 GETMET R3 R3 K3 + 0x5C140200, // 0012 MOVE R5 R1 + 0x7C0C0400, // 0013 CALL R3 2 + 0x4C100000, // 0014 LDNIL R4 + 0x20100604, // 0015 NE R4 R3 R4 + 0x7812000D, // 0016 JMPF R4 #0025 + 0x60100010, // 0017 GETGBL R4 G16 + 0x5C140600, // 0018 MOVE R5 R3 + 0x7C100200, // 0019 CALL R4 1 + 0xA8020006, // 001A EXBLK 0 #0022 + 0x5C140800, // 001B MOVE R5 R4 + 0x7C140000, // 001C CALL R5 0 + 0x8C180508, // 001D GETMET R6 R2 K8 + 0x8C200B09, // 001E GETMET R8 R5 K9 + 0x7C200200, // 001F CALL R8 1 + 0x7C180400, // 0020 CALL R6 2 + 0x7001FFF8, // 0021 JMP #001B + 0x58100007, // 0022 LDCONST R4 K7 + 0xAC100200, // 0023 CATCH R4 1 0 + 0xB0080000, // 0024 RAISE 2 R0 R0 + 0x80040400, // 0025 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_registered_events +********************************************************************/ +be_local_closure(class_EventManager_get_registered_events, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(get_registered_events), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x60080010, // 0002 GETGBL R2 G16 + 0x880C0105, // 0003 GETMBR R3 R0 K5 + 0x8C0C070A, // 0004 GETMET R3 R3 K10 + 0x7C0C0200, // 0005 CALL R3 1 + 0x7C080200, // 0006 CALL R2 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C0C0400, // 0008 MOVE R3 R2 + 0x7C0C0000, // 0009 CALL R3 0 + 0x8C100308, // 000A GETMET R4 R1 K8 + 0x5C180600, // 000B MOVE R6 R3 + 0x7C100400, // 000C CALL R4 2 + 0x7001FFF9, // 000D JMP #0008 + 0x58080007, // 000E LDCONST R2 K7 + 0xAC080200, // 000F CATCH R2 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x80040200, // 0011 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_EventManager_init, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x4C080000, // 0001 LDNIL R2 - 0x90020202, // 0002 SETMBR R0 K1 R2 - 0x60080013, // 0003 GETGBL R2 G19 - 0x7C080000, // 0004 CALL R2 0 - 0x90020402, // 0005 SETMBR R0 K2 R2 - 0x90020704, // 0006 SETMBR R0 K3 K4 - 0x90020B04, // 0007 SETMBR R0 K5 K4 - 0x60080012, // 0008 GETGBL R2 G18 - 0x7C080000, // 0009 CALL R2 0 - 0x90020C02, // 000A SETMBR R0 K6 R2 - 0x50080000, // 000B LDBOOL R2 0 0 - 0x90020E02, // 000C SETMBR R0 K7 R2 - 0x80000000, // 000D RET 0 + ( &(const binstruction[12]) { /* code */ + 0x60040013, // 0000 GETGBL R1 G19 + 0x7C040000, // 0001 CALL R1 0 + 0x90020A01, // 0002 SETMBR R0 K5 R1 + 0x60040012, // 0003 GETGBL R1 G18 + 0x7C040000, // 0004 CALL R1 0 + 0x90020401, // 0005 SETMBR R0 K2 R1 + 0x60040012, // 0006 GETGBL R1 G18 + 0x7C040000, // 0007 CALL R1 0 + 0x90021601, // 0008 SETMBR R0 K11 R1 + 0x50040000, // 0009 LDBOOL R1 0 0 + 0x90021801, // 000A SETMBR R0 K12 R1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: clear_all_handlers +********************************************************************/ +be_local_closure(class_EventManager_clear_all_handlers, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(clear_all_handlers), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x88040105, // 0000 GETMBR R1 R0 K5 + 0x8C04030D, // 0001 GETMET R1 R1 K13 + 0x7C040200, // 0002 CALL R1 1 + 0x88040102, // 0003 GETMBR R1 R0 K2 + 0x8C04030D, // 0004 GETMET R1 R1 K13 + 0x7C040200, // 0005 CALL R1 1 + 0x8804010B, // 0006 GETMBR R1 R0 K11 + 0x8C04030D, // 0007 GETMET R1 R1 K13 + 0x7C040200, // 0008 CALL R1 1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _sort_handlers +********************************************************************/ +be_local_closure(class_EventManager__sort_handlers, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(_sort_handlers), + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0x60080010, // 0000 GETGBL R2 G16 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x040C070E, // 0004 SUB R3 R3 K14 + 0x400E1C03, // 0005 CONNECT R3 K14 R3 + 0x7C080200, // 0006 CALL R2 1 + 0xA8020012, // 0007 EXBLK 0 #001B + 0x5C0C0400, // 0008 MOVE R3 R2 + 0x7C0C0000, // 0009 CALL R3 0 + 0x94100203, // 000A GETIDX R4 R1 R3 + 0x5C140600, // 000B MOVE R5 R3 + 0x24180B0F, // 000C GT R6 R5 K15 + 0x781A000A, // 000D JMPF R6 #0019 + 0x04180B0E, // 000E SUB R6 R5 K14 + 0x94180206, // 000F GETIDX R6 R1 R6 + 0x88180D10, // 0010 GETMBR R6 R6 K16 + 0x881C0910, // 0011 GETMBR R7 R4 K16 + 0x14180C07, // 0012 LT R6 R6 R7 + 0x781A0004, // 0013 JMPF R6 #0019 + 0x04180B0E, // 0014 SUB R6 R5 K14 + 0x94180206, // 0015 GETIDX R6 R1 R6 + 0x98040A06, // 0016 SETIDX R1 R5 R6 + 0x04140B0E, // 0017 SUB R5 R5 K14 + 0x7001FFF2, // 0018 JMP #000C + 0x98040A04, // 0019 SETIDX R1 R5 R4 + 0x7001FFEC, // 001A JMP #0008 + 0x58080007, // 001B LDCONST R2 K7 + 0xAC080200, // 001C CATCH R2 1 0 + 0xB0080000, // 001D RAISE 2 R0 R0 + 0x80000000, // 001E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: register_handler +********************************************************************/ +be_local_closure(class_EventManager_register_handler, /* name */ + be_nested_proto( + 13, /* nstack */ + 6, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(register_handler), + &be_const_str_solidified, + ( &(const binstruction[37]) { /* code */ + 0xB81A2200, // 0000 GETNGBL R6 K17 + 0x8C180D12, // 0001 GETMET R6 R6 K18 + 0x5C200200, // 0002 MOVE R8 R1 + 0x5C240400, // 0003 MOVE R9 R2 + 0x5C280600, // 0004 MOVE R10 R3 + 0x5C2C0800, // 0005 MOVE R11 R4 + 0x5C300A00, // 0006 MOVE R12 R5 + 0x7C180C00, // 0007 CALL R6 6 + 0x1C1C0301, // 0008 EQ R7 R1 K1 + 0x781E0007, // 0009 JMPF R7 #0012 + 0x881C0102, // 000A GETMBR R7 R0 K2 + 0x8C1C0F08, // 000B GETMET R7 R7 K8 + 0x5C240C00, // 000C MOVE R9 R6 + 0x7C1C0400, // 000D CALL R7 2 + 0x8C1C0113, // 000E GETMET R7 R0 K19 + 0x88240102, // 000F GETMBR R9 R0 K2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020011, // 0011 JMP #0024 + 0x881C0105, // 0012 GETMBR R7 R0 K5 + 0x8C1C0F14, // 0013 GETMET R7 R7 K20 + 0x5C240200, // 0014 MOVE R9 R1 + 0x7C1C0400, // 0015 CALL R7 2 + 0x741E0003, // 0016 JMPT R7 #001B + 0x881C0105, // 0017 GETMBR R7 R0 K5 + 0x60200012, // 0018 GETGBL R8 G18 + 0x7C200000, // 0019 CALL R8 0 + 0x981C0208, // 001A SETIDX R7 R1 R8 + 0x881C0105, // 001B GETMBR R7 R0 K5 + 0x941C0E01, // 001C GETIDX R7 R7 R1 + 0x8C1C0F08, // 001D GETMET R7 R7 K8 + 0x5C240C00, // 001E MOVE R9 R6 + 0x7C1C0400, // 001F CALL R7 2 + 0x8C1C0113, // 0020 GETMET R7 R0 K19 + 0x88240105, // 0021 GETMBR R9 R0 K5 + 0x94241201, // 0022 GETIDX R9 R9 R1 + 0x7C1C0400, // 0023 CALL R7 2 + 0x80040C00, // 0024 RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: trigger_event +********************************************************************/ +be_local_closure(class_EventManager_trigger_event, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(trigger_event), + &be_const_str_solidified, + ( &(const binstruction[69]) { /* code */ + 0x880C010C, // 0000 GETMBR R3 R0 K12 + 0x780E0007, // 0001 JMPF R3 #000A + 0x880C010B, // 0002 GETMBR R3 R0 K11 + 0x8C0C0708, // 0003 GETMET R3 R3 K8 + 0x60140013, // 0004 GETGBL R5 G19 + 0x7C140000, // 0005 CALL R5 0 + 0x98162A01, // 0006 SETIDX R5 K21 R1 + 0x98162C02, // 0007 SETIDX R5 K22 R2 + 0x7C0C0400, // 0008 CALL R3 2 + 0x80000600, // 0009 RET 0 + 0x500C0200, // 000A LDBOOL R3 1 0 + 0x90021803, // 000B SETMBR R0 K12 R3 + 0xA8020029, // 000C EXBLK 0 #0037 + 0x600C0010, // 000D GETGBL R3 G16 + 0x88100102, // 000E GETMBR R4 R0 K2 + 0x7C0C0200, // 000F CALL R3 1 + 0xA802000A, // 0010 EXBLK 0 #001C + 0x5C100600, // 0011 MOVE R4 R3 + 0x7C100000, // 0012 CALL R4 0 + 0x88140917, // 0013 GETMBR R5 R4 K23 + 0x78160005, // 0014 JMPF R5 #001B + 0x8C140918, // 0015 GETMET R5 R4 K24 + 0x601C0013, // 0016 GETGBL R7 G19 + 0x7C1C0000, // 0017 CALL R7 0 + 0x981E0001, // 0018 SETIDX R7 K0 R1 + 0x981E2C02, // 0019 SETIDX R7 K22 R2 + 0x7C140400, // 001A CALL R5 2 + 0x7001FFF4, // 001B JMP #0011 + 0x580C0007, // 001C LDCONST R3 K7 + 0xAC0C0200, // 001D CATCH R3 1 0 + 0xB0080000, // 001E RAISE 2 R0 R0 + 0x880C0105, // 001F GETMBR R3 R0 K5 + 0x8C0C0703, // 0020 GETMET R3 R3 K3 + 0x5C140200, // 0021 MOVE R5 R1 + 0x7C0C0400, // 0022 CALL R3 2 + 0x4C100000, // 0023 LDNIL R4 + 0x20100604, // 0024 NE R4 R3 R4 + 0x7812000E, // 0025 JMPF R4 #0035 + 0x60100010, // 0026 GETGBL R4 G16 + 0x5C140600, // 0027 MOVE R5 R3 + 0x7C100200, // 0028 CALL R4 1 + 0xA8020007, // 0029 EXBLK 0 #0032 + 0x5C140800, // 002A MOVE R5 R4 + 0x7C140000, // 002B CALL R5 0 + 0x88180B17, // 002C GETMBR R6 R5 K23 + 0x781A0002, // 002D JMPF R6 #0031 + 0x8C180B18, // 002E GETMET R6 R5 K24 + 0x5C200400, // 002F MOVE R8 R2 + 0x7C180400, // 0030 CALL R6 2 + 0x7001FFF7, // 0031 JMP #002A + 0x58100007, // 0032 LDCONST R4 K7 + 0xAC100200, // 0033 CATCH R4 1 0 + 0xB0080000, // 0034 RAISE 2 R0 R0 + 0xA8040001, // 0035 EXBLK 1 1 + 0x70020008, // 0036 JMP #0040 + 0xAC0C0002, // 0037 CATCH R3 0 2 + 0x70020005, // 0038 JMP #003F + 0x60140001, // 0039 GETGBL R5 G1 + 0x58180019, // 003A LDCONST R6 K25 + 0x5C1C0600, // 003B MOVE R7 R3 + 0x5C200800, // 003C MOVE R8 R4 + 0x7C140600, // 003D CALL R5 3 + 0x70020000, // 003E JMP #0040 + 0xB0080000, // 003F RAISE 2 R0 R0 + 0x500C0000, // 0040 LDBOOL R3 0 0 + 0x90021803, // 0041 SETMBR R0 K12 R3 + 0x8C0C011A, // 0042 GETMET R3 R0 K26 + 0x7C0C0200, // 0043 CALL R3 1 + 0x80000000, // 0044 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _process_queued_events +********************************************************************/ +be_local_closure(class_EventManager__process_queued_events, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_EventManager, /* shared constants */ + be_str_weak(_process_queued_events), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x8804010B, // 0000 GETMBR R1 R0 K11 + 0x8C04031B, // 0001 GETMET R1 R1 K27 + 0x7C040200, // 0002 CALL R1 1 + 0x2404030F, // 0003 GT R1 R1 K15 + 0x78060008, // 0004 JMPF R1 #000E + 0x8804010B, // 0005 GETMBR R1 R0 K11 + 0x8C04031C, // 0006 GETMET R1 R1 K28 + 0x580C000F, // 0007 LDCONST R3 K15 + 0x7C040400, // 0008 CALL R1 2 + 0x8C08011D, // 0009 GETMET R2 R0 K29 + 0x94100315, // 000A GETIDX R4 R1 K21 + 0x94140316, // 000B GETIDX R5 R1 K22 + 0x7C080600, // 000C CALL R2 3 + 0x7001FFF1, // 000D JMP #0000 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: EventManager +********************************************************************/ +be_local_class(EventManager, + 4, + NULL, + be_nested_map(14, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(unregister_handler, -1), be_const_closure(class_EventManager_unregister_handler_closure) }, + { be_const_key_weak(set_event_active, -1), be_const_closure(class_EventManager_set_event_active_closure) }, + { be_const_key_weak(handlers, -1), be_const_var(0) }, + { be_const_key_weak(init, -1), be_const_closure(class_EventManager_init_closure) }, + { be_const_key_weak(trigger_event, -1), be_const_closure(class_EventManager_trigger_event_closure) }, + { be_const_key_weak(get_handlers, 3), be_const_closure(class_EventManager_get_handlers_closure) }, + { be_const_key_weak(clear_all_handlers, -1), be_const_closure(class_EventManager_clear_all_handlers_closure) }, + { be_const_key_weak(event_queue, -1), be_const_var(2) }, + { be_const_key_weak(_sort_handlers, -1), be_const_closure(class_EventManager__sort_handlers_closure) }, + { be_const_key_weak(is_processing, 7), be_const_var(3) }, + { be_const_key_weak(global_handlers, -1), be_const_var(1) }, + { be_const_key_weak(register_handler, -1), be_const_closure(class_EventManager_register_handler_closure) }, + { be_const_key_weak(get_registered_events, 4), be_const_closure(class_EventManager_get_registered_events_closure) }, + { be_const_key_weak(_process_queued_events, -1), be_const_closure(class_EventManager__process_queued_events_closure) }, + })), + be_str_weak(EventManager) +); +// compact class 'SequenceManager' ktab size: 39, total: 137 (saved 784 bytes) +static const bvalue be_ktab_class_SequenceManager[39] = { + /* K0 */ be_nested_str_weak(steps), + /* K1 */ be_nested_str_weak(push), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(play), + /* K4 */ be_nested_str_weak(animation), + /* K5 */ be_nested_str_weak(duration), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(is_running), + /* K8 */ be_nested_str_weak(current_iteration), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(repeat_count), + /* K11 */ be_nested_str_weak(step_index), + /* K12 */ be_nested_str_weak(execute_current_step), + /* K13 */ be_nested_str_weak(assign), + /* K14 */ be_nested_str_weak(closure), + /* K15 */ be_nested_str_weak(engine), + /* K16 */ be_nested_str_weak(complete_iteration), + /* K17 */ be_nested_str_weak(subsequence), + /* K18 */ be_nested_str_weak(sequence_manager), + /* K19 */ be_nested_str_weak(stop), + /* K20 */ be_nested_str_weak(stop_iteration), + /* K21 */ be_nested_str_weak(wait), + /* K22 */ be_nested_str_weak(active_sequence), + /* K23 */ be_nested_str_weak(sequence_state), + /* K24 */ be_nested_str_weak(step_start_time), + /* K25 */ be_nested_str_weak(is_repeat_sequence), + /* K26 */ be_nested_str_weak(update), + /* K27 */ be_nested_str_weak(advance_to_next_step), + /* K28 */ be_nested_str_weak(execute_assign_steps_batch), + /* K29 */ be_nested_str_weak(contains), + /* K30 */ be_nested_str_weak(remove_animation), + /* K31 */ be_nested_str_weak(clear), + /* K32 */ be_nested_str_weak(stop_all_subsequences), + /* K33 */ be_nested_str_weak(total_steps), + /* K34 */ be_nested_str_weak(current_step), + /* K35 */ be_nested_str_weak(elapsed_ms), + /* K36 */ be_nested_str_weak(time_ms), + /* K37 */ be_nested_str_weak(add_animation), + /* K38 */ be_nested_str_weak(start), +}; + + +extern const bclass be_class_SequenceManager; + +/******************************************************************** +** Solidified function: push_play_step +********************************************************************/ +be_local_closure(class_SequenceManager_push_play_step, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(push_play_step), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x60140013, // 0002 GETGBL R5 G19 + 0x7C140000, // 0003 CALL R5 0 + 0x98160503, // 0004 SETIDX R5 K2 K3 + 0x98160801, // 0005 SETIDX R5 K4 R1 + 0x4C180000, // 0006 LDNIL R6 + 0x20180406, // 0007 NE R6 R2 R6 + 0x781A0001, // 0008 JMPF R6 #000B + 0x5C180400, // 0009 MOVE R6 R2 + 0x70020000, // 000A JMP #000C + 0x58180006, // 000B LDCONST R6 K6 + 0x98160A06, // 000C SETIDX R5 K5 R6 + 0x7C0C0400, // 000D CALL R3 2 + 0x80040000, // 000E RET 1 R0 }) ) ); @@ -1163,9 +2239,113 @@ be_local_closure(class_SequenceManager_is_sequence_running, /* name */ /******************************************************************** -** Solidified function: execute_current_step +** Solidified function: complete_iteration ********************************************************************/ -be_local_closure(class_SequenceManager_execute_current_step, /* name */ +be_local_closure(class_SequenceManager_complete_iteration, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(complete_iteration), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x88080108, // 0000 GETMBR R2 R0 K8 + 0x00080509, // 0001 ADD R2 R2 K9 + 0x90021002, // 0002 SETMBR R0 K8 R2 + 0x8808010A, // 0003 GETMBR R2 R0 K10 + 0x540DFFFE, // 0004 LDINT R3 -1 + 0x1C080403, // 0005 EQ R2 R2 R3 + 0x740A0003, // 0006 JMPT R2 #000B + 0x88080108, // 0007 GETMBR R2 R0 K8 + 0x880C010A, // 0008 GETMBR R3 R0 K10 + 0x14080403, // 0009 LT R2 R2 R3 + 0x780A0004, // 000A JMPF R2 #0010 + 0x90021706, // 000B SETMBR R0 K11 K6 + 0x8C08010C, // 000C GETMET R2 R0 K12 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x70020001, // 000F JMP #0012 + 0x50080000, // 0010 LDBOOL R2 0 0 + 0x90020E02, // 0011 SETMBR R0 K7 R2 + 0x80000000, // 0012 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: execute_assign_steps_batch +********************************************************************/ +be_local_closure(class_SequenceManager_execute_assign_steps_batch, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(execute_assign_steps_batch), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0x8808010B, // 0000 GETMBR R2 R0 K11 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x88100100, // 0002 GETMBR R4 R0 K0 + 0x7C0C0200, // 0003 CALL R3 1 + 0x14080403, // 0004 LT R2 R2 R3 + 0x780A0012, // 0005 JMPF R2 #0019 + 0x88080100, // 0006 GETMBR R2 R0 K0 + 0x880C010B, // 0007 GETMBR R3 R0 K11 + 0x94080403, // 0008 GETIDX R2 R2 R3 + 0x940C0502, // 0009 GETIDX R3 R2 K2 + 0x1C0C070D, // 000A EQ R3 R3 K13 + 0x780E000A, // 000B JMPF R3 #0017 + 0x940C050E, // 000C GETIDX R3 R2 K14 + 0x4C100000, // 000D LDNIL R4 + 0x20100604, // 000E NE R4 R3 R4 + 0x78120002, // 000F JMPF R4 #0013 + 0x5C100600, // 0010 MOVE R4 R3 + 0x8814010F, // 0011 GETMBR R5 R0 K15 + 0x7C100200, // 0012 CALL R4 1 + 0x8810010B, // 0013 GETMBR R4 R0 K11 + 0x00100909, // 0014 ADD R4 R4 K9 + 0x90021604, // 0015 SETMBR R0 K11 R4 + 0x70020000, // 0016 JMP #0018 + 0x70020000, // 0017 JMP #0019 + 0x7001FFE6, // 0018 JMP #0000 + 0x8808010B, // 0019 GETMBR R2 R0 K11 + 0x600C000C, // 001A GETGBL R3 G12 + 0x88100100, // 001B GETMBR R4 R0 K0 + 0x7C0C0200, // 001C CALL R3 1 + 0x14080403, // 001D LT R2 R2 R3 + 0x780A0003, // 001E JMPF R2 #0023 + 0x8C08010C, // 001F GETMET R2 R0 K12 + 0x5C100200, // 0020 MOVE R4 R1 + 0x7C080400, // 0021 CALL R2 2 + 0x70020002, // 0022 JMP #0026 + 0x8C080110, // 0023 GETMET R2 R0 K16 + 0x5C100200, // 0024 MOVE R4 R1 + 0x7C080400, // 0025 CALL R2 2 + 0x80000000, // 0026 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop_all_subsequences +********************************************************************/ +be_local_closure(class_SequenceManager_stop_all_subsequences, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ @@ -1176,57 +2356,26 @@ be_local_closure(class_SequenceManager_execute_current_step, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_SequenceManager, /* shared constants */ - be_str_weak(execute_current_step), + be_str_weak(stop_all_subsequences), &be_const_str_solidified, - ( &(const binstruction[48]) { /* code */ - 0x88040103, // 0000 GETMBR R1 R0 K3 - 0x6008000C, // 0001 GETGBL R2 G12 - 0x880C0106, // 0002 GETMBR R3 R0 K6 - 0x7C080200, // 0003 CALL R2 1 - 0x28040202, // 0004 GE R1 R1 R2 - 0x78060002, // 0005 JMPF R1 #0009 - 0x50040000, // 0006 LDBOOL R1 0 0 - 0x90020E01, // 0007 SETMBR R0 K7 R1 - 0x80000200, // 0008 RET 0 - 0x88040106, // 0009 GETMBR R1 R0 K6 - 0x88080103, // 000A GETMBR R2 R0 K3 - 0x94040202, // 000B GETIDX R1 R1 R2 - 0x94080308, // 000C GETIDX R2 R1 K8 - 0x1C080509, // 000D EQ R2 R2 K9 - 0x780A0010, // 000E JMPF R2 #0020 - 0x9408030A, // 000F GETIDX R2 R1 K10 - 0x880C0100, // 0010 GETMBR R3 R0 K0 - 0x8C0C070B, // 0011 GETMET R3 R3 K11 - 0x5C140400, // 0012 MOVE R5 R2 - 0x7C0C0400, // 0013 CALL R3 2 - 0x8C0C050C, // 0014 GETMET R3 R2 K12 - 0x7C0C0200, // 0015 CALL R3 1 - 0x8C0C030D, // 0016 GETMET R3 R1 K13 - 0x5814000E, // 0017 LDCONST R5 K14 - 0x7C0C0400, // 0018 CALL R3 2 - 0x780E0004, // 0019 JMPF R3 #001F - 0x940C030E, // 001A GETIDX R3 R1 K14 - 0x240C0704, // 001B GT R3 R3 K4 - 0x780E0001, // 001C JMPF R3 #001F - 0x940C030E, // 001D GETIDX R3 R1 K14 - 0x900A1C03, // 001E SETMBR R2 K14 R3 - 0x7002000B, // 001F JMP #002C - 0x94080308, // 0020 GETIDX R2 R1 K8 - 0x1C08050F, // 0021 EQ R2 R2 K15 - 0x780A0000, // 0022 JMPF R2 #0024 - 0x70020007, // 0023 JMP #002C - 0x94080308, // 0024 GETIDX R2 R1 K8 - 0x1C080510, // 0025 EQ R2 R2 K16 - 0x780A0004, // 0026 JMPF R2 #002C - 0x9408030A, // 0027 GETIDX R2 R1 K10 - 0x880C0100, // 0028 GETMBR R3 R0 K0 - 0x8C0C0711, // 0029 GETMET R3 R3 K17 - 0x5C140400, // 002A MOVE R5 R2 - 0x7C0C0400, // 002B CALL R3 2 - 0x88080100, // 002C GETMBR R2 R0 K0 - 0x88080512, // 002D GETMBR R2 R2 K18 - 0x90020A02, // 002E SETMBR R0 K5 R2 - 0x80000000, // 002F RET 0 + ( &(const binstruction[17]) { /* code */ + 0x60040010, // 0000 GETGBL R1 G16 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x7C040200, // 0002 CALL R1 1 + 0xA8020008, // 0003 EXBLK 0 #000D + 0x5C080200, // 0004 MOVE R2 R1 + 0x7C080000, // 0005 CALL R2 0 + 0x940C0502, // 0006 GETIDX R3 R2 K2 + 0x1C0C0711, // 0007 EQ R3 R3 K17 + 0x780E0002, // 0008 JMPF R3 #000C + 0x940C0512, // 0009 GETIDX R3 R2 K18 + 0x8C100713, // 000A GETMET R4 R3 K19 + 0x7C100200, // 000B CALL R4 1 + 0x7001FFF6, // 000C JMP #0004 + 0x58040014, // 000D LDCONST R1 K20 + 0xAC040200, // 000E CATCH R1 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x80040000, // 0010 RET 1 R0 }) ) ); @@ -1234,11 +2383,260 @@ be_local_closure(class_SequenceManager_execute_current_step, /* name */ /******************************************************************** -** Solidified function: stop_sequence +** Solidified function: push_wait_step ********************************************************************/ -be_local_closure(class_SequenceManager_stop_sequence, /* name */ +be_local_closure(class_SequenceManager_push_wait_step, /* name */ be_nested_proto( - 3, /* nstack */ + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(push_wait_step), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100013, // 0002 GETGBL R4 G19 + 0x7C100000, // 0003 CALL R4 0 + 0x98120515, // 0004 SETIDX R4 K2 K21 + 0x98120A01, // 0005 SETIDX R4 K5 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x80040000, // 0007 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_SequenceManager_init, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x90021E01, // 0000 SETMBR R0 K15 R1 + 0x4C0C0000, // 0001 LDNIL R3 + 0x90022C03, // 0002 SETMBR R0 K22 R3 + 0x600C0013, // 0003 GETGBL R3 G19 + 0x7C0C0000, // 0004 CALL R3 0 + 0x90022E03, // 0005 SETMBR R0 K23 R3 + 0x90021706, // 0006 SETMBR R0 K11 K6 + 0x90023106, // 0007 SETMBR R0 K24 K6 + 0x600C0012, // 0008 GETGBL R3 G18 + 0x7C0C0000, // 0009 CALL R3 0 + 0x90020003, // 000A SETMBR R0 K0 R3 + 0x500C0000, // 000B LDBOOL R3 0 0 + 0x90020E03, // 000C SETMBR R0 K7 R3 + 0x4C0C0000, // 000D LDNIL R3 + 0x200C0403, // 000E NE R3 R2 R3 + 0x780E0001, // 000F JMPF R3 #0012 + 0x5C0C0400, // 0010 MOVE R3 R2 + 0x70020000, // 0011 JMP #0013 + 0x580C0009, // 0012 LDCONST R3 K9 + 0x90021403, // 0013 SETMBR R0 K10 R3 + 0x90021106, // 0014 SETMBR R0 K8 K6 + 0x4C0C0000, // 0015 LDNIL R3 + 0x200C0403, // 0016 NE R3 R2 R3 + 0x780E0001, // 0017 JMPF R3 #001A + 0x200C0509, // 0018 NE R3 R2 K9 + 0x740E0000, // 0019 JMPT R3 #001B + 0x500C0001, // 001A LDBOOL R3 0 1 + 0x500C0200, // 001B LDBOOL R3 1 0 + 0x90023203, // 001C SETMBR R0 K25 R3 + 0x80000000, // 001D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update +********************************************************************/ +be_local_closure(class_SequenceManager_update, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[52]) { /* code */ + 0x88080107, // 0000 GETMBR R2 R0 K7 + 0x780A0004, // 0001 JMPF R2 #0007 + 0x6008000C, // 0002 GETGBL R2 G12 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x7C080200, // 0004 CALL R2 1 + 0x1C080506, // 0005 EQ R2 R2 K6 + 0x780A0001, // 0006 JMPF R2 #0009 + 0x50080000, // 0007 LDBOOL R2 0 0 + 0x80040400, // 0008 RET 1 R2 + 0x88080100, // 0009 GETMBR R2 R0 K0 + 0x880C010B, // 000A GETMBR R3 R0 K11 + 0x94080403, // 000B GETIDX R2 R2 R3 + 0x940C0502, // 000C GETIDX R3 R2 K2 + 0x1C0C0711, // 000D EQ R3 R3 K17 + 0x780E0008, // 000E JMPF R3 #0018 + 0x940C0512, // 000F GETIDX R3 R2 K18 + 0x8C10071A, // 0010 GETMET R4 R3 K26 + 0x5C180200, // 0011 MOVE R6 R1 + 0x7C100400, // 0012 CALL R4 2 + 0x74120002, // 0013 JMPT R4 #0017 + 0x8C10011B, // 0014 GETMET R4 R0 K27 + 0x5C180200, // 0015 MOVE R6 R1 + 0x7C100400, // 0016 CALL R4 2 + 0x70020019, // 0017 JMP #0032 + 0x940C0502, // 0018 GETIDX R3 R2 K2 + 0x1C0C070D, // 0019 EQ R3 R3 K13 + 0x780E0003, // 001A JMPF R3 #001F + 0x8C0C011C, // 001B GETMET R3 R0 K28 + 0x5C140200, // 001C MOVE R5 R1 + 0x7C0C0400, // 001D CALL R3 2 + 0x70020012, // 001E JMP #0032 + 0x8C0C051D, // 001F GETMET R3 R2 K29 + 0x58140005, // 0020 LDCONST R5 K5 + 0x7C0C0400, // 0021 CALL R3 2 + 0x780E000B, // 0022 JMPF R3 #002F + 0x940C0505, // 0023 GETIDX R3 R2 K5 + 0x240C0706, // 0024 GT R3 R3 K6 + 0x780E0008, // 0025 JMPF R3 #002F + 0x880C0118, // 0026 GETMBR R3 R0 K24 + 0x040C0203, // 0027 SUB R3 R1 R3 + 0x94100505, // 0028 GETIDX R4 R2 K5 + 0x28100604, // 0029 GE R4 R3 R4 + 0x78120002, // 002A JMPF R4 #002E + 0x8C10011B, // 002B GETMET R4 R0 K27 + 0x5C180200, // 002C MOVE R6 R1 + 0x7C100400, // 002D CALL R4 2 + 0x70020002, // 002E JMP #0032 + 0x8C0C011B, // 002F GETMET R3 R0 K27 + 0x5C140200, // 0030 MOVE R5 R1 + 0x7C0C0400, // 0031 CALL R3 2 + 0x880C0107, // 0032 GETMBR R3 R0 K7 + 0x80040600, // 0033 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: push_repeat_subsequence +********************************************************************/ +be_local_closure(class_SequenceManager_push_repeat_subsequence, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(push_repeat_subsequence), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100013, // 0002 GETGBL R4 G19 + 0x7C100000, // 0003 CALL R4 0 + 0x98120511, // 0004 SETIDX R4 K2 K17 + 0x98122401, // 0005 SETIDX R4 K18 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x80040000, // 0007 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: push_assign_step +********************************************************************/ +be_local_closure(class_SequenceManager_push_assign_step, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(push_assign_step), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x60100013, // 0002 GETGBL R4 G19 + 0x7C100000, // 0003 CALL R4 0 + 0x9812050D, // 0004 SETIDX R4 K2 K13 + 0x98121C01, // 0005 SETIDX R4 K14 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x80040000, // 0007 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: push_step +********************************************************************/ +be_local_closure(class_SequenceManager_push_step, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(push_step), + &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 + 0x80040000, // 0004 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop +********************************************************************/ +be_local_closure(class_SequenceManager_stop, /* name */ + be_nested_proto( + 6, /* nstack */ 1, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -1247,17 +2645,144 @@ be_local_closure(class_SequenceManager_stop_sequence, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_SequenceManager, /* shared constants */ - be_str_weak(stop_sequence), + be_str_weak(stop), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ + ( &(const binstruction[34]) { /* code */ 0x88040107, // 0000 GETMBR R1 R0 K7 - 0x78060004, // 0001 JMPF R1 #0007 + 0x7806001E, // 0001 JMPF R1 #0021 0x50040000, // 0002 LDBOOL R1 0 0 0x90020E01, // 0003 SETMBR R0 K7 R1 - 0x88040100, // 0004 GETMBR R1 R0 K0 - 0x8C040313, // 0005 GETMET R1 R1 K19 - 0x7C040200, // 0006 CALL R1 1 - 0x80000000, // 0007 RET 0 + 0x8804010B, // 0004 GETMBR R1 R0 K11 + 0x6008000C, // 0005 GETGBL R2 G12 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x7C080200, // 0007 CALL R2 1 + 0x14040202, // 0008 LT R1 R1 R2 + 0x78060011, // 0009 JMPF R1 #001C + 0x88040100, // 000A GETMBR R1 R0 K0 + 0x8808010B, // 000B GETMBR R2 R0 K11 + 0x94040202, // 000C GETIDX R1 R1 R2 + 0x94080302, // 000D GETIDX R2 R1 K2 + 0x1C080503, // 000E EQ R2 R2 K3 + 0x780A0005, // 000F JMPF R2 #0016 + 0x94080304, // 0010 GETIDX R2 R1 K4 + 0x880C010F, // 0011 GETMBR R3 R0 K15 + 0x8C0C071E, // 0012 GETMET R3 R3 K30 + 0x5C140400, // 0013 MOVE R5 R2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x70020005, // 0015 JMP #001C + 0x94080302, // 0016 GETIDX R2 R1 K2 + 0x1C080511, // 0017 EQ R2 R2 K17 + 0x780A0002, // 0018 JMPF R2 #001C + 0x94080312, // 0019 GETIDX R2 R1 K18 + 0x8C0C0513, // 001A GETMET R3 R2 K19 + 0x7C0C0200, // 001B CALL R3 1 + 0x8804010F, // 001C GETMBR R1 R0 K15 + 0x8C04031F, // 001D GETMET R1 R1 K31 + 0x7C040200, // 001E CALL R1 1 + 0x8C040120, // 001F GETMET R1 R0 K32 + 0x7C040200, // 0020 CALL R1 1 + 0x80040000, // 0021 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: advance_to_next_step +********************************************************************/ +be_local_closure(class_SequenceManager_advance_to_next_step, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(advance_to_next_step), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x880C010B, // 0001 GETMBR R3 R0 K11 + 0x94080403, // 0002 GETIDX R2 R2 R3 + 0x940C0502, // 0003 GETIDX R3 R2 K2 + 0x1C0C0703, // 0004 EQ R3 R3 K3 + 0x780E0008, // 0005 JMPF R3 #000F + 0x8C0C051D, // 0006 GETMET R3 R2 K29 + 0x58140005, // 0007 LDCONST R5 K5 + 0x7C0C0400, // 0008 CALL R3 2 + 0x780E0004, // 0009 JMPF R3 #000F + 0x940C0504, // 000A GETIDX R3 R2 K4 + 0x8810010F, // 000B GETMBR R4 R0 K15 + 0x8C10091E, // 000C GETMET R4 R4 K30 + 0x5C180600, // 000D MOVE R6 R3 + 0x7C100400, // 000E CALL R4 2 + 0x880C010B, // 000F GETMBR R3 R0 K11 + 0x000C0709, // 0010 ADD R3 R3 K9 + 0x90021603, // 0011 SETMBR R0 K11 R3 + 0x880C010B, // 0012 GETMBR R3 R0 K11 + 0x6010000C, // 0013 GETGBL R4 G12 + 0x88140100, // 0014 GETMBR R5 R0 K0 + 0x7C100200, // 0015 CALL R4 1 + 0x280C0604, // 0016 GE R3 R3 R4 + 0x780E0003, // 0017 JMPF R3 #001C + 0x8C0C0110, // 0018 GETMET R3 R0 K16 + 0x5C140200, // 0019 MOVE R5 R1 + 0x7C0C0400, // 001A CALL R3 2 + 0x70020002, // 001B JMP #001F + 0x8C0C011C, // 001C GETMET R3 R0 K28 + 0x5C140200, // 001D MOVE R5 R1 + 0x7C0C0400, // 001E CALL R3 2 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start +********************************************************************/ +be_local_closure(class_SequenceManager_start, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_SequenceManager, /* shared constants */ + be_str_weak(start), + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0x88080107, // 0000 GETMBR R2 R0 K7 + 0x780A0006, // 0001 JMPF R2 #0009 + 0x50080000, // 0002 LDBOOL R2 0 0 + 0x90020E02, // 0003 SETMBR R0 K7 R2 + 0x8808010F, // 0004 GETMBR R2 R0 K15 + 0x8C08051F, // 0005 GETMET R2 R2 K31 + 0x7C080200, // 0006 CALL R2 1 + 0x8C080120, // 0007 GETMET R2 R0 K32 + 0x7C080200, // 0008 CALL R2 1 + 0x90021706, // 0009 SETMBR R0 K11 K6 + 0x90023001, // 000A SETMBR R0 K24 R1 + 0x90021106, // 000B SETMBR R0 K8 K6 + 0x50080200, // 000C LDBOOL R2 1 0 + 0x90020E02, // 000D SETMBR R0 K7 R2 + 0x6008000C, // 000E GETGBL R2 G12 + 0x880C0100, // 000F GETMBR R3 R0 K0 + 0x7C080200, // 0010 CALL R2 1 + 0x24080506, // 0011 GT R2 R2 K6 + 0x780A0002, // 0012 JMPF R2 #0016 + 0x8C08010C, // 0013 GETMET R2 R0 K12 + 0x5C100200, // 0014 MOVE R4 R1 + 0x7C080400, // 0015 CALL R2 2 + 0x80040000, // 0016 RET 1 R0 }) ) ); @@ -1280,12 +2805,12 @@ be_local_closure(class_SequenceManager_get_current_step_info, /* name */ &be_ktab_class_SequenceManager, /* shared constants */ be_str_weak(get_current_step_info), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ + ( &(const binstruction[34]) { /* code */ 0x88040107, // 0000 GETMBR R1 R0 K7 0x78060005, // 0001 JMPF R1 #0008 - 0x88040103, // 0002 GETMBR R1 R0 K3 + 0x8804010B, // 0002 GETMBR R1 R0 K11 0x6008000C, // 0003 GETGBL R2 G12 - 0x880C0106, // 0004 GETMBR R3 R0 K6 + 0x880C0100, // 0004 GETMBR R3 R0 K0 0x7C080200, // 0005 CALL R2 1 0x28040202, // 0006 GE R1 R1 R2 0x78060001, // 0007 JMPF R1 #000A @@ -1293,22 +2818,28 @@ be_local_closure(class_SequenceManager_get_current_step_info, /* name */ 0x80040200, // 0009 RET 1 R1 0x60040013, // 000A GETGBL R1 G19 0x7C040000, // 000B CALL R1 0 - 0x88080103, // 000C GETMBR R2 R0 K3 - 0x98060602, // 000D SETIDX R1 K3 R2 + 0x8808010B, // 000C GETMBR R2 R0 K11 + 0x98061602, // 000D SETIDX R1 K11 R2 0x6008000C, // 000E GETGBL R2 G12 - 0x880C0106, // 000F GETMBR R3 R0 K6 + 0x880C0100, // 000F GETMBR R3 R0 K0 0x7C080200, // 0010 CALL R2 1 - 0x98062802, // 0011 SETIDX R1 K20 R2 - 0x88080106, // 0012 GETMBR R2 R0 K6 - 0x880C0103, // 0013 GETMBR R3 R0 K3 + 0x98064202, // 0011 SETIDX R1 K33 R2 + 0x88080100, // 0012 GETMBR R2 R0 K0 + 0x880C010B, // 0013 GETMBR R3 R0 K11 0x94080403, // 0014 GETIDX R2 R2 R3 - 0x98062A02, // 0015 SETIDX R1 K21 R2 - 0x88080100, // 0016 GETMBR R2 R0 K0 - 0x88080512, // 0017 GETMBR R2 R2 K18 - 0x880C0105, // 0018 GETMBR R3 R0 K5 + 0x98064402, // 0015 SETIDX R1 K34 R2 + 0x8808010F, // 0016 GETMBR R2 R0 K15 + 0x88080524, // 0017 GETMBR R2 R2 K36 + 0x880C0118, // 0018 GETMBR R3 R0 K24 0x04080403, // 0019 SUB R2 R2 R3 - 0x98062C02, // 001A SETIDX R1 K22 R2 - 0x80040200, // 001B RET 1 R1 + 0x98064602, // 001A SETIDX R1 K35 R2 + 0x8808010A, // 001B GETMBR R2 R0 K10 + 0x98061402, // 001C SETIDX R1 K10 R2 + 0x88080108, // 001D GETMBR R2 R0 K8 + 0x98061002, // 001E SETIDX R1 K8 R2 + 0x88080119, // 001F GETMBR R2 R0 K25 + 0x98063202, // 0020 SETIDX R1 K25 R2 + 0x80040200, // 0021 RET 1 R1 }) ) ); @@ -1316,11 +2847,11 @@ be_local_closure(class_SequenceManager_get_current_step_info, /* name */ /******************************************************************** -** Solidified function: start_sequence +** Solidified function: execute_current_step ********************************************************************/ -be_local_closure(class_SequenceManager_start_sequence, /* name */ +be_local_closure(class_SequenceManager_execute_current_step, /* name */ be_nested_proto( - 4, /* nstack */ + 7, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -1329,133 +2860,66 @@ be_local_closure(class_SequenceManager_start_sequence, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_SequenceManager, /* shared constants */ - be_str_weak(start_sequence), + be_str_weak(execute_current_step), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x8C080117, // 0000 GETMET R2 R0 K23 - 0x7C080200, // 0001 CALL R2 1 - 0x90020C01, // 0002 SETMBR R0 K6 R1 - 0x90020704, // 0003 SETMBR R0 K3 K4 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x88080512, // 0005 GETMBR R2 R2 K18 - 0x90020A02, // 0006 SETMBR R0 K5 R2 - 0x50080200, // 0007 LDBOOL R2 1 0 - 0x90020E02, // 0008 SETMBR R0 K7 R2 - 0x6008000C, // 0009 GETGBL R2 G12 - 0x880C0106, // 000A GETMBR R3 R0 K6 - 0x7C080200, // 000B CALL R2 1 - 0x24080504, // 000C GT R2 R2 K4 - 0x780A0001, // 000D JMPF R2 #0010 - 0x8C080118, // 000E GETMET R2 R0 K24 - 0x7C080200, // 000F CALL R2 1 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_SequenceManager_update, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SequenceManager, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0x88040107, // 0000 GETMBR R1 R0 K7 - 0x78060004, // 0001 JMPF R1 #0007 - 0x6004000C, // 0002 GETGBL R1 G12 - 0x88080106, // 0003 GETMBR R2 R0 K6 - 0x7C040200, // 0004 CALL R1 1 - 0x1C040304, // 0005 EQ R1 R1 K4 - 0x78060000, // 0006 JMPF R1 #0008 - 0x80000200, // 0007 RET 0 - 0x88040100, // 0008 GETMBR R1 R0 K0 - 0x88040312, // 0009 GETMBR R1 R1 K18 - 0x88080106, // 000A GETMBR R2 R0 K6 - 0x880C0103, // 000B GETMBR R3 R0 K3 - 0x94080403, // 000C GETIDX R2 R2 R3 - 0x8C0C050D, // 000D GETMET R3 R2 K13 - 0x5814000E, // 000E LDCONST R5 K14 - 0x7C0C0400, // 000F CALL R3 2 - 0x780E000A, // 0010 JMPF R3 #001C - 0x940C050E, // 0011 GETIDX R3 R2 K14 - 0x240C0704, // 0012 GT R3 R3 K4 - 0x780E0007, // 0013 JMPF R3 #001C - 0x880C0105, // 0014 GETMBR R3 R0 K5 - 0x040C0203, // 0015 SUB R3 R1 R3 - 0x9410050E, // 0016 GETIDX R4 R2 K14 - 0x28100604, // 0017 GE R4 R3 R4 - 0x78120001, // 0018 JMPF R4 #001B - 0x8C100119, // 0019 GETMET R4 R0 K25 - 0x7C100200, // 001A CALL R4 1 - 0x70020001, // 001B JMP #001E - 0x8C0C0119, // 001C GETMET R3 R0 K25 - 0x7C0C0200, // 001D CALL R3 1 - 0x80000000, // 001E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: advance_to_next_step -********************************************************************/ -be_local_closure(class_SequenceManager_advance_to_next_step, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SequenceManager, /* shared constants */ - be_str_weak(advance_to_next_step), - &be_const_str_solidified, - ( &(const binstruction[30]) { /* code */ - 0x88040106, // 0000 GETMBR R1 R0 K6 - 0x88080103, // 0001 GETMBR R2 R0 K3 - 0x94040202, // 0002 GETIDX R1 R1 R2 - 0x94080308, // 0003 GETIDX R2 R1 K8 - 0x1C080509, // 0004 EQ R2 R2 K9 - 0x780A0008, // 0005 JMPF R2 #000F - 0x8C08030D, // 0006 GETMET R2 R1 K13 - 0x5810000E, // 0007 LDCONST R4 K14 + ( &(const binstruction[57]) { /* code */ + 0x8808010B, // 0000 GETMBR R2 R0 K11 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x88100100, // 0002 GETMBR R4 R0 K0 + 0x7C0C0200, // 0003 CALL R3 1 + 0x28080403, // 0004 GE R2 R2 R3 + 0x780A0003, // 0005 JMPF R2 #000A + 0x8C080110, // 0006 GETMET R2 R0 K16 + 0x5C100200, // 0007 MOVE R4 R1 0x7C080400, // 0008 CALL R2 2 - 0x780A0004, // 0009 JMPF R2 #000F - 0x9408030A, // 000A GETIDX R2 R1 K10 - 0x880C0100, // 000B GETMBR R3 R0 K0 - 0x8C0C0711, // 000C GETMET R3 R3 K17 - 0x5C140400, // 000D MOVE R5 R2 - 0x7C0C0400, // 000E CALL R3 2 - 0x88080103, // 000F GETMBR R2 R0 K3 - 0x0008051A, // 0010 ADD R2 R2 K26 - 0x90020602, // 0011 SETMBR R0 K3 R2 - 0x88080103, // 0012 GETMBR R2 R0 K3 - 0x600C000C, // 0013 GETGBL R3 G12 - 0x88100106, // 0014 GETMBR R4 R0 K6 - 0x7C0C0200, // 0015 CALL R3 1 - 0x28080403, // 0016 GE R2 R2 R3 - 0x780A0002, // 0017 JMPF R2 #001B - 0x50080000, // 0018 LDBOOL R2 0 0 - 0x90020E02, // 0019 SETMBR R0 K7 R2 - 0x80000400, // 001A RET 0 - 0x8C080118, // 001B GETMET R2 R0 K24 - 0x7C080200, // 001C CALL R2 1 - 0x80000000, // 001D RET 0 + 0x80000400, // 0009 RET 0 + 0x88080100, // 000A GETMBR R2 R0 K0 + 0x880C010B, // 000B GETMBR R3 R0 K11 + 0x94080403, // 000C GETIDX R2 R2 R3 + 0x940C0502, // 000D GETIDX R3 R2 K2 + 0x1C0C0703, // 000E EQ R3 R3 K3 + 0x780E0008, // 000F JMPF R3 #0019 + 0x940C0504, // 0010 GETIDX R3 R2 K4 + 0x8810010F, // 0011 GETMBR R4 R0 K15 + 0x8C100925, // 0012 GETMET R4 R4 K37 + 0x5C180600, // 0013 MOVE R6 R3 + 0x7C100400, // 0014 CALL R4 2 + 0x8C100726, // 0015 GETMET R4 R3 K38 + 0x5C180200, // 0016 MOVE R6 R1 + 0x7C100400, // 0017 CALL R4 2 + 0x7002001D, // 0018 JMP #0037 + 0x940C0502, // 0019 GETIDX R3 R2 K2 + 0x1C0C0715, // 001A EQ R3 R3 K21 + 0x780E0000, // 001B JMPF R3 #001D + 0x70020019, // 001C JMP #0037 + 0x940C0502, // 001D GETIDX R3 R2 K2 + 0x1C0C0713, // 001E EQ R3 R3 K19 + 0x780E0005, // 001F JMPF R3 #0026 + 0x940C0504, // 0020 GETIDX R3 R2 K4 + 0x8810010F, // 0021 GETMBR R4 R0 K15 + 0x8C10091E, // 0022 GETMET R4 R4 K30 + 0x5C180600, // 0023 MOVE R6 R3 + 0x7C100400, // 0024 CALL R4 2 + 0x70020010, // 0025 JMP #0037 + 0x940C0502, // 0026 GETIDX R3 R2 K2 + 0x1C0C070D, // 0027 EQ R3 R3 K13 + 0x780E0007, // 0028 JMPF R3 #0031 + 0x940C050E, // 0029 GETIDX R3 R2 K14 + 0x4C100000, // 002A LDNIL R4 + 0x20100604, // 002B NE R4 R3 R4 + 0x78120002, // 002C JMPF R4 #0030 + 0x5C100600, // 002D MOVE R4 R3 + 0x8814010F, // 002E GETMBR R5 R0 K15 + 0x7C100200, // 002F CALL R4 1 + 0x70020005, // 0030 JMP #0037 + 0x940C0502, // 0031 GETIDX R3 R2 K2 + 0x1C0C0711, // 0032 EQ R3 R3 K17 + 0x780E0002, // 0033 JMPF R3 #0037 + 0x940C0512, // 0034 GETIDX R3 R2 K18 + 0x8C100726, // 0035 GETMET R4 R3 K38 + 0x7C100200, // 0036 CALL R4 1 + 0x90023001, // 0037 SETMBR R0 K24 R1 + 0x80000000, // 0038 RET 0 }) ) ); @@ -1466,25 +2930,36 @@ be_local_closure(class_SequenceManager_advance_to_next_step, /* name */ ** Solidified class: SequenceManager ********************************************************************/ be_local_class(SequenceManager, - 7, + 10, NULL, - be_nested_map(15, + be_nested_map(26, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, 2), be_const_closure(class_SequenceManager_init_closure) }, - { be_const_key_weak(is_running, 12), be_const_var(6) }, - { be_const_key_weak(advance_to_next_step, -1), be_const_closure(class_SequenceManager_advance_to_next_step_closure) }, - { be_const_key_weak(is_sequence_running, 5), be_const_closure(class_SequenceManager_is_sequence_running_closure) }, - { be_const_key_weak(controller, 7), be_const_var(0) }, - { be_const_key_weak(execute_current_step, 14), be_const_closure(class_SequenceManager_execute_current_step_closure) }, - { be_const_key_weak(active_sequence, -1), be_const_var(1) }, - { be_const_key_weak(update, 10), be_const_closure(class_SequenceManager_update_closure) }, + { be_const_key_weak(stop_all_subsequences, -1), be_const_closure(class_SequenceManager_stop_all_subsequences_closure) }, + { be_const_key_weak(engine, -1), be_const_var(0) }, { be_const_key_weak(steps, -1), be_const_var(5) }, { be_const_key_weak(sequence_state, -1), be_const_var(2) }, - { be_const_key_weak(get_current_step_info, -1), be_const_closure(class_SequenceManager_get_current_step_info_closure) }, - { be_const_key_weak(start_sequence, 8), be_const_closure(class_SequenceManager_start_sequence_closure) }, - { be_const_key_weak(stop_sequence, -1), be_const_closure(class_SequenceManager_stop_sequence_closure) }, + { be_const_key_weak(update, -1), be_const_closure(class_SequenceManager_update_closure) }, + { be_const_key_weak(execute_assign_steps_batch, -1), be_const_closure(class_SequenceManager_execute_assign_steps_batch_closure) }, + { be_const_key_weak(current_iteration, 0), be_const_var(8) }, + { be_const_key_weak(push_play_step, 1), be_const_closure(class_SequenceManager_push_play_step_closure) }, + { be_const_key_weak(push_assign_step, 3), be_const_closure(class_SequenceManager_push_assign_step_closure) }, + { be_const_key_weak(is_repeat_sequence, -1), be_const_var(9) }, + { be_const_key_weak(is_running, -1), be_const_var(6) }, + { be_const_key_weak(stop, -1), be_const_closure(class_SequenceManager_stop_closure) }, + { be_const_key_weak(push_wait_step, 4), be_const_closure(class_SequenceManager_push_wait_step_closure) }, + { be_const_key_weak(push_repeat_subsequence, -1), be_const_closure(class_SequenceManager_push_repeat_subsequence_closure) }, + { be_const_key_weak(complete_iteration, 8), be_const_closure(class_SequenceManager_complete_iteration_closure) }, + { be_const_key_weak(is_sequence_running, 10), be_const_closure(class_SequenceManager_is_sequence_running_closure) }, + { be_const_key_weak(push_step, -1), be_const_closure(class_SequenceManager_push_step_closure) }, + { be_const_key_weak(active_sequence, -1), be_const_var(1) }, { be_const_key_weak(step_start_time, -1), be_const_var(4) }, + { be_const_key_weak(init, 11), be_const_closure(class_SequenceManager_init_closure) }, + { be_const_key_weak(advance_to_next_step, -1), be_const_closure(class_SequenceManager_advance_to_next_step_closure) }, + { be_const_key_weak(start, -1), be_const_closure(class_SequenceManager_start_closure) }, { be_const_key_weak(step_index, -1), be_const_var(3) }, + { be_const_key_weak(get_current_step_info, -1), be_const_closure(class_SequenceManager_get_current_step_info_closure) }, + { be_const_key_weak(repeat_count, -1), be_const_var(7) }, + { be_const_key_weak(execute_current_step, -1), be_const_closure(class_SequenceManager_execute_current_step_closure) }, })), be_str_weak(SequenceManager) ); @@ -1524,704 +2999,6 @@ be_local_closure(scale_static, /* name */ ); /*******************************************************************/ -// compact class 'GradientAnimation' ktab size: 43, total: 82 (saved 312 bytes) -static const bvalue be_ktab_class_GradientAnimation[43] = { - /* K0 */ be_nested_str_weak(update), - /* K1 */ be_nested_str_weak(movement_speed), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(start_time), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(scale_uint), - /* K6 */ be_nested_str_weak(phase_offset), - /* K7 */ be_nested_str_weak(_calculate_gradient), - /* K8 */ be_const_int(1), - /* K9 */ be_nested_str_weak(direction), - /* K10 */ be_nested_str_weak(spread), - /* K11 */ be_nested_str_weak(gradient_type), - /* K12 */ be_nested_str_weak(color), - /* K13 */ be_nested_str_weak(priority), - /* K14 */ be_nested_str_weak(linear), - /* K15 */ be_nested_str_weak(radial), - /* K16 */ be_nested_str_weak(animation), - /* K17 */ be_nested_str_weak(is_value_provider), - /* K18 */ be_nested_str_weak(rainbow), - /* K19 */ be_nested_str_weak(0x_X2508x), - /* K20 */ be_nested_str_weak(GradientAnimation_X28_X25s_X2C_X20color_X3D_X25s_X2C_X20movement_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), - /* K21 */ be_nested_str_weak(is_running), - /* K22 */ be_nested_str_weak(engine), - /* K23 */ be_nested_str_weak(get_strip_length), - /* K24 */ be_nested_str_weak(width), - /* K25 */ be_nested_str_weak(current_colors), - /* K26 */ be_nested_str_weak(set_pixel_color), - /* K27 */ be_nested_str_weak(resize), - /* K28 */ be_const_int(-16777216), - /* K29 */ be_nested_str_weak(_calculate_linear_position), - /* K30 */ be_nested_str_weak(_calculate_radial_position), - /* K31 */ be_nested_str_weak(light_state), - /* K32 */ be_const_int(3), - /* K33 */ be_nested_str_weak(HsToRgb), - /* K34 */ be_nested_str_weak(r), - /* K35 */ be_nested_str_weak(g), - /* K36 */ be_nested_str_weak(b), - /* K37 */ be_nested_str_weak(is_color_provider), - /* K38 */ be_nested_str_weak(get_color_for_value), - /* K39 */ be_nested_str_weak(resolve_value), - /* K40 */ be_nested_str_weak(int), - /* K41 */ be_nested_str_weak(init), - /* K42 */ be_nested_str_weak(center_pos), -}; - - -extern const bclass be_class_GradientAnimation; - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_GradientAnimation_update, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080500, // 0003 GETMET R2 R2 K0 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x740A0001, // 0006 JMPT R2 #0009 - 0x50080000, // 0007 LDBOOL R2 0 0 - 0x80040400, // 0008 RET 1 R2 - 0x88080101, // 0009 GETMBR R2 R0 K1 - 0x240C0502, // 000A GT R3 R2 K2 - 0x780E0011, // 000B JMPF R3 #001E - 0x880C0103, // 000C GETMBR R3 R0 K3 - 0x040C0203, // 000D SUB R3 R1 R3 - 0xB8120800, // 000E GETNGBL R4 K4 - 0x8C100905, // 000F GETMET R4 R4 K5 - 0x5C180400, // 0010 MOVE R6 R2 - 0x581C0002, // 0011 LDCONST R7 K2 - 0x542200FE, // 0012 LDINT R8 255 - 0x58240002, // 0013 LDCONST R9 K2 - 0x542A0009, // 0014 LDINT R10 10 - 0x7C100C00, // 0015 CALL R4 6 - 0x24140902, // 0016 GT R5 R4 K2 - 0x78160005, // 0017 JMPF R5 #001E - 0x08140604, // 0018 MUL R5 R3 R4 - 0x541A03E7, // 0019 LDINT R6 1000 - 0x0C140A06, // 001A DIV R5 R5 R6 - 0x541A00FF, // 001B LDINT R6 256 - 0x10140A06, // 001C MOD R5 R5 R6 - 0x90020C05, // 001D SETMBR R0 K6 R5 - 0x8C0C0107, // 001E GETMET R3 R0 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x500C0200, // 0021 LDBOOL R3 1 0 - 0x80040600, // 0022 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _calculate_linear_position -********************************************************************/ -be_local_closure(class_GradientAnimation__calculate_linear_position, /* name */ - be_nested_proto( - 13, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(_calculate_linear_position), - &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0xB80E0800, // 0000 GETNGBL R3 K4 - 0x8C0C0705, // 0001 GETMET R3 R3 K5 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x041C0508, // 0004 SUB R7 R2 K8 - 0x58200002, // 0005 LDCONST R8 K2 - 0x542600FE, // 0006 LDINT R9 255 - 0x7C0C0C00, // 0007 CALL R3 6 - 0x88100109, // 0008 GETMBR R4 R0 K9 - 0x8814010A, // 0009 GETMBR R5 R0 K10 - 0x541A007F, // 000A LDINT R6 128 - 0x18180806, // 000B LE R6 R4 R6 - 0x781A000C, // 000C JMPF R6 #001A - 0xB81A0800, // 000D GETNGBL R6 K4 - 0x8C180D05, // 000E GETMET R6 R6 K5 - 0x5C200800, // 000F MOVE R8 R4 - 0x58240002, // 0010 LDCONST R9 K2 - 0x542A007F, // 0011 LDINT R10 128 - 0x582C0002, // 0012 LDCONST R11 K2 - 0x5432007F, // 0013 LDINT R12 128 - 0x7C180C00, // 0014 CALL R6 6 - 0x001C0606, // 0015 ADD R7 R3 R6 - 0x542200FF, // 0016 LDINT R8 256 - 0x101C0E08, // 0017 MOD R7 R7 R8 - 0x5C0C0E00, // 0018 MOVE R3 R7 - 0x7002000D, // 0019 JMP #0028 - 0xB81A0800, // 001A GETNGBL R6 K4 - 0x8C180D05, // 001B GETMET R6 R6 K5 - 0x5C200800, // 001C MOVE R8 R4 - 0x5426007F, // 001D LDINT R9 128 - 0x542A00FE, // 001E LDINT R10 255 - 0x582C0002, // 001F LDCONST R11 K2 - 0x543200FE, // 0020 LDINT R12 255 - 0x7C180C00, // 0021 CALL R6 6 - 0x541E00FE, // 0022 LDINT R7 255 - 0x00200606, // 0023 ADD R8 R3 R6 - 0x542600FF, // 0024 LDINT R9 256 - 0x10201009, // 0025 MOD R8 R8 R9 - 0x041C0E08, // 0026 SUB R7 R7 R8 - 0x5C0C0E00, // 0027 MOVE R3 R7 - 0xB81A0800, // 0028 GETNGBL R6 K4 - 0x8C180D05, // 0029 GETMET R6 R6 K5 - 0x5C200600, // 002A MOVE R8 R3 - 0x58240002, // 002B LDCONST R9 K2 - 0x542A00FE, // 002C LDINT R10 255 - 0x582C0002, // 002D LDCONST R11 K2 - 0x5C300A00, // 002E MOVE R12 R5 - 0x7C180C00, // 002F CALL R6 6 - 0x5C0C0C00, // 0030 MOVE R3 R6 - 0x80040600, // 0031 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_GradientAnimation_tostring, /* name */ - be_nested_proto( - 14, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0x8804010B, // 0000 GETMBR R1 R0 K11 - 0x8808010C, // 0001 GETMBR R2 R0 K12 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x8810010D, // 0003 GETMBR R4 R0 K13 - 0x1C140302, // 0004 EQ R5 R1 K2 - 0x78160001, // 0005 JMPF R5 #0008 - 0x5814000E, // 0006 LDCONST R5 K14 - 0x70020000, // 0007 JMP #0009 - 0x5814000F, // 0008 LDCONST R5 K15 - 0x4C180000, // 0009 LDNIL R6 - 0xB81E2000, // 000A GETNGBL R7 K16 - 0x8C1C0F11, // 000B GETMET R7 R7 K17 - 0x5C240400, // 000C MOVE R9 R2 - 0x7C1C0400, // 000D CALL R7 2 - 0x781E0004, // 000E JMPF R7 #0014 - 0x601C0008, // 000F GETGBL R7 G8 - 0x5C200400, // 0010 MOVE R8 R2 - 0x7C1C0200, // 0011 CALL R7 1 - 0x5C180E00, // 0012 MOVE R6 R7 - 0x70020009, // 0013 JMP #001E - 0x4C1C0000, // 0014 LDNIL R7 - 0x1C1C0407, // 0015 EQ R7 R2 R7 - 0x781E0001, // 0016 JMPF R7 #0019 - 0x58180012, // 0017 LDCONST R6 K18 - 0x70020004, // 0018 JMP #001E - 0x601C0018, // 0019 GETGBL R7 G24 - 0x58200013, // 001A LDCONST R8 K19 - 0x5C240400, // 001B MOVE R9 R2 - 0x7C1C0400, // 001C CALL R7 2 - 0x5C180E00, // 001D MOVE R6 R7 - 0x601C0018, // 001E GETGBL R7 G24 - 0x58200014, // 001F LDCONST R8 K20 - 0x5C240A00, // 0020 MOVE R9 R5 - 0x5C280C00, // 0021 MOVE R10 R6 - 0x5C2C0600, // 0022 MOVE R11 R3 - 0x5C300800, // 0023 MOVE R12 R4 - 0x88340115, // 0024 GETMBR R13 R0 K21 - 0x7C1C0C00, // 0025 CALL R7 6 - 0x80040E00, // 0026 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: render -********************************************************************/ -be_local_closure(class_GradientAnimation_render, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[30]) { /* code */ - 0x880C0115, // 0000 GETMBR R3 R0 K21 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0203, // 0003 EQ R3 R1 R3 - 0x780E0001, // 0004 JMPF R3 #0007 - 0x500C0000, // 0005 LDBOOL R3 0 0 - 0x80040600, // 0006 RET 1 R3 - 0x880C0116, // 0007 GETMBR R3 R0 K22 - 0x8C0C0717, // 0008 GETMET R3 R3 K23 - 0x7C0C0200, // 0009 CALL R3 1 - 0x58100002, // 000A LDCONST R4 K2 - 0x14140803, // 000B LT R5 R4 R3 - 0x7816000E, // 000C JMPF R5 #001C - 0x88140318, // 000D GETMBR R5 R1 K24 - 0x14140805, // 000E LT R5 R4 R5 - 0x7816000B, // 000F JMPF R5 #001C - 0x6014000C, // 0010 GETGBL R5 G12 - 0x88180119, // 0011 GETMBR R6 R0 K25 - 0x7C140200, // 0012 CALL R5 1 - 0x14140805, // 0013 LT R5 R4 R5 - 0x78160004, // 0014 JMPF R5 #001A - 0x8C14031A, // 0015 GETMET R5 R1 K26 - 0x5C1C0800, // 0016 MOVE R7 R4 - 0x88200119, // 0017 GETMBR R8 R0 K25 - 0x94201004, // 0018 GETIDX R8 R8 R4 - 0x7C140600, // 0019 CALL R5 3 - 0x00100908, // 001A ADD R4 R4 K8 - 0x7001FFEE, // 001B JMP #000B - 0x50140200, // 001C LDBOOL R5 1 0 - 0x80040A00, // 001D RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_GradientAnimation_on_param_changed, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0x880C0116, // 0000 GETMBR R3 R0 K22 - 0x8C0C0717, // 0001 GETMET R3 R3 K23 - 0x7C0C0200, // 0002 CALL R3 1 - 0x6010000C, // 0003 GETGBL R4 G12 - 0x88140119, // 0004 GETMBR R5 R0 K25 - 0x7C100200, // 0005 CALL R4 1 - 0x20100803, // 0006 NE R4 R4 R3 - 0x7812001B, // 0007 JMPF R4 #0024 - 0x88100119, // 0008 GETMBR R4 R0 K25 - 0x8C10091B, // 0009 GETMET R4 R4 K27 - 0x5C180600, // 000A MOVE R6 R3 - 0x7C100400, // 000B CALL R4 2 - 0x6010000C, // 000C GETGBL R4 G12 - 0x88140119, // 000D GETMBR R5 R0 K25 - 0x7C100200, // 000E CALL R4 1 - 0x14140803, // 000F LT R5 R4 R3 - 0x78160012, // 0010 JMPF R5 #0024 - 0x6014000C, // 0011 GETGBL R5 G12 - 0x88180119, // 0012 GETMBR R6 R0 K25 - 0x7C140200, // 0013 CALL R5 1 - 0x28140805, // 0014 GE R5 R4 R5 - 0x74160004, // 0015 JMPT R5 #001B - 0x88140119, // 0016 GETMBR R5 R0 K25 - 0x94140A04, // 0017 GETIDX R5 R5 R4 - 0x4C180000, // 0018 LDNIL R6 - 0x1C140A06, // 0019 EQ R5 R5 R6 - 0x78160006, // 001A JMPF R5 #0022 - 0x6014000C, // 001B GETGBL R5 G12 - 0x88180119, // 001C GETMBR R6 R0 K25 - 0x7C140200, // 001D CALL R5 1 - 0x14140805, // 001E LT R5 R4 R5 - 0x78160001, // 001F JMPF R5 #0022 - 0x88140119, // 0020 GETMBR R5 R0 K25 - 0x9814091C, // 0021 SETIDX R5 R4 K28 - 0x00100908, // 0022 ADD R4 R4 K8 - 0x7001FFEA, // 0023 JMP #000F - 0x80000000, // 0024 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _calculate_gradient -********************************************************************/ -be_local_closure(class_GradientAnimation__calculate_gradient, /* name */ - be_nested_proto( - 18, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(_calculate_gradient), - &be_const_str_solidified, - ( &(const binstruction[149]) { /* code */ - 0x8808010B, // 0000 GETMBR R2 R0 K11 - 0x880C010C, // 0001 GETMBR R3 R0 K12 - 0x88100116, // 0002 GETMBR R4 R0 K22 - 0x8C100917, // 0003 GETMET R4 R4 K23 - 0x7C100200, // 0004 CALL R4 1 - 0x6014000C, // 0005 GETGBL R5 G12 - 0x88180119, // 0006 GETMBR R6 R0 K25 - 0x7C140200, // 0007 CALL R5 1 - 0x20140A04, // 0008 NE R5 R5 R4 - 0x78160003, // 0009 JMPF R5 #000E - 0x88140119, // 000A GETMBR R5 R0 K25 - 0x8C140B1B, // 000B GETMET R5 R5 K27 - 0x5C1C0800, // 000C MOVE R7 R4 - 0x7C140400, // 000D CALL R5 2 - 0x58140002, // 000E LDCONST R5 K2 - 0x14180A04, // 000F LT R6 R5 R4 - 0x781A0082, // 0010 JMPF R6 #0094 - 0x58180002, // 0011 LDCONST R6 K2 - 0x1C1C0502, // 0012 EQ R7 R2 K2 - 0x781E0005, // 0013 JMPF R7 #001A - 0x8C1C011D, // 0014 GETMET R7 R0 K29 - 0x5C240A00, // 0015 MOVE R9 R5 - 0x5C280800, // 0016 MOVE R10 R4 - 0x7C1C0600, // 0017 CALL R7 3 - 0x5C180E00, // 0018 MOVE R6 R7 - 0x70020004, // 0019 JMP #001F - 0x8C1C011E, // 001A GETMET R7 R0 K30 - 0x5C240A00, // 001B MOVE R9 R5 - 0x5C280800, // 001C MOVE R10 R4 - 0x7C1C0600, // 001D CALL R7 3 - 0x5C180E00, // 001E MOVE R6 R7 - 0x881C0106, // 001F GETMBR R7 R0 K6 - 0x001C0C07, // 0020 ADD R7 R6 R7 - 0x542200FF, // 0021 LDINT R8 256 - 0x101C0E08, // 0022 MOD R7 R7 R8 - 0x5C180E00, // 0023 MOVE R6 R7 - 0x581C001C, // 0024 LDCONST R7 K28 - 0x4C200000, // 0025 LDNIL R8 - 0x1C200608, // 0026 EQ R8 R3 R8 - 0x7822001B, // 0027 JMPF R8 #0044 - 0xB8220800, // 0028 GETNGBL R8 K4 - 0x8C201105, // 0029 GETMET R8 R8 K5 - 0x5C280C00, // 002A MOVE R10 R6 - 0x582C0002, // 002B LDCONST R11 K2 - 0x543200FE, // 002C LDINT R12 255 - 0x58340002, // 002D LDCONST R13 K2 - 0x543A0166, // 002E LDINT R14 359 - 0x7C200C00, // 002F CALL R8 6 - 0xA4263E00, // 0030 IMPORT R9 K31 - 0x5C281200, // 0031 MOVE R10 R9 - 0x582C0020, // 0032 LDCONST R11 K32 - 0x7C280200, // 0033 CALL R10 1 - 0x8C2C1521, // 0034 GETMET R11 R10 K33 - 0x5C341000, // 0035 MOVE R13 R8 - 0x543A00FE, // 0036 LDINT R14 255 - 0x7C2C0600, // 0037 CALL R11 3 - 0x882C1522, // 0038 GETMBR R11 R10 K34 - 0x5432000F, // 0039 LDINT R12 16 - 0x382C160C, // 003A SHL R11 R11 R12 - 0x302E380B, // 003B OR R11 K28 R11 - 0x88301523, // 003C GETMBR R12 R10 K35 - 0x54360007, // 003D LDINT R13 8 - 0x3830180D, // 003E SHL R12 R12 R13 - 0x302C160C, // 003F OR R11 R11 R12 - 0x88301524, // 0040 GETMBR R12 R10 K36 - 0x302C160C, // 0041 OR R11 R11 R12 - 0x5C1C1600, // 0042 MOVE R7 R11 - 0x7002004B, // 0043 JMP #0090 - 0xB8222000, // 0044 GETNGBL R8 K16 - 0x8C201125, // 0045 GETMET R8 R8 K37 - 0x5C280600, // 0046 MOVE R10 R3 - 0x7C200400, // 0047 CALL R8 2 - 0x78220009, // 0048 JMPF R8 #0053 - 0x88200726, // 0049 GETMBR R8 R3 K38 - 0x4C240000, // 004A LDNIL R9 - 0x20201009, // 004B NE R8 R8 R9 - 0x78220005, // 004C JMPF R8 #0053 - 0x8C200726, // 004D GETMET R8 R3 K38 - 0x5C280C00, // 004E MOVE R10 R6 - 0x582C0002, // 004F LDCONST R11 K2 - 0x7C200600, // 0050 CALL R8 3 - 0x5C1C1000, // 0051 MOVE R7 R8 - 0x7002003C, // 0052 JMP #0090 - 0xB8222000, // 0053 GETNGBL R8 K16 - 0x8C201111, // 0054 GETMET R8 R8 K17 - 0x5C280600, // 0055 MOVE R10 R3 - 0x7C200400, // 0056 CALL R8 2 - 0x78220008, // 0057 JMPF R8 #0061 - 0x8C200127, // 0058 GETMET R8 R0 K39 - 0x5C280600, // 0059 MOVE R10 R3 - 0x582C000C, // 005A LDCONST R11 K12 - 0x54320009, // 005B LDINT R12 10 - 0x08300C0C, // 005C MUL R12 R6 R12 - 0x0030020C, // 005D ADD R12 R1 R12 - 0x7C200800, // 005E CALL R8 4 - 0x5C1C1000, // 005F MOVE R7 R8 - 0x7002002E, // 0060 JMP #0090 - 0x60200004, // 0061 GETGBL R8 G4 - 0x5C240600, // 0062 MOVE R9 R3 - 0x7C200200, // 0063 CALL R8 1 - 0x1C201128, // 0064 EQ R8 R8 K40 - 0x78220028, // 0065 JMPF R8 #008F - 0x5C200C00, // 0066 MOVE R8 R6 - 0xB8260800, // 0067 GETNGBL R9 K4 - 0x8C241305, // 0068 GETMET R9 R9 K5 - 0x5C2C1000, // 0069 MOVE R11 R8 - 0x58300002, // 006A LDCONST R12 K2 - 0x543600FE, // 006B LDINT R13 255 - 0x58380002, // 006C LDCONST R14 K2 - 0x543E000F, // 006D LDINT R15 16 - 0x3C3C060F, // 006E SHR R15 R3 R15 - 0x544200FE, // 006F LDINT R16 255 - 0x2C3C1E10, // 0070 AND R15 R15 R16 - 0x7C240C00, // 0071 CALL R9 6 - 0xB82A0800, // 0072 GETNGBL R10 K4 - 0x8C281505, // 0073 GETMET R10 R10 K5 - 0x5C301000, // 0074 MOVE R12 R8 - 0x58340002, // 0075 LDCONST R13 K2 - 0x543A00FE, // 0076 LDINT R14 255 - 0x583C0002, // 0077 LDCONST R15 K2 - 0x54420007, // 0078 LDINT R16 8 - 0x3C400610, // 0079 SHR R16 R3 R16 - 0x544600FE, // 007A LDINT R17 255 - 0x2C402011, // 007B AND R16 R16 R17 - 0x7C280C00, // 007C CALL R10 6 - 0xB82E0800, // 007D GETNGBL R11 K4 - 0x8C2C1705, // 007E GETMET R11 R11 K5 - 0x5C341000, // 007F MOVE R13 R8 - 0x58380002, // 0080 LDCONST R14 K2 - 0x543E00FE, // 0081 LDINT R15 255 - 0x58400002, // 0082 LDCONST R16 K2 - 0x544600FE, // 0083 LDINT R17 255 - 0x2C440611, // 0084 AND R17 R3 R17 - 0x7C2C0C00, // 0085 CALL R11 6 - 0x5432000F, // 0086 LDINT R12 16 - 0x3830120C, // 0087 SHL R12 R9 R12 - 0x3032380C, // 0088 OR R12 K28 R12 - 0x54360007, // 0089 LDINT R13 8 - 0x3834140D, // 008A SHL R13 R10 R13 - 0x3030180D, // 008B OR R12 R12 R13 - 0x3030180B, // 008C OR R12 R12 R11 - 0x5C1C1800, // 008D MOVE R7 R12 - 0x70020000, // 008E JMP #0090 - 0x5C1C0600, // 008F MOVE R7 R3 - 0x88200119, // 0090 GETMBR R8 R0 K25 - 0x98200A07, // 0091 SETIDX R8 R5 R7 - 0x00140B08, // 0092 ADD R5 R5 K8 - 0x7001FF7A, // 0093 JMP #000F - 0x80000000, // 0094 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_GradientAnimation_init, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080529, // 0003 GETMET R2 R2 K41 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x60080012, // 0006 GETGBL R2 G18 - 0x7C080000, // 0007 CALL R2 0 - 0x90023202, // 0008 SETMBR R0 K25 R2 - 0x90020D02, // 0009 SETMBR R0 K6 K2 - 0x88080116, // 000A GETMBR R2 R0 K22 - 0x8C080517, // 000B GETMET R2 R2 K23 - 0x7C080200, // 000C CALL R2 1 - 0x880C0119, // 000D GETMBR R3 R0 K25 - 0x8C0C071B, // 000E GETMET R3 R3 K27 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x580C0002, // 0011 LDCONST R3 K2 - 0x14100602, // 0012 LT R4 R3 R2 - 0x78120003, // 0013 JMPF R4 #0018 - 0x88100119, // 0014 GETMBR R4 R0 K25 - 0x9810071C, // 0015 SETIDX R4 R3 K28 - 0x000C0708, // 0016 ADD R3 R3 K8 - 0x7001FFF9, // 0017 JMP #0012 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _calculate_radial_position -********************************************************************/ -be_local_closure(class_GradientAnimation__calculate_radial_position, /* name */ - be_nested_proto( - 14, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_GradientAnimation, /* shared constants */ - be_str_weak(_calculate_radial_position), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0xB80E0800, // 0000 GETNGBL R3 K4 - 0x8C0C0705, // 0001 GETMET R3 R3 K5 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x041C0508, // 0004 SUB R7 R2 K8 - 0x58200002, // 0005 LDCONST R8 K2 - 0x542600FE, // 0006 LDINT R9 255 - 0x7C0C0C00, // 0007 CALL R3 6 - 0x8810012A, // 0008 GETMBR R4 R0 K42 - 0x8814010A, // 0009 GETMBR R5 R0 K10 - 0x58180002, // 000A LDCONST R6 K2 - 0x281C0604, // 000B GE R7 R3 R4 - 0x781E0002, // 000C JMPF R7 #0010 - 0x041C0604, // 000D SUB R7 R3 R4 - 0x5C180E00, // 000E MOVE R6 R7 - 0x70020001, // 000F JMP #0012 - 0x041C0803, // 0010 SUB R7 R4 R3 - 0x5C180E00, // 0011 MOVE R6 R7 - 0xB81E0800, // 0012 GETNGBL R7 K4 - 0x8C1C0F05, // 0013 GETMET R7 R7 K5 - 0x5C240C00, // 0014 MOVE R9 R6 - 0x58280002, // 0015 LDCONST R10 K2 - 0x542E007F, // 0016 LDINT R11 128 - 0x58300002, // 0017 LDCONST R12 K2 - 0x5C340A00, // 0018 MOVE R13 R5 - 0x7C1C0C00, // 0019 CALL R7 6 - 0x5C180E00, // 001A MOVE R6 R7 - 0x541E00FE, // 001B LDINT R7 255 - 0x241C0C07, // 001C GT R7 R6 R7 - 0x781E0000, // 001D JMPF R7 #001F - 0x541A00FE, // 001E LDINT R6 255 - 0x80040C00, // 001F RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: GradientAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(GradientAnimation, - 2, - &be_class_Animation, - be_nested_map(11, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(current_colors, -1), be_const_var(0) }, - { be_const_key_weak(render, -1), be_const_closure(class_GradientAnimation_render_closure) }, - { be_const_key_weak(_calculate_linear_position, -1), be_const_closure(class_GradientAnimation__calculate_linear_position_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_GradientAnimation_tostring_closure) }, - { be_const_key_weak(update, 1), be_const_closure(class_GradientAnimation_update_closure) }, - { be_const_key_weak(on_param_changed, -1), be_const_closure(class_GradientAnimation_on_param_changed_closure) }, - { be_const_key_weak(phase_offset, -1), be_const_var(1) }, - { be_const_key_weak(_calculate_gradient, -1), be_const_closure(class_GradientAnimation__calculate_gradient_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(direction, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(center_pos, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(128) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(gradient_type, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, 1), be_const_nil() }, - { be_const_key_weak(nillable, -1), be_const_bool(1) }, - })) ) } )) }, - { be_const_key_weak(movement_speed, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(spread, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(255) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_GradientAnimation_init_closure) }, - { be_const_key_weak(_calculate_radial_position, -1), be_const_closure(class_GradientAnimation__calculate_radial_position_closure) }, - })), - be_str_weak(GradientAnimation) -); /******************************************************************** ** Solidified function: twinkle_intense @@ -2355,42 +3132,6 @@ be_local_closure(gradient_two_color_linear, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: sawtooth -********************************************************************/ -be_local_closure(sawtooth, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(oscillator_value), - /* K2 */ be_nested_str_weak(form), - /* K3 */ be_nested_str_weak(SAWTOOTH), - }), - be_str_weak(sawtooth), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x88080503, // 0005 GETMBR R2 R2 K3 - 0x90060402, // 0006 SETMBR R1 K2 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - // compact class 'CometAnimation' ktab size: 24, total: 45 (saved 168 bytes) static const bvalue be_ktab_class_CometAnimation[24] = { /* K0 */ be_nested_str_weak(update), @@ -2814,43 +3555,6 @@ be_local_class(CometAnimation, })), be_str_weak(CometAnimation) ); - -/******************************************************************** -** Solidified function: jitter_position -********************************************************************/ -be_local_closure(jitter_position, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(jitter_animation), - /* K2 */ be_nested_str_weak(jitter_type), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(position_range), - }), - be_str_weak(jitter_position), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A0031, // 0005 LDINT R2 50 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - // compact class 'FireAnimation' ktab size: 45, total: 73 (saved 224 bytes) static const bvalue be_ktab_class_FireAnimation[45] = { /* K0 */ be_nested_str_weak(init), @@ -3541,11 +4245,59 @@ be_local_class(FireAnimation, ); /******************************************************************** -** Solidified function: wave_rainbow_sine +** Solidified function: list_user_functions ********************************************************************/ -be_local_closure(wave_rainbow_sine, /* name */ +be_local_closure(list_user_functions, /* name */ be_nested_proto( 7, /* nstack */ + 0, /* argc */ + 0, /* 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(global), + /* K1 */ be_nested_str_weak(_animation_user_functions), + /* K2 */ be_nested_str_weak(keys), + /* K3 */ be_nested_str_weak(push), + /* K4 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(list_user_functions), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0xA4020000, // 0000 IMPORT R0 K0 + 0x60040012, // 0001 GETGBL R1 G18 + 0x7C040000, // 0002 CALL R1 0 + 0x60080010, // 0003 GETGBL R2 G16 + 0x880C0101, // 0004 GETMBR R3 R0 K1 + 0x8C0C0702, // 0005 GETMET R3 R3 K2 + 0x7C0C0200, // 0006 CALL R3 1 + 0x7C080200, // 0007 CALL R2 1 + 0xA8020005, // 0008 EXBLK 0 #000F + 0x5C0C0400, // 0009 MOVE R3 R2 + 0x7C0C0000, // 000A CALL R3 0 + 0x8C100303, // 000B GETMET R4 R1 K3 + 0x5C180600, // 000C MOVE R6 R3 + 0x7C100400, // 000D CALL R4 2 + 0x7001FFF9, // 000E JMP #0009 + 0x58080004, // 000F LDCONST R2 K4 + 0xAC080200, // 0010 CATCH R2 1 0 + 0xB0080000, // 0011 RAISE 2 R0 R0 + 0x80040200, // 0012 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: gradient_rainbow_linear +********************************************************************/ +be_local_closure(gradient_rainbow_linear, /* name */ + be_nested_proto( + 4, /* nstack */ 1, /* argc */ 0, /* varg */ 0, /* has upvals */ @@ -3553,53 +4305,140 @@ be_local_closure(wave_rainbow_sine, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ + ( &(const bvalue[ 7]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(wave_animation), - /* K2 */ be_nested_str_weak(rich_palette), - /* K3 */ be_nested_str_weak(palette), - /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), - /* K5 */ be_nested_str_weak(cycle_period), - /* K6 */ be_nested_str_weak(transition_type), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(brightness), - /* K9 */ be_nested_str_weak(set_range), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(color), - /* K12 */ be_nested_str_weak(wave_type), - /* K13 */ be_nested_str_weak(frequency), - /* K14 */ be_nested_str_weak(wave_speed), + /* K1 */ be_nested_str_weak(gradient_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(gradient_type), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(direction), + /* K6 */ be_nested_str_weak(movement_speed), }), - be_str_weak(wave_rainbow_sine), + be_str_weak(gradient_rainbow_linear), &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ + ( &(const binstruction[11]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x8C080502, // 0005 GETMET R2 R2 K2 - 0x5C100000, // 0006 MOVE R4 R0 - 0x7C080400, // 0007 CALL R2 2 - 0xB80E0000, // 0008 GETNGBL R3 K0 - 0x880C0704, // 0009 GETMBR R3 R3 K4 - 0x900A0603, // 000A SETMBR R2 K3 R3 - 0x540E1387, // 000B LDINT R3 5000 - 0x900A0A03, // 000C SETMBR R2 K5 R3 - 0x900A0D07, // 000D SETMBR R2 K6 K7 - 0x540E00FE, // 000E LDINT R3 255 - 0x900A1003, // 000F SETMBR R2 K8 R3 - 0x8C0C0509, // 0010 GETMET R3 R2 K9 - 0x5814000A, // 0011 LDCONST R5 K10 - 0x541A00FE, // 0012 LDINT R6 255 - 0x7C0C0600, // 0013 CALL R3 3 - 0x90061602, // 0014 SETMBR R1 K11 R2 - 0x9006190A, // 0015 SETMBR R1 K12 K10 - 0x540E001F, // 0016 LDINT R3 32 - 0x90061A03, // 0017 SETMBR R1 K13 R3 - 0x540E0031, // 0018 LDINT R3 50 - 0x90061C03, // 0019 SETMBR R1 K14 R3 - 0x80040200, // 001A RET 1 R1 + 0x4C080000, // 0004 LDNIL R2 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x90060704, // 0006 SETMBR R1 K3 K4 + 0x90060B04, // 0007 SETMBR R1 K5 K4 + 0x540A0031, // 0008 LDINT R2 50 + 0x90060C02, // 0009 SETMBR R1 K6 R2 + 0x80040200, // 000A RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: jitter_position +********************************************************************/ +be_local_closure(jitter_position, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(jitter_animation), + /* K2 */ be_nested_str_weak(jitter_type), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(position_range), + }), + be_str_weak(jitter_position), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A0031, // 0005 LDINT R2 50 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sparkle_white +********************************************************************/ +be_local_closure(sparkle_white, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(sparkle_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(name), + /* K4 */ be_nested_str_weak(sparkle_white), + }), + be_str_weak(sparkle_white), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409FFFE, // 0004 LDINT R2 -1 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x90060704, // 0006 SETMBR R1 K3 K4 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: scale_grow +********************************************************************/ +be_local_closure(scale_grow, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(scale_animation), + /* K2 */ be_nested_str_weak(scale_mode), + /* K3 */ be_const_int(2), + /* K4 */ be_nested_str_weak(scale_speed), + }), + be_str_weak(scale_grow), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A007F, // 0005 LDINT R2 128 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x80040200, // 0007 RET 1 R1 }) ) ); @@ -4375,44 +5214,1058 @@ be_local_class(JitterAnimation, })), be_str_weak(JitterAnimation) ); +// compact class 'RichPaletteColorProvider' ktab size: 46, total: 105 (saved 472 bytes) +static const bvalue be_ktab_class_RichPaletteColorProvider[46] = { + /* K0 */ be_nested_str_weak(value_error), + /* K1 */ be_nested_str_weak(min_X20must_X20be_X20lower_X20than_X20max), + /* K2 */ be_nested_str_weak(range_min), + /* K3 */ be_nested_str_weak(range_max), + /* K4 */ be_nested_str_weak(slots_arr), + /* K5 */ be_nested_str_weak(_parse_palette), + /* K6 */ be_nested_str_weak(RichPaletteColorProvider_X28slots_X3D_X25s_X2C_X20cycle_period_X3D_X25s_X29), + /* K7 */ be_nested_str_weak(slots), + /* K8 */ be_nested_str_weak(cycle_period), + /* K9 */ be_nested_str_weak(RichPaletteColorProvider_X28uninitialized_X29), + /* K10 */ be_nested_str_weak(_get_palette_bytes), + /* K11 */ be_nested_str_weak(resize), + /* K12 */ be_nested_str_weak(get), + /* K13 */ be_const_int(0), + /* K14 */ be_const_int(1), + /* K15 */ be_nested_str_weak(tasmota), + /* K16 */ be_nested_str_weak(scale_int), + /* K17 */ be_nested_str_weak(palette), + /* K18 */ be_nested_str_weak(_recompute_palette), + /* K19 */ be_nested_str_weak(cycle_period_X20must_X20be_X20non_X2Dnegative), + /* K20 */ be_nested_str_weak(range_min_X20must_X20be_X20lower_X20than_X20range_max), + /* K21 */ be_nested_str_weak(brightness), + /* K22 */ be_const_int(2), + /* K23 */ be_nested_str_weak(scale_uint), + /* K24 */ be_nested_str_weak(current_color), + /* K25 */ be_nested_str_weak(_get_color_at_index), + /* K26 */ be_nested_str_weak(init), + /* K27 */ be_nested_str_weak(cycle_start), + /* K28 */ be_nested_str_weak(engine), + /* K29 */ be_nested_str_weak(time_ms), + /* K30 */ be_nested_str_weak(global), + /* K31 */ be_nested_str_weak(light_state), + /* K32 */ be_nested_str_weak(RGB), + /* K33 */ be_nested_str_weak(background_X3Alinear_X2Dgradient_X28to_X20right_X2C_X20_X23000000_X29_X3B), + /* K34 */ be_nested_str_weak(background_X3Alinear_X2Dgradient_X28to_X20right), + /* K35 */ be_nested_str_weak(_X2C_X23_X2502X_X2502X_X2502X_X20_X25_X2E1f_X25_X25), + /* K36 */ be_const_real_hex(0x41200000), + /* K37 */ be_nested_str_weak(_X29_X3B), + /* K38 */ be_const_int(-16777216), + /* K39 */ be_nested_str_weak(_DEFAULT_PALETTE), + /* K40 */ be_nested_str_weak(set_rgb), + /* K41 */ be_nested_str_weak(bri), + /* K42 */ be_nested_str_weak(set_bri), + /* K43 */ be_nested_str_weak(r), + /* K44 */ be_nested_str_weak(g), + /* K45 */ be_nested_str_weak(b), +}; + + +extern const bclass be_class_RichPaletteColorProvider; /******************************************************************** -** Solidified function: jitter_brightness +** Solidified function: set_range ********************************************************************/ -be_local_closure(jitter_brightness, /* name */ +be_local_closure(class_RichPaletteColorProvider_set_range, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* varg */ + 7, /* nstack */ + 3, /* argc */ + 10, /* 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(animation), - /* K1 */ be_nested_str_weak(jitter_animation), - /* K2 */ be_nested_str_weak(jitter_type), - /* K3 */ be_const_int(2), - /* K4 */ be_nested_str_weak(brightness_range), - }), - be_str_weak(jitter_brightness), + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(set_range), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A0027, // 0005 LDINT R2 40 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x80040200, // 0007 RET 1 R1 + ( &(const binstruction[11]) { /* code */ + 0x280C0202, // 0000 GE R3 R1 R2 + 0x780E0000, // 0001 JMPF R3 #0003 + 0xB0060101, // 0002 RAISE 1 K0 K1 + 0x90020401, // 0003 SETMBR R0 K2 R1 + 0x90020602, // 0004 SETMBR R0 K3 R2 + 0x8C0C0105, // 0005 GETMET R3 R0 K5 + 0x5C140200, // 0006 MOVE R5 R1 + 0x5C180400, // 0007 MOVE R6 R2 + 0x7C0C0600, // 0008 CALL R3 3 + 0x90020803, // 0009 SETMBR R0 K4 R3 + 0x80040000, // 000A RET 1 R0 }) ) ); /*******************************************************************/ +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_tostring, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xA8020008, // 0000 EXBLK 0 #000A + 0x60040018, // 0001 GETGBL R1 G24 + 0x58080006, // 0002 LDCONST R2 K6 + 0x880C0107, // 0003 GETMBR R3 R0 K7 + 0x88100108, // 0004 GETMBR R4 R0 K8 + 0x7C040600, // 0005 CALL R1 3 + 0xA8040001, // 0006 EXBLK 1 1 + 0x80040200, // 0007 RET 1 R1 + 0xA8040001, // 0008 EXBLK 1 1 + 0x70020004, // 0009 JMP #000F + 0xAC040000, // 000A CATCH R1 0 0 + 0x70020001, // 000B JMP #000E + 0x80061200, // 000C RET 1 K9 + 0x70020000, // 000D JMP #000F + 0xB0080000, // 000E RAISE 2 R0 R0 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _parse_palette +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider__parse_palette, /* name */ + be_nested_proto( + 16, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(_parse_palette), + &be_const_str_solidified, + ( &(const binstruction[69]) { /* code */ + 0x8C0C010A, // 0000 GETMET R3 R0 K10 + 0x7C0C0200, // 0001 CALL R3 1 + 0x60100012, // 0002 GETGBL R4 G18 + 0x7C100000, // 0003 CALL R4 0 + 0x88140107, // 0004 GETMBR R5 R0 K7 + 0x8C18090B, // 0005 GETMET R6 R4 K11 + 0x5C200A00, // 0006 MOVE R8 R5 + 0x7C180400, // 0007 CALL R6 2 + 0x8C18070C, // 0008 GETMET R6 R3 K12 + 0x5820000D, // 0009 LDCONST R8 K13 + 0x5824000E, // 000A LDCONST R9 K14 + 0x7C180600, // 000B CALL R6 3 + 0x20180D0D, // 000C NE R6 R6 K13 + 0x781A0022, // 000D JMPF R6 #0031 + 0x5818000D, // 000E LDCONST R6 K13 + 0x581C000D, // 000F LDCONST R7 K13 + 0x04200B0E, // 0010 SUB R8 R5 K14 + 0x14200E08, // 0011 LT R8 R7 R8 + 0x78220007, // 0012 JMPF R8 #001B + 0x8C20070C, // 0013 GETMET R8 R3 K12 + 0x542A0003, // 0014 LDINT R10 4 + 0x08280E0A, // 0015 MUL R10 R7 R10 + 0x582C000E, // 0016 LDCONST R11 K14 + 0x7C200600, // 0017 CALL R8 3 + 0x00180C08, // 0018 ADD R6 R6 R8 + 0x001C0F0E, // 0019 ADD R7 R7 K14 + 0x7001FFF4, // 001A JMP #0010 + 0x5820000D, // 001B LDCONST R8 K13 + 0x581C000D, // 001C LDCONST R7 K13 + 0x14240E05, // 001D LT R9 R7 R5 + 0x78260010, // 001E JMPF R9 #0030 + 0xB8261E00, // 001F GETNGBL R9 K15 + 0x8C241310, // 0020 GETMET R9 R9 K16 + 0x5C2C1000, // 0021 MOVE R11 R8 + 0x5830000D, // 0022 LDCONST R12 K13 + 0x5C340C00, // 0023 MOVE R13 R6 + 0x5C380200, // 0024 MOVE R14 R1 + 0x5C3C0400, // 0025 MOVE R15 R2 + 0x7C240C00, // 0026 CALL R9 6 + 0x98100E09, // 0027 SETIDX R4 R7 R9 + 0x8C24070C, // 0028 GETMET R9 R3 K12 + 0x542E0003, // 0029 LDINT R11 4 + 0x082C0E0B, // 002A MUL R11 R7 R11 + 0x5830000E, // 002B LDCONST R12 K14 + 0x7C240600, // 002C CALL R9 3 + 0x00201009, // 002D ADD R8 R8 R9 + 0x001C0F0E, // 002E ADD R7 R7 K14 + 0x7001FFEC, // 002F JMP #001D + 0x70020012, // 0030 JMP #0044 + 0x5818000D, // 0031 LDCONST R6 K13 + 0x141C0C05, // 0032 LT R7 R6 R5 + 0x781E000F, // 0033 JMPF R7 #0044 + 0x8C1C070C, // 0034 GETMET R7 R3 K12 + 0x54260003, // 0035 LDINT R9 4 + 0x08240C09, // 0036 MUL R9 R6 R9 + 0x5828000E, // 0037 LDCONST R10 K14 + 0x7C1C0600, // 0038 CALL R7 3 + 0xB8221E00, // 0039 GETNGBL R8 K15 + 0x8C201110, // 003A GETMET R8 R8 K16 + 0x5C280E00, // 003B MOVE R10 R7 + 0x582C000D, // 003C LDCONST R11 K13 + 0x543200FE, // 003D LDINT R12 255 + 0x5C340200, // 003E MOVE R13 R1 + 0x5C380400, // 003F MOVE R14 R2 + 0x7C200C00, // 0040 CALL R8 6 + 0x98100C08, // 0041 SETIDX R4 R6 R8 + 0x00180D0E, // 0042 ADD R6 R6 K14 + 0x7001FFED, // 0043 JMP #0032 + 0x80040800, // 0044 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: on_param_changed +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_on_param_changed, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(on_param_changed), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x1C0C0311, // 0000 EQ R3 R1 K17 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x8C0C0112, // 0002 GETMET R3 R0 K18 + 0x7C0C0200, // 0003 CALL R3 1 + 0x7002002E, // 0004 JMP #0034 + 0x1C0C0308, // 0005 EQ R3 R1 K8 + 0x780E0013, // 0006 JMPF R3 #001B + 0x4C0C0000, // 0007 LDNIL R3 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0000, // 0009 JMPF R3 #000B + 0x80000600, // 000A RET 0 + 0x140C050D, // 000B LT R3 R2 K13 + 0x780E0000, // 000C JMPF R3 #000E + 0xB0060113, // 000D RAISE 1 K0 K19 + 0x240C050D, // 000E GT R3 R2 K13 + 0x780E0009, // 000F JMPF R3 #001A + 0x8C0C010A, // 0010 GETMET R3 R0 K10 + 0x7C0C0200, // 0011 CALL R3 1 + 0x4C100000, // 0012 LDNIL R4 + 0x200C0604, // 0013 NE R3 R3 R4 + 0x780E0004, // 0014 JMPF R3 #001A + 0x8C0C0105, // 0015 GETMET R3 R0 K5 + 0x5814000D, // 0016 LDCONST R5 K13 + 0x0418050E, // 0017 SUB R6 R2 K14 + 0x7C0C0600, // 0018 CALL R3 3 + 0x90020803, // 0019 SETMBR R0 K4 R3 + 0x70020018, // 001A JMP #0034 + 0x1C0C0302, // 001B EQ R3 R1 K2 + 0x740E0001, // 001C JMPT R3 #001F + 0x1C0C0303, // 001D EQ R3 R1 K3 + 0x780E0014, // 001E JMPF R3 #0034 + 0x880C0102, // 001F GETMBR R3 R0 K2 + 0x88100103, // 0020 GETMBR R4 R0 K3 + 0x4C140000, // 0021 LDNIL R5 + 0x20140605, // 0022 NE R5 R3 R5 + 0x7816000F, // 0023 JMPF R5 #0034 + 0x4C140000, // 0024 LDNIL R5 + 0x20140805, // 0025 NE R5 R4 R5 + 0x7816000C, // 0026 JMPF R5 #0034 + 0x28140604, // 0027 GE R5 R3 R4 + 0x78160000, // 0028 JMPF R5 #002A + 0xB0060114, // 0029 RAISE 1 K0 K20 + 0x8C14010A, // 002A GETMET R5 R0 K10 + 0x7C140200, // 002B CALL R5 1 + 0x4C180000, // 002C LDNIL R6 + 0x20140A06, // 002D NE R5 R5 R6 + 0x78160004, // 002E JMPF R5 #0034 + 0x8C140105, // 002F GETMET R5 R0 K5 + 0x5C1C0600, // 0030 MOVE R7 R3 + 0x5C200800, // 0031 MOVE R8 R4 + 0x7C140600, // 0032 CALL R5 3 + 0x90020805, // 0033 SETMBR R0 K4 R5 + 0x80000000, // 0034 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_color_for_value +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_get_color_for_value, /* name */ + be_nested_proto( + 23, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(get_color_for_value), + &be_const_str_solidified, + ( &(const binstruction[123]) { /* code */ + 0x8C0C010A, // 0000 GETMET R3 R0 K10 + 0x7C0C0200, // 0001 CALL R3 1 + 0x88100102, // 0002 GETMBR R4 R0 K2 + 0x88140103, // 0003 GETMBR R5 R0 K3 + 0x88180115, // 0004 GETMBR R6 R0 K21 + 0x4C1C0000, // 0005 LDNIL R7 + 0x1C1C0807, // 0006 EQ R7 R4 R7 + 0x741E0002, // 0007 JMPT R7 #000B + 0x4C1C0000, // 0008 LDNIL R7 + 0x1C1C0A07, // 0009 EQ R7 R5 R7 + 0x781E0001, // 000A JMPF R7 #000D + 0x4C1C0000, // 000B LDNIL R7 + 0x80040E00, // 000C RET 1 R7 + 0x881C0107, // 000D GETMBR R7 R0 K7 + 0x04200F16, // 000E SUB R8 R7 K22 + 0x2424110D, // 000F GT R9 R8 K13 + 0x78260006, // 0010 JMPF R9 #0018 + 0x88240104, // 0011 GETMBR R9 R0 K4 + 0x94241208, // 0012 GETIDX R9 R9 R8 + 0x28240209, // 0013 GE R9 R1 R9 + 0x78260000, // 0014 JMPF R9 #0016 + 0x70020001, // 0015 JMP #0018 + 0x0420110E, // 0016 SUB R8 R8 K14 + 0x7001FFF6, // 0017 JMP #000F + 0x8C24070C, // 0018 GETMET R9 R3 K12 + 0x542E0003, // 0019 LDINT R11 4 + 0x082C100B, // 001A MUL R11 R8 R11 + 0x54320003, // 001B LDINT R12 4 + 0x7C240600, // 001C CALL R9 3 + 0x8C28070C, // 001D GETMET R10 R3 K12 + 0x0030110E, // 001E ADD R12 R8 K14 + 0x54360003, // 001F LDINT R13 4 + 0x0830180D, // 0020 MUL R12 R12 R13 + 0x54360003, // 0021 LDINT R13 4 + 0x7C280600, // 0022 CALL R10 3 + 0x882C0104, // 0023 GETMBR R11 R0 K4 + 0x942C1608, // 0024 GETIDX R11 R11 R8 + 0x0030110E, // 0025 ADD R12 R8 K14 + 0x88340104, // 0026 GETMBR R13 R0 K4 + 0x94301A0C, // 0027 GETIDX R12 R13 R12 + 0xB8361E00, // 0028 GETNGBL R13 K15 + 0x8C341B17, // 0029 GETMET R13 R13 K23 + 0x5C3C0200, // 002A MOVE R15 R1 + 0x5C401600, // 002B MOVE R16 R11 + 0x5C441800, // 002C MOVE R17 R12 + 0x544A0007, // 002D LDINT R18 8 + 0x3C481212, // 002E SHR R18 R9 R18 + 0x544E00FE, // 002F LDINT R19 255 + 0x2C482413, // 0030 AND R18 R18 R19 + 0x544E0007, // 0031 LDINT R19 8 + 0x3C4C1413, // 0032 SHR R19 R10 R19 + 0x545200FE, // 0033 LDINT R20 255 + 0x2C4C2614, // 0034 AND R19 R19 R20 + 0x7C340C00, // 0035 CALL R13 6 + 0xB83A1E00, // 0036 GETNGBL R14 K15 + 0x8C381D17, // 0037 GETMET R14 R14 K23 + 0x5C400200, // 0038 MOVE R16 R1 + 0x5C441600, // 0039 MOVE R17 R11 + 0x5C481800, // 003A MOVE R18 R12 + 0x544E000F, // 003B LDINT R19 16 + 0x3C4C1213, // 003C SHR R19 R9 R19 + 0x545200FE, // 003D LDINT R20 255 + 0x2C4C2614, // 003E AND R19 R19 R20 + 0x5452000F, // 003F LDINT R20 16 + 0x3C501414, // 0040 SHR R20 R10 R20 + 0x545600FE, // 0041 LDINT R21 255 + 0x2C502815, // 0042 AND R20 R20 R21 + 0x7C380C00, // 0043 CALL R14 6 + 0xB83E1E00, // 0044 GETNGBL R15 K15 + 0x8C3C1F17, // 0045 GETMET R15 R15 K23 + 0x5C440200, // 0046 MOVE R17 R1 + 0x5C481600, // 0047 MOVE R18 R11 + 0x5C4C1800, // 0048 MOVE R19 R12 + 0x54520017, // 0049 LDINT R20 24 + 0x3C501214, // 004A SHR R20 R9 R20 + 0x545600FE, // 004B LDINT R21 255 + 0x2C502815, // 004C AND R20 R20 R21 + 0x54560017, // 004D LDINT R21 24 + 0x3C541415, // 004E SHR R21 R10 R21 + 0x545A00FE, // 004F LDINT R22 255 + 0x2C542A16, // 0050 AND R21 R21 R22 + 0x7C3C0C00, // 0051 CALL R15 6 + 0x544200FE, // 0052 LDINT R16 255 + 0x20400C10, // 0053 NE R16 R6 R16 + 0x7842001A, // 0054 JMPF R16 #0070 + 0xB8421E00, // 0055 GETNGBL R16 K15 + 0x8C402117, // 0056 GETMET R16 R16 K23 + 0x5C481A00, // 0057 MOVE R18 R13 + 0x584C000D, // 0058 LDCONST R19 K13 + 0x545200FE, // 0059 LDINT R20 255 + 0x5854000D, // 005A LDCONST R21 K13 + 0x5C580C00, // 005B MOVE R22 R6 + 0x7C400C00, // 005C CALL R16 6 + 0x5C342000, // 005D MOVE R13 R16 + 0xB8421E00, // 005E GETNGBL R16 K15 + 0x8C402117, // 005F GETMET R16 R16 K23 + 0x5C481C00, // 0060 MOVE R18 R14 + 0x584C000D, // 0061 LDCONST R19 K13 + 0x545200FE, // 0062 LDINT R20 255 + 0x5854000D, // 0063 LDCONST R21 K13 + 0x5C580C00, // 0064 MOVE R22 R6 + 0x7C400C00, // 0065 CALL R16 6 + 0x5C382000, // 0066 MOVE R14 R16 + 0xB8421E00, // 0067 GETNGBL R16 K15 + 0x8C402117, // 0068 GETMET R16 R16 K23 + 0x5C481E00, // 0069 MOVE R18 R15 + 0x584C000D, // 006A LDCONST R19 K13 + 0x545200FE, // 006B LDINT R20 255 + 0x5854000D, // 006C LDCONST R21 K13 + 0x5C580C00, // 006D MOVE R22 R6 + 0x7C400C00, // 006E CALL R16 6 + 0x5C3C2000, // 006F MOVE R15 R16 + 0x544200FE, // 0070 LDINT R16 255 + 0x54460017, // 0071 LDINT R17 24 + 0x38402011, // 0072 SHL R16 R16 R17 + 0x5446000F, // 0073 LDINT R17 16 + 0x38441A11, // 0074 SHL R17 R13 R17 + 0x30402011, // 0075 OR R16 R16 R17 + 0x54460007, // 0076 LDINT R17 8 + 0x38441C11, // 0077 SHL R17 R14 R17 + 0x30402011, // 0078 OR R16 R16 R17 + 0x3040200F, // 0079 OR R16 R16 R15 + 0x80042000, // 007A RET 1 R16 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _recompute_palette +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider__recompute_palette, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(_recompute_palette), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x8C04010A, // 0000 GETMET R1 R0 K10 + 0x7C040200, // 0001 CALL R1 1 + 0x6008000C, // 0002 GETGBL R2 G12 + 0x5C0C0200, // 0003 MOVE R3 R1 + 0x7C080200, // 0004 CALL R2 1 + 0x540E0003, // 0005 LDINT R3 4 + 0x0C080403, // 0006 DIV R2 R2 R3 + 0x90020E02, // 0007 SETMBR R0 K7 R2 + 0x88080108, // 0008 GETMBR R2 R0 K8 + 0x880C0102, // 0009 GETMBR R3 R0 K2 + 0x88100103, // 000A GETMBR R4 R0 K3 + 0x4C140000, // 000B LDNIL R5 + 0x20140405, // 000C NE R5 R2 R5 + 0x78160007, // 000D JMPF R5 #0016 + 0x2414050D, // 000E GT R5 R2 K13 + 0x78160005, // 000F JMPF R5 #0016 + 0x8C140105, // 0010 GETMET R5 R0 K5 + 0x581C000D, // 0011 LDCONST R7 K13 + 0x0420050E, // 0012 SUB R8 R2 K14 + 0x7C140600, // 0013 CALL R5 3 + 0x90020805, // 0014 SETMBR R0 K4 R5 + 0x7002000A, // 0015 JMP #0021 + 0x4C140000, // 0016 LDNIL R5 + 0x20140605, // 0017 NE R5 R3 R5 + 0x78160007, // 0018 JMPF R5 #0021 + 0x4C140000, // 0019 LDNIL R5 + 0x20140805, // 001A NE R5 R4 R5 + 0x78160004, // 001B JMPF R5 #0021 + 0x8C140105, // 001C GETMET R5 R0 K5 + 0x5C1C0600, // 001D MOVE R7 R3 + 0x5C200800, // 001E MOVE R8 R4 + 0x7C140600, // 001F CALL R5 3 + 0x90020805, // 0020 SETMBR R0 K4 R5 + 0x88140107, // 0021 GETMBR R5 R0 K7 + 0x24140B0D, // 0022 GT R5 R5 K13 + 0x78160003, // 0023 JMPF R5 #0028 + 0x8C140119, // 0024 GETMET R5 R0 K25 + 0x581C000D, // 0025 LDCONST R7 K13 + 0x7C140400, // 0026 CALL R5 2 + 0x90023005, // 0027 SETMBR R0 K24 R5 + 0x80040000, // 0028 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_init, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C08051A, // 0003 GETMET R2 R2 K26 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x5409FFFE, // 0006 LDINT R2 -1 + 0x90023002, // 0007 SETMBR R0 K24 R2 + 0x8808011C, // 0008 GETMBR R2 R0 K28 + 0x8808051D, // 0009 GETMBR R2 R2 K29 + 0x90023602, // 000A SETMBR R0 K27 R2 + 0x4C080000, // 000B LDNIL R2 + 0x90020802, // 000C SETMBR R0 K4 R2 + 0x90020F0D, // 000D SETMBR R0 K7 K13 + 0xA40A3C00, // 000E IMPORT R2 K30 + 0x8C0C051F, // 000F GETMET R3 R2 K31 + 0x8814051F, // 0010 GETMBR R5 R2 K31 + 0x88140B20, // 0011 GETMBR R5 R5 K32 + 0x7C0C0400, // 0012 CALL R3 2 + 0x90023E03, // 0013 SETMBR R0 K31 R3 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: to_css_gradient +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_to_css_gradient, /* name */ + be_nested_proto( + 16, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(to_css_gradient), + &be_const_str_solidified, + ( &(const binstruction[47]) { /* code */ + 0x8C04010A, // 0000 GETMET R1 R0 K10 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x1C080202, // 0003 EQ R2 R1 R2 + 0x780A0000, // 0004 JMPF R2 #0006 + 0x80064200, // 0005 RET 1 K33 + 0x8C080105, // 0006 GETMET R2 R0 K5 + 0x5810000D, // 0007 LDCONST R4 K13 + 0x541603E7, // 0008 LDINT R5 1000 + 0x7C080600, // 0009 CALL R2 3 + 0x580C0022, // 000A LDCONST R3 K34 + 0x5810000D, // 000B LDCONST R4 K13 + 0x6014000C, // 000C GETGBL R5 G12 + 0x5C180400, // 000D MOVE R6 R2 + 0x7C140200, // 000E CALL R5 1 + 0x14140805, // 000F LT R5 R4 R5 + 0x7816001B, // 0010 JMPF R5 #002D + 0x94140404, // 0011 GETIDX R5 R2 R4 + 0x8C18030C, // 0012 GETMET R6 R1 K12 + 0x54220003, // 0013 LDINT R8 4 + 0x08200808, // 0014 MUL R8 R4 R8 + 0x54260003, // 0015 LDINT R9 4 + 0x7C180600, // 0016 CALL R6 3 + 0x541E0007, // 0017 LDINT R7 8 + 0x3C1C0C07, // 0018 SHR R7 R6 R7 + 0x542200FE, // 0019 LDINT R8 255 + 0x2C1C0E08, // 001A AND R7 R7 R8 + 0x5422000F, // 001B LDINT R8 16 + 0x3C200C08, // 001C SHR R8 R6 R8 + 0x542600FE, // 001D LDINT R9 255 + 0x2C201009, // 001E AND R8 R8 R9 + 0x54260017, // 001F LDINT R9 24 + 0x3C240C09, // 0020 SHR R9 R6 R9 + 0x542A00FE, // 0021 LDINT R10 255 + 0x2C24120A, // 0022 AND R9 R9 R10 + 0x60280018, // 0023 GETGBL R10 G24 + 0x582C0023, // 0024 LDCONST R11 K35 + 0x5C300E00, // 0025 MOVE R12 R7 + 0x5C341000, // 0026 MOVE R13 R8 + 0x5C381200, // 0027 MOVE R14 R9 + 0x0C3C0B24, // 0028 DIV R15 R5 K36 + 0x7C280A00, // 0029 CALL R10 5 + 0x000C060A, // 002A ADD R3 R3 R10 + 0x0010090E, // 002B ADD R4 R4 K14 + 0x7001FFDE, // 002C JMP #000C + 0x000C0725, // 002D ADD R3 R3 K37 + 0x80040600, // 002E RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_start, /* name */ + be_nested_proto( + 3, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(start), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0001, // 0002 JMPF R2 #0005 + 0x8808011C, // 0003 GETMBR R2 R0 K28 + 0x8804051D, // 0004 GETMBR R1 R2 K29 + 0x90023601, // 0005 SETMBR R0 K27 R1 + 0x80040000, // 0006 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _get_color_at_index +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider__get_color_at_index, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(_get_color_at_index), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x1408030D, // 0000 LT R2 R1 K13 + 0x740A0002, // 0001 JMPT R2 #0005 + 0x88080107, // 0002 GETMBR R2 R0 K7 + 0x28080202, // 0003 GE R2 R1 R2 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x5409FFFE, // 0005 LDINT R2 -1 + 0x80040400, // 0006 RET 1 R2 + 0x8C08010A, // 0007 GETMET R2 R0 K10 + 0x7C080200, // 0008 CALL R2 1 + 0x8C0C050C, // 0009 GETMET R3 R2 K12 + 0x54160003, // 000A LDINT R5 4 + 0x08140205, // 000B MUL R5 R1 R5 + 0x5419FFFB, // 000C LDINT R6 -4 + 0x7C0C0600, // 000D CALL R3 3 + 0x300C0726, // 000E OR R3 R3 K38 + 0x80040600, // 000F RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _get_palette_bytes +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider__get_palette_bytes, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(_get_palette_bytes), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88040111, // 0000 GETMBR R1 R0 K17 + 0x4C080000, // 0001 LDNIL R2 + 0x20080202, // 0002 NE R2 R1 R2 + 0x780A0001, // 0003 JMPF R2 #0006 + 0x5C080200, // 0004 MOVE R2 R1 + 0x70020000, // 0005 JMP #0007 + 0x88080127, // 0006 GETMBR R2 R0 K39 + 0x80040400, // 0007 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_RichPaletteColorProvider_produce_value, /* name */ + be_nested_proto( + 28, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_RichPaletteColorProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[236]) { /* code */ + 0x8C0C010A, // 0000 GETMET R3 R0 K10 + 0x7C0C0200, // 0001 CALL R3 1 + 0x4C100000, // 0002 LDNIL R4 + 0x1C100604, // 0003 EQ R4 R3 R4 + 0x74120002, // 0004 JMPT R4 #0008 + 0x88100107, // 0005 GETMBR R4 R0 K7 + 0x14100916, // 0006 LT R4 R4 K22 + 0x78120001, // 0007 JMPF R4 #000A + 0x5411FFFE, // 0008 LDINT R4 -1 + 0x80040800, // 0009 RET 1 R4 + 0x88100108, // 000A GETMBR R4 R0 K8 + 0x88140115, // 000B GETMBR R5 R0 K21 + 0x1C18090D, // 000C EQ R6 R4 K13 + 0x781A0039, // 000D JMPF R6 #0048 + 0x8C18070C, // 000E GETMET R6 R3 K12 + 0x5820000D, // 000F LDCONST R8 K13 + 0x54260003, // 0010 LDINT R9 4 + 0x7C180600, // 0011 CALL R6 3 + 0x541E0007, // 0012 LDINT R7 8 + 0x3C1C0C07, // 0013 SHR R7 R6 R7 + 0x542200FE, // 0014 LDINT R8 255 + 0x2C1C0E08, // 0015 AND R7 R7 R8 + 0x5422000F, // 0016 LDINT R8 16 + 0x3C200C08, // 0017 SHR R8 R6 R8 + 0x542600FE, // 0018 LDINT R9 255 + 0x2C201009, // 0019 AND R8 R8 R9 + 0x54260017, // 001A LDINT R9 24 + 0x3C240C09, // 001B SHR R9 R6 R9 + 0x542A00FE, // 001C LDINT R10 255 + 0x2C24120A, // 001D AND R9 R9 R10 + 0x542A00FE, // 001E LDINT R10 255 + 0x20280A0A, // 001F NE R10 R5 R10 + 0x782A001A, // 0020 JMPF R10 #003C + 0xB82A1E00, // 0021 GETNGBL R10 K15 + 0x8C281517, // 0022 GETMET R10 R10 K23 + 0x5C300E00, // 0023 MOVE R12 R7 + 0x5834000D, // 0024 LDCONST R13 K13 + 0x543A00FE, // 0025 LDINT R14 255 + 0x583C000D, // 0026 LDCONST R15 K13 + 0x5C400A00, // 0027 MOVE R16 R5 + 0x7C280C00, // 0028 CALL R10 6 + 0x5C1C1400, // 0029 MOVE R7 R10 + 0xB82A1E00, // 002A GETNGBL R10 K15 + 0x8C281517, // 002B GETMET R10 R10 K23 + 0x5C301000, // 002C MOVE R12 R8 + 0x5834000D, // 002D LDCONST R13 K13 + 0x543A00FE, // 002E LDINT R14 255 + 0x583C000D, // 002F LDCONST R15 K13 + 0x5C400A00, // 0030 MOVE R16 R5 + 0x7C280C00, // 0031 CALL R10 6 + 0x5C201400, // 0032 MOVE R8 R10 + 0xB82A1E00, // 0033 GETNGBL R10 K15 + 0x8C281517, // 0034 GETMET R10 R10 K23 + 0x5C301200, // 0035 MOVE R12 R9 + 0x5834000D, // 0036 LDCONST R13 K13 + 0x543A00FE, // 0037 LDINT R14 255 + 0x583C000D, // 0038 LDCONST R15 K13 + 0x5C400A00, // 0039 MOVE R16 R5 + 0x7C280C00, // 003A CALL R10 6 + 0x5C241400, // 003B MOVE R9 R10 + 0x542A00FE, // 003C LDINT R10 255 + 0x542E0017, // 003D LDINT R11 24 + 0x3828140B, // 003E SHL R10 R10 R11 + 0x542E000F, // 003F LDINT R11 16 + 0x382C0E0B, // 0040 SHL R11 R7 R11 + 0x3028140B, // 0041 OR R10 R10 R11 + 0x542E0007, // 0042 LDINT R11 8 + 0x382C100B, // 0043 SHL R11 R8 R11 + 0x3028140B, // 0044 OR R10 R10 R11 + 0x30281409, // 0045 OR R10 R10 R9 + 0x9002300A, // 0046 SETMBR R0 K24 R10 + 0x80041400, // 0047 RET 1 R10 + 0x8818011B, // 0048 GETMBR R6 R0 K27 + 0x04180406, // 0049 SUB R6 R2 R6 + 0x101C0C04, // 004A MOD R7 R6 R4 + 0x88200107, // 004B GETMBR R8 R0 K7 + 0x04241116, // 004C SUB R9 R8 K22 + 0x2428130D, // 004D GT R10 R9 K13 + 0x782A0006, // 004E JMPF R10 #0056 + 0x88280104, // 004F GETMBR R10 R0 K4 + 0x94281409, // 0050 GETIDX R10 R10 R9 + 0x28280E0A, // 0051 GE R10 R7 R10 + 0x782A0000, // 0052 JMPF R10 #0054 + 0x70020001, // 0053 JMP #0056 + 0x0424130E, // 0054 SUB R9 R9 K14 + 0x7001FFF6, // 0055 JMP #004D + 0x8C28070C, // 0056 GETMET R10 R3 K12 + 0x54320003, // 0057 LDINT R12 4 + 0x0830120C, // 0058 MUL R12 R9 R12 + 0x54360003, // 0059 LDINT R13 4 + 0x7C280600, // 005A CALL R10 3 + 0x8C2C070C, // 005B GETMET R11 R3 K12 + 0x0034130E, // 005C ADD R13 R9 K14 + 0x543A0003, // 005D LDINT R14 4 + 0x08341A0E, // 005E MUL R13 R13 R14 + 0x543A0003, // 005F LDINT R14 4 + 0x7C2C0600, // 0060 CALL R11 3 + 0x88300104, // 0061 GETMBR R12 R0 K4 + 0x94301809, // 0062 GETIDX R12 R12 R9 + 0x0034130E, // 0063 ADD R13 R9 K14 + 0x88380104, // 0064 GETMBR R14 R0 K4 + 0x94341C0D, // 0065 GETIDX R13 R14 R13 + 0xB83A1E00, // 0066 GETNGBL R14 K15 + 0x8C381D17, // 0067 GETMET R14 R14 K23 + 0x5C400E00, // 0068 MOVE R16 R7 + 0x5C441800, // 0069 MOVE R17 R12 + 0x5C481A00, // 006A MOVE R18 R13 + 0x544E0007, // 006B LDINT R19 8 + 0x3C4C1413, // 006C SHR R19 R10 R19 + 0x545200FE, // 006D LDINT R20 255 + 0x2C4C2614, // 006E AND R19 R19 R20 + 0x54520007, // 006F LDINT R20 8 + 0x3C501614, // 0070 SHR R20 R11 R20 + 0x545600FE, // 0071 LDINT R21 255 + 0x2C502815, // 0072 AND R20 R20 R21 + 0x7C380C00, // 0073 CALL R14 6 + 0xB83E1E00, // 0074 GETNGBL R15 K15 + 0x8C3C1F17, // 0075 GETMET R15 R15 K23 + 0x5C440E00, // 0076 MOVE R17 R7 + 0x5C481800, // 0077 MOVE R18 R12 + 0x5C4C1A00, // 0078 MOVE R19 R13 + 0x5452000F, // 0079 LDINT R20 16 + 0x3C501414, // 007A SHR R20 R10 R20 + 0x545600FE, // 007B LDINT R21 255 + 0x2C502815, // 007C AND R20 R20 R21 + 0x5456000F, // 007D LDINT R21 16 + 0x3C541615, // 007E SHR R21 R11 R21 + 0x545A00FE, // 007F LDINT R22 255 + 0x2C542A16, // 0080 AND R21 R21 R22 + 0x7C3C0C00, // 0081 CALL R15 6 + 0xB8421E00, // 0082 GETNGBL R16 K15 + 0x8C402117, // 0083 GETMET R16 R16 K23 + 0x5C480E00, // 0084 MOVE R18 R7 + 0x5C4C1800, // 0085 MOVE R19 R12 + 0x5C501A00, // 0086 MOVE R20 R13 + 0x54560017, // 0087 LDINT R21 24 + 0x3C541415, // 0088 SHR R21 R10 R21 + 0x545A00FE, // 0089 LDINT R22 255 + 0x2C542A16, // 008A AND R21 R21 R22 + 0x545A0017, // 008B LDINT R22 24 + 0x3C581616, // 008C SHR R22 R11 R22 + 0x545E00FE, // 008D LDINT R23 255 + 0x2C582C17, // 008E AND R22 R22 R23 + 0x7C400C00, // 008F CALL R16 6 + 0x8844011F, // 0090 GETMBR R17 R0 K31 + 0x8C482328, // 0091 GETMET R18 R17 K40 + 0x54520007, // 0092 LDINT R20 8 + 0x3C501414, // 0093 SHR R20 R10 R20 + 0x545600FE, // 0094 LDINT R21 255 + 0x2C502815, // 0095 AND R20 R20 R21 + 0x5456000F, // 0096 LDINT R21 16 + 0x3C541415, // 0097 SHR R21 R10 R21 + 0x545A00FE, // 0098 LDINT R22 255 + 0x2C542A16, // 0099 AND R21 R21 R22 + 0x545A0017, // 009A LDINT R22 24 + 0x3C581416, // 009B SHR R22 R10 R22 + 0x545E00FE, // 009C LDINT R23 255 + 0x2C582C17, // 009D AND R22 R22 R23 + 0x7C480800, // 009E CALL R18 4 + 0x88482329, // 009F GETMBR R18 R17 K41 + 0x8C4C2328, // 00A0 GETMET R19 R17 K40 + 0x54560007, // 00A1 LDINT R21 8 + 0x3C541615, // 00A2 SHR R21 R11 R21 + 0x545A00FE, // 00A3 LDINT R22 255 + 0x2C542A16, // 00A4 AND R21 R21 R22 + 0x545A000F, // 00A5 LDINT R22 16 + 0x3C581616, // 00A6 SHR R22 R11 R22 + 0x545E00FE, // 00A7 LDINT R23 255 + 0x2C582C17, // 00A8 AND R22 R22 R23 + 0x545E0017, // 00A9 LDINT R23 24 + 0x3C5C1617, // 00AA SHR R23 R11 R23 + 0x546200FE, // 00AB LDINT R24 255 + 0x2C5C2E18, // 00AC AND R23 R23 R24 + 0x7C4C0800, // 00AD CALL R19 4 + 0x884C2329, // 00AE GETMBR R19 R17 K41 + 0xB8521E00, // 00AF GETNGBL R20 K15 + 0x8C502917, // 00B0 GETMET R20 R20 K23 + 0x5C580E00, // 00B1 MOVE R22 R7 + 0x5C5C1800, // 00B2 MOVE R23 R12 + 0x5C601A00, // 00B3 MOVE R24 R13 + 0x5C642400, // 00B4 MOVE R25 R18 + 0x5C682600, // 00B5 MOVE R26 R19 + 0x7C500C00, // 00B6 CALL R20 6 + 0x8C542328, // 00B7 GETMET R21 R17 K40 + 0x5C5C1C00, // 00B8 MOVE R23 R14 + 0x5C601E00, // 00B9 MOVE R24 R15 + 0x5C642000, // 00BA MOVE R25 R16 + 0x7C540800, // 00BB CALL R21 4 + 0x8C54232A, // 00BC GETMET R21 R17 K42 + 0x5C5C2800, // 00BD MOVE R23 R20 + 0x7C540400, // 00BE CALL R21 2 + 0x8838232B, // 00BF GETMBR R14 R17 K43 + 0x883C232C, // 00C0 GETMBR R15 R17 K44 + 0x8840232D, // 00C1 GETMBR R16 R17 K45 + 0x545600FE, // 00C2 LDINT R21 255 + 0x20540A15, // 00C3 NE R21 R5 R21 + 0x7856001A, // 00C4 JMPF R21 #00E0 + 0xB8561E00, // 00C5 GETNGBL R21 K15 + 0x8C542B17, // 00C6 GETMET R21 R21 K23 + 0x5C5C1C00, // 00C7 MOVE R23 R14 + 0x5860000D, // 00C8 LDCONST R24 K13 + 0x546600FE, // 00C9 LDINT R25 255 + 0x5868000D, // 00CA LDCONST R26 K13 + 0x5C6C0A00, // 00CB MOVE R27 R5 + 0x7C540C00, // 00CC CALL R21 6 + 0x5C382A00, // 00CD MOVE R14 R21 + 0xB8561E00, // 00CE GETNGBL R21 K15 + 0x8C542B17, // 00CF GETMET R21 R21 K23 + 0x5C5C1E00, // 00D0 MOVE R23 R15 + 0x5860000D, // 00D1 LDCONST R24 K13 + 0x546600FE, // 00D2 LDINT R25 255 + 0x5868000D, // 00D3 LDCONST R26 K13 + 0x5C6C0A00, // 00D4 MOVE R27 R5 + 0x7C540C00, // 00D5 CALL R21 6 + 0x5C3C2A00, // 00D6 MOVE R15 R21 + 0xB8561E00, // 00D7 GETNGBL R21 K15 + 0x8C542B17, // 00D8 GETMET R21 R21 K23 + 0x5C5C2000, // 00D9 MOVE R23 R16 + 0x5860000D, // 00DA LDCONST R24 K13 + 0x546600FE, // 00DB LDINT R25 255 + 0x5868000D, // 00DC LDCONST R26 K13 + 0x5C6C0A00, // 00DD MOVE R27 R5 + 0x7C540C00, // 00DE CALL R21 6 + 0x5C402A00, // 00DF MOVE R16 R21 + 0x545600FE, // 00E0 LDINT R21 255 + 0x545A0017, // 00E1 LDINT R22 24 + 0x38542A16, // 00E2 SHL R21 R21 R22 + 0x545A000F, // 00E3 LDINT R22 16 + 0x38581C16, // 00E4 SHL R22 R14 R22 + 0x30542A16, // 00E5 OR R21 R21 R22 + 0x545A0007, // 00E6 LDINT R22 8 + 0x38581E16, // 00E7 SHL R22 R15 R22 + 0x30542A16, // 00E8 OR R21 R21 R22 + 0x30542A10, // 00E9 OR R21 R21 R16 + 0x90023015, // 00EA SETMBR R0 K24 R21 + 0x80042A00, // 00EB RET 1 R21 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: RichPaletteColorProvider +********************************************************************/ +extern const bclass be_class_ColorProvider; +be_local_class(RichPaletteColorProvider, + 5, + &be_class_ColorProvider, + be_nested_map(19, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(light_state, -1), be_const_var(3) }, + { be_const_key_weak(_parse_palette, -1), be_const_closure(class_RichPaletteColorProvider__parse_palette_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_RichPaletteColorProvider_tostring_closure) }, + { be_const_key_weak(PARAMS, 15), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(range_min, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(transition_type, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(enum, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(2, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(1), + be_const_int(5), + })) ) } )) }, + { be_const_key_weak(default, -1), be_const_int(5) }, + })) ) } )) }, + { be_const_key_weak(palette, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(bytes) }, + })) ) } )) }, + { be_const_key_weak(cycle_period, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(5000) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(255) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(range_max, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(100) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(slots_arr, 1), be_const_var(0) }, + { be_const_key_weak(_get_palette_bytes, -1), be_const_closure(class_RichPaletteColorProvider__get_palette_bytes_closure) }, + { be_const_key_weak(get_color_for_value, 9), be_const_closure(class_RichPaletteColorProvider_get_color_for_value_closure) }, + { be_const_key_weak(_DEFAULT_PALETTE, -1), be_const_bytes_instance(00FF000024FFA50049FFFF006E00FF00920000FFB74B0082DBEE82EEFFFF0000) }, + { be_const_key_weak(_recompute_palette, -1), be_const_closure(class_RichPaletteColorProvider__recompute_palette_closure) }, + { be_const_key_weak(current_color, -1), be_const_var(2) }, + { be_const_key_weak(_get_color_at_index, -1), be_const_closure(class_RichPaletteColorProvider__get_color_at_index_closure) }, + { be_const_key_weak(to_css_gradient, -1), be_const_closure(class_RichPaletteColorProvider_to_css_gradient_closure) }, + { be_const_key_weak(slots, -1), be_const_var(1) }, + { be_const_key_weak(init, 12), be_const_closure(class_RichPaletteColorProvider_init_closure) }, + { be_const_key_weak(cycle_start, 10), be_const_var(4) }, + { be_const_key_weak(start, -1), be_const_closure(class_RichPaletteColorProvider_start_closure) }, + { be_const_key_weak(set_range, 5), be_const_closure(class_RichPaletteColorProvider_set_range_closure) }, + { be_const_key_weak(produce_value, -1), be_const_closure(class_RichPaletteColorProvider_produce_value_closure) }, + { be_const_key_weak(on_param_changed, 0), be_const_closure(class_RichPaletteColorProvider_on_param_changed_closure) }, + })), + be_str_weak(RichPaletteColorProvider) +); + /******************************************************************** ** Solidified function: scale_oscillate ********************************************************************/ @@ -4451,11 +6304,11 @@ be_local_closure(scale_oscillate, /* name */ /******************************************************************** -** Solidified function: scale_grow +** Solidified function: wave_rainbow_sine ********************************************************************/ -be_local_closure(scale_grow, /* name */ +be_local_closure(wave_rainbow_sine, /* name */ be_nested_proto( - 4, /* nstack */ + 7, /* nstack */ 1, /* argc */ 0, /* varg */ 0, /* has upvals */ @@ -4463,24 +6316,87 @@ be_local_closure(scale_grow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ + ( &(const bvalue[15]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(scale_animation), - /* K2 */ be_nested_str_weak(scale_mode), - /* K3 */ be_const_int(2), - /* K4 */ be_nested_str_weak(scale_speed), + /* K1 */ be_nested_str_weak(wave_animation), + /* K2 */ be_nested_str_weak(rich_palette), + /* K3 */ be_nested_str_weak(palette), + /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), + /* K5 */ be_nested_str_weak(cycle_period), + /* K6 */ be_nested_str_weak(transition_type), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(brightness), + /* K9 */ be_nested_str_weak(set_range), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(color), + /* K12 */ be_nested_str_weak(wave_type), + /* K13 */ be_nested_str_weak(frequency), + /* K14 */ be_nested_str_weak(wave_speed), }), - be_str_weak(scale_grow), + be_str_weak(wave_rainbow_sine), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ + ( &(const binstruction[27]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A007F, // 0005 LDINT R2 128 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x80040200, // 0007 RET 1 R1 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x8C080502, // 0005 GETMET R2 R2 K2 + 0x5C100000, // 0006 MOVE R4 R0 + 0x7C080400, // 0007 CALL R2 2 + 0xB80E0000, // 0008 GETNGBL R3 K0 + 0x880C0704, // 0009 GETMBR R3 R3 K4 + 0x900A0603, // 000A SETMBR R2 K3 R3 + 0x540E1387, // 000B LDINT R3 5000 + 0x900A0A03, // 000C SETMBR R2 K5 R3 + 0x900A0D07, // 000D SETMBR R2 K6 K7 + 0x540E00FE, // 000E LDINT R3 255 + 0x900A1003, // 000F SETMBR R2 K8 R3 + 0x8C0C0509, // 0010 GETMET R3 R2 K9 + 0x5814000A, // 0011 LDCONST R5 K10 + 0x541A00FE, // 0012 LDINT R6 255 + 0x7C0C0600, // 0013 CALL R3 3 + 0x90061602, // 0014 SETMBR R1 K11 R2 + 0x9006190A, // 0015 SETMBR R1 K12 K10 + 0x540E001F, // 0016 LDINT R3 32 + 0x90061A03, // 0017 SETMBR R1 K13 R3 + 0x540E0031, // 0018 LDINT R3 50 + 0x90061C03, // 0019 SETMBR R1 K14 R3 + 0x80040200, // 001A RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: trigger_event +********************************************************************/ +be_local_closure(trigger_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(event_manager), + /* K2 */ be_nested_str_weak(trigger_event), + }), + be_str_weak(trigger_event), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x88080501, // 0001 GETMBR R2 R2 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x5C100000, // 0003 MOVE R4 R0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x7C080600, // 0005 CALL R2 3 + 0x80000000, // 0006 RET 0 }) ) ); @@ -5272,1325 +7188,6 @@ be_local_class(ScaleAnimation, })), be_str_weak(ScaleAnimation) ); -// compact class 'RichPaletteColorProvider' ktab size: 47, total: 109 (saved 496 bytes) -static const bvalue be_ktab_class_RichPaletteColorProvider[47] = { - /* K0 */ be_nested_str_weak(RichPaletteColorProvider_X28slots_X3D_X25s_X2C_X20cycle_period_X3D_X25s_X29), - /* K1 */ be_nested_str_weak(slots), - /* K2 */ be_nested_str_weak(cycle_period), - /* K3 */ be_nested_str_weak(RichPaletteColorProvider_X28uninitialized_X29), - /* K4 */ be_nested_str_weak(_get_palette_bytes), - /* K5 */ be_nested_str_weak(resize), - /* K6 */ be_nested_str_weak(get), - /* K7 */ be_const_int(0), - /* K8 */ be_const_int(1), - /* K9 */ be_nested_str_weak(tasmota), - /* K10 */ be_nested_str_weak(scale_int), - /* K11 */ be_nested_str_weak(palette), - /* K12 */ be_nested_str_weak(_recompute_palette), - /* K13 */ be_nested_str_weak(value_error), - /* K14 */ be_nested_str_weak(cycle_period_X20must_X20be_X20non_X2Dnegative), - /* K15 */ be_nested_str_weak(slots_arr), - /* K16 */ be_nested_str_weak(_parse_palette), - /* K17 */ be_nested_str_weak(range_min), - /* K18 */ be_nested_str_weak(range_max), - /* K19 */ be_nested_str_weak(range_min_X20must_X20be_X20lower_X20than_X20range_max), - /* K20 */ be_nested_str_weak(brightness), - /* K21 */ be_const_int(2), - /* K22 */ be_nested_str_weak(scale_uint), - /* K23 */ be_nested_str_weak(init), - /* K24 */ be_nested_str_weak(current_color), - /* K25 */ be_nested_str_weak(cycle_start), - /* K26 */ be_nested_str_weak(engine), - /* K27 */ be_nested_str_weak(time_ms), - /* K28 */ be_nested_str_weak(global), - /* K29 */ be_nested_str_weak(light_state), - /* K30 */ be_nested_str_weak(RGB), - /* K31 */ be_nested_str_weak(_get_color_at_index), - /* K32 */ be_nested_str_weak(min_X20must_X20be_X20lower_X20than_X20max), - /* K33 */ be_nested_str_weak(background_X3Alinear_X2Dgradient_X28to_X20right_X2C_X20_X23000000_X29_X3B), - /* K34 */ be_nested_str_weak(background_X3Alinear_X2Dgradient_X28to_X20right), - /* K35 */ be_nested_str_weak(_X2C_X23_X2502X_X2502X_X2502X_X20_X25_X2E1f_X25_X25), - /* K36 */ be_const_real_hex(0x41200000), - /* K37 */ be_nested_str_weak(_X29_X3B), - /* K38 */ be_nested_str_weak(ptr), - /* K39 */ be_nested_str_weak(00FF000024FFA50049FFFF006E00FF00920000FFB74B0082DBEE82EEFFFF0000), - /* K40 */ be_nested_str_weak(_ptr_to_palette), - /* K41 */ be_nested_str_weak(set_rgb), - /* K42 */ be_nested_str_weak(bri), - /* K43 */ be_nested_str_weak(set_bri), - /* K44 */ be_nested_str_weak(r), - /* K45 */ be_nested_str_weak(g), - /* K46 */ be_nested_str_weak(b), -}; - - -extern const bclass be_class_RichPaletteColorProvider; - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_tostring, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xA8020008, // 0000 EXBLK 0 #000A - 0x60040018, // 0001 GETGBL R1 G24 - 0x58080000, // 0002 LDCONST R2 K0 - 0x880C0101, // 0003 GETMBR R3 R0 K1 - 0x88100102, // 0004 GETMBR R4 R0 K2 - 0x7C040600, // 0005 CALL R1 3 - 0xA8040001, // 0006 EXBLK 1 1 - 0x80040200, // 0007 RET 1 R1 - 0xA8040001, // 0008 EXBLK 1 1 - 0x70020004, // 0009 JMP #000F - 0xAC040000, // 000A CATCH R1 0 0 - 0x70020001, // 000B JMP #000E - 0x80060600, // 000C RET 1 K3 - 0x70020000, // 000D JMP #000F - 0xB0080000, // 000E RAISE 2 R0 R0 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _parse_palette -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider__parse_palette, /* name */ - be_nested_proto( - 16, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(_parse_palette), - &be_const_str_solidified, - ( &(const binstruction[69]) { /* code */ - 0x8C0C0104, // 0000 GETMET R3 R0 K4 - 0x7C0C0200, // 0001 CALL R3 1 - 0x60100012, // 0002 GETGBL R4 G18 - 0x7C100000, // 0003 CALL R4 0 - 0x88140101, // 0004 GETMBR R5 R0 K1 - 0x8C180905, // 0005 GETMET R6 R4 K5 - 0x5C200A00, // 0006 MOVE R8 R5 - 0x7C180400, // 0007 CALL R6 2 - 0x8C180706, // 0008 GETMET R6 R3 K6 - 0x58200007, // 0009 LDCONST R8 K7 - 0x58240008, // 000A LDCONST R9 K8 - 0x7C180600, // 000B CALL R6 3 - 0x20180D07, // 000C NE R6 R6 K7 - 0x781A0022, // 000D JMPF R6 #0031 - 0x58180007, // 000E LDCONST R6 K7 - 0x581C0007, // 000F LDCONST R7 K7 - 0x04200B08, // 0010 SUB R8 R5 K8 - 0x14200E08, // 0011 LT R8 R7 R8 - 0x78220007, // 0012 JMPF R8 #001B - 0x8C200706, // 0013 GETMET R8 R3 K6 - 0x542A0003, // 0014 LDINT R10 4 - 0x08280E0A, // 0015 MUL R10 R7 R10 - 0x582C0008, // 0016 LDCONST R11 K8 - 0x7C200600, // 0017 CALL R8 3 - 0x00180C08, // 0018 ADD R6 R6 R8 - 0x001C0F08, // 0019 ADD R7 R7 K8 - 0x7001FFF4, // 001A JMP #0010 - 0x58200007, // 001B LDCONST R8 K7 - 0x581C0007, // 001C LDCONST R7 K7 - 0x14240E05, // 001D LT R9 R7 R5 - 0x78260010, // 001E JMPF R9 #0030 - 0xB8261200, // 001F GETNGBL R9 K9 - 0x8C24130A, // 0020 GETMET R9 R9 K10 - 0x5C2C1000, // 0021 MOVE R11 R8 - 0x58300007, // 0022 LDCONST R12 K7 - 0x5C340C00, // 0023 MOVE R13 R6 - 0x5C380200, // 0024 MOVE R14 R1 - 0x5C3C0400, // 0025 MOVE R15 R2 - 0x7C240C00, // 0026 CALL R9 6 - 0x98100E09, // 0027 SETIDX R4 R7 R9 - 0x8C240706, // 0028 GETMET R9 R3 K6 - 0x542E0003, // 0029 LDINT R11 4 - 0x082C0E0B, // 002A MUL R11 R7 R11 - 0x58300008, // 002B LDCONST R12 K8 - 0x7C240600, // 002C CALL R9 3 - 0x00201009, // 002D ADD R8 R8 R9 - 0x001C0F08, // 002E ADD R7 R7 K8 - 0x7001FFEC, // 002F JMP #001D - 0x70020012, // 0030 JMP #0044 - 0x58180007, // 0031 LDCONST R6 K7 - 0x141C0C05, // 0032 LT R7 R6 R5 - 0x781E000F, // 0033 JMPF R7 #0044 - 0x8C1C0706, // 0034 GETMET R7 R3 K6 - 0x54260003, // 0035 LDINT R9 4 - 0x08240C09, // 0036 MUL R9 R6 R9 - 0x58280008, // 0037 LDCONST R10 K8 - 0x7C1C0600, // 0038 CALL R7 3 - 0xB8221200, // 0039 GETNGBL R8 K9 - 0x8C20110A, // 003A GETMET R8 R8 K10 - 0x5C280E00, // 003B MOVE R10 R7 - 0x582C0007, // 003C LDCONST R11 K7 - 0x543200FE, // 003D LDINT R12 255 - 0x5C340200, // 003E MOVE R13 R1 - 0x5C380400, // 003F MOVE R14 R2 - 0x7C200C00, // 0040 CALL R8 6 - 0x98100C08, // 0041 SETIDX R4 R6 R8 - 0x00180D08, // 0042 ADD R6 R6 K8 - 0x7001FFED, // 0043 JMP #0032 - 0x80040800, // 0044 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_on_param_changed, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x1C0C030B, // 0000 EQ R3 R1 K11 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x8C0C010C, // 0002 GETMET R3 R0 K12 - 0x7C0C0200, // 0003 CALL R3 1 - 0x7002002E, // 0004 JMP #0034 - 0x1C0C0302, // 0005 EQ R3 R1 K2 - 0x780E0013, // 0006 JMPF R3 #001B - 0x4C0C0000, // 0007 LDNIL R3 - 0x1C0C0403, // 0008 EQ R3 R2 R3 - 0x780E0000, // 0009 JMPF R3 #000B - 0x80000600, // 000A RET 0 - 0x140C0507, // 000B LT R3 R2 K7 - 0x780E0000, // 000C JMPF R3 #000E - 0xB0061B0E, // 000D RAISE 1 K13 K14 - 0x240C0507, // 000E GT R3 R2 K7 - 0x780E0009, // 000F JMPF R3 #001A - 0x8C0C0104, // 0010 GETMET R3 R0 K4 - 0x7C0C0200, // 0011 CALL R3 1 - 0x4C100000, // 0012 LDNIL R4 - 0x200C0604, // 0013 NE R3 R3 R4 - 0x780E0004, // 0014 JMPF R3 #001A - 0x8C0C0110, // 0015 GETMET R3 R0 K16 - 0x58140007, // 0016 LDCONST R5 K7 - 0x04180508, // 0017 SUB R6 R2 K8 - 0x7C0C0600, // 0018 CALL R3 3 - 0x90021E03, // 0019 SETMBR R0 K15 R3 - 0x70020018, // 001A JMP #0034 - 0x1C0C0311, // 001B EQ R3 R1 K17 - 0x740E0001, // 001C JMPT R3 #001F - 0x1C0C0312, // 001D EQ R3 R1 K18 - 0x780E0014, // 001E JMPF R3 #0034 - 0x880C0111, // 001F GETMBR R3 R0 K17 - 0x88100112, // 0020 GETMBR R4 R0 K18 - 0x4C140000, // 0021 LDNIL R5 - 0x20140605, // 0022 NE R5 R3 R5 - 0x7816000F, // 0023 JMPF R5 #0034 - 0x4C140000, // 0024 LDNIL R5 - 0x20140805, // 0025 NE R5 R4 R5 - 0x7816000C, // 0026 JMPF R5 #0034 - 0x28140604, // 0027 GE R5 R3 R4 - 0x78160000, // 0028 JMPF R5 #002A - 0xB0061B13, // 0029 RAISE 1 K13 K19 - 0x8C140104, // 002A GETMET R5 R0 K4 - 0x7C140200, // 002B CALL R5 1 - 0x4C180000, // 002C LDNIL R6 - 0x20140A06, // 002D NE R5 R5 R6 - 0x78160004, // 002E JMPF R5 #0034 - 0x8C140110, // 002F GETMET R5 R0 K16 - 0x5C1C0600, // 0030 MOVE R7 R3 - 0x5C200800, // 0031 MOVE R8 R4 - 0x7C140600, // 0032 CALL R5 3 - 0x90021E05, // 0033 SETMBR R0 K15 R5 - 0x80000000, // 0034 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_color_for_value -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_get_color_for_value, /* name */ - be_nested_proto( - 23, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(get_color_for_value), - &be_const_str_solidified, - ( &(const binstruction[123]) { /* code */ - 0x8C0C0104, // 0000 GETMET R3 R0 K4 - 0x7C0C0200, // 0001 CALL R3 1 - 0x88100111, // 0002 GETMBR R4 R0 K17 - 0x88140112, // 0003 GETMBR R5 R0 K18 - 0x88180114, // 0004 GETMBR R6 R0 K20 - 0x4C1C0000, // 0005 LDNIL R7 - 0x1C1C0807, // 0006 EQ R7 R4 R7 - 0x741E0002, // 0007 JMPT R7 #000B - 0x4C1C0000, // 0008 LDNIL R7 - 0x1C1C0A07, // 0009 EQ R7 R5 R7 - 0x781E0001, // 000A JMPF R7 #000D - 0x4C1C0000, // 000B LDNIL R7 - 0x80040E00, // 000C RET 1 R7 - 0x881C0101, // 000D GETMBR R7 R0 K1 - 0x04200F15, // 000E SUB R8 R7 K21 - 0x24241107, // 000F GT R9 R8 K7 - 0x78260006, // 0010 JMPF R9 #0018 - 0x8824010F, // 0011 GETMBR R9 R0 K15 - 0x94241208, // 0012 GETIDX R9 R9 R8 - 0x28240209, // 0013 GE R9 R1 R9 - 0x78260000, // 0014 JMPF R9 #0016 - 0x70020001, // 0015 JMP #0018 - 0x04201108, // 0016 SUB R8 R8 K8 - 0x7001FFF6, // 0017 JMP #000F - 0x8C240706, // 0018 GETMET R9 R3 K6 - 0x542E0003, // 0019 LDINT R11 4 - 0x082C100B, // 001A MUL R11 R8 R11 - 0x54320003, // 001B LDINT R12 4 - 0x7C240600, // 001C CALL R9 3 - 0x8C280706, // 001D GETMET R10 R3 K6 - 0x00301108, // 001E ADD R12 R8 K8 - 0x54360003, // 001F LDINT R13 4 - 0x0830180D, // 0020 MUL R12 R12 R13 - 0x54360003, // 0021 LDINT R13 4 - 0x7C280600, // 0022 CALL R10 3 - 0x882C010F, // 0023 GETMBR R11 R0 K15 - 0x942C1608, // 0024 GETIDX R11 R11 R8 - 0x00301108, // 0025 ADD R12 R8 K8 - 0x8834010F, // 0026 GETMBR R13 R0 K15 - 0x94301A0C, // 0027 GETIDX R12 R13 R12 - 0xB8361200, // 0028 GETNGBL R13 K9 - 0x8C341B16, // 0029 GETMET R13 R13 K22 - 0x5C3C0200, // 002A MOVE R15 R1 - 0x5C401600, // 002B MOVE R16 R11 - 0x5C441800, // 002C MOVE R17 R12 - 0x544A0007, // 002D LDINT R18 8 - 0x3C481212, // 002E SHR R18 R9 R18 - 0x544E00FE, // 002F LDINT R19 255 - 0x2C482413, // 0030 AND R18 R18 R19 - 0x544E0007, // 0031 LDINT R19 8 - 0x3C4C1413, // 0032 SHR R19 R10 R19 - 0x545200FE, // 0033 LDINT R20 255 - 0x2C4C2614, // 0034 AND R19 R19 R20 - 0x7C340C00, // 0035 CALL R13 6 - 0xB83A1200, // 0036 GETNGBL R14 K9 - 0x8C381D16, // 0037 GETMET R14 R14 K22 - 0x5C400200, // 0038 MOVE R16 R1 - 0x5C441600, // 0039 MOVE R17 R11 - 0x5C481800, // 003A MOVE R18 R12 - 0x544E000F, // 003B LDINT R19 16 - 0x3C4C1213, // 003C SHR R19 R9 R19 - 0x545200FE, // 003D LDINT R20 255 - 0x2C4C2614, // 003E AND R19 R19 R20 - 0x5452000F, // 003F LDINT R20 16 - 0x3C501414, // 0040 SHR R20 R10 R20 - 0x545600FE, // 0041 LDINT R21 255 - 0x2C502815, // 0042 AND R20 R20 R21 - 0x7C380C00, // 0043 CALL R14 6 - 0xB83E1200, // 0044 GETNGBL R15 K9 - 0x8C3C1F16, // 0045 GETMET R15 R15 K22 - 0x5C440200, // 0046 MOVE R17 R1 - 0x5C481600, // 0047 MOVE R18 R11 - 0x5C4C1800, // 0048 MOVE R19 R12 - 0x54520017, // 0049 LDINT R20 24 - 0x3C501214, // 004A SHR R20 R9 R20 - 0x545600FE, // 004B LDINT R21 255 - 0x2C502815, // 004C AND R20 R20 R21 - 0x54560017, // 004D LDINT R21 24 - 0x3C541415, // 004E SHR R21 R10 R21 - 0x545A00FE, // 004F LDINT R22 255 - 0x2C542A16, // 0050 AND R21 R21 R22 - 0x7C3C0C00, // 0051 CALL R15 6 - 0x544200FE, // 0052 LDINT R16 255 - 0x20400C10, // 0053 NE R16 R6 R16 - 0x7842001A, // 0054 JMPF R16 #0070 - 0xB8421200, // 0055 GETNGBL R16 K9 - 0x8C402116, // 0056 GETMET R16 R16 K22 - 0x5C481A00, // 0057 MOVE R18 R13 - 0x584C0007, // 0058 LDCONST R19 K7 - 0x545200FE, // 0059 LDINT R20 255 - 0x58540007, // 005A LDCONST R21 K7 - 0x5C580C00, // 005B MOVE R22 R6 - 0x7C400C00, // 005C CALL R16 6 - 0x5C342000, // 005D MOVE R13 R16 - 0xB8421200, // 005E GETNGBL R16 K9 - 0x8C402116, // 005F GETMET R16 R16 K22 - 0x5C481C00, // 0060 MOVE R18 R14 - 0x584C0007, // 0061 LDCONST R19 K7 - 0x545200FE, // 0062 LDINT R20 255 - 0x58540007, // 0063 LDCONST R21 K7 - 0x5C580C00, // 0064 MOVE R22 R6 - 0x7C400C00, // 0065 CALL R16 6 - 0x5C382000, // 0066 MOVE R14 R16 - 0xB8421200, // 0067 GETNGBL R16 K9 - 0x8C402116, // 0068 GETMET R16 R16 K22 - 0x5C481E00, // 0069 MOVE R18 R15 - 0x584C0007, // 006A LDCONST R19 K7 - 0x545200FE, // 006B LDINT R20 255 - 0x58540007, // 006C LDCONST R21 K7 - 0x5C580C00, // 006D MOVE R22 R6 - 0x7C400C00, // 006E CALL R16 6 - 0x5C3C2000, // 006F MOVE R15 R16 - 0x544200FE, // 0070 LDINT R16 255 - 0x54460017, // 0071 LDINT R17 24 - 0x38402011, // 0072 SHL R16 R16 R17 - 0x5446000F, // 0073 LDINT R17 16 - 0x38441A11, // 0074 SHL R17 R13 R17 - 0x30402011, // 0075 OR R16 R16 R17 - 0x54460007, // 0076 LDINT R17 8 - 0x38441C11, // 0077 SHL R17 R14 R17 - 0x30402011, // 0078 OR R16 R16 R17 - 0x3040200F, // 0079 OR R16 R16 R15 - 0x80042000, // 007A RET 1 R16 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_init, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080517, // 0003 GETMET R2 R2 K23 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x5409FFFE, // 0006 LDINT R2 -1 - 0x90023002, // 0007 SETMBR R0 K24 R2 - 0x8808011A, // 0008 GETMBR R2 R0 K26 - 0x8808051B, // 0009 GETMBR R2 R2 K27 - 0x90023202, // 000A SETMBR R0 K25 R2 - 0x4C080000, // 000B LDNIL R2 - 0x90021E02, // 000C SETMBR R0 K15 R2 - 0x90020307, // 000D SETMBR R0 K1 K7 - 0xA40A3800, // 000E IMPORT R2 K28 - 0x8C0C051D, // 000F GETMET R3 R2 K29 - 0x8814051D, // 0010 GETMBR R5 R2 K29 - 0x88140B1E, // 0011 GETMBR R5 R5 K30 - 0x7C0C0400, // 0012 CALL R3 2 - 0x90023A03, // 0013 SETMBR R0 K29 R3 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _recompute_palette -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider__recompute_palette, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(_recompute_palette), - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0x8C040104, // 0000 GETMET R1 R0 K4 - 0x7C040200, // 0001 CALL R1 1 - 0x6008000C, // 0002 GETGBL R2 G12 - 0x5C0C0200, // 0003 MOVE R3 R1 - 0x7C080200, // 0004 CALL R2 1 - 0x540E0003, // 0005 LDINT R3 4 - 0x0C080403, // 0006 DIV R2 R2 R3 - 0x90020202, // 0007 SETMBR R0 K1 R2 - 0x88080102, // 0008 GETMBR R2 R0 K2 - 0x880C0111, // 0009 GETMBR R3 R0 K17 - 0x88100112, // 000A GETMBR R4 R0 K18 - 0x4C140000, // 000B LDNIL R5 - 0x20140405, // 000C NE R5 R2 R5 - 0x78160007, // 000D JMPF R5 #0016 - 0x24140507, // 000E GT R5 R2 K7 - 0x78160005, // 000F JMPF R5 #0016 - 0x8C140110, // 0010 GETMET R5 R0 K16 - 0x581C0007, // 0011 LDCONST R7 K7 - 0x04200508, // 0012 SUB R8 R2 K8 - 0x7C140600, // 0013 CALL R5 3 - 0x90021E05, // 0014 SETMBR R0 K15 R5 - 0x7002000A, // 0015 JMP #0021 - 0x4C140000, // 0016 LDNIL R5 - 0x20140605, // 0017 NE R5 R3 R5 - 0x78160007, // 0018 JMPF R5 #0021 - 0x4C140000, // 0019 LDNIL R5 - 0x20140805, // 001A NE R5 R4 R5 - 0x78160004, // 001B JMPF R5 #0021 - 0x8C140110, // 001C GETMET R5 R0 K16 - 0x5C1C0600, // 001D MOVE R7 R3 - 0x5C200800, // 001E MOVE R8 R4 - 0x7C140600, // 001F CALL R5 3 - 0x90021E05, // 0020 SETMBR R0 K15 R5 - 0x88140101, // 0021 GETMBR R5 R0 K1 - 0x24140B07, // 0022 GT R5 R5 K7 - 0x78160003, // 0023 JMPF R5 #0028 - 0x8C14011F, // 0024 GETMET R5 R0 K31 - 0x581C0007, // 0025 LDCONST R7 K7 - 0x7C140400, // 0026 CALL R5 2 - 0x90023005, // 0027 SETMBR R0 K24 R5 - 0x80040000, // 0028 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_range -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_set_range, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(set_range), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x280C0202, // 0000 GE R3 R1 R2 - 0x780E0000, // 0001 JMPF R3 #0003 - 0xB0061B20, // 0002 RAISE 1 K13 K32 - 0x90022201, // 0003 SETMBR R0 K17 R1 - 0x90022402, // 0004 SETMBR R0 K18 R2 - 0x8C0C0110, // 0005 GETMET R3 R0 K16 - 0x5C140200, // 0006 MOVE R5 R1 - 0x5C180400, // 0007 MOVE R6 R2 - 0x7C0C0600, // 0008 CALL R3 3 - 0x90021E03, // 0009 SETMBR R0 K15 R3 - 0x80040000, // 000A RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: to_css_gradient -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_to_css_gradient, /* name */ - be_nested_proto( - 16, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(to_css_gradient), - &be_const_str_solidified, - ( &(const binstruction[47]) { /* code */ - 0x8C040104, // 0000 GETMET R1 R0 K4 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x1C080202, // 0003 EQ R2 R1 R2 - 0x780A0000, // 0004 JMPF R2 #0006 - 0x80064200, // 0005 RET 1 K33 - 0x8C080110, // 0006 GETMET R2 R0 K16 - 0x58100007, // 0007 LDCONST R4 K7 - 0x541603E7, // 0008 LDINT R5 1000 - 0x7C080600, // 0009 CALL R2 3 - 0x580C0022, // 000A LDCONST R3 K34 - 0x58100007, // 000B LDCONST R4 K7 - 0x6014000C, // 000C GETGBL R5 G12 - 0x5C180400, // 000D MOVE R6 R2 - 0x7C140200, // 000E CALL R5 1 - 0x14140805, // 000F LT R5 R4 R5 - 0x7816001B, // 0010 JMPF R5 #002D - 0x94140404, // 0011 GETIDX R5 R2 R4 - 0x8C180306, // 0012 GETMET R6 R1 K6 - 0x54220003, // 0013 LDINT R8 4 - 0x08200808, // 0014 MUL R8 R4 R8 - 0x54260003, // 0015 LDINT R9 4 - 0x7C180600, // 0016 CALL R6 3 - 0x541E0007, // 0017 LDINT R7 8 - 0x3C1C0C07, // 0018 SHR R7 R6 R7 - 0x542200FE, // 0019 LDINT R8 255 - 0x2C1C0E08, // 001A AND R7 R7 R8 - 0x5422000F, // 001B LDINT R8 16 - 0x3C200C08, // 001C SHR R8 R6 R8 - 0x542600FE, // 001D LDINT R9 255 - 0x2C201009, // 001E AND R8 R8 R9 - 0x54260017, // 001F LDINT R9 24 - 0x3C240C09, // 0020 SHR R9 R6 R9 - 0x542A00FE, // 0021 LDINT R10 255 - 0x2C24120A, // 0022 AND R9 R9 R10 - 0x60280018, // 0023 GETGBL R10 G24 - 0x582C0023, // 0024 LDCONST R11 K35 - 0x5C300E00, // 0025 MOVE R12 R7 - 0x5C341000, // 0026 MOVE R13 R8 - 0x5C381200, // 0027 MOVE R14 R9 - 0x0C3C0B24, // 0028 DIV R15 R5 K36 - 0x7C280A00, // 0029 CALL R10 5 - 0x000C060A, // 002A ADD R3 R3 R10 - 0x00100908, // 002B ADD R4 R4 K8 - 0x7001FFDE, // 002C JMP #000C - 0x000C0725, // 002D ADD R3 R3 K37 - 0x80040600, // 002E RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _ptr_to_palette -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider__ptr_to_palette, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(_ptr_to_palette), - &be_const_str_solidified, - ( &(const binstruction[44]) { /* code */ - 0x60080004, // 0000 GETGBL R2 G4 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x1C080526, // 0003 EQ R2 R2 K38 - 0x780A0025, // 0004 JMPF R2 #002B - 0x60080015, // 0005 GETGBL R2 G21 - 0x5C0C0200, // 0006 MOVE R3 R1 - 0x541207CF, // 0007 LDINT R4 2000 - 0x7C080400, // 0008 CALL R2 2 - 0x580C0008, // 0009 LDCONST R3 K8 - 0x94100507, // 000A GETIDX R4 R2 K7 - 0x20100907, // 000B NE R4 R4 K7 - 0x7812000A, // 000C JMPF R4 #0018 - 0x50100200, // 000D LDBOOL R4 1 0 - 0x78120007, // 000E JMPF R4 #0017 - 0x54120003, // 000F LDINT R4 4 - 0x08100604, // 0010 MUL R4 R3 R4 - 0x94100404, // 0011 GETIDX R4 R2 R4 - 0x1C100907, // 0012 EQ R4 R4 K7 - 0x78120000, // 0013 JMPF R4 #0015 - 0x70020001, // 0014 JMP #0017 - 0x000C0708, // 0015 ADD R3 R3 K8 - 0x7001FFF5, // 0016 JMP #000D - 0x7002000A, // 0017 JMP #0023 - 0x50100200, // 0018 LDBOOL R4 1 0 - 0x78120008, // 0019 JMPF R4 #0023 - 0x54120003, // 001A LDINT R4 4 - 0x08100604, // 001B MUL R4 R3 R4 - 0x94100404, // 001C GETIDX R4 R2 R4 - 0x541600FE, // 001D LDINT R5 255 - 0x1C100805, // 001E EQ R4 R4 R5 - 0x78120000, // 001F JMPF R4 #0021 - 0x70020001, // 0020 JMP #0023 - 0x000C0708, // 0021 ADD R3 R3 K8 - 0x7001FFF4, // 0022 JMP #0018 - 0x00100708, // 0023 ADD R4 R3 K8 - 0x54160003, // 0024 LDINT R5 4 - 0x08100805, // 0025 MUL R4 R4 R5 - 0x60140015, // 0026 GETGBL R5 G21 - 0x5C180200, // 0027 MOVE R6 R1 - 0x5C1C0800, // 0028 MOVE R7 R4 - 0x7C140400, // 0029 CALL R5 2 - 0x80040A00, // 002A RET 1 R5 - 0x80000000, // 002B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _get_color_at_index -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider__get_color_at_index, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(_get_color_at_index), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0x14080307, // 0000 LT R2 R1 K7 - 0x740A0002, // 0001 JMPT R2 #0005 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x28080202, // 0003 GE R2 R1 R2 - 0x780A0001, // 0004 JMPF R2 #0007 - 0x5409FFFE, // 0005 LDINT R2 -1 - 0x80040400, // 0006 RET 1 R2 - 0x8C080104, // 0007 GETMET R2 R0 K4 - 0x7C080200, // 0008 CALL R2 1 - 0x8C0C0506, // 0009 GETMET R3 R2 K6 - 0x54160003, // 000A LDINT R5 4 - 0x08140205, // 000B MUL R5 R1 R5 - 0x541A0003, // 000C LDINT R6 4 - 0x7C0C0600, // 000D CALL R3 3 - 0x54120007, // 000E LDINT R4 8 - 0x3C100604, // 000F SHR R4 R3 R4 - 0x541600FE, // 0010 LDINT R5 255 - 0x2C100805, // 0011 AND R4 R4 R5 - 0x5416000F, // 0012 LDINT R5 16 - 0x3C140605, // 0013 SHR R5 R3 R5 - 0x541A00FE, // 0014 LDINT R6 255 - 0x2C140A06, // 0015 AND R5 R5 R6 - 0x541A0017, // 0016 LDINT R6 24 - 0x3C180606, // 0017 SHR R6 R3 R6 - 0x541E00FE, // 0018 LDINT R7 255 - 0x2C180C07, // 0019 AND R6 R6 R7 - 0x541E00FE, // 001A LDINT R7 255 - 0x54220017, // 001B LDINT R8 24 - 0x381C0E08, // 001C SHL R7 R7 R8 - 0x5422000F, // 001D LDINT R8 16 - 0x38200808, // 001E SHL R8 R4 R8 - 0x301C0E08, // 001F OR R7 R7 R8 - 0x54220007, // 0020 LDINT R8 8 - 0x38200A08, // 0021 SHL R8 R5 R8 - 0x301C0E08, // 0022 OR R7 R7 R8 - 0x301C0E06, // 0023 OR R7 R7 R6 - 0x80040E00, // 0024 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_start, /* name */ - be_nested_proto( - 3, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(start), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x8808011A, // 0003 GETMBR R2 R0 K26 - 0x8804051B, // 0004 GETMBR R1 R2 K27 - 0x90023201, // 0005 SETMBR R0 K25 R1 - 0x80040000, // 0006 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _get_palette_bytes -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider__get_palette_bytes, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(_get_palette_bytes), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8804010B, // 0000 GETMBR R1 R0 K11 - 0x4C080000, // 0001 LDNIL R2 - 0x1C080202, // 0002 EQ R2 R1 R2 - 0x780A0003, // 0003 JMPF R2 #0008 - 0x60080015, // 0004 GETGBL R2 G21 - 0x580C0027, // 0005 LDCONST R3 K39 - 0x7C080200, // 0006 CALL R2 1 - 0x5C040400, // 0007 MOVE R1 R2 - 0x60080004, // 0008 GETGBL R2 G4 - 0x5C0C0200, // 0009 MOVE R3 R1 - 0x7C080200, // 000A CALL R2 1 - 0x1C080526, // 000B EQ R2 R2 K38 - 0x780A0003, // 000C JMPF R2 #0011 - 0x8C080128, // 000D GETMET R2 R0 K40 - 0x5C100200, // 000E MOVE R4 R1 - 0x7C080400, // 000F CALL R2 2 - 0x5C040400, // 0010 MOVE R1 R2 - 0x80040200, // 0011 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: produce_value -********************************************************************/ -be_local_closure(class_RichPaletteColorProvider_produce_value, /* name */ - be_nested_proto( - 28, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_RichPaletteColorProvider, /* shared constants */ - be_str_weak(produce_value), - &be_const_str_solidified, - ( &(const binstruction[236]) { /* code */ - 0x8C0C0104, // 0000 GETMET R3 R0 K4 - 0x7C0C0200, // 0001 CALL R3 1 - 0x4C100000, // 0002 LDNIL R4 - 0x1C100604, // 0003 EQ R4 R3 R4 - 0x74120002, // 0004 JMPT R4 #0008 - 0x88100101, // 0005 GETMBR R4 R0 K1 - 0x14100915, // 0006 LT R4 R4 K21 - 0x78120001, // 0007 JMPF R4 #000A - 0x5411FFFE, // 0008 LDINT R4 -1 - 0x80040800, // 0009 RET 1 R4 - 0x88100102, // 000A GETMBR R4 R0 K2 - 0x88140114, // 000B GETMBR R5 R0 K20 - 0x1C180907, // 000C EQ R6 R4 K7 - 0x781A0039, // 000D JMPF R6 #0048 - 0x8C180706, // 000E GETMET R6 R3 K6 - 0x58200007, // 000F LDCONST R8 K7 - 0x54260003, // 0010 LDINT R9 4 - 0x7C180600, // 0011 CALL R6 3 - 0x541E0007, // 0012 LDINT R7 8 - 0x3C1C0C07, // 0013 SHR R7 R6 R7 - 0x542200FE, // 0014 LDINT R8 255 - 0x2C1C0E08, // 0015 AND R7 R7 R8 - 0x5422000F, // 0016 LDINT R8 16 - 0x3C200C08, // 0017 SHR R8 R6 R8 - 0x542600FE, // 0018 LDINT R9 255 - 0x2C201009, // 0019 AND R8 R8 R9 - 0x54260017, // 001A LDINT R9 24 - 0x3C240C09, // 001B SHR R9 R6 R9 - 0x542A00FE, // 001C LDINT R10 255 - 0x2C24120A, // 001D AND R9 R9 R10 - 0x542A00FE, // 001E LDINT R10 255 - 0x20280A0A, // 001F NE R10 R5 R10 - 0x782A001A, // 0020 JMPF R10 #003C - 0xB82A1200, // 0021 GETNGBL R10 K9 - 0x8C281516, // 0022 GETMET R10 R10 K22 - 0x5C300E00, // 0023 MOVE R12 R7 - 0x58340007, // 0024 LDCONST R13 K7 - 0x543A00FE, // 0025 LDINT R14 255 - 0x583C0007, // 0026 LDCONST R15 K7 - 0x5C400A00, // 0027 MOVE R16 R5 - 0x7C280C00, // 0028 CALL R10 6 - 0x5C1C1400, // 0029 MOVE R7 R10 - 0xB82A1200, // 002A GETNGBL R10 K9 - 0x8C281516, // 002B GETMET R10 R10 K22 - 0x5C301000, // 002C MOVE R12 R8 - 0x58340007, // 002D LDCONST R13 K7 - 0x543A00FE, // 002E LDINT R14 255 - 0x583C0007, // 002F LDCONST R15 K7 - 0x5C400A00, // 0030 MOVE R16 R5 - 0x7C280C00, // 0031 CALL R10 6 - 0x5C201400, // 0032 MOVE R8 R10 - 0xB82A1200, // 0033 GETNGBL R10 K9 - 0x8C281516, // 0034 GETMET R10 R10 K22 - 0x5C301200, // 0035 MOVE R12 R9 - 0x58340007, // 0036 LDCONST R13 K7 - 0x543A00FE, // 0037 LDINT R14 255 - 0x583C0007, // 0038 LDCONST R15 K7 - 0x5C400A00, // 0039 MOVE R16 R5 - 0x7C280C00, // 003A CALL R10 6 - 0x5C241400, // 003B MOVE R9 R10 - 0x542A00FE, // 003C LDINT R10 255 - 0x542E0017, // 003D LDINT R11 24 - 0x3828140B, // 003E SHL R10 R10 R11 - 0x542E000F, // 003F LDINT R11 16 - 0x382C0E0B, // 0040 SHL R11 R7 R11 - 0x3028140B, // 0041 OR R10 R10 R11 - 0x542E0007, // 0042 LDINT R11 8 - 0x382C100B, // 0043 SHL R11 R8 R11 - 0x3028140B, // 0044 OR R10 R10 R11 - 0x30281409, // 0045 OR R10 R10 R9 - 0x9002300A, // 0046 SETMBR R0 K24 R10 - 0x80041400, // 0047 RET 1 R10 - 0x88180119, // 0048 GETMBR R6 R0 K25 - 0x04180406, // 0049 SUB R6 R2 R6 - 0x101C0C04, // 004A MOD R7 R6 R4 - 0x88200101, // 004B GETMBR R8 R0 K1 - 0x04241115, // 004C SUB R9 R8 K21 - 0x24281307, // 004D GT R10 R9 K7 - 0x782A0006, // 004E JMPF R10 #0056 - 0x8828010F, // 004F GETMBR R10 R0 K15 - 0x94281409, // 0050 GETIDX R10 R10 R9 - 0x28280E0A, // 0051 GE R10 R7 R10 - 0x782A0000, // 0052 JMPF R10 #0054 - 0x70020001, // 0053 JMP #0056 - 0x04241308, // 0054 SUB R9 R9 K8 - 0x7001FFF6, // 0055 JMP #004D - 0x8C280706, // 0056 GETMET R10 R3 K6 - 0x54320003, // 0057 LDINT R12 4 - 0x0830120C, // 0058 MUL R12 R9 R12 - 0x54360003, // 0059 LDINT R13 4 - 0x7C280600, // 005A CALL R10 3 - 0x8C2C0706, // 005B GETMET R11 R3 K6 - 0x00341308, // 005C ADD R13 R9 K8 - 0x543A0003, // 005D LDINT R14 4 - 0x08341A0E, // 005E MUL R13 R13 R14 - 0x543A0003, // 005F LDINT R14 4 - 0x7C2C0600, // 0060 CALL R11 3 - 0x8830010F, // 0061 GETMBR R12 R0 K15 - 0x94301809, // 0062 GETIDX R12 R12 R9 - 0x00341308, // 0063 ADD R13 R9 K8 - 0x8838010F, // 0064 GETMBR R14 R0 K15 - 0x94341C0D, // 0065 GETIDX R13 R14 R13 - 0xB83A1200, // 0066 GETNGBL R14 K9 - 0x8C381D16, // 0067 GETMET R14 R14 K22 - 0x5C400E00, // 0068 MOVE R16 R7 - 0x5C441800, // 0069 MOVE R17 R12 - 0x5C481A00, // 006A MOVE R18 R13 - 0x544E0007, // 006B LDINT R19 8 - 0x3C4C1413, // 006C SHR R19 R10 R19 - 0x545200FE, // 006D LDINT R20 255 - 0x2C4C2614, // 006E AND R19 R19 R20 - 0x54520007, // 006F LDINT R20 8 - 0x3C501614, // 0070 SHR R20 R11 R20 - 0x545600FE, // 0071 LDINT R21 255 - 0x2C502815, // 0072 AND R20 R20 R21 - 0x7C380C00, // 0073 CALL R14 6 - 0xB83E1200, // 0074 GETNGBL R15 K9 - 0x8C3C1F16, // 0075 GETMET R15 R15 K22 - 0x5C440E00, // 0076 MOVE R17 R7 - 0x5C481800, // 0077 MOVE R18 R12 - 0x5C4C1A00, // 0078 MOVE R19 R13 - 0x5452000F, // 0079 LDINT R20 16 - 0x3C501414, // 007A SHR R20 R10 R20 - 0x545600FE, // 007B LDINT R21 255 - 0x2C502815, // 007C AND R20 R20 R21 - 0x5456000F, // 007D LDINT R21 16 - 0x3C541615, // 007E SHR R21 R11 R21 - 0x545A00FE, // 007F LDINT R22 255 - 0x2C542A16, // 0080 AND R21 R21 R22 - 0x7C3C0C00, // 0081 CALL R15 6 - 0xB8421200, // 0082 GETNGBL R16 K9 - 0x8C402116, // 0083 GETMET R16 R16 K22 - 0x5C480E00, // 0084 MOVE R18 R7 - 0x5C4C1800, // 0085 MOVE R19 R12 - 0x5C501A00, // 0086 MOVE R20 R13 - 0x54560017, // 0087 LDINT R21 24 - 0x3C541415, // 0088 SHR R21 R10 R21 - 0x545A00FE, // 0089 LDINT R22 255 - 0x2C542A16, // 008A AND R21 R21 R22 - 0x545A0017, // 008B LDINT R22 24 - 0x3C581616, // 008C SHR R22 R11 R22 - 0x545E00FE, // 008D LDINT R23 255 - 0x2C582C17, // 008E AND R22 R22 R23 - 0x7C400C00, // 008F CALL R16 6 - 0x8844011D, // 0090 GETMBR R17 R0 K29 - 0x8C482329, // 0091 GETMET R18 R17 K41 - 0x54520007, // 0092 LDINT R20 8 - 0x3C501414, // 0093 SHR R20 R10 R20 - 0x545600FE, // 0094 LDINT R21 255 - 0x2C502815, // 0095 AND R20 R20 R21 - 0x5456000F, // 0096 LDINT R21 16 - 0x3C541415, // 0097 SHR R21 R10 R21 - 0x545A00FE, // 0098 LDINT R22 255 - 0x2C542A16, // 0099 AND R21 R21 R22 - 0x545A0017, // 009A LDINT R22 24 - 0x3C581416, // 009B SHR R22 R10 R22 - 0x545E00FE, // 009C LDINT R23 255 - 0x2C582C17, // 009D AND R22 R22 R23 - 0x7C480800, // 009E CALL R18 4 - 0x8848232A, // 009F GETMBR R18 R17 K42 - 0x8C4C2329, // 00A0 GETMET R19 R17 K41 - 0x54560007, // 00A1 LDINT R21 8 - 0x3C541615, // 00A2 SHR R21 R11 R21 - 0x545A00FE, // 00A3 LDINT R22 255 - 0x2C542A16, // 00A4 AND R21 R21 R22 - 0x545A000F, // 00A5 LDINT R22 16 - 0x3C581616, // 00A6 SHR R22 R11 R22 - 0x545E00FE, // 00A7 LDINT R23 255 - 0x2C582C17, // 00A8 AND R22 R22 R23 - 0x545E0017, // 00A9 LDINT R23 24 - 0x3C5C1617, // 00AA SHR R23 R11 R23 - 0x546200FE, // 00AB LDINT R24 255 - 0x2C5C2E18, // 00AC AND R23 R23 R24 - 0x7C4C0800, // 00AD CALL R19 4 - 0x884C232A, // 00AE GETMBR R19 R17 K42 - 0xB8521200, // 00AF GETNGBL R20 K9 - 0x8C502916, // 00B0 GETMET R20 R20 K22 - 0x5C580E00, // 00B1 MOVE R22 R7 - 0x5C5C1800, // 00B2 MOVE R23 R12 - 0x5C601A00, // 00B3 MOVE R24 R13 - 0x5C642400, // 00B4 MOVE R25 R18 - 0x5C682600, // 00B5 MOVE R26 R19 - 0x7C500C00, // 00B6 CALL R20 6 - 0x8C542329, // 00B7 GETMET R21 R17 K41 - 0x5C5C1C00, // 00B8 MOVE R23 R14 - 0x5C601E00, // 00B9 MOVE R24 R15 - 0x5C642000, // 00BA MOVE R25 R16 - 0x7C540800, // 00BB CALL R21 4 - 0x8C54232B, // 00BC GETMET R21 R17 K43 - 0x5C5C2800, // 00BD MOVE R23 R20 - 0x7C540400, // 00BE CALL R21 2 - 0x8838232C, // 00BF GETMBR R14 R17 K44 - 0x883C232D, // 00C0 GETMBR R15 R17 K45 - 0x8840232E, // 00C1 GETMBR R16 R17 K46 - 0x545600FE, // 00C2 LDINT R21 255 - 0x20540A15, // 00C3 NE R21 R5 R21 - 0x7856001A, // 00C4 JMPF R21 #00E0 - 0xB8561200, // 00C5 GETNGBL R21 K9 - 0x8C542B16, // 00C6 GETMET R21 R21 K22 - 0x5C5C1C00, // 00C7 MOVE R23 R14 - 0x58600007, // 00C8 LDCONST R24 K7 - 0x546600FE, // 00C9 LDINT R25 255 - 0x58680007, // 00CA LDCONST R26 K7 - 0x5C6C0A00, // 00CB MOVE R27 R5 - 0x7C540C00, // 00CC CALL R21 6 - 0x5C382A00, // 00CD MOVE R14 R21 - 0xB8561200, // 00CE GETNGBL R21 K9 - 0x8C542B16, // 00CF GETMET R21 R21 K22 - 0x5C5C1E00, // 00D0 MOVE R23 R15 - 0x58600007, // 00D1 LDCONST R24 K7 - 0x546600FE, // 00D2 LDINT R25 255 - 0x58680007, // 00D3 LDCONST R26 K7 - 0x5C6C0A00, // 00D4 MOVE R27 R5 - 0x7C540C00, // 00D5 CALL R21 6 - 0x5C3C2A00, // 00D6 MOVE R15 R21 - 0xB8561200, // 00D7 GETNGBL R21 K9 - 0x8C542B16, // 00D8 GETMET R21 R21 K22 - 0x5C5C2000, // 00D9 MOVE R23 R16 - 0x58600007, // 00DA LDCONST R24 K7 - 0x546600FE, // 00DB LDINT R25 255 - 0x58680007, // 00DC LDCONST R26 K7 - 0x5C6C0A00, // 00DD MOVE R27 R5 - 0x7C540C00, // 00DE CALL R21 6 - 0x5C402A00, // 00DF MOVE R16 R21 - 0x545600FE, // 00E0 LDINT R21 255 - 0x545A0017, // 00E1 LDINT R22 24 - 0x38542A16, // 00E2 SHL R21 R21 R22 - 0x545A000F, // 00E3 LDINT R22 16 - 0x38581C16, // 00E4 SHL R22 R14 R22 - 0x30542A16, // 00E5 OR R21 R21 R22 - 0x545A0007, // 00E6 LDINT R22 8 - 0x38581E16, // 00E7 SHL R22 R15 R22 - 0x30542A16, // 00E8 OR R21 R21 R22 - 0x30542A10, // 00E9 OR R21 R21 R16 - 0x90023015, // 00EA SETMBR R0 K24 R21 - 0x80042A00, // 00EB RET 1 R21 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: RichPaletteColorProvider -********************************************************************/ -extern const bclass be_class_ColorProvider; -be_local_class(RichPaletteColorProvider, - 5, - &be_class_ColorProvider, - be_nested_map(19, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(light_state, -1), be_const_var(3) }, - { be_const_key_weak(_parse_palette, -1), be_const_closure(class_RichPaletteColorProvider__parse_palette_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_RichPaletteColorProvider_tostring_closure) }, - { be_const_key_weak(PARAMS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(range_min, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(transition_type, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(enum, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(2, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(1), - be_const_int(5), - })) ) } )) }, - { be_const_key_weak(default, -1), be_const_int(5) }, - })) ) } )) }, - { be_const_key_weak(palette, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, - })) ) } )) }, - { be_const_key_weak(cycle_period, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(5000) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(255) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(range_max, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(100) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(slots_arr, 1), be_const_var(0) }, - { be_const_key_weak(_get_palette_bytes, -1), be_const_closure(class_RichPaletteColorProvider__get_palette_bytes_closure) }, - { be_const_key_weak(current_color, 15), be_const_var(2) }, - { be_const_key_weak(start, -1), be_const_closure(class_RichPaletteColorProvider_start_closure) }, - { be_const_key_weak(_recompute_palette, -1), be_const_closure(class_RichPaletteColorProvider__recompute_palette_closure) }, - { be_const_key_weak(_get_color_at_index, -1), be_const_closure(class_RichPaletteColorProvider__get_color_at_index_closure) }, - { be_const_key_weak(slots, -1), be_const_var(1) }, - { be_const_key_weak(to_css_gradient, -1), be_const_closure(class_RichPaletteColorProvider_to_css_gradient_closure) }, - { be_const_key_weak(_ptr_to_palette, -1), be_const_closure(class_RichPaletteColorProvider__ptr_to_palette_closure) }, - { be_const_key_weak(init, 10), be_const_closure(class_RichPaletteColorProvider_init_closure) }, - { be_const_key_weak(cycle_start, 9), be_const_var(4) }, - { be_const_key_weak(get_color_for_value, -1), be_const_closure(class_RichPaletteColorProvider_get_color_for_value_closure) }, - { be_const_key_weak(set_range, 5), be_const_closure(class_RichPaletteColorProvider_set_range_closure) }, - { be_const_key_weak(produce_value, -1), be_const_closure(class_RichPaletteColorProvider_produce_value_closure) }, - { be_const_key_weak(on_param_changed, 0), be_const_closure(class_RichPaletteColorProvider_on_param_changed_closure) }, - })), - be_str_weak(RichPaletteColorProvider) -); - -/******************************************************************** -** Solidified function: color_cycle_from_palette -********************************************************************/ -be_local_closure(color_cycle_from_palette, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(color_cycle), - /* K2 */ be_nested_str_weak(palette), - /* K3 */ be_nested_str_weak(cycle_period), - }), - be_str_weak(color_cycle_from_palette), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xB80E0000, // 0000 GETNGBL R3 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140000, // 0002 MOVE R5 R0 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x20100204, // 0005 NE R4 R1 R4 - 0x78120000, // 0006 JMPF R4 #0008 - 0x900E0401, // 0007 SETMBR R3 K2 R1 - 0x4C100000, // 0008 LDNIL R4 - 0x20100404, // 0009 NE R4 R2 R4 - 0x78120000, // 000A JMPF R4 #000C - 0x900E0602, // 000B SETMBR R3 K3 R2 - 0x80040600, // 000C RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: list_user_functions -********************************************************************/ -be_local_closure(list_user_functions, /* name */ - be_nested_proto( - 7, /* nstack */ - 0, /* argc */ - 0, /* 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(global), - /* K1 */ be_nested_str_weak(_animation_user_functions), - /* K2 */ be_nested_str_weak(keys), - /* K3 */ be_nested_str_weak(push), - /* K4 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(list_user_functions), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0xA4020000, // 0000 IMPORT R0 K0 - 0x60040012, // 0001 GETGBL R1 G18 - 0x7C040000, // 0002 CALL R1 0 - 0x60080010, // 0003 GETGBL R2 G16 - 0x880C0101, // 0004 GETMBR R3 R0 K1 - 0x8C0C0702, // 0005 GETMET R3 R3 K2 - 0x7C0C0200, // 0006 CALL R3 1 - 0x7C080200, // 0007 CALL R2 1 - 0xA8020005, // 0008 EXBLK 0 #000F - 0x5C0C0400, // 0009 MOVE R3 R2 - 0x7C0C0000, // 000A CALL R3 0 - 0x8C100303, // 000B GETMET R4 R1 K3 - 0x5C180600, // 000C MOVE R6 R3 - 0x7C100400, // 000D CALL R4 2 - 0x7001FFF9, // 000E JMP #0009 - 0x58080004, // 000F LDCONST R2 K4 - 0xAC080200, // 0010 CATCH R2 1 0 - 0xB0080000, // 0011 RAISE 2 R0 R0 - 0x80040200, // 0012 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: trigger_event -********************************************************************/ -be_local_closure(trigger_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(event_manager), - /* K2 */ be_nested_str_weak(trigger_event), - }), - be_str_weak(trigger_event), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x88080501, // 0001 GETMBR R2 R2 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x5C100000, // 0003 MOVE R4 R0 - 0x5C140200, // 0004 MOVE R5 R1 - 0x7C080600, // 0005 CALL R2 3 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: bounce_constrained -********************************************************************/ -be_local_closure(bounce_constrained, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(bounce_animation), - /* K2 */ be_nested_str_weak(bounce_speed), - /* K3 */ be_nested_str_weak(bounce_range), - /* K4 */ be_nested_str_weak(damping), - /* K5 */ be_nested_str_weak(gravity), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(bounce_constrained), - }), - be_str_weak(bounce_constrained), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x540A0095, // 0004 LDINT R2 150 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x540A000E, // 0006 LDINT R2 15 - 0x90060602, // 0007 SETMBR R1 K3 R2 - 0x540A00F9, // 0008 LDINT R2 250 - 0x90060802, // 0009 SETMBR R1 K4 R2 - 0x90060B06, // 000A SETMBR R1 K5 K6 - 0x90060F08, // 000B SETMBR R1 K7 K8 - 0x80040200, // 000C RET 1 R1 - }) - ) -); -/*******************************************************************/ - /******************************************************************** ** Solidified function: animation_global @@ -6649,9 +7246,9 @@ be_local_closure(animation_global, /* name */ /******************************************************************** -** Solidified function: smooth +** Solidified function: unregister_event_handler ********************************************************************/ -be_local_closure(smooth, /* name */ +be_local_closure(unregister_event_handler, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -6661,23 +7258,427 @@ be_local_closure(smooth, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(oscillator_value), - /* K2 */ be_nested_str_weak(form), - /* K3 */ be_nested_str_weak(COSINE), + /* K1 */ be_nested_str_weak(event_manager), + /* K2 */ be_nested_str_weak(unregister_handler), }), - be_str_weak(smooth), + be_str_weak(unregister_event_handler), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ + ( &(const binstruction[ 6]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x8C040302, // 0002 GETMET R1 R1 K2 + 0x5C0C0000, // 0003 MOVE R3 R0 + 0x7C040400, // 0004 CALL R1 2 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: bounce_constrained +********************************************************************/ +be_local_closure(bounce_constrained, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(bounce_animation), + /* K2 */ be_nested_str_weak(bounce_speed), + /* K3 */ be_nested_str_weak(bounce_range), + /* K4 */ be_nested_str_weak(damping), + /* K5 */ be_nested_str_weak(gravity), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(name), + /* K8 */ be_nested_str_weak(bounce_constrained), + }), + be_str_weak(bounce_constrained), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x88080503, // 0005 GETMBR R2 R2 K3 - 0x90060402, // 0006 SETMBR R1 K2 R2 - 0x80040200, // 0007 RET 1 R1 + 0x540A0095, // 0004 LDINT R2 150 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x540A000E, // 0006 LDINT R2 15 + 0x90060602, // 0007 SETMBR R1 K3 R2 + 0x540A00F9, // 0008 LDINT R2 250 + 0x90060802, // 0009 SETMBR R1 K4 R2 + 0x90060B06, // 000A SETMBR R1 K5 K6 + 0x90060F08, // 000B SETMBR R1 K7 K8 + 0x80040200, // 000C RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +extern const bclass be_class_PaletteWaveAnimation; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_PaletteWaveAnimation_init, /* 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(init), + /* K1 */ be_nested_str_weak(name), + /* K2 */ be_nested_str_weak(palette_wave), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080500, // 0003 GETMET R2 R2 K0 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x90020302, // 0006 SETMBR R0 K1 K2 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update_value_buffer +********************************************************************/ +be_local_closure(class_PaletteWaveAnimation__update_value_buffer, /* name */ + be_nested_proto( + 19, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(wave_period), + /* K1 */ be_nested_str_weak(wave_length), + /* K2 */ be_nested_str_weak(engine), + /* K3 */ be_nested_str_weak(get_strip_length), + /* K4 */ be_nested_str_weak(value_buffer), + /* K5 */ be_nested_str_weak(resize), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(scale_uint), + /* K8 */ be_const_int(0), + /* K9 */ be_const_real_hex(0x447A0000), + /* K10 */ be_nested_str_weak(sine_int), + /* K11 */ be_nested_str_weak(scale_int), + /* K12 */ be_const_int(1), + }), + be_str_weak(_update_value_buffer), + &be_const_str_solidified, + ( &(const binstruction[56]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x88100102, // 0002 GETMBR R4 R0 K2 + 0x8C100903, // 0003 GETMET R4 R4 K3 + 0x7C100200, // 0004 CALL R4 1 + 0x6014000C, // 0005 GETGBL R5 G12 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x20140A04, // 0008 NE R5 R5 R4 + 0x78160003, // 0009 JMPF R5 #000E + 0x88140104, // 000A GETMBR R5 R0 K4 + 0x8C140B05, // 000B GETMET R5 R5 K5 + 0x5C1C0800, // 000C MOVE R7 R4 + 0x7C140400, // 000D CALL R5 2 + 0xB8160C00, // 000E GETNGBL R5 K6 + 0x8C140B07, // 000F GETMET R5 R5 K7 + 0x101C0202, // 0010 MOD R7 R1 R2 + 0x58200008, // 0011 LDCONST R8 K8 + 0x5C240400, // 0012 MOVE R9 R2 + 0x58280008, // 0013 LDCONST R10 K8 + 0x542E03E7, // 0014 LDINT R11 1000 + 0x7C140C00, // 0015 CALL R5 6 + 0x0C140B09, // 0016 DIV R5 R5 K9 + 0x60180009, // 0017 GETGBL R6 G9 + 0x081C0A03, // 0018 MUL R7 R5 R3 + 0x7C180200, // 0019 CALL R6 1 + 0x581C0008, // 001A LDCONST R7 K8 + 0x14200E04, // 001B LT R8 R7 R4 + 0x78220019, // 001C JMPF R8 #0037 + 0x00200E06, // 001D ADD R8 R7 R6 + 0x10201003, // 001E MOD R8 R8 R3 + 0xB8260C00, // 001F GETNGBL R9 K6 + 0x8C241307, // 0020 GETMET R9 R9 K7 + 0x5C2C1000, // 0021 MOVE R11 R8 + 0x58300008, // 0022 LDCONST R12 K8 + 0x5C340600, // 0023 MOVE R13 R3 + 0x58380008, // 0024 LDCONST R14 K8 + 0x543E7FFE, // 0025 LDINT R15 32767 + 0x7C240C00, // 0026 CALL R9 6 + 0xB82A0C00, // 0027 GETNGBL R10 K6 + 0x8C28150A, // 0028 GETMET R10 R10 K10 + 0x5C301200, // 0029 MOVE R12 R9 + 0x7C280400, // 002A CALL R10 2 + 0x882C0104, // 002B GETMBR R11 R0 K4 + 0xB8320C00, // 002C GETNGBL R12 K6 + 0x8C30190B, // 002D GETMET R12 R12 K11 + 0x5C381400, // 002E MOVE R14 R10 + 0x543DEFFF, // 002F LDINT R15 -4096 + 0x54420FFF, // 0030 LDINT R16 4096 + 0x58440008, // 0031 LDCONST R17 K8 + 0x544A0063, // 0032 LDINT R18 100 + 0x7C300C00, // 0033 CALL R12 6 + 0x982C0E0C, // 0034 SETIDX R11 R7 R12 + 0x001C0F0C, // 0035 ADD R7 R7 K12 + 0x7001FFE3, // 0036 JMP #001B + 0x80000000, // 0037 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: PaletteWaveAnimation +********************************************************************/ +extern const bclass be_class_PalettePatternAnimation; +be_local_class(PaletteWaveAnimation, + 0, + &be_class_PalettePatternAnimation, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(wave_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(5000) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(wave_length, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(10) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_PaletteWaveAnimation_init_closure) }, + { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteWaveAnimation__update_value_buffer_closure) }, + })), + be_str_weak(PaletteWaveAnimation) +); + +/******************************************************************** +** Solidified function: bounce_gravity +********************************************************************/ +be_local_closure(bounce_gravity, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(bounce_animation), + /* K2 */ be_nested_str_weak(bounce_speed), + /* K3 */ be_nested_str_weak(bounce_range), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(damping), + /* K6 */ be_nested_str_weak(gravity), + /* K7 */ be_nested_str_weak(name), + /* K8 */ be_nested_str_weak(bounce_gravity), + }), + be_str_weak(bounce_gravity), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x540A0063, // 0004 LDINT R2 100 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x90060704, // 0006 SETMBR R1 K3 K4 + 0x540A00EF, // 0007 LDINT R2 240 + 0x90060A02, // 0008 SETMBR R1 K5 R2 + 0x540A007F, // 0009 LDINT R2 128 + 0x90060C02, // 000A SETMBR R1 K6 R2 + 0x90060F08, // 000B SETMBR R1 K7 K8 + 0x80040200, // 000C RET 1 R1 + }) + ) +); +/*******************************************************************/ + +// compact class 'StaticColorProvider' ktab size: 3, total: 5 (saved 16 bytes) +static const bvalue be_ktab_class_StaticColorProvider[3] = { + /* K0 */ be_nested_str_weak(color), + /* K1 */ be_nested_str_weak(StaticColorProvider_X28color_X3D0x_X2508X_X29), + /* K2 */ be_nested_str_weak(StaticColorProvider_X28color_X3Dunset_X29), +}; + + +extern const bclass be_class_StaticColorProvider; + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_StaticColorProvider_produce_value, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticColorProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x80040600, // 0001 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_StaticColorProvider_tostring, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticColorProvider, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0xA8020007, // 0000 EXBLK 0 #0009 + 0x60040018, // 0001 GETGBL R1 G24 + 0x58080001, // 0002 LDCONST R2 K1 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x7C040400, // 0004 CALL R1 2 + 0xA8040001, // 0005 EXBLK 1 1 + 0x80040200, // 0006 RET 1 R1 + 0xA8040001, // 0007 EXBLK 1 1 + 0x70020004, // 0008 JMP #000E + 0xAC040000, // 0009 CATCH R1 0 0 + 0x70020001, // 000A JMP #000D + 0x80060400, // 000B RET 1 K2 + 0x70020000, // 000C JMP #000E + 0xB0080000, // 000D RAISE 2 R0 R0 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_color_for_value +********************************************************************/ +be_local_closure(class_StaticColorProvider_get_color_for_value, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticColorProvider, /* shared constants */ + be_str_weak(get_color_for_value), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x80040600, // 0001 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: StaticColorProvider +********************************************************************/ +extern const bclass be_class_ColorProvider; +be_local_class(StaticColorProvider, + 0, + &be_class_ColorProvider, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(tostring, -1), be_const_closure(class_StaticColorProvider_tostring_closure) }, + { be_const_key_weak(produce_value, 2), be_const_closure(class_StaticColorProvider_produce_value_closure) }, + { be_const_key_weak(get_color_for_value, 0), be_const_closure(class_StaticColorProvider_get_color_for_value_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-1) }, + })) ) } )) }, + })) ) } )) }, + })), + be_str_weak(StaticColorProvider) +); + +/******************************************************************** +** Solidified function: get_registered_events +********************************************************************/ +be_local_closure(get_registered_events, /* name */ + be_nested_proto( + 2, /* nstack */ + 0, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(event_manager), + /* K2 */ be_nested_str_weak(get_registered_events), + }), + be_str_weak(get_registered_events), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8020000, // 0000 GETNGBL R0 K0 + 0x88000101, // 0001 GETMBR R0 R0 K1 + 0x8C000102, // 0002 GETMET R0 R0 K2 + 0x7C000200, // 0003 CALL R0 1 + 0x80040000, // 0004 RET 1 R0 }) ) ); @@ -7306,1356 +8307,6 @@ be_local_class(BounceAnimation, })), be_str_weak(BounceAnimation) ); -// compact class 'ColorCycleColorProvider' ktab size: 17, total: 36 (saved 152 bytes) -static const bvalue be_ktab_class_ColorCycleColorProvider[17] = { - /* K0 */ be_nested_str_weak(palette), - /* K1 */ be_const_int(0), - /* K2 */ be_const_int(1), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(scale_uint), - /* K5 */ be_nested_str_weak(cycle_period), - /* K6 */ be_nested_str_weak(current_color), - /* K7 */ be_nested_str_weak(current_index), - /* K8 */ be_nested_str_weak(next), - /* K9 */ be_nested_str_weak(set_param), - /* K10 */ be_nested_str_weak(init), - /* K11 */ be_nested_str_weak(manual), - /* K12 */ be_nested_str_weak(auto), - /* K13 */ be_nested_str_weak(ColorCycleColorProvider_X28palette_size_X3D_X25s_X2C_X20cycle_period_X3D_X25s_X2C_X20mode_X3D_X25s_X2C_X20current_index_X3D_X25s_X29), - /* K14 */ be_nested_str_weak(ColorCycleColorProvider_X28uninitialized_X29), - /* K15 */ be_nested_str_weak(copy), - /* K16 */ be_nested_str_weak(push), -}; - - -extern const bclass be_class_ColorCycleColorProvider; - -/******************************************************************** -** Solidified function: get_color_for_value -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_get_color_for_value, /* name */ - be_nested_proto( - 12, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(get_color_for_value), - &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x6010000C, // 0001 GETGBL R4 G12 - 0x5C140600, // 0002 MOVE R5 R3 - 0x7C100200, // 0003 CALL R4 1 - 0x1C140901, // 0004 EQ R5 R4 K1 - 0x78160001, // 0005 JMPF R5 #0008 - 0x5415FFFE, // 0006 LDINT R5 -1 - 0x80040A00, // 0007 RET 1 R5 - 0x1C140902, // 0008 EQ R5 R4 K2 - 0x78160001, // 0009 JMPF R5 #000C - 0x94140701, // 000A GETIDX R5 R3 K1 - 0x80040A00, // 000B RET 1 R5 - 0x14140301, // 000C LT R5 R1 K1 - 0x78160001, // 000D JMPF R5 #0010 - 0x58040001, // 000E LDCONST R1 K1 - 0x70020003, // 000F JMP #0014 - 0x54160063, // 0010 LDINT R5 100 - 0x24140205, // 0011 GT R5 R1 R5 - 0x78160000, // 0012 JMPF R5 #0014 - 0x54060063, // 0013 LDINT R1 100 - 0xB8160600, // 0014 GETNGBL R5 K3 - 0x8C140B04, // 0015 GETMET R5 R5 K4 - 0x5C1C0200, // 0016 MOVE R7 R1 - 0x58200001, // 0017 LDCONST R8 K1 - 0x54260063, // 0018 LDINT R9 100 - 0x58280001, // 0019 LDCONST R10 K1 - 0x042C0902, // 001A SUB R11 R4 K2 - 0x7C140C00, // 001B CALL R5 6 - 0x28180A04, // 001C GE R6 R5 R4 - 0x781A0001, // 001D JMPF R6 #0020 - 0x04180902, // 001E SUB R6 R4 K2 - 0x5C140C00, // 001F MOVE R5 R6 - 0x94180605, // 0020 GETIDX R6 R3 R5 - 0x80040C00, // 0021 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: produce_value -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_produce_value, /* name */ - be_nested_proto( - 14, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(produce_value), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x88100105, // 0001 GETMBR R4 R0 K5 - 0x6014000C, // 0002 GETGBL R5 G12 - 0x5C180600, // 0003 MOVE R6 R3 - 0x7C140200, // 0004 CALL R5 1 - 0x1C180B01, // 0005 EQ R6 R5 K1 - 0x781A0001, // 0006 JMPF R6 #0009 - 0x5419FFFE, // 0007 LDINT R6 -1 - 0x80040C00, // 0008 RET 1 R6 - 0x1C180B02, // 0009 EQ R6 R5 K2 - 0x781A0003, // 000A JMPF R6 #000F - 0x94180701, // 000B GETIDX R6 R3 K1 - 0x90020C06, // 000C SETMBR R0 K6 R6 - 0x88180106, // 000D GETMBR R6 R0 K6 - 0x80040C00, // 000E RET 1 R6 - 0x1C180901, // 000F EQ R6 R4 K1 - 0x781A0001, // 0010 JMPF R6 #0013 - 0x88180106, // 0011 GETMBR R6 R0 K6 - 0x80040C00, // 0012 RET 1 R6 - 0x10180404, // 0013 MOD R6 R2 R4 - 0xB81E0600, // 0014 GETNGBL R7 K3 - 0x8C1C0F04, // 0015 GETMET R7 R7 K4 - 0x5C240C00, // 0016 MOVE R9 R6 - 0x58280001, // 0017 LDCONST R10 K1 - 0x042C0902, // 0018 SUB R11 R4 K2 - 0x58300001, // 0019 LDCONST R12 K1 - 0x04340B02, // 001A SUB R13 R5 K2 - 0x7C1C0C00, // 001B CALL R7 6 - 0x28200E05, // 001C GE R8 R7 R5 - 0x78220001, // 001D JMPF R8 #0020 - 0x04200B02, // 001E SUB R8 R5 K2 - 0x5C1C1000, // 001F MOVE R7 R8 - 0x90020E07, // 0020 SETMBR R0 K7 R7 - 0x94200607, // 0021 GETIDX R8 R3 R7 - 0x90020C08, // 0022 SETMBR R0 K6 R8 - 0x88200106, // 0023 GETMBR R8 R0 K6 - 0x80041000, // 0024 RET 1 R8 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_on_param_changed, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[44]) { /* code */ - 0x1C0C0300, // 0000 EQ R3 R1 K0 - 0x780E0010, // 0001 JMPF R3 #0013 - 0x5C0C0400, // 0002 MOVE R3 R2 - 0x6010000C, // 0003 GETGBL R4 G12 - 0x5C140600, // 0004 MOVE R5 R3 - 0x7C100200, // 0005 CALL R4 1 - 0x24100901, // 0006 GT R4 R4 K1 - 0x78120009, // 0007 JMPF R4 #0012 - 0x88100107, // 0008 GETMBR R4 R0 K7 - 0x6014000C, // 0009 GETGBL R5 G12 - 0x5C180600, // 000A MOVE R6 R3 - 0x7C140200, // 000B CALL R5 1 - 0x28100805, // 000C GE R4 R4 R5 - 0x78120000, // 000D JMPF R4 #000F - 0x90020F01, // 000E SETMBR R0 K7 K1 - 0x88100107, // 000F GETMBR R4 R0 K7 - 0x94100604, // 0010 GETIDX R4 R3 R4 - 0x90020C04, // 0011 SETMBR R0 K6 R4 - 0x70020017, // 0012 JMP #002B - 0x1C0C0308, // 0013 EQ R3 R1 K8 - 0x780E0015, // 0014 JMPF R3 #002B - 0x1C0C0502, // 0015 EQ R3 R2 K2 - 0x780E0013, // 0016 JMPF R3 #002B - 0x880C0100, // 0017 GETMBR R3 R0 K0 - 0x6010000C, // 0018 GETGBL R4 G12 - 0x5C140600, // 0019 MOVE R5 R3 - 0x7C100200, // 001A CALL R4 1 - 0x24100901, // 001B GT R4 R4 K1 - 0x78120009, // 001C JMPF R4 #0027 - 0x88100107, // 001D GETMBR R4 R0 K7 - 0x00100902, // 001E ADD R4 R4 K2 - 0x6014000C, // 001F GETGBL R5 G12 - 0x5C180600, // 0020 MOVE R6 R3 - 0x7C140200, // 0021 CALL R5 1 - 0x10100805, // 0022 MOD R4 R4 R5 - 0x90020E04, // 0023 SETMBR R0 K7 R4 - 0x88100107, // 0024 GETMBR R4 R0 K7 - 0x94100604, // 0025 GETIDX R4 R3 R4 - 0x90020C04, // 0026 SETMBR R0 K6 R4 - 0x8C100109, // 0027 GETMET R4 R0 K9 - 0x58180008, // 0028 LDCONST R6 K8 - 0x581C0001, // 0029 LDCONST R7 K1 - 0x7C100600, // 002A CALL R4 3 - 0x80000000, // 002B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C08050A, // 0003 GETMET R2 R2 K10 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x88080100, // 0006 GETMBR R2 R0 K0 - 0x940C0501, // 0007 GETIDX R3 R2 K1 - 0x90020C03, // 0008 SETMBR R0 K6 R3 - 0x90020F01, // 0009 SETMBR R0 K7 K1 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_tostring, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0xA8020012, // 0000 EXBLK 0 #0014 - 0x88040105, // 0001 GETMBR R1 R0 K5 - 0x1C040301, // 0002 EQ R1 R1 K1 - 0x78060001, // 0003 JMPF R1 #0006 - 0x5804000B, // 0004 LDCONST R1 K11 - 0x70020000, // 0005 JMP #0007 - 0x5804000C, // 0006 LDCONST R1 K12 - 0x60080018, // 0007 GETGBL R2 G24 - 0x580C000D, // 0008 LDCONST R3 K13 - 0x6010000C, // 0009 GETGBL R4 G12 - 0x88140100, // 000A GETMBR R5 R0 K0 - 0x7C100200, // 000B CALL R4 1 - 0x88140105, // 000C GETMBR R5 R0 K5 - 0x5C180200, // 000D MOVE R6 R1 - 0x881C0107, // 000E GETMBR R7 R0 K7 - 0x7C080A00, // 000F CALL R2 5 - 0xA8040001, // 0010 EXBLK 1 1 - 0x80040400, // 0011 RET 1 R2 - 0xA8040001, // 0012 EXBLK 1 1 - 0x70020004, // 0013 JMP #0019 - 0xAC040000, // 0014 CATCH R1 0 0 - 0x70020001, // 0015 JMP #0018 - 0x80061C00, // 0016 RET 1 K14 - 0x70020000, // 0017 JMP #0019 - 0xB0080000, // 0018 RAISE 2 R0 R0 - 0x80000000, // 0019 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_color -********************************************************************/ -be_local_closure(class_ColorCycleColorProvider_add_color, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ColorCycleColorProvider, /* shared constants */ - be_str_weak(add_color), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C0C050F, // 0001 GETMET R3 R2 K15 - 0x7C0C0200, // 0002 CALL R3 1 - 0x8C100710, // 0003 GETMET R4 R3 K16 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C100400, // 0005 CALL R4 2 - 0x90020003, // 0006 SETMBR R0 K0 R3 - 0x80040000, // 0007 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: ColorCycleColorProvider -********************************************************************/ -extern const bclass be_class_ColorProvider; -be_local_class(ColorCycleColorProvider, - 2, - &be_class_ColorProvider, - be_nested_map(9, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(current_color, -1), be_const_var(0) }, - { be_const_key_weak(current_index, 0), be_const_var(1) }, - { be_const_key_weak(get_color_for_value, -1), be_const_closure(class_ColorCycleColorProvider_get_color_for_value_closure) }, - { be_const_key_weak(produce_value, -1), be_const_closure(class_ColorCycleColorProvider_produce_value_closure) }, - { be_const_key_weak(on_param_changed, -1), be_const_closure(class_ColorCycleColorProvider_on_param_changed_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(cycle_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(5000) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(next, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(palette, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(3, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(-16776961), - be_const_int(-16711936), - be_const_int(-65536), - })) ) } )) }, - { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, 5), be_const_closure(class_ColorCycleColorProvider_init_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_ColorCycleColorProvider_tostring_closure) }, - { be_const_key_weak(add_color, -1), be_const_closure(class_ColorCycleColorProvider_add_color_closure) }, - })), - be_str_weak(ColorCycleColorProvider) -); -// compact class 'PalettePatternAnimation' ktab size: 21, total: 40 (saved 152 bytes) -static const bvalue be_ktab_class_PalettePatternAnimation[21] = { - /* K0 */ be_nested_str_weak(pattern_func), - /* K1 */ be_nested_str_weak(color_source), - /* K2 */ be_nested_str_weak(_initialize_value_buffer), - /* K3 */ be_nested_str_weak(is_running), - /* K4 */ be_nested_str_weak(engine), - /* K5 */ be_nested_str_weak(time_ms), - /* K6 */ be_nested_str_weak(start_time), - /* K7 */ be_nested_str_weak(get_strip_length), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(width), - /* K10 */ be_nested_str_weak(value_buffer), - /* K11 */ be_nested_str_weak(get_color_for_value), - /* K12 */ be_nested_str_weak(current_color), - /* K13 */ be_nested_str_weak(set_pixel_color), - /* K14 */ be_const_int(1), - /* K15 */ be_nested_str_weak(resize), - /* K16 */ be_nested_str_weak(init), - /* K17 */ be_nested_str_weak(PalettePatternAnimation_X28strip_length_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), - /* K18 */ be_nested_str_weak(priority), - /* K19 */ be_nested_str_weak(update), - /* K20 */ be_nested_str_weak(_update_value_buffer), -}; - - -extern const bclass be_class_PalettePatternAnimation; - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_PalettePatternAnimation_on_param_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x1C0C0300, // 0000 EQ R3 R1 K0 - 0x740E0001, // 0001 JMPT R3 #0004 - 0x1C0C0301, // 0002 EQ R3 R1 K1 - 0x780E0001, // 0003 JMPF R3 #0006 - 0x8C0C0102, // 0004 GETMET R3 R0 K2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: render -********************************************************************/ -be_local_closure(class_PalettePatternAnimation_render, /* name */ - be_nested_proto( - 13, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0x880C0103, // 0000 GETMBR R3 R0 K3 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0203, // 0003 EQ R3 R1 R3 - 0x780E0001, // 0004 JMPF R3 #0007 - 0x500C0000, // 0005 LDBOOL R3 0 0 - 0x80040600, // 0006 RET 1 R3 - 0x4C0C0000, // 0007 LDNIL R3 - 0x1C0C0403, // 0008 EQ R3 R2 R3 - 0x780E0001, // 0009 JMPF R3 #000C - 0x880C0104, // 000A GETMBR R3 R0 K4 - 0x88080705, // 000B GETMBR R2 R3 K5 - 0x880C0101, // 000C GETMBR R3 R0 K1 - 0x4C100000, // 000D LDNIL R4 - 0x1C100604, // 000E EQ R4 R3 R4 - 0x78120001, // 000F JMPF R4 #0012 - 0x50100000, // 0010 LDBOOL R4 0 0 - 0x80040800, // 0011 RET 1 R4 - 0x88100106, // 0012 GETMBR R4 R0 K6 - 0x04100404, // 0013 SUB R4 R2 R4 - 0x88140104, // 0014 GETMBR R5 R0 K4 - 0x8C140B07, // 0015 GETMET R5 R5 K7 - 0x7C140200, // 0016 CALL R5 1 - 0x58180008, // 0017 LDCONST R6 K8 - 0x141C0C05, // 0018 LT R7 R6 R5 - 0x781E0016, // 0019 JMPF R7 #0031 - 0x881C0309, // 001A GETMBR R7 R1 K9 - 0x141C0C07, // 001B LT R7 R6 R7 - 0x781E0013, // 001C JMPF R7 #0031 - 0x881C010A, // 001D GETMBR R7 R0 K10 - 0x941C0E06, // 001E GETIDX R7 R7 R6 - 0x4C200000, // 001F LDNIL R8 - 0x8824070B, // 0020 GETMBR R9 R3 K11 - 0x4C280000, // 0021 LDNIL R10 - 0x2024120A, // 0022 NE R9 R9 R10 - 0x78260005, // 0023 JMPF R9 #002A - 0x8C24070B, // 0024 GETMET R9 R3 K11 - 0x5C2C0E00, // 0025 MOVE R11 R7 - 0x5C300800, // 0026 MOVE R12 R4 - 0x7C240600, // 0027 CALL R9 3 - 0x5C201200, // 0028 MOVE R8 R9 - 0x70020000, // 0029 JMP #002B - 0x8820070C, // 002A GETMBR R8 R3 K12 - 0x8C24030D, // 002B GETMET R9 R1 K13 - 0x5C2C0C00, // 002C MOVE R11 R6 - 0x5C301000, // 002D MOVE R12 R8 - 0x7C240600, // 002E CALL R9 3 - 0x00180D0E, // 002F ADD R6 R6 K14 - 0x7001FFE6, // 0030 JMP #0018 - 0x501C0200, // 0031 LDBOOL R7 1 0 - 0x80040E00, // 0032 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _update_value_buffer -********************************************************************/ -be_local_closure(class_PalettePatternAnimation__update_value_buffer, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(_update_value_buffer), - &be_const_str_solidified, - ( &(const binstruction[30]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x1C0C0403, // 0002 EQ R3 R2 R3 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x80000600, // 0004 RET 0 - 0x880C0104, // 0005 GETMBR R3 R0 K4 - 0x8C0C0707, // 0006 GETMET R3 R3 K7 - 0x7C0C0200, // 0007 CALL R3 1 - 0x6010000C, // 0008 GETGBL R4 G12 - 0x8814010A, // 0009 GETMBR R5 R0 K10 - 0x7C100200, // 000A CALL R4 1 - 0x20100803, // 000B NE R4 R4 R3 - 0x78120003, // 000C JMPF R4 #0011 - 0x8810010A, // 000D GETMBR R4 R0 K10 - 0x8C10090F, // 000E GETMET R4 R4 K15 - 0x5C180600, // 000F MOVE R6 R3 - 0x7C100400, // 0010 CALL R4 2 - 0x58100008, // 0011 LDCONST R4 K8 - 0x14140803, // 0012 LT R5 R4 R3 - 0x78160008, // 0013 JMPF R5 #001D - 0x8814010A, // 0014 GETMBR R5 R0 K10 - 0x5C180400, // 0015 MOVE R6 R2 - 0x5C1C0800, // 0016 MOVE R7 R4 - 0x5C200200, // 0017 MOVE R8 R1 - 0x5C240000, // 0018 MOVE R9 R0 - 0x7C180600, // 0019 CALL R6 3 - 0x98140806, // 001A SETIDX R5 R4 R6 - 0x0010090E, // 001B ADD R4 R4 K14 - 0x7001FFF4, // 001C JMP #0012 - 0x80000000, // 001D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _initialize_value_buffer -********************************************************************/ -be_local_closure(class_PalettePatternAnimation__initialize_value_buffer, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(_initialize_value_buffer), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C040307, // 0001 GETMET R1 R1 K7 - 0x7C040200, // 0002 CALL R1 1 - 0x8808010A, // 0003 GETMBR R2 R0 K10 - 0x8C08050F, // 0004 GETMET R2 R2 K15 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x58080008, // 0007 LDCONST R2 K8 - 0x140C0401, // 0008 LT R3 R2 R1 - 0x780E0003, // 0009 JMPF R3 #000E - 0x880C010A, // 000A GETMBR R3 R0 K10 - 0x980C0508, // 000B SETIDX R3 R2 K8 - 0x0008050E, // 000C ADD R2 R2 K14 - 0x7001FFF9, // 000D JMP #0008 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_PalettePatternAnimation_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080510, // 0003 GETMET R2 R2 K16 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x60080012, // 0006 GETGBL R2 G18 - 0x7C080000, // 0007 CALL R2 0 - 0x90021402, // 0008 SETMBR R0 K10 R2 - 0x8C080102, // 0009 GETMET R2 R0 K2 - 0x7C080200, // 000A CALL R2 1 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_PalettePatternAnimation_tostring, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C040307, // 0001 GETMET R1 R1 K7 - 0x7C040200, // 0002 CALL R1 1 - 0x60080018, // 0003 GETGBL R2 G24 - 0x580C0011, // 0004 LDCONST R3 K17 - 0x5C100200, // 0005 MOVE R4 R1 - 0x88140112, // 0006 GETMBR R5 R0 K18 - 0x88180103, // 0007 GETMBR R6 R0 K3 - 0x7C080800, // 0008 CALL R2 4 - 0x80040400, // 0009 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_PalettePatternAnimation_update, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PalettePatternAnimation, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080513, // 0003 GETMET R2 R2 K19 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x740A0001, // 0006 JMPT R2 #0009 - 0x50080000, // 0007 LDBOOL R2 0 0 - 0x80040400, // 0008 RET 1 R2 - 0x88080106, // 0009 GETMBR R2 R0 K6 - 0x04080202, // 000A SUB R2 R1 R2 - 0x8C0C0114, // 000B GETMET R3 R0 K20 - 0x5C140400, // 000C MOVE R5 R2 - 0x7C0C0400, // 000D CALL R3 2 - 0x500C0200, // 000E LDBOOL R3 1 0 - 0x80040600, // 000F RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: PalettePatternAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(PalettePatternAnimation, - 1, - &be_class_Animation, - be_nested_map(9, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(update, 1), be_const_closure(class_PalettePatternAnimation_update_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_PalettePatternAnimation_tostring_closure) }, - { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PalettePatternAnimation__update_value_buffer_closure) }, - { be_const_key_weak(_initialize_value_buffer, -1), be_const_closure(class_PalettePatternAnimation__initialize_value_buffer_closure) }, - { be_const_key_weak(on_param_changed, 8), be_const_closure(class_PalettePatternAnimation_on_param_changed_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(color_source, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, - })) ) } )) }, - { be_const_key_weak(pattern_func, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(function) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, 5), be_const_closure(class_PalettePatternAnimation_init_closure) }, - { be_const_key_weak(render, 0), be_const_closure(class_PalettePatternAnimation_render_closure) }, - { be_const_key_weak(value_buffer, -1), be_const_var(0) }, - })), - be_str_weak(PalettePatternAnimation) -); -// compact class 'StaticColorProvider' ktab size: 3, total: 5 (saved 16 bytes) -static const bvalue be_ktab_class_StaticColorProvider[3] = { - /* K0 */ be_nested_str_weak(color), - /* K1 */ be_nested_str_weak(StaticColorProvider_X28color_X3D0x_X2508X_X29), - /* K2 */ be_nested_str_weak(StaticColorProvider_X28color_X3Dunset_X29), -}; - - -extern const bclass be_class_StaticColorProvider; - -/******************************************************************** -** Solidified function: produce_value -********************************************************************/ -be_local_closure(class_StaticColorProvider_produce_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticColorProvider, /* shared constants */ - be_str_weak(produce_value), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x80040600, // 0001 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_StaticColorProvider_tostring, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticColorProvider, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0xA8020007, // 0000 EXBLK 0 #0009 - 0x60040018, // 0001 GETGBL R1 G24 - 0x58080001, // 0002 LDCONST R2 K1 - 0x880C0100, // 0003 GETMBR R3 R0 K0 - 0x7C040400, // 0004 CALL R1 2 - 0xA8040001, // 0005 EXBLK 1 1 - 0x80040200, // 0006 RET 1 R1 - 0xA8040001, // 0007 EXBLK 1 1 - 0x70020004, // 0008 JMP #000E - 0xAC040000, // 0009 CATCH R1 0 0 - 0x70020001, // 000A JMP #000D - 0x80060400, // 000B RET 1 K2 - 0x70020000, // 000C JMP #000E - 0xB0080000, // 000D RAISE 2 R0 R0 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_color_for_value -********************************************************************/ -be_local_closure(class_StaticColorProvider_get_color_for_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticColorProvider, /* shared constants */ - be_str_weak(get_color_for_value), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x80040600, // 0001 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: StaticColorProvider -********************************************************************/ -extern const bclass be_class_ColorProvider; -be_local_class(StaticColorProvider, - 0, - &be_class_ColorProvider, - be_nested_map(4, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(tostring, -1), be_const_closure(class_StaticColorProvider_tostring_closure) }, - { be_const_key_weak(produce_value, 2), be_const_closure(class_StaticColorProvider_produce_value_closure) }, - { be_const_key_weak(get_color_for_value, 0), be_const_closure(class_StaticColorProvider_get_color_for_value_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-1) }, - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(StaticColorProvider) -); - -/******************************************************************** -** Solidified function: get_registered_events -********************************************************************/ -be_local_closure(get_registered_events, /* name */ - be_nested_proto( - 2, /* nstack */ - 0, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(event_manager), - /* K2 */ be_nested_str_weak(get_registered_events), - }), - be_str_weak(get_registered_events), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8020000, // 0000 GETNGBL R0 K0 - 0x88000101, // 0001 GETMBR R0 R0 K1 - 0x8C000102, // 0002 GETMET R0 R0 K2 - 0x7C000200, // 0003 CALL R0 1 - 0x80040000, // 0004 RET 1 R0 - }) - ) -); -/*******************************************************************/ - -// compact class 'ShiftAnimation' ktab size: 33, total: 62 (saved 232 bytes) -static const bvalue be_ktab_class_ShiftAnimation[33] = { - /* K0 */ be_nested_str_weak(engine), - /* K1 */ be_nested_str_weak(get_strip_length), - /* K2 */ be_nested_str_weak(source_frame), - /* K3 */ be_nested_str_weak(animation), - /* K4 */ be_nested_str_weak(frame_buffer), - /* K5 */ be_nested_str_weak(current_colors), - /* K6 */ be_nested_str_weak(resize), - /* K7 */ be_const_int(0), - /* K8 */ be_const_int(-16777216), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(update), - /* K11 */ be_nested_str_weak(shift_speed), - /* K12 */ be_nested_str_weak(direction), - /* K13 */ be_nested_str_weak(wrap_around), - /* K14 */ be_nested_str_weak(source_animation), - /* K15 */ be_nested_str_weak(start_time), - /* K16 */ be_nested_str_weak(tasmota), - /* K17 */ be_nested_str_weak(scale_uint), - /* K18 */ be_nested_str_weak(current_offset), - /* K19 */ be_nested_str_weak(is_running), - /* K20 */ be_nested_str_weak(start), - /* K21 */ be_nested_str_weak(_calculate_shift), - /* K22 */ be_nested_str_weak(priority), - /* K23 */ be_nested_str_weak(right), - /* K24 */ be_nested_str_weak(left), - /* K25 */ be_nested_str_weak(ShiftAnimation_X28_X25s_X2C_X20speed_X3D_X25s_X2C_X20wrap_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), - /* K26 */ be_nested_str_weak(width), - /* K27 */ be_nested_str_weak(set_pixel_color), - /* K28 */ be_nested_str_weak(_initialize_buffers), - /* K29 */ be_nested_str_weak(clear), - /* K30 */ be_nested_str_weak(render), - /* K31 */ be_nested_str_weak(get_pixel_color), - /* K32 */ be_nested_str_weak(init), -}; - - -extern const bclass be_class_ShiftAnimation; - -/******************************************************************** -** Solidified function: _initialize_buffers -********************************************************************/ -be_local_closure(class_ShiftAnimation__initialize_buffers, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(_initialize_buffers), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0xB80A0600, // 0003 GETNGBL R2 K3 - 0x8C080504, // 0004 GETMET R2 R2 K4 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x90020402, // 0007 SETMBR R0 K2 R2 - 0x60080012, // 0008 GETGBL R2 G18 - 0x7C080000, // 0009 CALL R2 0 - 0x90020A02, // 000A SETMBR R0 K5 R2 - 0x88080105, // 000B GETMBR R2 R0 K5 - 0x8C080506, // 000C GETMET R2 R2 K6 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x58080007, // 000F LDCONST R2 K7 - 0x140C0401, // 0010 LT R3 R2 R1 - 0x780E0003, // 0011 JMPF R3 #0016 - 0x880C0105, // 0012 GETMBR R3 R0 K5 - 0x980C0508, // 0013 SETIDX R3 R2 K8 - 0x00080509, // 0014 ADD R2 R2 K9 - 0x7001FFF9, // 0015 JMP #0010 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_ShiftAnimation_update, /* name */ - be_nested_proto( - 16, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[63]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C08050A, // 0003 GETMET R2 R2 K10 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x8808010B, // 0006 GETMBR R2 R0 K11 - 0x880C010C, // 0007 GETMBR R3 R0 K12 - 0x8810010D, // 0008 GETMBR R4 R0 K13 - 0x8814010E, // 0009 GETMBR R5 R0 K14 - 0x88180100, // 000A GETMBR R6 R0 K0 - 0x8C180D01, // 000B GETMET R6 R6 K1 - 0x7C180200, // 000C CALL R6 1 - 0x241C0507, // 000D GT R7 R2 K7 - 0x781E0020, // 000E JMPF R7 #0030 - 0x881C010F, // 000F GETMBR R7 R0 K15 - 0x041C0207, // 0010 SUB R7 R1 R7 - 0xB8222000, // 0011 GETNGBL R8 K16 - 0x8C201111, // 0012 GETMET R8 R8 K17 - 0x5C280400, // 0013 MOVE R10 R2 - 0x582C0007, // 0014 LDCONST R11 K7 - 0x543200FE, // 0015 LDINT R12 255 - 0x58340007, // 0016 LDCONST R13 K7 - 0x543A0009, // 0017 LDINT R14 10 - 0x543E00FF, // 0018 LDINT R15 256 - 0x08381C0F, // 0019 MUL R14 R14 R15 - 0x7C200C00, // 001A CALL R8 6 - 0x24241107, // 001B GT R9 R8 K7 - 0x78260012, // 001C JMPF R9 #0030 - 0x08240E08, // 001D MUL R9 R7 R8 - 0x542A03E7, // 001E LDINT R10 1000 - 0x0C24120A, // 001F DIV R9 R9 R10 - 0x08241203, // 0020 MUL R9 R9 R3 - 0x7812000C, // 0021 JMPF R4 #002F - 0x542A00FF, // 0022 LDINT R10 256 - 0x08280C0A, // 0023 MUL R10 R6 R10 - 0x1028120A, // 0024 MOD R10 R9 R10 - 0x9002240A, // 0025 SETMBR R0 K18 R10 - 0x88280112, // 0026 GETMBR R10 R0 K18 - 0x14281507, // 0027 LT R10 R10 K7 - 0x782A0004, // 0028 JMPF R10 #002E - 0x542E00FF, // 0029 LDINT R11 256 - 0x082C0C0B, // 002A MUL R11 R6 R11 - 0x88280112, // 002B GETMBR R10 R0 K18 - 0x0028140B, // 002C ADD R10 R10 R11 - 0x9002240A, // 002D SETMBR R0 K18 R10 - 0x70020000, // 002E JMP #0030 - 0x90022409, // 002F SETMBR R0 K18 R9 - 0x4C1C0000, // 0030 LDNIL R7 - 0x201C0A07, // 0031 NE R7 R5 R7 - 0x781E0007, // 0032 JMPF R7 #003B - 0x881C0B13, // 0033 GETMBR R7 R5 K19 - 0x741E0002, // 0034 JMPT R7 #0038 - 0x8C1C0B14, // 0035 GETMET R7 R5 K20 - 0x8824010F, // 0036 GETMBR R9 R0 K15 - 0x7C1C0400, // 0037 CALL R7 2 - 0x8C1C0B0A, // 0038 GETMET R7 R5 K10 - 0x5C240200, // 0039 MOVE R9 R1 - 0x7C1C0400, // 003A CALL R7 2 - 0x8C1C0115, // 003B GETMET R7 R0 K21 - 0x7C1C0200, // 003C CALL R7 1 - 0x501C0200, // 003D LDBOOL R7 1 0 - 0x80040E00, // 003E RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_ShiftAnimation_tostring, /* name */ - be_nested_proto( - 13, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8804010C, // 0000 GETMBR R1 R0 K12 - 0x8808010B, // 0001 GETMBR R2 R0 K11 - 0x880C010D, // 0002 GETMBR R3 R0 K13 - 0x88100116, // 0003 GETMBR R4 R0 K22 - 0x24140307, // 0004 GT R5 R1 K7 - 0x78160001, // 0005 JMPF R5 #0008 - 0x58140017, // 0006 LDCONST R5 K23 - 0x70020000, // 0007 JMP #0009 - 0x58140018, // 0008 LDCONST R5 K24 - 0x60180018, // 0009 GETGBL R6 G24 - 0x581C0019, // 000A LDCONST R7 K25 - 0x5C200A00, // 000B MOVE R8 R5 - 0x5C240400, // 000C MOVE R9 R2 - 0x5C280600, // 000D MOVE R10 R3 - 0x5C2C0800, // 000E MOVE R11 R4 - 0x88300113, // 000F GETMBR R12 R0 K19 - 0x7C180C00, // 0010 CALL R6 6 - 0x80040C00, // 0011 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: render -********************************************************************/ -be_local_closure(class_ShiftAnimation_render, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x880C0113, // 0000 GETMBR R3 R0 K19 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0203, // 0003 EQ R3 R1 R3 - 0x780E0001, // 0004 JMPF R3 #0007 - 0x500C0000, // 0005 LDBOOL R3 0 0 - 0x80040600, // 0006 RET 1 R3 - 0x880C0100, // 0007 GETMBR R3 R0 K0 - 0x8C0C0701, // 0008 GETMET R3 R3 K1 - 0x7C0C0200, // 0009 CALL R3 1 - 0x58100007, // 000A LDCONST R4 K7 - 0x14140803, // 000B LT R5 R4 R3 - 0x78160009, // 000C JMPF R5 #0017 - 0x8814031A, // 000D GETMBR R5 R1 K26 - 0x14140805, // 000E LT R5 R4 R5 - 0x78160004, // 000F JMPF R5 #0015 - 0x8C14031B, // 0010 GETMET R5 R1 K27 - 0x5C1C0800, // 0011 MOVE R7 R4 - 0x88200105, // 0012 GETMBR R8 R0 K5 - 0x94201004, // 0013 GETIDX R8 R8 R4 - 0x7C140600, // 0014 CALL R5 3 - 0x00100909, // 0015 ADD R4 R4 K9 - 0x7001FFF3, // 0016 JMP #000B - 0x50140200, // 0017 LDBOOL R5 1 0 - 0x80040A00, // 0018 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_ShiftAnimation_on_param_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x1C0C030E, // 0000 EQ R3 R1 K14 - 0x780E0001, // 0001 JMPF R3 #0004 - 0x8C0C011C, // 0002 GETMET R3 R0 K28 - 0x7C0C0200, // 0003 CALL R3 1 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _calculate_shift -********************************************************************/ -be_local_closure(class_ShiftAnimation__calculate_shift, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(_calculate_shift), - &be_const_str_solidified, - ( &(const binstruction[64]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x6008000C, // 0003 GETGBL R2 G12 - 0x880C0105, // 0004 GETMBR R3 R0 K5 - 0x7C080200, // 0005 CALL R2 1 - 0x20080401, // 0006 NE R2 R2 R1 - 0x780A0001, // 0007 JMPF R2 #000A - 0x8C08011C, // 0008 GETMET R2 R0 K28 - 0x7C080200, // 0009 CALL R2 1 - 0x8808010E, // 000A GETMBR R2 R0 K14 - 0x880C010D, // 000B GETMBR R3 R0 K13 - 0x88100102, // 000C GETMBR R4 R0 K2 - 0x8C10091D, // 000D GETMET R4 R4 K29 - 0x7C100200, // 000E CALL R4 1 - 0x4C100000, // 000F LDNIL R4 - 0x20100404, // 0010 NE R4 R2 R4 - 0x78120003, // 0011 JMPF R4 #0016 - 0x8C10051E, // 0012 GETMET R4 R2 K30 - 0x88180102, // 0013 GETMBR R6 R0 K2 - 0x581C0007, // 0014 LDCONST R7 K7 - 0x7C100600, // 0015 CALL R4 3 - 0x88100112, // 0016 GETMBR R4 R0 K18 - 0x541600FF, // 0017 LDINT R5 256 - 0x0C100805, // 0018 DIV R4 R4 R5 - 0x88140112, // 0019 GETMBR R5 R0 K18 - 0x541A00FF, // 001A LDINT R6 256 - 0x10140A06, // 001B MOD R5 R5 R6 - 0x58180007, // 001C LDCONST R6 K7 - 0x141C0C01, // 001D LT R7 R6 R1 - 0x781E001F, // 001E JMPF R7 #003F - 0x041C0C04, // 001F SUB R7 R6 R4 - 0x780E000E, // 0020 JMPF R3 #0030 - 0x14200F07, // 0021 LT R8 R7 K7 - 0x78220001, // 0022 JMPF R8 #0025 - 0x001C0E01, // 0023 ADD R7 R7 R1 - 0x7001FFFB, // 0024 JMP #0021 - 0x28200E01, // 0025 GE R8 R7 R1 - 0x78220001, // 0026 JMPF R8 #0029 - 0x041C0E01, // 0027 SUB R7 R7 R1 - 0x7001FFFB, // 0028 JMP #0025 - 0x88200105, // 0029 GETMBR R8 R0 K5 - 0x88240102, // 002A GETMBR R9 R0 K2 - 0x8C24131F, // 002B GETMET R9 R9 K31 - 0x5C2C0E00, // 002C MOVE R11 R7 - 0x7C240400, // 002D CALL R9 2 - 0x98200C09, // 002E SETIDX R8 R6 R9 - 0x7002000C, // 002F JMP #003D - 0x28200F07, // 0030 GE R8 R7 K7 - 0x78220008, // 0031 JMPF R8 #003B - 0x14200E01, // 0032 LT R8 R7 R1 - 0x78220006, // 0033 JMPF R8 #003B - 0x88200105, // 0034 GETMBR R8 R0 K5 - 0x88240102, // 0035 GETMBR R9 R0 K2 - 0x8C24131F, // 0036 GETMET R9 R9 K31 - 0x5C2C0E00, // 0037 MOVE R11 R7 - 0x7C240400, // 0038 CALL R9 2 - 0x98200C09, // 0039 SETIDX R8 R6 R9 - 0x70020001, // 003A JMP #003D - 0x88200105, // 003B GETMBR R8 R0 K5 - 0x98200D08, // 003C SETIDX R8 R6 K8 - 0x00180D09, // 003D ADD R6 R6 K9 - 0x7001FFDD, // 003E JMP #001D - 0x80000000, // 003F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_ShiftAnimation_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ShiftAnimation, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080520, // 0003 GETMET R2 R2 K32 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x90022507, // 0006 SETMBR R0 K18 K7 - 0x8C08011C, // 0007 GETMET R2 R0 K28 - 0x7C080200, // 0008 CALL R2 1 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: ShiftAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(ShiftAnimation, - 3, - &be_class_Animation, - be_nested_map(11, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(current_colors, -1), be_const_var(2) }, - { be_const_key_weak(_initialize_buffers, -1), be_const_closure(class_ShiftAnimation__initialize_buffers_closure) }, - { be_const_key_weak(current_offset, 6), be_const_var(0) }, - { be_const_key_weak(tostring, 2), be_const_closure(class_ShiftAnimation_tostring_closure) }, - { be_const_key_weak(update, 10), be_const_closure(class_ShiftAnimation_update_closure) }, - { be_const_key_weak(on_param_changed, -1), be_const_closure(class_ShiftAnimation_on_param_changed_closure) }, - { be_const_key_weak(source_frame, -1), be_const_var(1) }, - { be_const_key_weak(_calculate_shift, -1), be_const_closure(class_ShiftAnimation__calculate_shift_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(4, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(shift_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(128) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(source_animation, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, - })) ) } )) }, - { be_const_key_weak(direction, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(1) }, - { be_const_key_weak(min, -1), be_const_int(-1) }, - { be_const_key_weak(max, 1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(wrap_around, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_bool(1) }, - { be_const_key_weak(type, -1), be_nested_str_weak(bool) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_ShiftAnimation_init_closure) }, - { be_const_key_weak(render, -1), be_const_closure(class_ShiftAnimation_render_closure) }, - })), - be_str_weak(ShiftAnimation) -); /******************************************************************** ** Solidified function: gradient_rainbow_radial @@ -9367,47 +9018,373 @@ be_local_closure(rich_palette_rainbow, /* name */ ); /*******************************************************************/ +// compact class 'PalettePatternAnimation' ktab size: 21, total: 40 (saved 152 bytes) +static const bvalue be_ktab_class_PalettePatternAnimation[21] = { + /* K0 */ be_nested_str_weak(pattern_func), + /* K1 */ be_nested_str_weak(color_source), + /* K2 */ be_nested_str_weak(_initialize_value_buffer), + /* K3 */ be_nested_str_weak(is_running), + /* K4 */ be_nested_str_weak(engine), + /* K5 */ be_nested_str_weak(time_ms), + /* K6 */ be_nested_str_weak(start_time), + /* K7 */ be_nested_str_weak(get_strip_length), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(width), + /* K10 */ be_nested_str_weak(value_buffer), + /* K11 */ be_nested_str_weak(get_color_for_value), + /* K12 */ be_nested_str_weak(current_color), + /* K13 */ be_nested_str_weak(set_pixel_color), + /* K14 */ be_const_int(1), + /* K15 */ be_nested_str_weak(resize), + /* K16 */ be_nested_str_weak(init), + /* K17 */ be_nested_str_weak(PalettePatternAnimation_X28strip_length_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), + /* K18 */ be_nested_str_weak(priority), + /* K19 */ be_nested_str_weak(update), + /* K20 */ be_nested_str_weak(_update_value_buffer), +}; + + +extern const bclass be_class_PalettePatternAnimation; /******************************************************************** -** Solidified function: shift_fast_scroll +** Solidified function: on_param_changed ********************************************************************/ -be_local_closure(shift_fast_scroll, /* name */ +be_local_closure(class_PalettePatternAnimation_on_param_changed, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* varg */ + 5, /* nstack */ + 3, /* argc */ + 10, /* 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(animation), - /* K1 */ be_nested_str_weak(shift_animation), - /* K2 */ be_nested_str_weak(direction), - /* K3 */ be_const_int(1), - /* K4 */ be_nested_str_weak(shift_speed), - /* K5 */ be_nested_str_weak(wrap_around), - }), - be_str_weak(shift_fast_scroll), + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(on_param_changed), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A00C7, // 0005 LDINT R2 200 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x50080200, // 0007 LDBOOL R2 1 0 - 0x90060A02, // 0008 SETMBR R1 K5 R2 - 0x80040200, // 0009 RET 1 R1 + ( &(const binstruction[ 7]) { /* code */ + 0x1C0C0300, // 0000 EQ R3 R1 K0 + 0x740E0001, // 0001 JMPT R3 #0004 + 0x1C0C0301, // 0002 EQ R3 R1 K1 + 0x780E0001, // 0003 JMPF R3 #0006 + 0x8C0C0102, // 0004 GETMET R3 R0 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x80000000, // 0006 RET 0 }) ) ); /*******************************************************************/ +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_PalettePatternAnimation_render, /* name */ + be_nested_proto( + 13, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[51]) { /* code */ + 0x880C0103, // 0000 GETMBR R3 R0 K3 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0203, // 0003 EQ R3 R1 R3 + 0x780E0001, // 0004 JMPF R3 #0007 + 0x500C0000, // 0005 LDBOOL R3 0 0 + 0x80040600, // 0006 RET 1 R3 + 0x4C0C0000, // 0007 LDNIL R3 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0001, // 0009 JMPF R3 #000C + 0x880C0104, // 000A GETMBR R3 R0 K4 + 0x88080705, // 000B GETMBR R2 R3 K5 + 0x880C0101, // 000C GETMBR R3 R0 K1 + 0x4C100000, // 000D LDNIL R4 + 0x1C100604, // 000E EQ R4 R3 R4 + 0x78120001, // 000F JMPF R4 #0012 + 0x50100000, // 0010 LDBOOL R4 0 0 + 0x80040800, // 0011 RET 1 R4 + 0x88100106, // 0012 GETMBR R4 R0 K6 + 0x04100404, // 0013 SUB R4 R2 R4 + 0x88140104, // 0014 GETMBR R5 R0 K4 + 0x8C140B07, // 0015 GETMET R5 R5 K7 + 0x7C140200, // 0016 CALL R5 1 + 0x58180008, // 0017 LDCONST R6 K8 + 0x141C0C05, // 0018 LT R7 R6 R5 + 0x781E0016, // 0019 JMPF R7 #0031 + 0x881C0309, // 001A GETMBR R7 R1 K9 + 0x141C0C07, // 001B LT R7 R6 R7 + 0x781E0013, // 001C JMPF R7 #0031 + 0x881C010A, // 001D GETMBR R7 R0 K10 + 0x941C0E06, // 001E GETIDX R7 R7 R6 + 0x4C200000, // 001F LDNIL R8 + 0x8824070B, // 0020 GETMBR R9 R3 K11 + 0x4C280000, // 0021 LDNIL R10 + 0x2024120A, // 0022 NE R9 R9 R10 + 0x78260005, // 0023 JMPF R9 #002A + 0x8C24070B, // 0024 GETMET R9 R3 K11 + 0x5C2C0E00, // 0025 MOVE R11 R7 + 0x5C300800, // 0026 MOVE R12 R4 + 0x7C240600, // 0027 CALL R9 3 + 0x5C201200, // 0028 MOVE R8 R9 + 0x70020000, // 0029 JMP #002B + 0x8820070C, // 002A GETMBR R8 R3 K12 + 0x8C24030D, // 002B GETMET R9 R1 K13 + 0x5C2C0C00, // 002C MOVE R11 R6 + 0x5C301000, // 002D MOVE R12 R8 + 0x7C240600, // 002E CALL R9 3 + 0x00180D0E, // 002F ADD R6 R6 K14 + 0x7001FFE6, // 0030 JMP #0018 + 0x501C0200, // 0031 LDBOOL R7 1 0 + 0x80040E00, // 0032 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update_value_buffer +********************************************************************/ +be_local_closure(class_PalettePatternAnimation__update_value_buffer, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(_update_value_buffer), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x1C0C0403, // 0002 EQ R3 R2 R3 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x80000600, // 0004 RET 0 + 0x880C0104, // 0005 GETMBR R3 R0 K4 + 0x8C0C0707, // 0006 GETMET R3 R3 K7 + 0x7C0C0200, // 0007 CALL R3 1 + 0x6010000C, // 0008 GETGBL R4 G12 + 0x8814010A, // 0009 GETMBR R5 R0 K10 + 0x7C100200, // 000A CALL R4 1 + 0x20100803, // 000B NE R4 R4 R3 + 0x78120003, // 000C JMPF R4 #0011 + 0x8810010A, // 000D GETMBR R4 R0 K10 + 0x8C10090F, // 000E GETMET R4 R4 K15 + 0x5C180600, // 000F MOVE R6 R3 + 0x7C100400, // 0010 CALL R4 2 + 0x58100008, // 0011 LDCONST R4 K8 + 0x14140803, // 0012 LT R5 R4 R3 + 0x78160008, // 0013 JMPF R5 #001D + 0x8814010A, // 0014 GETMBR R5 R0 K10 + 0x5C180400, // 0015 MOVE R6 R2 + 0x5C1C0800, // 0016 MOVE R7 R4 + 0x5C200200, // 0017 MOVE R8 R1 + 0x5C240000, // 0018 MOVE R9 R0 + 0x7C180600, // 0019 CALL R6 3 + 0x98140806, // 001A SETIDX R5 R4 R6 + 0x0010090E, // 001B ADD R4 R4 K14 + 0x7001FFF4, // 001C JMP #0012 + 0x80000000, // 001D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _initialize_value_buffer +********************************************************************/ +be_local_closure(class_PalettePatternAnimation__initialize_value_buffer, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(_initialize_value_buffer), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x88040104, // 0000 GETMBR R1 R0 K4 + 0x8C040307, // 0001 GETMET R1 R1 K7 + 0x7C040200, // 0002 CALL R1 1 + 0x8808010A, // 0003 GETMBR R2 R0 K10 + 0x8C08050F, // 0004 GETMET R2 R2 K15 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x58080008, // 0007 LDCONST R2 K8 + 0x140C0401, // 0008 LT R3 R2 R1 + 0x780E0003, // 0009 JMPF R3 #000E + 0x880C010A, // 000A GETMBR R3 R0 K10 + 0x980C0508, // 000B SETIDX R3 R2 K8 + 0x0008050E, // 000C ADD R2 R2 K14 + 0x7001FFF9, // 000D JMP #0008 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_PalettePatternAnimation_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080510, // 0003 GETMET R2 R2 K16 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x60080012, // 0006 GETGBL R2 G18 + 0x7C080000, // 0007 CALL R2 0 + 0x90021402, // 0008 SETMBR R0 K10 R2 + 0x8C080102, // 0009 GETMET R2 R0 K2 + 0x7C080200, // 000A CALL R2 1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_PalettePatternAnimation_tostring, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x88040104, // 0000 GETMBR R1 R0 K4 + 0x8C040307, // 0001 GETMET R1 R1 K7 + 0x7C040200, // 0002 CALL R1 1 + 0x60080018, // 0003 GETGBL R2 G24 + 0x580C0011, // 0004 LDCONST R3 K17 + 0x5C100200, // 0005 MOVE R4 R1 + 0x88140112, // 0006 GETMBR R5 R0 K18 + 0x88180103, // 0007 GETMBR R6 R0 K3 + 0x7C080800, // 0008 CALL R2 4 + 0x80040400, // 0009 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update +********************************************************************/ +be_local_closure(class_PalettePatternAnimation_update, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PalettePatternAnimation, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080513, // 0003 GETMET R2 R2 K19 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x740A0001, // 0006 JMPT R2 #0009 + 0x50080000, // 0007 LDBOOL R2 0 0 + 0x80040400, // 0008 RET 1 R2 + 0x88080106, // 0009 GETMBR R2 R0 K6 + 0x04080202, // 000A SUB R2 R1 R2 + 0x8C0C0114, // 000B GETMET R3 R0 K20 + 0x5C140400, // 000C MOVE R5 R2 + 0x7C0C0400, // 000D CALL R3 2 + 0x500C0200, // 000E LDBOOL R3 1 0 + 0x80040600, // 000F RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: PalettePatternAnimation +********************************************************************/ +extern const bclass be_class_Animation; +be_local_class(PalettePatternAnimation, + 1, + &be_class_Animation, + be_nested_map(9, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update, 1), be_const_closure(class_PalettePatternAnimation_update_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_PalettePatternAnimation_tostring_closure) }, + { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PalettePatternAnimation__update_value_buffer_closure) }, + { be_const_key_weak(_initialize_value_buffer, -1), be_const_closure(class_PalettePatternAnimation__initialize_value_buffer_closure) }, + { be_const_key_weak(on_param_changed, 8), be_const_closure(class_PalettePatternAnimation_on_param_changed_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(color_source, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, + })) ) } )) }, + { be_const_key_weak(pattern_func, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(function) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, 5), be_const_closure(class_PalettePatternAnimation_init_closure) }, + { be_const_key_weak(render, 0), be_const_closure(class_PalettePatternAnimation_render_closure) }, + { be_const_key_weak(value_buffer, -1), be_const_var(0) }, + })), + be_str_weak(PalettePatternAnimation) +); + /******************************************************************** ** Solidified function: sine_osc ********************************************************************/ @@ -9479,47 +9456,468 @@ be_local_closure(bounce, /* name */ ); /*******************************************************************/ +// compact class 'ShiftAnimation' ktab size: 33, total: 62 (saved 232 bytes) +static const bvalue be_ktab_class_ShiftAnimation[33] = { + /* K0 */ be_nested_str_weak(engine), + /* K1 */ be_nested_str_weak(get_strip_length), + /* K2 */ be_nested_str_weak(source_frame), + /* K3 */ be_nested_str_weak(animation), + /* K4 */ be_nested_str_weak(frame_buffer), + /* K5 */ be_nested_str_weak(current_colors), + /* K6 */ be_nested_str_weak(resize), + /* K7 */ be_const_int(0), + /* K8 */ be_const_int(-16777216), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(update), + /* K11 */ be_nested_str_weak(shift_speed), + /* K12 */ be_nested_str_weak(direction), + /* K13 */ be_nested_str_weak(wrap_around), + /* K14 */ be_nested_str_weak(source_animation), + /* K15 */ be_nested_str_weak(start_time), + /* K16 */ be_nested_str_weak(tasmota), + /* K17 */ be_nested_str_weak(scale_uint), + /* K18 */ be_nested_str_weak(current_offset), + /* K19 */ be_nested_str_weak(is_running), + /* K20 */ be_nested_str_weak(start), + /* K21 */ be_nested_str_weak(_calculate_shift), + /* K22 */ be_nested_str_weak(priority), + /* K23 */ be_nested_str_weak(right), + /* K24 */ be_nested_str_weak(left), + /* K25 */ be_nested_str_weak(ShiftAnimation_X28_X25s_X2C_X20speed_X3D_X25s_X2C_X20wrap_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), + /* K26 */ be_nested_str_weak(width), + /* K27 */ be_nested_str_weak(set_pixel_color), + /* K28 */ be_nested_str_weak(_initialize_buffers), + /* K29 */ be_nested_str_weak(clear), + /* K30 */ be_nested_str_weak(render), + /* K31 */ be_nested_str_weak(get_pixel_color), + /* K32 */ be_nested_str_weak(init), +}; + + +extern const bclass be_class_ShiftAnimation; /******************************************************************** -** Solidified function: shift_scroll_right +** Solidified function: _initialize_buffers ********************************************************************/ -be_local_closure(shift_scroll_right, /* name */ +be_local_closure(class_ShiftAnimation__initialize_buffers, /* name */ be_nested_proto( - 4, /* nstack */ + 5, /* nstack */ 1, /* argc */ - 0, /* varg */ + 10, /* 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(animation), - /* K1 */ be_nested_str_weak(shift_animation), - /* K2 */ be_nested_str_weak(direction), - /* K3 */ be_const_int(1), - /* K4 */ be_nested_str_weak(shift_speed), - /* K5 */ be_nested_str_weak(wrap_around), - }), - be_str_weak(shift_scroll_right), + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(_initialize_buffers), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 + ( &(const binstruction[23]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A007F, // 0005 LDINT R2 128 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x50080200, // 0007 LDBOOL R2 1 0 - 0x90060A02, // 0008 SETMBR R1 K5 R2 - 0x80040200, // 0009 RET 1 R1 + 0x7C040200, // 0002 CALL R1 1 + 0xB80A0600, // 0003 GETNGBL R2 K3 + 0x8C080504, // 0004 GETMET R2 R2 K4 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x90020402, // 0007 SETMBR R0 K2 R2 + 0x60080012, // 0008 GETGBL R2 G18 + 0x7C080000, // 0009 CALL R2 0 + 0x90020A02, // 000A SETMBR R0 K5 R2 + 0x88080105, // 000B GETMBR R2 R0 K5 + 0x8C080506, // 000C GETMET R2 R2 K6 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x58080007, // 000F LDCONST R2 K7 + 0x140C0401, // 0010 LT R3 R2 R1 + 0x780E0003, // 0011 JMPF R3 #0016 + 0x880C0105, // 0012 GETMBR R3 R0 K5 + 0x980C0508, // 0013 SETIDX R3 R2 K8 + 0x00080509, // 0014 ADD R2 R2 K9 + 0x7001FFF9, // 0015 JMP #0010 + 0x80000000, // 0016 RET 0 }) ) ); /*******************************************************************/ +/******************************************************************** +** Solidified function: update +********************************************************************/ +be_local_closure(class_ShiftAnimation_update, /* name */ + be_nested_proto( + 16, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[63]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C08050A, // 0003 GETMET R2 R2 K10 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x8808010B, // 0006 GETMBR R2 R0 K11 + 0x880C010C, // 0007 GETMBR R3 R0 K12 + 0x8810010D, // 0008 GETMBR R4 R0 K13 + 0x8814010E, // 0009 GETMBR R5 R0 K14 + 0x88180100, // 000A GETMBR R6 R0 K0 + 0x8C180D01, // 000B GETMET R6 R6 K1 + 0x7C180200, // 000C CALL R6 1 + 0x241C0507, // 000D GT R7 R2 K7 + 0x781E0020, // 000E JMPF R7 #0030 + 0x881C010F, // 000F GETMBR R7 R0 K15 + 0x041C0207, // 0010 SUB R7 R1 R7 + 0xB8222000, // 0011 GETNGBL R8 K16 + 0x8C201111, // 0012 GETMET R8 R8 K17 + 0x5C280400, // 0013 MOVE R10 R2 + 0x582C0007, // 0014 LDCONST R11 K7 + 0x543200FE, // 0015 LDINT R12 255 + 0x58340007, // 0016 LDCONST R13 K7 + 0x543A0009, // 0017 LDINT R14 10 + 0x543E00FF, // 0018 LDINT R15 256 + 0x08381C0F, // 0019 MUL R14 R14 R15 + 0x7C200C00, // 001A CALL R8 6 + 0x24241107, // 001B GT R9 R8 K7 + 0x78260012, // 001C JMPF R9 #0030 + 0x08240E08, // 001D MUL R9 R7 R8 + 0x542A03E7, // 001E LDINT R10 1000 + 0x0C24120A, // 001F DIV R9 R9 R10 + 0x08241203, // 0020 MUL R9 R9 R3 + 0x7812000C, // 0021 JMPF R4 #002F + 0x542A00FF, // 0022 LDINT R10 256 + 0x08280C0A, // 0023 MUL R10 R6 R10 + 0x1028120A, // 0024 MOD R10 R9 R10 + 0x9002240A, // 0025 SETMBR R0 K18 R10 + 0x88280112, // 0026 GETMBR R10 R0 K18 + 0x14281507, // 0027 LT R10 R10 K7 + 0x782A0004, // 0028 JMPF R10 #002E + 0x542E00FF, // 0029 LDINT R11 256 + 0x082C0C0B, // 002A MUL R11 R6 R11 + 0x88280112, // 002B GETMBR R10 R0 K18 + 0x0028140B, // 002C ADD R10 R10 R11 + 0x9002240A, // 002D SETMBR R0 K18 R10 + 0x70020000, // 002E JMP #0030 + 0x90022409, // 002F SETMBR R0 K18 R9 + 0x4C1C0000, // 0030 LDNIL R7 + 0x201C0A07, // 0031 NE R7 R5 R7 + 0x781E0007, // 0032 JMPF R7 #003B + 0x881C0B13, // 0033 GETMBR R7 R5 K19 + 0x741E0002, // 0034 JMPT R7 #0038 + 0x8C1C0B14, // 0035 GETMET R7 R5 K20 + 0x8824010F, // 0036 GETMBR R9 R0 K15 + 0x7C1C0400, // 0037 CALL R7 2 + 0x8C1C0B0A, // 0038 GETMET R7 R5 K10 + 0x5C240200, // 0039 MOVE R9 R1 + 0x7C1C0400, // 003A CALL R7 2 + 0x8C1C0115, // 003B GETMET R7 R0 K21 + 0x7C1C0200, // 003C CALL R7 1 + 0x501C0200, // 003D LDBOOL R7 1 0 + 0x80040E00, // 003E RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_ShiftAnimation_tostring, /* name */ + be_nested_proto( + 13, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8804010C, // 0000 GETMBR R1 R0 K12 + 0x8808010B, // 0001 GETMBR R2 R0 K11 + 0x880C010D, // 0002 GETMBR R3 R0 K13 + 0x88100116, // 0003 GETMBR R4 R0 K22 + 0x24140307, // 0004 GT R5 R1 K7 + 0x78160001, // 0005 JMPF R5 #0008 + 0x58140017, // 0006 LDCONST R5 K23 + 0x70020000, // 0007 JMP #0009 + 0x58140018, // 0008 LDCONST R5 K24 + 0x60180018, // 0009 GETGBL R6 G24 + 0x581C0019, // 000A LDCONST R7 K25 + 0x5C200A00, // 000B MOVE R8 R5 + 0x5C240400, // 000C MOVE R9 R2 + 0x5C280600, // 000D MOVE R10 R3 + 0x5C2C0800, // 000E MOVE R11 R4 + 0x88300113, // 000F GETMBR R12 R0 K19 + 0x7C180C00, // 0010 CALL R6 6 + 0x80040C00, // 0011 RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_ShiftAnimation_render, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x880C0113, // 0000 GETMBR R3 R0 K19 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0203, // 0003 EQ R3 R1 R3 + 0x780E0001, // 0004 JMPF R3 #0007 + 0x500C0000, // 0005 LDBOOL R3 0 0 + 0x80040600, // 0006 RET 1 R3 + 0x880C0100, // 0007 GETMBR R3 R0 K0 + 0x8C0C0701, // 0008 GETMET R3 R3 K1 + 0x7C0C0200, // 0009 CALL R3 1 + 0x58100007, // 000A LDCONST R4 K7 + 0x14140803, // 000B LT R5 R4 R3 + 0x78160009, // 000C JMPF R5 #0017 + 0x8814031A, // 000D GETMBR R5 R1 K26 + 0x14140805, // 000E LT R5 R4 R5 + 0x78160004, // 000F JMPF R5 #0015 + 0x8C14031B, // 0010 GETMET R5 R1 K27 + 0x5C1C0800, // 0011 MOVE R7 R4 + 0x88200105, // 0012 GETMBR R8 R0 K5 + 0x94201004, // 0013 GETIDX R8 R8 R4 + 0x7C140600, // 0014 CALL R5 3 + 0x00100909, // 0015 ADD R4 R4 K9 + 0x7001FFF3, // 0016 JMP #000B + 0x50140200, // 0017 LDBOOL R5 1 0 + 0x80040A00, // 0018 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: on_param_changed +********************************************************************/ +be_local_closure(class_ShiftAnimation_on_param_changed, /* name */ + be_nested_proto( + 5, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(on_param_changed), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x1C0C030E, // 0000 EQ R3 R1 K14 + 0x780E0001, // 0001 JMPF R3 #0004 + 0x8C0C011C, // 0002 GETMET R3 R0 K28 + 0x7C0C0200, // 0003 CALL R3 1 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _calculate_shift +********************************************************************/ +be_local_closure(class_ShiftAnimation__calculate_shift, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(_calculate_shift), + &be_const_str_solidified, + ( &(const binstruction[64]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x6008000C, // 0003 GETGBL R2 G12 + 0x880C0105, // 0004 GETMBR R3 R0 K5 + 0x7C080200, // 0005 CALL R2 1 + 0x20080401, // 0006 NE R2 R2 R1 + 0x780A0001, // 0007 JMPF R2 #000A + 0x8C08011C, // 0008 GETMET R2 R0 K28 + 0x7C080200, // 0009 CALL R2 1 + 0x8808010E, // 000A GETMBR R2 R0 K14 + 0x880C010D, // 000B GETMBR R3 R0 K13 + 0x88100102, // 000C GETMBR R4 R0 K2 + 0x8C10091D, // 000D GETMET R4 R4 K29 + 0x7C100200, // 000E CALL R4 1 + 0x4C100000, // 000F LDNIL R4 + 0x20100404, // 0010 NE R4 R2 R4 + 0x78120003, // 0011 JMPF R4 #0016 + 0x8C10051E, // 0012 GETMET R4 R2 K30 + 0x88180102, // 0013 GETMBR R6 R0 K2 + 0x581C0007, // 0014 LDCONST R7 K7 + 0x7C100600, // 0015 CALL R4 3 + 0x88100112, // 0016 GETMBR R4 R0 K18 + 0x541600FF, // 0017 LDINT R5 256 + 0x0C100805, // 0018 DIV R4 R4 R5 + 0x88140112, // 0019 GETMBR R5 R0 K18 + 0x541A00FF, // 001A LDINT R6 256 + 0x10140A06, // 001B MOD R5 R5 R6 + 0x58180007, // 001C LDCONST R6 K7 + 0x141C0C01, // 001D LT R7 R6 R1 + 0x781E001F, // 001E JMPF R7 #003F + 0x041C0C04, // 001F SUB R7 R6 R4 + 0x780E000E, // 0020 JMPF R3 #0030 + 0x14200F07, // 0021 LT R8 R7 K7 + 0x78220001, // 0022 JMPF R8 #0025 + 0x001C0E01, // 0023 ADD R7 R7 R1 + 0x7001FFFB, // 0024 JMP #0021 + 0x28200E01, // 0025 GE R8 R7 R1 + 0x78220001, // 0026 JMPF R8 #0029 + 0x041C0E01, // 0027 SUB R7 R7 R1 + 0x7001FFFB, // 0028 JMP #0025 + 0x88200105, // 0029 GETMBR R8 R0 K5 + 0x88240102, // 002A GETMBR R9 R0 K2 + 0x8C24131F, // 002B GETMET R9 R9 K31 + 0x5C2C0E00, // 002C MOVE R11 R7 + 0x7C240400, // 002D CALL R9 2 + 0x98200C09, // 002E SETIDX R8 R6 R9 + 0x7002000C, // 002F JMP #003D + 0x28200F07, // 0030 GE R8 R7 K7 + 0x78220008, // 0031 JMPF R8 #003B + 0x14200E01, // 0032 LT R8 R7 R1 + 0x78220006, // 0033 JMPF R8 #003B + 0x88200105, // 0034 GETMBR R8 R0 K5 + 0x88240102, // 0035 GETMBR R9 R0 K2 + 0x8C24131F, // 0036 GETMET R9 R9 K31 + 0x5C2C0E00, // 0037 MOVE R11 R7 + 0x7C240400, // 0038 CALL R9 2 + 0x98200C09, // 0039 SETIDX R8 R6 R9 + 0x70020001, // 003A JMP #003D + 0x88200105, // 003B GETMBR R8 R0 K5 + 0x98200D08, // 003C SETIDX R8 R6 K8 + 0x00180D09, // 003D ADD R6 R6 K9 + 0x7001FFDD, // 003E JMP #001D + 0x80000000, // 003F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_ShiftAnimation_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ShiftAnimation, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080520, // 0003 GETMET R2 R2 K32 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x90022507, // 0006 SETMBR R0 K18 K7 + 0x8C08011C, // 0007 GETMET R2 R0 K28 + 0x7C080200, // 0008 CALL R2 1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: ShiftAnimation +********************************************************************/ +extern const bclass be_class_Animation; +be_local_class(ShiftAnimation, + 3, + &be_class_Animation, + be_nested_map(11, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(current_colors, -1), be_const_var(2) }, + { be_const_key_weak(_initialize_buffers, -1), be_const_closure(class_ShiftAnimation__initialize_buffers_closure) }, + { be_const_key_weak(current_offset, 6), be_const_var(0) }, + { be_const_key_weak(tostring, 2), be_const_closure(class_ShiftAnimation_tostring_closure) }, + { be_const_key_weak(update, 10), be_const_closure(class_ShiftAnimation_update_closure) }, + { be_const_key_weak(on_param_changed, -1), be_const_closure(class_ShiftAnimation_on_param_changed_closure) }, + { be_const_key_weak(source_frame, -1), be_const_var(1) }, + { be_const_key_weak(_calculate_shift, -1), be_const_closure(class_ShiftAnimation__calculate_shift_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(shift_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(128) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(source_animation, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(instance) }, + })) ) } )) }, + { be_const_key_weak(direction, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(1) }, + { be_const_key_weak(min, -1), be_const_int(-1) }, + { be_const_key_weak(max, 1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(wrap_around, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_bool(1) }, + { be_const_key_weak(type, -1), be_nested_str_weak(bool) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_ShiftAnimation_init_closure) }, + { be_const_key_weak(render, -1), be_const_closure(class_ShiftAnimation_render_closure) }, + })), + be_str_weak(ShiftAnimation) +); + /******************************************************************** ** Solidified function: jitter_all ********************************************************************/ @@ -9598,72 +9996,65 @@ be_local_closure(linear, /* name */ ); /*******************************************************************/ -// compact class 'ClosureValueProvider' ktab size: 26, total: 39 (saved 104 bytes) -static const bvalue be_ktab_class_ClosureValueProvider[26] = { - /* K0 */ be_nested_str_weak(closure), - /* K1 */ be_nested_str_weak(_closure), - /* K2 */ be_nested_str_weak(math), - /* K3 */ be_nested_str_weak(abs), - /* K4 */ be_nested_str_weak(int), - /* K5 */ be_const_int(0), - /* K6 */ be_const_real_hex(0x437F0000), - /* K7 */ be_nested_str_weak(sqrt), - /* K8 */ be_nested_str_weak(ClosureValueProvider_X28_X25s_X29), - /* K9 */ be_nested_str_weak(closure_X20set), - /* K10 */ be_nested_str_weak(no_X20closure), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(scale_int), - /* K13 */ be_nested_str_weak(sine_int), - /* K14 */ be_nested_str_weak(min), - /* K15 */ be_nested_str_weak(round), - /* K16 */ be_nested_str_weak(max), - /* K17 */ be_nested_str_weak(animation), - /* K18 */ be_nested_str_weak(is_value_provider), - /* K19 */ be_nested_str_weak(produce_value), - /* K20 */ be_nested_str_weak(engine), - /* K21 */ be_nested_str_weak(time_ms), - /* K22 */ be_nested_str_weak(parameterized_object), - /* K23 */ be_nested_str_weak(value_error), - /* K24 */ be_nested_str_weak(Parameter_X20name_X20cannot_X20be_X20nil_X20when_X20resolving_X20object_X20parameter), - /* K25 */ be_nested_str_weak(get_param_value), +// compact class 'PlasmaAnimation' ktab size: 46, total: 93 (saved 376 bytes) +static const bvalue be_ktab_class_PlasmaAnimation[46] = { + /* K0 */ be_nested_str_weak(start), + /* K1 */ be_nested_str_weak(color), + /* K2 */ be_nested_str_weak(animation), + /* K3 */ be_nested_str_weak(rich_palette), + /* K4 */ be_nested_str_weak(engine), + /* K5 */ be_nested_str_weak(palette), + /* K6 */ be_nested_str_weak(PALETTE_RAINBOW), + /* K7 */ be_nested_str_weak(cycle_period), + /* K8 */ be_nested_str_weak(transition_type), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(brightness), + /* K11 */ be_nested_str_weak(range_min), + /* K12 */ be_const_int(0), + /* K13 */ be_nested_str_weak(range_max), + /* K14 */ be_nested_str_weak(time_phase), + /* K15 */ be_nested_str_weak(is_value_provider), + /* K16 */ be_nested_str_weak(0x_X2508x), + /* K17 */ be_nested_str_weak(PlasmaAnimation_X28color_X3D_X25s_X2C_X20freq_x_X3D_X25s_X2C_X20freq_y_X3D_X25s_X2C_X20time_speed_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), + /* K18 */ be_nested_str_weak(freq_x), + /* K19 */ be_nested_str_weak(freq_y), + /* K20 */ be_nested_str_weak(time_speed), + /* K21 */ be_nested_str_weak(priority), + /* K22 */ be_nested_str_weak(is_running), + /* K23 */ be_nested_str_weak(init), + /* K24 */ be_nested_str_weak(current_colors), + /* K25 */ be_nested_str_weak(_initialize_colors), + /* K26 */ be_nested_str_weak(update), + /* K27 */ be_nested_str_weak(start_time), + /* K28 */ be_nested_str_weak(tasmota), + /* K29 */ be_nested_str_weak(scale_uint), + /* K30 */ be_nested_str_weak(_calculate_plasma), + /* K31 */ be_nested_str_weak(get_strip_length), + /* K32 */ be_nested_str_weak(resize), + /* K33 */ be_const_int(-16777216), + /* K34 */ be_nested_str_weak(set_param), + /* K35 */ be_nested_str_weak(phase_x), + /* K36 */ be_nested_str_weak(phase_y), + /* K37 */ be_nested_str_weak(blend_mode), + /* K38 */ be_nested_str_weak(_sine), + /* K39 */ be_const_int(2), + /* K40 */ be_nested_str_weak(is_color_provider), + /* K41 */ be_nested_str_weak(get_color_for_value), + /* K42 */ be_nested_str_weak(resolve_value), + /* K43 */ be_nested_str_weak(width), + /* K44 */ be_nested_str_weak(set_pixel_color), + /* K45 */ be_nested_str_weak(sine_int), }; -extern const bclass be_class_ClosureValueProvider; +extern const bclass be_class_PlasmaAnimation; /******************************************************************** -** Solidified function: on_param_changed +** Solidified function: start ********************************************************************/ -be_local_closure(class_ClosureValueProvider_on_param_changed, /* name */ +be_local_closure(class_PlasmaAnimation_start, /* name */ be_nested_proto( - 4, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x1C0C0300, // 0000 EQ R3 R1 K0 - 0x780E0000, // 0001 JMPF R3 #0003 - 0x90020202, // 0002 SETMBR R0 K1 R2 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: abs -********************************************************************/ -be_local_closure(class_ClosureValueProvider_abs, /* name */ - be_nested_proto( - 6, /* nstack */ + 5, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -9671,64 +10062,38 @@ be_local_closure(class_ClosureValueProvider_abs, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(abs), + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(start), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xA40A0400, // 0000 IMPORT R2 K2 - 0x8C0C0503, // 0001 GETMET R3 R2 K3 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x80040600, // 0004 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sqrt -********************************************************************/ -be_local_closure(class_ClosureValueProvider_sqrt, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(sqrt), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0xA40A0400, // 0000 IMPORT R2 K2 - 0x600C0004, // 0001 GETGBL R3 G4 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x1C0C0704, // 0004 EQ R3 R3 K4 - 0x780E000E, // 0005 JMPF R3 #0015 - 0x280C0305, // 0006 GE R3 R1 K5 - 0x780E000C, // 0007 JMPF R3 #0015 - 0x540E00FE, // 0008 LDINT R3 255 - 0x180C0203, // 0009 LE R3 R1 R3 - 0x780E0009, // 000A JMPF R3 #0015 - 0x0C0C0306, // 000B DIV R3 R1 K6 - 0x60100009, // 000C GETGBL R4 G9 - 0x8C140507, // 000D GETMET R5 R2 K7 - 0x5C1C0600, // 000E MOVE R7 R3 - 0x7C140400, // 000F CALL R5 2 - 0x541A00FE, // 0010 LDINT R6 255 - 0x08140A06, // 0011 MUL R5 R5 R6 - 0x7C100200, // 0012 CALL R4 1 - 0x80040800, // 0013 RET 1 R4 - 0x70020003, // 0014 JMP #0019 - 0x8C0C0507, // 0015 GETMET R3 R2 K7 - 0x5C140200, // 0016 MOVE R5 R1 - 0x7C0C0400, // 0017 CALL R3 2 - 0x80040600, // 0018 RET 1 R3 - 0x80000000, // 0019 RET 0 + ( &(const binstruction[28]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080500, // 0003 GETMET R2 R2 K0 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x88080101, // 0006 GETMBR R2 R0 K1 + 0x4C0C0000, // 0007 LDNIL R3 + 0x1C080403, // 0008 EQ R2 R2 R3 + 0x780A000F, // 0009 JMPF R2 #001A + 0xB80A0400, // 000A GETNGBL R2 K2 + 0x8C080503, // 000B GETMET R2 R2 K3 + 0x88100104, // 000C GETMBR R4 R0 K4 + 0x7C080400, // 000D CALL R2 2 + 0xB80E0400, // 000E GETNGBL R3 K2 + 0x880C0706, // 000F GETMBR R3 R3 K6 + 0x900A0A03, // 0010 SETMBR R2 K5 R3 + 0x540E1387, // 0011 LDINT R3 5000 + 0x900A0E03, // 0012 SETMBR R2 K7 R3 + 0x900A1109, // 0013 SETMBR R2 K8 K9 + 0x540E00FE, // 0014 LDINT R3 255 + 0x900A1403, // 0015 SETMBR R2 K10 R3 + 0x900A170C, // 0016 SETMBR R2 K11 K12 + 0x540E00FE, // 0017 LDINT R3 255 + 0x900A1A03, // 0018 SETMBR R2 K13 R3 + 0x90020202, // 0019 SETMBR R0 K1 R2 + 0x90021D0C, // 001A SETMBR R0 K14 K12 + 0x80040000, // 001B RET 1 R0 }) ) ); @@ -9738,9 +10103,9 @@ be_local_closure(class_ClosureValueProvider_sqrt, /* name */ /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(class_ClosureValueProvider_tostring, /* name */ +be_local_closure(class_PlasmaAnimation_tostring, /* name */ be_nested_proto( - 4, /* nstack */ + 11, /* nstack */ 1, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -9748,19 +10113,37 @@ be_local_closure(class_ClosureValueProvider_tostring, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x60040018, // 0000 GETGBL R1 G24 - 0x58080008, // 0001 LDCONST R2 K8 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x780E0001, // 0003 JMPF R3 #0006 - 0x580C0009, // 0004 LDCONST R3 K9 - 0x70020000, // 0005 JMP #0007 - 0x580C000A, // 0006 LDCONST R3 K10 - 0x7C040400, // 0007 CALL R1 2 - 0x80040200, // 0008 RET 1 R1 + ( &(const binstruction[27]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x8C0C070F, // 0003 GETMET R3 R3 K15 + 0x5C140400, // 0004 MOVE R5 R2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x780E0004, // 0006 JMPF R3 #000C + 0x600C0008, // 0007 GETGBL R3 G8 + 0x5C100400, // 0008 MOVE R4 R2 + 0x7C0C0200, // 0009 CALL R3 1 + 0x5C040600, // 000A MOVE R1 R3 + 0x70020004, // 000B JMP #0011 + 0x600C0018, // 000C GETGBL R3 G24 + 0x58100010, // 000D LDCONST R4 K16 + 0x5C140400, // 000E MOVE R5 R2 + 0x7C0C0400, // 000F CALL R3 2 + 0x5C040600, // 0010 MOVE R1 R3 + 0x600C0018, // 0011 GETGBL R3 G24 + 0x58100011, // 0012 LDCONST R4 K17 + 0x5C140200, // 0013 MOVE R5 R1 + 0x88180112, // 0014 GETMBR R6 R0 K18 + 0x881C0113, // 0015 GETMBR R7 R0 K19 + 0x88200114, // 0016 GETMBR R8 R0 K20 + 0x88240115, // 0017 GETMBR R9 R0 K21 + 0x88280116, // 0018 GETMBR R10 R0 K22 + 0x7C0C0E00, // 0019 CALL R3 7 + 0x80040600, // 001A RET 1 R3 }) ) ); @@ -9768,11 +10151,11 @@ be_local_closure(class_ClosureValueProvider_tostring, /* name */ /******************************************************************** -** Solidified function: cos +** Solidified function: init ********************************************************************/ -be_local_closure(class_ClosureValueProvider_cos, /* name */ +be_local_closure(class_PlasmaAnimation_init, /* name */ be_nested_proto( - 11, /* nstack */ + 5, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -9780,32 +10163,23 @@ be_local_closure(class_ClosureValueProvider_cos, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(cos), + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xB80A1600, // 0000 GETNGBL R2 K11 - 0x8C08050C, // 0001 GETMET R2 R2 K12 - 0x5C100200, // 0002 MOVE R4 R1 - 0x58140005, // 0003 LDCONST R5 K5 - 0x541A00FE, // 0004 LDINT R6 255 - 0x581C0005, // 0005 LDCONST R7 K5 - 0x54227FFE, // 0006 LDINT R8 32767 - 0x7C080C00, // 0007 CALL R2 6 - 0xB80E1600, // 0008 GETNGBL R3 K11 - 0x8C0C070D, // 0009 GETMET R3 R3 K13 - 0x54161FFF, // 000A LDINT R5 8192 - 0x04140405, // 000B SUB R5 R2 R5 - 0x7C0C0400, // 000C CALL R3 2 - 0xB8121600, // 000D GETNGBL R4 K11 - 0x8C10090C, // 000E GETMET R4 R4 K12 - 0x5C180600, // 000F MOVE R6 R3 - 0x541DEFFF, // 0010 LDINT R7 -4096 - 0x54220FFF, // 0011 LDINT R8 4096 - 0x5425FF00, // 0012 LDINT R9 -255 - 0x542A00FE, // 0013 LDINT R10 255 - 0x7C100C00, // 0014 CALL R4 6 - 0x80040800, // 0015 RET 1 R4 + ( &(const binstruction[13]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080517, // 0003 GETMET R2 R2 K23 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x90021D0C, // 0006 SETMBR R0 K14 K12 + 0x60080012, // 0007 GETGBL R2 G18 + 0x7C080000, // 0008 CALL R2 0 + 0x90023002, // 0009 SETMBR R0 K24 R2 + 0x8C080119, // 000A GETMET R2 R0 K25 + 0x7C080200, // 000B CALL R2 1 + 0x80000000, // 000C RET 0 }) ) ); @@ -9813,9 +10187,9 @@ be_local_closure(class_ClosureValueProvider_cos, /* name */ /******************************************************************** -** Solidified function: sin +** Solidified function: update ********************************************************************/ -be_local_closure(class_ClosureValueProvider_sin, /* name */ +be_local_closure(class_PlasmaAnimation_update, /* name */ be_nested_proto( 11, /* nstack */ 2, /* argc */ @@ -9825,28 +10199,346 @@ be_local_closure(class_ClosureValueProvider_sin, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(sin), + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C08051A, // 0003 GETMET R2 R2 K26 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x740A0001, // 0006 JMPT R2 #0009 + 0x50080000, // 0007 LDBOOL R2 0 0 + 0x80040400, // 0008 RET 1 R2 + 0x88080114, // 0009 GETMBR R2 R0 K20 + 0x240C050C, // 000A GT R3 R2 K12 + 0x780E0011, // 000B JMPF R3 #001E + 0x880C011B, // 000C GETMBR R3 R0 K27 + 0x040C0203, // 000D SUB R3 R1 R3 + 0xB8123800, // 000E GETNGBL R4 K28 + 0x8C10091D, // 000F GETMET R4 R4 K29 + 0x5C180400, // 0010 MOVE R6 R2 + 0x581C000C, // 0011 LDCONST R7 K12 + 0x542200FE, // 0012 LDINT R8 255 + 0x5824000C, // 0013 LDCONST R9 K12 + 0x542A0007, // 0014 LDINT R10 8 + 0x7C100C00, // 0015 CALL R4 6 + 0x2414090C, // 0016 GT R5 R4 K12 + 0x78160005, // 0017 JMPF R5 #001E + 0x08140604, // 0018 MUL R5 R3 R4 + 0x541A03E7, // 0019 LDINT R6 1000 + 0x0C140A06, // 001A DIV R5 R5 R6 + 0x541A00FF, // 001B LDINT R6 256 + 0x10140A06, // 001C MOD R5 R5 R6 + 0x90021C05, // 001D SETMBR R0 K14 R5 + 0x8C0C011E, // 001E GETMET R3 R0 K30 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0x500C0200, // 0021 LDBOOL R3 1 0 + 0x80040600, // 0022 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _initialize_colors +********************************************************************/ +be_local_closure(class_PlasmaAnimation__initialize_colors, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(_initialize_colors), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x88040104, // 0000 GETMBR R1 R0 K4 + 0x8C04031F, // 0001 GETMET R1 R1 K31 + 0x7C040200, // 0002 CALL R1 1 + 0x88080118, // 0003 GETMBR R2 R0 K24 + 0x8C080520, // 0004 GETMET R2 R2 K32 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x5808000C, // 0007 LDCONST R2 K12 + 0x140C0401, // 0008 LT R3 R2 R1 + 0x780E0003, // 0009 JMPF R3 #000E + 0x880C0118, // 000A GETMBR R3 R0 K24 + 0x980C0521, // 000B SETIDX R3 R2 K33 + 0x00080509, // 000C ADD R2 R2 K9 + 0x7001FFF9, // 000D JMP #0008 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: on_param_changed +********************************************************************/ +be_local_closure(class_PlasmaAnimation_on_param_changed, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(on_param_changed), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x1C0C0301, // 0000 EQ R3 R1 K1 + 0x780E0015, // 0001 JMPF R3 #0018 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0403, // 0003 EQ R3 R2 R3 + 0x780E0012, // 0004 JMPF R3 #0018 + 0xB80E0400, // 0005 GETNGBL R3 K2 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x88140104, // 0007 GETMBR R5 R0 K4 + 0x7C0C0400, // 0008 CALL R3 2 + 0xB8120400, // 0009 GETNGBL R4 K2 + 0x88100906, // 000A GETMBR R4 R4 K6 + 0x900E0A04, // 000B SETMBR R3 K5 R4 + 0x54121387, // 000C LDINT R4 5000 + 0x900E0E04, // 000D SETMBR R3 K7 R4 + 0x900E1109, // 000E SETMBR R3 K8 K9 + 0x541200FE, // 000F LDINT R4 255 + 0x900E1404, // 0010 SETMBR R3 K10 R4 + 0x900E170C, // 0011 SETMBR R3 K11 K12 + 0x541200FE, // 0012 LDINT R4 255 + 0x900E1A04, // 0013 SETMBR R3 K13 R4 + 0x8C100122, // 0014 GETMET R4 R0 K34 + 0x58180001, // 0015 LDCONST R6 K1 + 0x5C1C0600, // 0016 MOVE R7 R3 + 0x7C100600, // 0017 CALL R4 3 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _calculate_plasma +********************************************************************/ +be_local_closure(class_PlasmaAnimation__calculate_plasma, /* name */ + be_nested_proto( + 21, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(_calculate_plasma), + &be_const_str_solidified, + ( &(const binstruction[103]) { /* code */ + 0x88080104, // 0000 GETMBR R2 R0 K4 + 0x8C08051F, // 0001 GETMET R2 R2 K31 + 0x7C080200, // 0002 CALL R2 1 + 0x600C000C, // 0003 GETGBL R3 G12 + 0x88100118, // 0004 GETMBR R4 R0 K24 + 0x7C0C0200, // 0005 CALL R3 1 + 0x200C0602, // 0006 NE R3 R3 R2 + 0x780E0001, // 0007 JMPF R3 #000A + 0x8C0C0119, // 0008 GETMET R3 R0 K25 + 0x7C0C0200, // 0009 CALL R3 1 + 0x880C0112, // 000A GETMBR R3 R0 K18 + 0x88100113, // 000B GETMBR R4 R0 K19 + 0x88140123, // 000C GETMBR R5 R0 K35 + 0x88180124, // 000D GETMBR R6 R0 K36 + 0x881C0125, // 000E GETMBR R7 R0 K37 + 0x88200101, // 000F GETMBR R8 R0 K1 + 0x5824000C, // 0010 LDCONST R9 K12 + 0x14281202, // 0011 LT R10 R9 R2 + 0x782A0052, // 0012 JMPF R10 #0066 + 0xB82A3800, // 0013 GETNGBL R10 K28 + 0x8C28151D, // 0014 GETMET R10 R10 K29 + 0x5C301200, // 0015 MOVE R12 R9 + 0x5834000C, // 0016 LDCONST R13 K12 + 0x04380509, // 0017 SUB R14 R2 K9 + 0x583C000C, // 0018 LDCONST R15 K12 + 0x544200FE, // 0019 LDINT R16 255 + 0x7C280C00, // 001A CALL R10 6 + 0x8C2C0126, // 001B GETMET R11 R0 K38 + 0x08341403, // 001C MUL R13 R10 R3 + 0x543A001F, // 001D LDINT R14 32 + 0x0C341A0E, // 001E DIV R13 R13 R14 + 0x00341A05, // 001F ADD R13 R13 R5 + 0x8838010E, // 0020 GETMBR R14 R0 K14 + 0x00341A0E, // 0021 ADD R13 R13 R14 + 0x7C2C0400, // 0022 CALL R11 2 + 0x8C300126, // 0023 GETMET R12 R0 K38 + 0x08381404, // 0024 MUL R14 R10 R4 + 0x543E001F, // 0025 LDINT R15 32 + 0x0C381C0F, // 0026 DIV R14 R14 R15 + 0x00381C06, // 0027 ADD R14 R14 R6 + 0x883C010E, // 0028 GETMBR R15 R0 K14 + 0x083C1F27, // 0029 MUL R15 R15 K39 + 0x00381C0F, // 002A ADD R14 R14 R15 + 0x7C300400, // 002B CALL R12 2 + 0x5834000C, // 002C LDCONST R13 K12 + 0x1C380F0C, // 002D EQ R14 R7 K12 + 0x783A0003, // 002E JMPF R14 #0033 + 0x0038160C, // 002F ADD R14 R11 R12 + 0x0C381D27, // 0030 DIV R14 R14 K39 + 0x5C341C00, // 0031 MOVE R13 R14 + 0x7002000E, // 0032 JMP #0042 + 0x1C380F09, // 0033 EQ R14 R7 K9 + 0x783A0009, // 0034 JMPF R14 #003F + 0xB83A3800, // 0035 GETNGBL R14 K28 + 0x8C381D1D, // 0036 GETMET R14 R14 K29 + 0x5C401600, // 0037 MOVE R16 R11 + 0x5844000C, // 0038 LDCONST R17 K12 + 0x544A00FE, // 0039 LDINT R18 255 + 0x584C000C, // 003A LDCONST R19 K12 + 0x5C501800, // 003B MOVE R20 R12 + 0x7C380C00, // 003C CALL R14 6 + 0x5C341C00, // 003D MOVE R13 R14 + 0x70020002, // 003E JMP #0042 + 0x0038160C, // 003F ADD R14 R11 R12 + 0x0C381D27, // 0040 DIV R14 R14 K39 + 0x5C341C00, // 0041 MOVE R13 R14 + 0x543A00FE, // 0042 LDINT R14 255 + 0x24381A0E, // 0043 GT R14 R13 R14 + 0x783A0001, // 0044 JMPF R14 #0047 + 0x543600FE, // 0045 LDINT R13 255 + 0x70020002, // 0046 JMP #004A + 0x14381B0C, // 0047 LT R14 R13 K12 + 0x783A0000, // 0048 JMPF R14 #004A + 0x5834000C, // 0049 LDCONST R13 K12 + 0x58380021, // 004A LDCONST R14 K33 + 0xB83E0400, // 004B GETNGBL R15 K2 + 0x8C3C1F28, // 004C GETMET R15 R15 K40 + 0x5C441000, // 004D MOVE R17 R8 + 0x7C3C0400, // 004E CALL R15 2 + 0x783E0009, // 004F JMPF R15 #005A + 0x883C1129, // 0050 GETMBR R15 R8 K41 + 0x4C400000, // 0051 LDNIL R16 + 0x203C1E10, // 0052 NE R15 R15 R16 + 0x783E0005, // 0053 JMPF R15 #005A + 0x8C3C1129, // 0054 GETMET R15 R8 K41 + 0x5C441A00, // 0055 MOVE R17 R13 + 0x5848000C, // 0056 LDCONST R18 K12 + 0x7C3C0600, // 0057 CALL R15 3 + 0x5C381E00, // 0058 MOVE R14 R15 + 0x70020007, // 0059 JMP #0062 + 0x8C3C012A, // 005A GETMET R15 R0 K42 + 0x5C441000, // 005B MOVE R17 R8 + 0x58480001, // 005C LDCONST R18 K1 + 0x544E0009, // 005D LDINT R19 10 + 0x084C1A13, // 005E MUL R19 R13 R19 + 0x004C0213, // 005F ADD R19 R1 R19 + 0x7C3C0800, // 0060 CALL R15 4 + 0x5C381E00, // 0061 MOVE R14 R15 + 0x883C0118, // 0062 GETMBR R15 R0 K24 + 0x983C120E, // 0063 SETIDX R15 R9 R14 + 0x00241309, // 0064 ADD R9 R9 K9 + 0x7001FFAA, // 0065 JMP #0011 + 0x80000000, // 0066 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_PlasmaAnimation_render, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x880C0116, // 0000 GETMBR R3 R0 K22 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0203, // 0003 EQ R3 R1 R3 + 0x780E0001, // 0004 JMPF R3 #0007 + 0x500C0000, // 0005 LDBOOL R3 0 0 + 0x80040600, // 0006 RET 1 R3 + 0x880C0104, // 0007 GETMBR R3 R0 K4 + 0x8C0C071F, // 0008 GETMET R3 R3 K31 + 0x7C0C0200, // 0009 CALL R3 1 + 0x5810000C, // 000A LDCONST R4 K12 + 0x14140803, // 000B LT R5 R4 R3 + 0x78160009, // 000C JMPF R5 #0017 + 0x8814032B, // 000D GETMBR R5 R1 K43 + 0x14140805, // 000E LT R5 R4 R5 + 0x78160004, // 000F JMPF R5 #0015 + 0x8C14032C, // 0010 GETMET R5 R1 K44 + 0x5C1C0800, // 0011 MOVE R7 R4 + 0x88200118, // 0012 GETMBR R8 R0 K24 + 0x94201004, // 0013 GETIDX R8 R8 R4 + 0x7C140600, // 0014 CALL R5 3 + 0x00100909, // 0015 ADD R4 R4 K9 + 0x7001FFF3, // 0016 JMP #000B + 0x50140200, // 0017 LDBOOL R5 1 0 + 0x80040A00, // 0018 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _sine +********************************************************************/ +be_local_closure(class_PlasmaAnimation__sine, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_PlasmaAnimation, /* shared constants */ + be_str_weak(_sine), &be_const_str_solidified, ( &(const binstruction[21]) { /* code */ - 0xB80A1600, // 0000 GETNGBL R2 K11 - 0x8C08050C, // 0001 GETMET R2 R2 K12 + 0xB80A3800, // 0000 GETNGBL R2 K28 + 0x8C08051D, // 0001 GETMET R2 R2 K29 0x5C100200, // 0002 MOVE R4 R1 - 0x58140005, // 0003 LDCONST R5 K5 + 0x5814000C, // 0003 LDCONST R5 K12 0x541A00FE, // 0004 LDINT R6 255 - 0x581C0005, // 0005 LDCONST R7 K5 + 0x581C000C, // 0005 LDCONST R7 K12 0x54227FFE, // 0006 LDINT R8 32767 0x7C080C00, // 0007 CALL R2 6 - 0xB80E1600, // 0008 GETNGBL R3 K11 - 0x8C0C070D, // 0009 GETMET R3 R3 K13 + 0xB80E3800, // 0008 GETNGBL R3 K28 + 0x8C0C072D, // 0009 GETMET R3 R3 K45 0x5C140400, // 000A MOVE R5 R2 0x7C0C0400, // 000B CALL R3 2 - 0xB8121600, // 000C GETNGBL R4 K11 - 0x8C10090C, // 000D GETMET R4 R4 K12 + 0xB8123800, // 000C GETNGBL R4 K28 + 0x8C10091D, // 000D GETMET R4 R4 K29 0x5C180600, // 000E MOVE R6 R3 0x541DEFFF, // 000F LDINT R7 -4096 0x54220FFF, // 0010 LDINT R8 4096 - 0x5425FF00, // 0011 LDINT R9 -255 + 0x5824000C, // 0011 LDCONST R9 K12 0x542A00FE, // 0012 LDINT R10 255 0x7C100C00, // 0013 CALL R4 6 0x80040800, // 0014 RET 1 R4 @@ -9857,122 +10549,101 @@ be_local_closure(class_ClosureValueProvider_sin, /* name */ /******************************************************************** -** Solidified function: min +** Solidified class: PlasmaAnimation ********************************************************************/ -be_local_closure(class_ClosureValueProvider_min, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 11, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(min), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0xA40A0400, // 0000 IMPORT R2 K2 - 0x600C0016, // 0001 GETGBL R3 G22 - 0x8810050E, // 0002 GETMBR R4 R2 K14 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C0C0400, // 0004 CALL R3 2 - 0x80040600, // 0005 RET 1 R3 - }) - ) +extern const bclass be_class_Animation; +be_local_class(PlasmaAnimation, + 2, + &be_class_Animation, + be_nested_map(12, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_sine, -1), be_const_closure(class_PlasmaAnimation__sine_closure) }, + { be_const_key_weak(tostring, 2), be_const_closure(class_PlasmaAnimation_tostring_closure) }, + { be_const_key_weak(render, 5), be_const_closure(class_PlasmaAnimation_render_closure) }, + { be_const_key_weak(init, 9), be_const_closure(class_PlasmaAnimation_init_closure) }, + { be_const_key_weak(update, -1), be_const_closure(class_PlasmaAnimation_update_closure) }, + { be_const_key_weak(_calculate_plasma, 7), be_const_closure(class_PlasmaAnimation__calculate_plasma_closure) }, + { be_const_key_weak(_initialize_colors, -1), be_const_closure(class_PlasmaAnimation__initialize_colors_closure) }, + { be_const_key_weak(on_param_changed, 6), be_const_closure(class_PlasmaAnimation_on_param_changed_closure) }, + { be_const_key_weak(time_phase, -1), be_const_var(1) }, + { be_const_key_weak(current_colors, 10), be_const_var(0) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(7, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(phase_y, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(64) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(freq_x, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(32) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(blend_mode, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(time_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(50) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(color, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + })) ) } )) }, + { be_const_key_weak(phase_x, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(freq_y, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(23) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(start, 0), be_const_closure(class_PlasmaAnimation_start_closure) }, + })), + be_str_weak(PlasmaAnimation) ); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: round -********************************************************************/ -be_local_closure(class_ClosureValueProvider_round, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(round), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xA40A0400, // 0000 IMPORT R2 K2 - 0x600C0009, // 0001 GETGBL R3 G9 - 0x8C10050F, // 0002 GETMET R4 R2 K15 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C100400, // 0004 CALL R4 2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x80040600, // 0006 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: max -********************************************************************/ -be_local_closure(class_ClosureValueProvider_max, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 11, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(max), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0xA40A0400, // 0000 IMPORT R2 K2 - 0x600C0016, // 0001 GETGBL R3 G22 - 0x88100510, // 0002 GETMBR R4 R2 K16 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C0C0400, // 0004 CALL R3 2 - 0x80040600, // 0005 RET 1 R3 - }) - ) -); -/*******************************************************************/ +extern const bclass be_class_ColorProvider; /******************************************************************** ** Solidified function: produce_value ********************************************************************/ -be_local_closure(class_ClosureValueProvider_produce_value, /* name */ +be_local_closure(class_ColorProvider_produce_value, /* name */ be_nested_proto( - 8, /* nstack */ + 4, /* nstack */ 3, /* argc */ - 10, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ + 0, /* has constants */ + NULL, /* no const */ be_str_weak(produce_value), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x880C0101, // 0000 GETMBR R3 R0 K1 - 0x4C100000, // 0001 LDNIL R4 - 0x1C100604, // 0002 EQ R4 R3 R4 - 0x78120001, // 0003 JMPF R4 #0006 - 0x4C100000, // 0004 LDNIL R4 - 0x80040800, // 0005 RET 1 R4 - 0x5C100600, // 0006 MOVE R4 R3 - 0x5C140000, // 0007 MOVE R5 R0 - 0x5C180200, // 0008 MOVE R6 R1 - 0x5C1C0400, // 0009 MOVE R7 R2 - 0x7C100600, // 000A CALL R4 3 - 0x80040800, // 000B RET 1 R4 + ( &(const binstruction[ 2]) { /* code */ + 0x540DFFFE, // 0000 LDINT R3 -1 + 0x80040600, // 0001 RET 1 R3 }) ) ); @@ -9980,56 +10651,30 @@ be_local_closure(class_ClosureValueProvider_produce_value, /* name */ /******************************************************************** -** Solidified function: resolve +** Solidified function: get_color_for_value ********************************************************************/ -be_local_closure(class_ClosureValueProvider_resolve, /* name */ +be_local_closure(class_ColorProvider_get_color_for_value, /* name */ be_nested_proto( 7, /* nstack */ 3, /* argc */ - 10, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(resolve), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(produce_value), + /* K1 */ be_nested_str_weak(color), + }), + be_str_weak(get_color_for_value), &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ - 0xB80E2200, // 0000 GETNGBL R3 K17 - 0x8C0C0712, // 0001 GETMET R3 R3 K18 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x780E0006, // 0004 JMPF R3 #000C - 0x8C0C0313, // 0005 GETMET R3 R1 K19 - 0x5C140400, // 0006 MOVE R5 R2 - 0x88180114, // 0007 GETMBR R6 R0 K20 - 0x88180D15, // 0008 GETMBR R6 R6 K21 - 0x7C0C0600, // 0009 CALL R3 3 - 0x80040600, // 000A RET 1 R3 - 0x70020014, // 000B JMP #0021 - 0x4C0C0000, // 000C LDNIL R3 - 0x200C0203, // 000D NE R3 R1 R3 - 0x780E0010, // 000E JMPF R3 #0020 - 0x600C000F, // 000F GETGBL R3 G15 - 0x5C100200, // 0010 MOVE R4 R1 - 0xB8162200, // 0011 GETNGBL R5 K17 - 0x88140B16, // 0012 GETMBR R5 R5 K22 - 0x7C0C0400, // 0013 CALL R3 2 - 0x780E000A, // 0014 JMPF R3 #0020 - 0x4C0C0000, // 0015 LDNIL R3 - 0x1C0C0403, // 0016 EQ R3 R2 R3 - 0x780E0000, // 0017 JMPF R3 #0019 - 0xB0062F18, // 0018 RAISE 1 K23 K24 - 0x8C0C0319, // 0019 GETMET R3 R1 K25 - 0x5C140400, // 001A MOVE R5 R2 - 0x88180114, // 001B GETMBR R6 R0 K20 - 0x88180D15, // 001C GETMBR R6 R6 K21 - 0x7C0C0600, // 001D CALL R3 3 - 0x80040600, // 001E RET 1 R3 - 0x70020000, // 001F JMP #0021 - 0x80040200, // 0020 RET 1 R1 - 0x80000000, // 0021 RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x58140001, // 0001 LDCONST R5 K1 + 0x5C180400, // 0002 MOVE R6 R2 + 0x7C0C0600, // 0003 CALL R3 3 + 0x80040600, // 0004 RET 1 R3 }) ) ); @@ -10037,122 +10682,20 @@ be_local_closure(class_ClosureValueProvider_resolve, /* name */ /******************************************************************** -** Solidified function: scale -********************************************************************/ -be_local_closure(class_ClosureValueProvider_scale, /* name */ - be_nested_proto( - 13, /* nstack */ - 6, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_ClosureValueProvider, /* shared constants */ - be_str_weak(scale), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0xB81A1600, // 0000 GETNGBL R6 K11 - 0x8C180D0C, // 0001 GETMET R6 R6 K12 - 0x5C200200, // 0002 MOVE R8 R1 - 0x5C240400, // 0003 MOVE R9 R2 - 0x5C280600, // 0004 MOVE R10 R3 - 0x5C2C0800, // 0005 MOVE R11 R4 - 0x5C300A00, // 0006 MOVE R12 R5 - 0x7C180C00, // 0007 CALL R6 6 - 0x80040C00, // 0008 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: ClosureValueProvider +** Solidified class: ColorProvider ********************************************************************/ extern const bclass be_class_ValueProvider; -be_local_class(ClosureValueProvider, - 1, +be_local_class(ColorProvider, + 0, &be_class_ValueProvider, - be_nested_map(14, + be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(scale, -1), be_const_closure(class_ClosureValueProvider_scale_closure) }, - { be_const_key_weak(abs, 8), be_const_closure(class_ClosureValueProvider_abs_closure) }, - { be_const_key_weak(resolve, 6), be_const_closure(class_ClosureValueProvider_resolve_closure) }, - { be_const_key_weak(tostring, 2), be_const_closure(class_ClosureValueProvider_tostring_closure) }, - { be_const_key_weak(cos, -1), be_const_closure(class_ClosureValueProvider_cos_closure) }, - { be_const_key_weak(sin, 10), be_const_closure(class_ClosureValueProvider_sin_closure) }, - { be_const_key_weak(min, -1), be_const_closure(class_ClosureValueProvider_min_closure) }, - { be_const_key_weak(round, -1), be_const_closure(class_ClosureValueProvider_round_closure) }, - { be_const_key_weak(produce_value, 12), be_const_closure(class_ClosureValueProvider_produce_value_closure) }, - { be_const_key_weak(max, -1), be_const_closure(class_ClosureValueProvider_max_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(closure, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(function) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(_closure, -1), be_const_var(0) }, - { be_const_key_weak(sqrt, -1), be_const_closure(class_ClosureValueProvider_sqrt_closure) }, - { be_const_key_weak(on_param_changed, 0), be_const_closure(class_ClosureValueProvider_on_param_changed_closure) }, + { be_const_key_weak(get_color_for_value, -1), be_const_closure(class_ColorProvider_get_color_for_value_closure) }, + { be_const_key_weak(produce_value, 0), be_const_closure(class_ColorProvider_produce_value_closure) }, })), - be_str_weak(ClosureValueProvider) + be_str_weak(ColorProvider) ); -/******************************************************************** -** Solidified function: twinkle_rainbow -********************************************************************/ -be_local_closure(twinkle_rainbow, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(twinkle_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(density), - /* K4 */ be_nested_str_weak(twinkle_speed), - /* K5 */ be_nested_str_weak(fade_speed), - /* K6 */ be_nested_str_weak(min_brightness), - /* K7 */ be_nested_str_weak(max_brightness), - }), - be_str_weak(twinkle_rainbow), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x5409FFFE, // 0004 LDINT R2 -1 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x540A0077, // 0006 LDINT R2 120 - 0x90060602, // 0007 SETMBR R1 K3 R2 - 0x540A0005, // 0008 LDINT R2 6 - 0x90060802, // 0009 SETMBR R1 K4 R2 - 0x540A00B3, // 000A LDINT R2 180 - 0x90060A02, // 000B SETMBR R1 K5 R2 - 0x540A001F, // 000C LDINT R2 32 - 0x90060C02, // 000D SETMBR R1 K6 R2 - 0x540A00FE, // 000E LDINT R2 255 - 0x90060E02, // 000F SETMBR R1 K7 R2 - 0x80040200, // 0010 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: register_event_handler ********************************************************************/ @@ -10189,6 +10732,283 @@ be_local_closure(register_event_handler, /* name */ ); /*******************************************************************/ +// compact class 'StaticValueProvider' ktab size: 3, total: 10 (saved 56 bytes) +static const bvalue be_ktab_class_StaticValueProvider[3] = { + /* K0 */ be_nested_str_weak(value), + /* K1 */ be_nested_str_weak(StaticValueProvider_X28value_X3D_X25s_X29), + /* K2 */ be_nested_str_weak(StaticValueProvider_X28value_X3Dunset_X29), +}; + + +extern const bclass be_class_StaticValueProvider; + +/******************************************************************** +** Solidified function: <= +********************************************************************/ +be_local_closure(class_StaticValueProvider__X3C_X3D, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X3C_X3D), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x18080403, // 0004 LE R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: > +********************************************************************/ +be_local_closure(class_StaticValueProvider__X3E, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x24080403, // 0004 GT R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: >= +********************************************************************/ +be_local_closure(class_StaticValueProvider__X3E_X3D, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X3E_X3D), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x28080403, // 0004 GE R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_StaticValueProvider_produce_value, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x80040600, // 0001 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: != +********************************************************************/ +be_local_closure(class_StaticValueProvider__X21_X3D, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X21_X3D), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x20080403, // 0004 NE R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: == +********************************************************************/ +be_local_closure(class_StaticValueProvider__X3D_X3D, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X3D_X3D), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x1C080403, // 0004 EQ R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_StaticValueProvider_tostring, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0xA8020007, // 0000 EXBLK 0 #0009 + 0x60040018, // 0001 GETGBL R1 G24 + 0x58080001, // 0002 LDCONST R2 K1 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x7C040400, // 0004 CALL R1 2 + 0xA8040001, // 0005 EXBLK 1 1 + 0x80040200, // 0006 RET 1 R1 + 0xA8040001, // 0007 EXBLK 1 1 + 0x70020004, // 0008 JMP #000E + 0xAC040000, // 0009 CATCH R1 0 0 + 0x70020001, // 000A JMP #000D + 0x80060400, // 000B RET 1 K2 + 0x70020000, // 000C JMP #000E + 0xB0080000, // 000D RAISE 2 R0 R0 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: < +********************************************************************/ +be_local_closure(class_StaticValueProvider__X3C, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_StaticValueProvider, /* shared constants */ + be_str_weak(_X3C), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x14080403, // 0004 LT R2 R2 R3 + 0x80040400, // 0005 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: StaticValueProvider +********************************************************************/ +extern const bclass be_class_ValueProvider; +be_local_class(StaticValueProvider, + 0, + &be_class_ValueProvider, + be_nested_map(9, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(_X3C_X3D, -1), be_const_closure(class_StaticValueProvider__X3C_X3D_closure) }, + { be_const_key_weak(_X3D_X3D, -1), be_const_closure(class_StaticValueProvider__X3D_X3D_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(value, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(any) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(produce_value, -1), be_const_closure(class_StaticValueProvider_produce_value_closure) }, + { be_const_key_weak(_X21_X3D, -1), be_const_closure(class_StaticValueProvider__X21_X3D_closure) }, + { be_const_key_weak(_X3E_X3D, 1), be_const_closure(class_StaticValueProvider__X3E_X3D_closure) }, + { be_const_key_weak(_X3E, 2), be_const_closure(class_StaticValueProvider__X3E_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_StaticValueProvider_tostring_closure) }, + { be_const_key_weak(_X3C, -1), be_const_closure(class_StaticValueProvider__X3C_closure) }, + })), + be_str_weak(StaticValueProvider) +); /******************************************************************** ** Solidified function: square @@ -10225,6 +11045,42 @@ be_local_closure(square, /* name */ ); /*******************************************************************/ + +/******************************************************************** +** Solidified function: sawtooth +********************************************************************/ +be_local_closure(sawtooth, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(oscillator_value), + /* K2 */ be_nested_str_weak(form), + /* K3 */ be_nested_str_weak(SAWTOOTH), + }), + be_str_weak(sawtooth), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x90060402, // 0006 SETMBR R1 K2 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + // compact class 'NoiseAnimation' ktab size: 50, total: 107 (saved 456 bytes) static const bvalue be_ktab_class_NoiseAnimation[50] = { /* K0 */ be_nested_str_weak(init), @@ -11016,43 +11872,69 @@ be_local_class(NoiseAnimation, })), be_str_weak(NoiseAnimation) ); -// compact class 'StripLengthProvider' ktab size: 5, total: 8 (saved 24 bytes) -static const bvalue be_ktab_class_StripLengthProvider[5] = { - /* K0 */ be_nested_str_weak(engine), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(width), - /* K3 */ be_nested_str_weak(StripLengthProvider_X28length_X3D_X25s_X29), - /* K4 */ be_nested_str_weak(StripLengthProvider_X28length_X3Dunknown_X29), +// compact class 'ColorCycleColorProvider' ktab size: 23, total: 46 (saved 184 bytes) +static const bvalue be_ktab_class_ColorCycleColorProvider[23] = { + /* K0 */ be_nested_str_weak(palette), + /* K1 */ be_nested_str_weak(_get_param_def), + /* K2 */ be_nested_str_weak(contains), + /* K3 */ be_nested_str_weak(default), + /* K4 */ be_nested_str_weak(cycle_period), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(manual), + /* K7 */ be_nested_str_weak(auto), + /* K8 */ be_nested_str_weak(_get_palette_size), + /* K9 */ be_nested_str_weak(ColorCycleColorProvider_X28palette_size_X3D_X25s_X2C_X20cycle_period_X3D_X25s_X2C_X20mode_X3D_X25s_X2C_X20current_index_X3D_X25s_X29), + /* K10 */ be_nested_str_weak(current_index), + /* K11 */ be_nested_str_weak(ColorCycleColorProvider_X28uninitialized_X29), + /* K12 */ be_nested_str_weak(_get_palette_bytes), + /* K13 */ be_nested_str_weak(current_color), + /* K14 */ be_nested_str_weak(_get_color_at_index), + /* K15 */ be_nested_str_weak(next), + /* K16 */ be_nested_str_weak(set_param), + /* K17 */ be_const_int(1), + /* K18 */ be_nested_str_weak(tasmota), + /* K19 */ be_nested_str_weak(scale_uint), + /* K20 */ be_nested_str_weak(init), + /* K21 */ be_nested_str_weak(get), + /* K22 */ be_const_int(-16777216), }; -extern const bclass be_class_StripLengthProvider; +extern const bclass be_class_ColorCycleColorProvider; /******************************************************************** -** Solidified function: produce_value +** Solidified function: _get_palette_bytes ********************************************************************/ -be_local_closure(class_StripLengthProvider_produce_value, /* name */ +be_local_closure(class_ColorCycleColorProvider__get_palette_bytes, /* name */ be_nested_proto( - 5, /* nstack */ - 3, /* argc */ + 6, /* nstack */ + 1, /* argc */ 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StripLengthProvider, /* shared constants */ - be_str_weak(produce_value), + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(_get_palette_bytes), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x4C100000, // 0001 LDNIL R4 - 0x1C0C0604, // 0002 EQ R3 R3 R4 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x80060200, // 0004 RET 1 K1 - 0x880C0100, // 0005 GETMBR R3 R0 K0 - 0x880C0702, // 0006 GETMBR R3 R3 K2 - 0x80040600, // 0007 RET 1 R3 + ( &(const binstruction[16]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C080202, // 0002 EQ R2 R1 R2 + 0x780A000A, // 0003 JMPF R2 #000F + 0x8C080101, // 0004 GETMET R2 R0 K1 + 0x58100000, // 0005 LDCONST R4 K0 + 0x7C080400, // 0006 CALL R2 2 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0004, // 0009 JMPF R3 #000F + 0x8C0C0502, // 000A GETMET R3 R2 K2 + 0x58140003, // 000B LDCONST R5 K3 + 0x7C0C0400, // 000C CALL R3 2 + 0x780E0000, // 000D JMPF R3 #000F + 0x94040503, // 000E GETIDX R1 R2 K3 + 0x80040200, // 000F RET 1 R1 }) ) ); @@ -11062,9 +11944,9 @@ be_local_closure(class_StripLengthProvider_produce_value, /* name */ /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(class_StripLengthProvider_tostring, /* name */ +be_local_closure(class_ColorCycleColorProvider_tostring, /* name */ be_nested_proto( - 5, /* nstack */ + 9, /* nstack */ 1, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -11072,33 +11954,36 @@ be_local_closure(class_StripLengthProvider_tostring, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StripLengthProvider, /* shared constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0xA802000F, // 0000 EXBLK 0 #0011 - 0x88040100, // 0001 GETMBR R1 R0 K0 - 0x4C080000, // 0002 LDNIL R2 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060002, // 0004 JMPF R1 #0008 - 0x88040100, // 0005 GETMBR R1 R0 K0 - 0x88040302, // 0006 GETMBR R1 R1 K2 - 0x70020000, // 0007 JMP #0009 - 0x58040001, // 0008 LDCONST R1 K1 - 0x60080018, // 0009 GETGBL R2 G24 - 0x580C0003, // 000A LDCONST R3 K3 - 0x5C100200, // 000B MOVE R4 R1 - 0x7C080400, // 000C CALL R2 2 - 0xA8040001, // 000D EXBLK 1 1 - 0x80040400, // 000E RET 1 R2 - 0xA8040001, // 000F EXBLK 1 1 - 0x70020004, // 0010 JMP #0016 - 0xAC040000, // 0011 CATCH R1 0 0 - 0x70020001, // 0012 JMP #0015 - 0x80060800, // 0013 RET 1 K4 - 0x70020000, // 0014 JMP #0016 - 0xB0080000, // 0015 RAISE 2 R0 R0 - 0x80000000, // 0016 RET 0 + ( &(const binstruction[26]) { /* code */ + 0xA8020012, // 0000 EXBLK 0 #0014 + 0x88040104, // 0001 GETMBR R1 R0 K4 + 0x1C040305, // 0002 EQ R1 R1 K5 + 0x78060001, // 0003 JMPF R1 #0006 + 0x58040006, // 0004 LDCONST R1 K6 + 0x70020000, // 0005 JMP #0007 + 0x58040007, // 0006 LDCONST R1 K7 + 0x8C080108, // 0007 GETMET R2 R0 K8 + 0x7C080200, // 0008 CALL R2 1 + 0x600C0018, // 0009 GETGBL R3 G24 + 0x58100009, // 000A LDCONST R4 K9 + 0x5C140400, // 000B MOVE R5 R2 + 0x88180104, // 000C GETMBR R6 R0 K4 + 0x5C1C0200, // 000D MOVE R7 R1 + 0x8820010A, // 000E GETMBR R8 R0 K10 + 0x7C0C0A00, // 000F CALL R3 5 + 0xA8040001, // 0010 EXBLK 1 1 + 0x80040600, // 0011 RET 1 R3 + 0xA8040001, // 0012 EXBLK 1 1 + 0x70020004, // 0013 JMP #0019 + 0xAC040000, // 0014 CATCH R1 0 0 + 0x70020001, // 0015 JMP #0018 + 0x80061600, // 0016 RET 1 K11 + 0x70020000, // 0017 JMP #0019 + 0xB0080000, // 0018 RAISE 2 R0 R0 + 0x80000000, // 0019 RET 0 }) ) ); @@ -11106,24 +11991,349 @@ be_local_closure(class_StripLengthProvider_tostring, /* name */ /******************************************************************** -** Solidified class: StripLengthProvider +** Solidified function: _get_palette_size ********************************************************************/ -extern const bclass be_class_ValueProvider; -be_local_class(StripLengthProvider, - 0, - &be_class_ValueProvider, - be_nested_map(2, +be_local_closure(class_ColorCycleColorProvider__get_palette_size, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(_get_palette_size), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x8C04010C, // 0000 GETMET R1 R0 K12 + 0x7C040200, // 0001 CALL R1 1 + 0x6008000C, // 0002 GETGBL R2 G12 + 0x5C0C0200, // 0003 MOVE R3 R1 + 0x7C080200, // 0004 CALL R2 1 + 0x540E0003, // 0005 LDINT R3 4 + 0x0C080403, // 0006 DIV R2 R2 R3 + 0x80040400, // 0007 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: on_param_changed +********************************************************************/ +be_local_closure(class_ColorCycleColorProvider_on_param_changed, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(on_param_changed), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0x1C0C0300, // 0000 EQ R3 R1 K0 + 0x780E000C, // 0001 JMPF R3 #000F + 0x8C0C0108, // 0002 GETMET R3 R0 K8 + 0x7C0C0200, // 0003 CALL R3 1 + 0x24100705, // 0004 GT R4 R3 K5 + 0x78120007, // 0005 JMPF R4 #000E + 0x8810010A, // 0006 GETMBR R4 R0 K10 + 0x28100803, // 0007 GE R4 R4 R3 + 0x78120000, // 0008 JMPF R4 #000A + 0x90021505, // 0009 SETMBR R0 K10 K5 + 0x8C10010E, // 000A GETMET R4 R0 K14 + 0x8818010A, // 000B GETMBR R6 R0 K10 + 0x7C100400, // 000C CALL R4 2 + 0x90021A04, // 000D SETMBR R0 K13 R4 + 0x70020016, // 000E JMP #0026 + 0x1C0C030F, // 000F EQ R3 R1 K15 + 0x780E0014, // 0010 JMPF R3 #0026 + 0x200C0505, // 0011 NE R3 R2 K5 + 0x780E0012, // 0012 JMPF R3 #0026 + 0x8C0C0108, // 0013 GETMET R3 R0 K8 + 0x7C0C0200, // 0014 CALL R3 1 + 0x24100705, // 0015 GT R4 R3 K5 + 0x7812000A, // 0016 JMPF R4 #0022 + 0x8810010A, // 0017 GETMBR R4 R0 K10 + 0x00100802, // 0018 ADD R4 R4 R2 + 0x10100803, // 0019 MOD R4 R4 R3 + 0x14140905, // 001A LT R5 R4 K5 + 0x78160000, // 001B JMPF R5 #001D + 0x00100803, // 001C ADD R4 R4 R3 + 0x90021404, // 001D SETMBR R0 K10 R4 + 0x8C14010E, // 001E GETMET R5 R0 K14 + 0x881C010A, // 001F GETMBR R7 R0 K10 + 0x7C140400, // 0020 CALL R5 2 + 0x90021A05, // 0021 SETMBR R0 K13 R5 + 0x8C100110, // 0022 GETMET R4 R0 K16 + 0x5818000F, // 0023 LDCONST R6 K15 + 0x581C0005, // 0024 LDCONST R7 K5 + 0x7C100600, // 0025 CALL R4 3 + 0x80000000, // 0026 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_ColorCycleColorProvider_produce_value, /* name */ + be_nested_proto( + 13, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0x880C0104, // 0000 GETMBR R3 R0 K4 + 0x8C100108, // 0001 GETMET R4 R0 K8 + 0x7C100200, // 0002 CALL R4 1 + 0x1C140905, // 0003 EQ R5 R4 K5 + 0x78160001, // 0004 JMPF R5 #0007 + 0x5415FFFE, // 0005 LDINT R5 -1 + 0x80040A00, // 0006 RET 1 R5 + 0x1C140911, // 0007 EQ R5 R4 K17 + 0x78160005, // 0008 JMPF R5 #000F + 0x8C14010E, // 0009 GETMET R5 R0 K14 + 0x581C0005, // 000A LDCONST R7 K5 + 0x7C140400, // 000B CALL R5 2 + 0x90021A05, // 000C SETMBR R0 K13 R5 + 0x8814010D, // 000D GETMBR R5 R0 K13 + 0x80040A00, // 000E RET 1 R5 + 0x1C140705, // 000F EQ R5 R3 K5 + 0x78160001, // 0010 JMPF R5 #0013 + 0x8814010D, // 0011 GETMBR R5 R0 K13 + 0x80040A00, // 0012 RET 1 R5 + 0x10140403, // 0013 MOD R5 R2 R3 + 0xB81A2400, // 0014 GETNGBL R6 K18 + 0x8C180D13, // 0015 GETMET R6 R6 K19 + 0x5C200A00, // 0016 MOVE R8 R5 + 0x58240005, // 0017 LDCONST R9 K5 + 0x04280711, // 0018 SUB R10 R3 K17 + 0x582C0005, // 0019 LDCONST R11 K5 + 0x04300911, // 001A SUB R12 R4 K17 + 0x7C180C00, // 001B CALL R6 6 + 0x281C0C04, // 001C GE R7 R6 R4 + 0x781E0001, // 001D JMPF R7 #0020 + 0x041C0911, // 001E SUB R7 R4 K17 + 0x5C180E00, // 001F MOVE R6 R7 + 0x90021406, // 0020 SETMBR R0 K10 R6 + 0x8C1C010E, // 0021 GETMET R7 R0 K14 + 0x5C240C00, // 0022 MOVE R9 R6 + 0x7C1C0400, // 0023 CALL R7 2 + 0x90021A07, // 0024 SETMBR R0 K13 R7 + 0x881C010D, // 0025 GETMBR R7 R0 K13 + 0x80040E00, // 0026 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_color_for_value +********************************************************************/ +be_local_closure(class_ColorCycleColorProvider_get_color_for_value, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(get_color_for_value), + &be_const_str_solidified, + ( &(const binstruction[36]) { /* code */ + 0x8C0C0108, // 0000 GETMET R3 R0 K8 + 0x7C0C0200, // 0001 CALL R3 1 + 0x1C100705, // 0002 EQ R4 R3 K5 + 0x78120001, // 0003 JMPF R4 #0006 + 0x5411FFFE, // 0004 LDINT R4 -1 + 0x80040800, // 0005 RET 1 R4 + 0x1C100711, // 0006 EQ R4 R3 K17 + 0x78120003, // 0007 JMPF R4 #000C + 0x8C10010E, // 0008 GETMET R4 R0 K14 + 0x58180005, // 0009 LDCONST R6 K5 + 0x7C100400, // 000A CALL R4 2 + 0x80040800, // 000B RET 1 R4 + 0x14100305, // 000C LT R4 R1 K5 + 0x78120001, // 000D JMPF R4 #0010 + 0x58040005, // 000E LDCONST R1 K5 + 0x70020003, // 000F JMP #0014 + 0x54120063, // 0010 LDINT R4 100 + 0x24100204, // 0011 GT R4 R1 R4 + 0x78120000, // 0012 JMPF R4 #0014 + 0x54060063, // 0013 LDINT R1 100 + 0xB8122400, // 0014 GETNGBL R4 K18 + 0x8C100913, // 0015 GETMET R4 R4 K19 + 0x5C180200, // 0016 MOVE R6 R1 + 0x581C0005, // 0017 LDCONST R7 K5 + 0x54220063, // 0018 LDINT R8 100 + 0x58240005, // 0019 LDCONST R9 K5 + 0x04280711, // 001A SUB R10 R3 K17 + 0x7C100C00, // 001B CALL R4 6 + 0x28140803, // 001C GE R5 R4 R3 + 0x78160001, // 001D JMPF R5 #0020 + 0x04140711, // 001E SUB R5 R3 K17 + 0x5C100A00, // 001F MOVE R4 R5 + 0x8C14010E, // 0020 GETMET R5 R0 K14 + 0x5C1C0800, // 0021 MOVE R7 R4 + 0x7C140400, // 0022 CALL R5 2 + 0x80040A00, // 0023 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_ColorCycleColorProvider_init, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080514, // 0003 GETMET R2 R2 K20 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x8C08010C, // 0006 GETMET R2 R0 K12 + 0x7C080200, // 0007 CALL R2 1 + 0x8C0C010E, // 0008 GETMET R3 R0 K14 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C0C0400, // 000A CALL R3 2 + 0x90021A03, // 000B SETMBR R0 K13 R3 + 0x90021505, // 000C SETMBR R0 K10 K5 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _get_color_at_index +********************************************************************/ +be_local_closure(class_ColorCycleColorProvider__get_color_at_index, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ColorCycleColorProvider, /* shared constants */ + be_str_weak(_get_color_at_index), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x8C08010C, // 0000 GETMET R2 R0 K12 + 0x7C080200, // 0001 CALL R2 1 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100400, // 0003 MOVE R4 R2 + 0x7C0C0200, // 0004 CALL R3 1 + 0x54120003, // 0005 LDINT R4 4 + 0x0C0C0604, // 0006 DIV R3 R3 R4 + 0x1C100705, // 0007 EQ R4 R3 K5 + 0x74120003, // 0008 JMPT R4 #000D + 0x14100305, // 0009 LT R4 R1 K5 + 0x74120001, // 000A JMPT R4 #000D + 0x28100203, // 000B GE R4 R1 R3 + 0x78120001, // 000C JMPF R4 #000F + 0x5411FFFE, // 000D LDINT R4 -1 + 0x80040800, // 000E RET 1 R4 + 0x8C100515, // 000F GETMET R4 R2 K21 + 0x541A0003, // 0010 LDINT R6 4 + 0x08180206, // 0011 MUL R6 R1 R6 + 0x541DFFFB, // 0012 LDINT R7 -4 + 0x7C100600, // 0013 CALL R4 3 + 0x30100916, // 0014 OR R4 R4 K22 + 0x80040800, // 0015 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: ColorCycleColorProvider +********************************************************************/ +extern const bclass be_class_ColorProvider; +be_local_class(ColorCycleColorProvider, + 2, + &be_class_ColorProvider, + be_nested_map(11, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(tostring, -1), be_const_closure(class_StripLengthProvider_tostring_closure) }, - { be_const_key_weak(produce_value, 0), be_const_closure(class_StripLengthProvider_produce_value_closure) }, + { be_const_key_weak(_get_color_at_index, -1), be_const_closure(class_ColorCycleColorProvider__get_color_at_index_closure) }, + { be_const_key_weak(_get_palette_size, -1), be_const_closure(class_ColorCycleColorProvider__get_palette_size_closure) }, + { be_const_key_weak(current_color, 6), be_const_var(0) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_ColorCycleColorProvider_tostring_closure) }, + { be_const_key_weak(_get_palette_bytes, 1), be_const_closure(class_ColorCycleColorProvider__get_palette_bytes_closure) }, + { be_const_key_weak(on_param_changed, -1), be_const_closure(class_ColorCycleColorProvider_on_param_changed_closure) }, + { be_const_key_weak(current_index, -1), be_const_var(1) }, + { be_const_key_weak(get_color_for_value, -1), be_const_closure(class_ColorCycleColorProvider_get_color_for_value_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(cycle_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(5000) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(next, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(palette, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_bytes_instance(FF0000FFFF00FF00FFFF0000) }, + { be_const_key_weak(type, -1), be_nested_str_weak(bytes) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_ColorCycleColorProvider_init_closure) }, + { be_const_key_weak(produce_value, 0), be_const_closure(class_ColorCycleColorProvider_produce_value_closure) }, })), - be_str_weak(StripLengthProvider) + be_str_weak(ColorCycleColorProvider) ); /******************************************************************** -** Solidified function: unregister_event_handler +** Solidified function: twinkle_rainbow ********************************************************************/ -be_local_closure(unregister_event_handler, /* name */ +be_local_closure(twinkle_rainbow, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -11133,20 +12343,36 @@ be_local_closure(unregister_event_handler, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ + ( &(const bvalue[ 8]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(event_manager), - /* K2 */ be_nested_str_weak(unregister_handler), + /* K1 */ be_nested_str_weak(twinkle_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(density), + /* K4 */ be_nested_str_weak(twinkle_speed), + /* K5 */ be_nested_str_weak(fade_speed), + /* K6 */ be_nested_str_weak(min_brightness), + /* K7 */ be_nested_str_weak(max_brightness), }), - be_str_weak(unregister_event_handler), + be_str_weak(twinkle_rainbow), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ + ( &(const binstruction[17]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 - 0x88040301, // 0001 GETMBR R1 R1 K1 - 0x8C040302, // 0002 GETMET R1 R1 K2 - 0x5C0C0000, // 0003 MOVE R3 R0 - 0x7C040400, // 0004 CALL R1 2 - 0x80000000, // 0005 RET 0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409FFFE, // 0004 LDINT R2 -1 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x540A0077, // 0006 LDINT R2 120 + 0x90060602, // 0007 SETMBR R1 K3 R2 + 0x540A0005, // 0008 LDINT R2 6 + 0x90060802, // 0009 SETMBR R1 K4 R2 + 0x540A00B3, // 000A LDINT R2 180 + 0x90060A02, // 000B SETMBR R1 K5 R2 + 0x540A001F, // 000C LDINT R2 32 + 0x90060C02, // 000D SETMBR R1 K6 R2 + 0x540A00FE, // 000E LDINT R2 255 + 0x90060E02, // 000F SETMBR R1 K7 R2 + 0x80040200, // 0010 RET 1 R1 }) ) ); @@ -11189,107 +12415,75 @@ be_local_closure(jitter_color, /* name */ ); /*******************************************************************/ -// compact class 'StaticValueProvider' ktab size: 3, total: 10 (saved 56 bytes) -static const bvalue be_ktab_class_StaticValueProvider[3] = { - /* K0 */ be_nested_str_weak(value), - /* K1 */ be_nested_str_weak(StaticValueProvider_X28value_X3D_X25s_X29), - /* K2 */ be_nested_str_weak(StaticValueProvider_X28value_X3Dunset_X29), + +/******************************************************************** +** Solidified function: clear_all_event_handlers +********************************************************************/ +be_local_closure(clear_all_event_handlers, /* name */ + be_nested_proto( + 2, /* nstack */ + 0, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(event_manager), + /* K2 */ be_nested_str_weak(clear_all_handlers), + }), + be_str_weak(clear_all_event_handlers), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0xB8020000, // 0000 GETNGBL R0 K0 + 0x88000101, // 0001 GETMBR R0 R0 K1 + 0x8C000102, // 0002 GETMET R0 R0 K2 + 0x7C000200, // 0003 CALL R0 1 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + +// compact class 'ClosureValueProvider' ktab size: 26, total: 39 (saved 104 bytes) +static const bvalue be_ktab_class_ClosureValueProvider[26] = { + /* K0 */ be_nested_str_weak(closure), + /* K1 */ be_nested_str_weak(_closure), + /* K2 */ be_nested_str_weak(math), + /* K3 */ be_nested_str_weak(abs), + /* K4 */ be_nested_str_weak(int), + /* K5 */ be_const_int(0), + /* K6 */ be_const_real_hex(0x437F0000), + /* K7 */ be_nested_str_weak(sqrt), + /* K8 */ be_nested_str_weak(ClosureValueProvider_X28_X25s_X29), + /* K9 */ be_nested_str_weak(closure_X20set), + /* K10 */ be_nested_str_weak(no_X20closure), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(scale_int), + /* K13 */ be_nested_str_weak(sine_int), + /* K14 */ be_nested_str_weak(min), + /* K15 */ be_nested_str_weak(round), + /* K16 */ be_nested_str_weak(max), + /* K17 */ be_nested_str_weak(animation), + /* K18 */ be_nested_str_weak(is_value_provider), + /* K19 */ be_nested_str_weak(produce_value), + /* K20 */ be_nested_str_weak(engine), + /* K21 */ be_nested_str_weak(time_ms), + /* K22 */ be_nested_str_weak(parameterized_object), + /* K23 */ be_nested_str_weak(value_error), + /* K24 */ be_nested_str_weak(Parameter_X20name_X20cannot_X20be_X20nil_X20when_X20resolving_X20object_X20parameter), + /* K25 */ be_nested_str_weak(get_param_value), }; -extern const bclass be_class_StaticValueProvider; +extern const bclass be_class_ClosureValueProvider; /******************************************************************** -** Solidified function: <= +** Solidified function: on_param_changed ********************************************************************/ -be_local_closure(class_StaticValueProvider__X3C_X3D, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X3C_X3D), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x18080403, // 0004 LE R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: > -********************************************************************/ -be_local_closure(class_StaticValueProvider__X3E, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x24080403, // 0004 GT R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: >= -********************************************************************/ -be_local_closure(class_StaticValueProvider__X3E_X3D, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X3E_X3D), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x28080403, // 0004 GE R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: produce_value -********************************************************************/ -be_local_closure(class_StaticValueProvider_produce_value, /* name */ +be_local_closure(class_ClosureValueProvider_on_param_changed, /* name */ be_nested_proto( 4, /* nstack */ 3, /* argc */ @@ -11299,12 +12493,14 @@ be_local_closure(class_StaticValueProvider_produce_value, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(produce_value), + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(on_param_changed), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x80040600, // 0001 RET 1 R3 + ( &(const binstruction[ 4]) { /* code */ + 0x1C0C0300, // 0000 EQ R3 R1 K0 + 0x780E0000, // 0001 JMPF R3 #0003 + 0x90020202, // 0002 SETMBR R0 K1 R2 + 0x80000000, // 0003 RET 0 }) ) ); @@ -11312,11 +12508,11 @@ be_local_closure(class_StaticValueProvider_produce_value, /* name */ /******************************************************************** -** Solidified function: != +** Solidified function: abs ********************************************************************/ -be_local_closure(class_StaticValueProvider__X21_X3D, /* name */ +be_local_closure(class_ClosureValueProvider_abs, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -11324,16 +12520,15 @@ be_local_closure(class_StaticValueProvider__X21_X3D, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X21_X3D), + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(abs), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x20080403, // 0004 NE R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 + ( &(const binstruction[ 5]) { /* code */ + 0xA40A0400, // 0000 IMPORT R2 K2 + 0x8C0C0503, // 0001 GETMET R3 R2 K3 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x80040600, // 0004 RET 1 R3 }) ) ); @@ -11341,11 +12536,11 @@ be_local_closure(class_StaticValueProvider__X21_X3D, /* name */ /******************************************************************** -** Solidified function: == +** Solidified function: sqrt ********************************************************************/ -be_local_closure(class_StaticValueProvider__X3D_X3D, /* name */ +be_local_closure(class_ClosureValueProvider_sqrt, /* name */ be_nested_proto( - 5, /* nstack */ + 8, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -11353,16 +12548,36 @@ be_local_closure(class_StaticValueProvider__X3D_X3D, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X3D_X3D), + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(sqrt), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 + ( &(const binstruction[26]) { /* code */ + 0xA40A0400, // 0000 IMPORT R2 K2 + 0x600C0004, // 0001 GETGBL R3 G4 0x5C100200, // 0002 MOVE R4 R1 0x7C0C0200, // 0003 CALL R3 1 - 0x1C080403, // 0004 EQ R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 + 0x1C0C0704, // 0004 EQ R3 R3 K4 + 0x780E000E, // 0005 JMPF R3 #0015 + 0x280C0305, // 0006 GE R3 R1 K5 + 0x780E000C, // 0007 JMPF R3 #0015 + 0x540E00FE, // 0008 LDINT R3 255 + 0x180C0203, // 0009 LE R3 R1 R3 + 0x780E0009, // 000A JMPF R3 #0015 + 0x0C0C0306, // 000B DIV R3 R1 K6 + 0x60100009, // 000C GETGBL R4 G9 + 0x8C140507, // 000D GETMET R5 R2 K7 + 0x5C1C0600, // 000E MOVE R7 R3 + 0x7C140400, // 000F CALL R5 2 + 0x541A00FE, // 0010 LDINT R6 255 + 0x08140A06, // 0011 MUL R5 R5 R6 + 0x7C100200, // 0012 CALL R4 1 + 0x80040800, // 0013 RET 1 R4 + 0x70020003, // 0014 JMP #0019 + 0x8C0C0507, // 0015 GETMET R3 R2 K7 + 0x5C140200, // 0016 MOVE R5 R1 + 0x7C0C0400, // 0017 CALL R3 2 + 0x80040600, // 0018 RET 1 R3 + 0x80000000, // 0019 RET 0 }) ) ); @@ -11372,7 +12587,7 @@ be_local_closure(class_StaticValueProvider__X3D_X3D, /* name */ /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(class_StaticValueProvider_tostring, /* name */ +be_local_closure(class_ClosureValueProvider_tostring, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -11382,25 +12597,19 @@ be_local_closure(class_StaticValueProvider_tostring, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0xA8020007, // 0000 EXBLK 0 #0009 - 0x60040018, // 0001 GETGBL R1 G24 - 0x58080001, // 0002 LDCONST R2 K1 - 0x880C0100, // 0003 GETMBR R3 R0 K0 - 0x7C040400, // 0004 CALL R1 2 - 0xA8040001, // 0005 EXBLK 1 1 - 0x80040200, // 0006 RET 1 R1 - 0xA8040001, // 0007 EXBLK 1 1 - 0x70020004, // 0008 JMP #000E - 0xAC040000, // 0009 CATCH R1 0 0 - 0x70020001, // 000A JMP #000D - 0x80060400, // 000B RET 1 K2 - 0x70020000, // 000C JMP #000E - 0xB0080000, // 000D RAISE 2 R0 R0 - 0x80000000, // 000E RET 0 + ( &(const binstruction[ 9]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080008, // 0001 LDCONST R2 K8 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x780E0001, // 0003 JMPF R3 #0006 + 0x580C0009, // 0004 LDCONST R3 K9 + 0x70020000, // 0005 JMP #0007 + 0x580C000A, // 0006 LDCONST R3 K10 + 0x7C040400, // 0007 CALL R1 2 + 0x80040200, // 0008 RET 1 R1 }) ) ); @@ -11408,11 +12617,11 @@ be_local_closure(class_StaticValueProvider_tostring, /* name */ /******************************************************************** -** Solidified function: < +** Solidified function: cos ********************************************************************/ -be_local_closure(class_StaticValueProvider__X3C, /* name */ +be_local_closure(class_ClosureValueProvider_cos, /* name */ be_nested_proto( - 5, /* nstack */ + 11, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -11420,16 +12629,32 @@ be_local_closure(class_StaticValueProvider__X3C, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_StaticValueProvider, /* shared constants */ - be_str_weak(_X3C), + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(cos), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x600C0009, // 0001 GETGBL R3 G9 + ( &(const binstruction[22]) { /* code */ + 0xB80A1600, // 0000 GETNGBL R2 K11 + 0x8C08050C, // 0001 GETMET R2 R2 K12 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x14080403, // 0004 LT R2 R2 R3 - 0x80040400, // 0005 RET 1 R2 + 0x58140005, // 0003 LDCONST R5 K5 + 0x541A00FE, // 0004 LDINT R6 255 + 0x581C0005, // 0005 LDCONST R7 K5 + 0x54227FFE, // 0006 LDINT R8 32767 + 0x7C080C00, // 0007 CALL R2 6 + 0xB80E1600, // 0008 GETNGBL R3 K11 + 0x8C0C070D, // 0009 GETMET R3 R3 K13 + 0x54161FFF, // 000A LDINT R5 8192 + 0x04140405, // 000B SUB R5 R2 R5 + 0x7C0C0400, // 000C CALL R3 2 + 0xB8121600, // 000D GETNGBL R4 K11 + 0x8C10090C, // 000E GETMET R4 R4 K12 + 0x5C180600, // 000F MOVE R6 R3 + 0x541DEFFF, // 0010 LDINT R7 -4096 + 0x54220FFF, // 0011 LDINT R8 4096 + 0x5425FF00, // 0012 LDINT R9 -255 + 0x542A00FE, // 0013 LDINT R10 255 + 0x7C100C00, // 0014 CALL R4 6 + 0x80040800, // 0015 RET 1 R4 }) ) ); @@ -11437,72 +12662,297 @@ be_local_closure(class_StaticValueProvider__X3C, /* name */ /******************************************************************** -** Solidified class: StaticValueProvider +** Solidified function: sin ********************************************************************/ -extern const bclass be_class_ValueProvider; -be_local_class(StaticValueProvider, - 0, - &be_class_ValueProvider, - be_nested_map(9, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_X3C_X3D, -1), be_const_closure(class_StaticValueProvider__X3C_X3D_closure) }, - { be_const_key_weak(_X3D_X3D, -1), be_const_closure(class_StaticValueProvider__X3D_X3D_closure) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(value, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(any) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(produce_value, -1), be_const_closure(class_StaticValueProvider_produce_value_closure) }, - { be_const_key_weak(_X21_X3D, -1), be_const_closure(class_StaticValueProvider__X21_X3D_closure) }, - { be_const_key_weak(_X3E_X3D, 1), be_const_closure(class_StaticValueProvider__X3E_X3D_closure) }, - { be_const_key_weak(_X3E, 2), be_const_closure(class_StaticValueProvider__X3E_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_StaticValueProvider_tostring_closure) }, - { be_const_key_weak(_X3C, -1), be_const_closure(class_StaticValueProvider__X3C_closure) }, - })), - be_str_weak(StaticValueProvider) -); - -/******************************************************************** -** Solidified function: elastic -********************************************************************/ -be_local_closure(elastic, /* name */ +be_local_closure(class_ClosureValueProvider_sin, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* varg */ + 11, /* nstack */ + 2, /* argc */ + 10, /* 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(animation), - /* K1 */ be_nested_str_weak(oscillator_value), - /* K2 */ be_nested_str_weak(form), - /* K3 */ be_nested_str_weak(ELASTIC), - }), - be_str_weak(elastic), + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(sin), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x88080503, // 0005 GETMBR R2 R2 K3 - 0x90060402, // 0006 SETMBR R1 K2 R2 - 0x80040200, // 0007 RET 1 R1 + ( &(const binstruction[21]) { /* code */ + 0xB80A1600, // 0000 GETNGBL R2 K11 + 0x8C08050C, // 0001 GETMET R2 R2 K12 + 0x5C100200, // 0002 MOVE R4 R1 + 0x58140005, // 0003 LDCONST R5 K5 + 0x541A00FE, // 0004 LDINT R6 255 + 0x581C0005, // 0005 LDCONST R7 K5 + 0x54227FFE, // 0006 LDINT R8 32767 + 0x7C080C00, // 0007 CALL R2 6 + 0xB80E1600, // 0008 GETNGBL R3 K11 + 0x8C0C070D, // 0009 GETMET R3 R3 K13 + 0x5C140400, // 000A MOVE R5 R2 + 0x7C0C0400, // 000B CALL R3 2 + 0xB8121600, // 000C GETNGBL R4 K11 + 0x8C10090C, // 000D GETMET R4 R4 K12 + 0x5C180600, // 000E MOVE R6 R3 + 0x541DEFFF, // 000F LDINT R7 -4096 + 0x54220FFF, // 0010 LDINT R8 4096 + 0x5425FF00, // 0011 LDINT R9 -255 + 0x542A00FE, // 0012 LDINT R10 255 + 0x7C100C00, // 0013 CALL R4 6 + 0x80040800, // 0014 RET 1 R4 }) ) ); /*******************************************************************/ +/******************************************************************** +** Solidified function: min +********************************************************************/ +be_local_closure(class_ClosureValueProvider_min, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 11, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(min), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0xA40A0400, // 0000 IMPORT R2 K2 + 0x600C0016, // 0001 GETGBL R3 G22 + 0x8810050E, // 0002 GETMBR R4 R2 K14 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C0C0400, // 0004 CALL R3 2 + 0x80040600, // 0005 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: round +********************************************************************/ +be_local_closure(class_ClosureValueProvider_round, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(round), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0xA40A0400, // 0000 IMPORT R2 K2 + 0x600C0009, // 0001 GETGBL R3 G9 + 0x8C10050F, // 0002 GETMET R4 R2 K15 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C100400, // 0004 CALL R4 2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x80040600, // 0006 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: max +********************************************************************/ +be_local_closure(class_ClosureValueProvider_max, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 11, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(max), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0xA40A0400, // 0000 IMPORT R2 K2 + 0x600C0016, // 0001 GETGBL R3 G22 + 0x88100510, // 0002 GETMBR R4 R2 K16 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C0C0400, // 0004 CALL R3 2 + 0x80040600, // 0005 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_ClosureValueProvider_produce_value, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x880C0101, // 0000 GETMBR R3 R0 K1 + 0x4C100000, // 0001 LDNIL R4 + 0x1C100604, // 0002 EQ R4 R3 R4 + 0x78120001, // 0003 JMPF R4 #0006 + 0x4C100000, // 0004 LDNIL R4 + 0x80040800, // 0005 RET 1 R4 + 0x5C100600, // 0006 MOVE R4 R3 + 0x5C140000, // 0007 MOVE R5 R0 + 0x5C180200, // 0008 MOVE R6 R1 + 0x5C1C0400, // 0009 MOVE R7 R2 + 0x7C100600, // 000A CALL R4 3 + 0x80040800, // 000B RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: resolve +********************************************************************/ +be_local_closure(class_ClosureValueProvider_resolve, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(resolve), + &be_const_str_solidified, + ( &(const binstruction[34]) { /* code */ + 0xB80E2200, // 0000 GETNGBL R3 K17 + 0x8C0C0712, // 0001 GETMET R3 R3 K18 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x780E0006, // 0004 JMPF R3 #000C + 0x8C0C0313, // 0005 GETMET R3 R1 K19 + 0x5C140400, // 0006 MOVE R5 R2 + 0x88180114, // 0007 GETMBR R6 R0 K20 + 0x88180D15, // 0008 GETMBR R6 R6 K21 + 0x7C0C0600, // 0009 CALL R3 3 + 0x80040600, // 000A RET 1 R3 + 0x70020014, // 000B JMP #0021 + 0x4C0C0000, // 000C LDNIL R3 + 0x200C0203, // 000D NE R3 R1 R3 + 0x780E0010, // 000E JMPF R3 #0020 + 0x600C000F, // 000F GETGBL R3 G15 + 0x5C100200, // 0010 MOVE R4 R1 + 0xB8162200, // 0011 GETNGBL R5 K17 + 0x88140B16, // 0012 GETMBR R5 R5 K22 + 0x7C0C0400, // 0013 CALL R3 2 + 0x780E000A, // 0014 JMPF R3 #0020 + 0x4C0C0000, // 0015 LDNIL R3 + 0x1C0C0403, // 0016 EQ R3 R2 R3 + 0x780E0000, // 0017 JMPF R3 #0019 + 0xB0062F18, // 0018 RAISE 1 K23 K24 + 0x8C0C0319, // 0019 GETMET R3 R1 K25 + 0x5C140400, // 001A MOVE R5 R2 + 0x88180114, // 001B GETMBR R6 R0 K20 + 0x88180D15, // 001C GETMBR R6 R6 K21 + 0x7C0C0600, // 001D CALL R3 3 + 0x80040600, // 001E RET 1 R3 + 0x70020000, // 001F JMP #0021 + 0x80040200, // 0020 RET 1 R1 + 0x80000000, // 0021 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: scale +********************************************************************/ +be_local_closure(class_ClosureValueProvider_scale, /* name */ + be_nested_proto( + 13, /* nstack */ + 6, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_ClosureValueProvider, /* shared constants */ + be_str_weak(scale), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0xB81A1600, // 0000 GETNGBL R6 K11 + 0x8C180D0C, // 0001 GETMET R6 R6 K12 + 0x5C200200, // 0002 MOVE R8 R1 + 0x5C240400, // 0003 MOVE R9 R2 + 0x5C280600, // 0004 MOVE R10 R3 + 0x5C2C0800, // 0005 MOVE R11 R4 + 0x5C300A00, // 0006 MOVE R12 R5 + 0x7C180C00, // 0007 CALL R6 6 + 0x80040C00, // 0008 RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: ClosureValueProvider +********************************************************************/ +extern const bclass be_class_ValueProvider; +be_local_class(ClosureValueProvider, + 1, + &be_class_ValueProvider, + be_nested_map(14, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(scale, -1), be_const_closure(class_ClosureValueProvider_scale_closure) }, + { be_const_key_weak(abs, 8), be_const_closure(class_ClosureValueProvider_abs_closure) }, + { be_const_key_weak(resolve, 6), be_const_closure(class_ClosureValueProvider_resolve_closure) }, + { be_const_key_weak(tostring, 2), be_const_closure(class_ClosureValueProvider_tostring_closure) }, + { be_const_key_weak(cos, -1), be_const_closure(class_ClosureValueProvider_cos_closure) }, + { be_const_key_weak(sin, 10), be_const_closure(class_ClosureValueProvider_sin_closure) }, + { be_const_key_weak(min, -1), be_const_closure(class_ClosureValueProvider_min_closure) }, + { be_const_key_weak(round, -1), be_const_closure(class_ClosureValueProvider_round_closure) }, + { be_const_key_weak(produce_value, 12), be_const_closure(class_ClosureValueProvider_produce_value_closure) }, + { be_const_key_weak(max, -1), be_const_closure(class_ClosureValueProvider_max_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(closure, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(function) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(_closure, -1), be_const_var(0) }, + { be_const_key_weak(sqrt, -1), be_const_closure(class_ClosureValueProvider_sqrt_closure) }, + { be_const_key_weak(on_param_changed, 0), be_const_closure(class_ClosureValueProvider_on_param_changed_closure) }, + })), + be_str_weak(ClosureValueProvider) +); + /******************************************************************** ** Solidified function: plasma_fast ********************************************************************/ @@ -11549,79 +12999,144 @@ be_local_closure(plasma_fast, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: gradient_rainbow_linear -********************************************************************/ -be_local_closure(gradient_rainbow_linear, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(gradient_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(gradient_type), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(direction), - /* K6 */ be_nested_str_weak(movement_speed), - }), - be_str_weak(gradient_rainbow_linear), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x4C080000, // 0004 LDNIL R2 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x90060704, // 0006 SETMBR R1 K3 K4 - 0x90060B04, // 0007 SETMBR R1 K5 K4 - 0x540A0031, // 0008 LDINT R2 50 - 0x90060C02, // 0009 SETMBR R1 K6 R2 - 0x80040200, // 000A RET 1 R1 - }) - ) -); -/*******************************************************************/ - +extern const bclass be_class_PaletteGradientAnimation; /******************************************************************** -** Solidified function: clear_all_event_handlers +** Solidified function: init ********************************************************************/ -be_local_closure(clear_all_event_handlers, /* name */ +be_local_closure(class_PaletteGradientAnimation_init, /* name */ be_nested_proto( - 2, /* nstack */ - 0, /* argc */ - 0, /* varg */ + 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(animation), - /* K1 */ be_nested_str_weak(event_manager), - /* K2 */ be_nested_str_weak(clear_all_handlers), + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(name), + /* K2 */ be_nested_str_weak(palette_gradient), }), - be_str_weak(clear_all_event_handlers), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xB8020000, // 0000 GETNGBL R0 K0 - 0x88000101, // 0001 GETMBR R0 R0 K1 - 0x8C000102, // 0002 GETMET R0 R0 K2 - 0x7C000200, // 0003 CALL R0 1 - 0x80000000, // 0004 RET 0 + ( &(const binstruction[ 8]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080500, // 0003 GETMET R2 R2 K0 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x90020302, // 0006 SETMBR R0 K1 K2 + 0x80000000, // 0007 RET 0 }) ) ); /*******************************************************************/ + +/******************************************************************** +** Solidified function: _update_value_buffer +********************************************************************/ +be_local_closure(class_PaletteGradientAnimation__update_value_buffer, /* name */ + be_nested_proto( + 16, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(shift_period), + /* K1 */ be_nested_str_weak(engine), + /* K2 */ be_nested_str_weak(get_strip_length), + /* K3 */ be_nested_str_weak(value_buffer), + /* K4 */ be_nested_str_weak(resize), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(scale_uint), + /* K7 */ be_const_int(0), + /* K8 */ be_const_real_hex(0x447A0000), + /* K9 */ be_const_int(1), + }), + be_str_weak(_update_value_buffer), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x8C0C0702, // 0002 GETMET R3 R3 K2 + 0x7C0C0200, // 0003 CALL R3 1 + 0x6010000C, // 0004 GETGBL R4 G12 + 0x88140103, // 0005 GETMBR R5 R0 K3 + 0x7C100200, // 0006 CALL R4 1 + 0x20100803, // 0007 NE R4 R4 R3 + 0x78120003, // 0008 JMPF R4 #000D + 0x88100103, // 0009 GETMBR R4 R0 K3 + 0x8C100904, // 000A GETMET R4 R4 K4 + 0x5C180600, // 000B MOVE R6 R3 + 0x7C100400, // 000C CALL R4 2 + 0xB8120A00, // 000D GETNGBL R4 K5 + 0x8C100906, // 000E GETMET R4 R4 K6 + 0x10180202, // 000F MOD R6 R1 R2 + 0x581C0007, // 0010 LDCONST R7 K7 + 0x5C200400, // 0011 MOVE R8 R2 + 0x58240007, // 0012 LDCONST R9 K7 + 0x542A03E7, // 0013 LDINT R10 1000 + 0x7C100C00, // 0014 CALL R4 6 + 0x0C100908, // 0015 DIV R4 R4 K8 + 0x60140009, // 0016 GETGBL R5 G9 + 0x08180803, // 0017 MUL R6 R4 R3 + 0x7C140200, // 0018 CALL R5 1 + 0x58180007, // 0019 LDCONST R6 K7 + 0x141C0C03, // 001A LT R7 R6 R3 + 0x781E000D, // 001B JMPF R7 #002A + 0x001C0C05, // 001C ADD R7 R6 R5 + 0x101C0E03, // 001D MOD R7 R7 R3 + 0x88200103, // 001E GETMBR R8 R0 K3 + 0xB8260A00, // 001F GETNGBL R9 K5 + 0x8C241306, // 0020 GETMET R9 R9 K6 + 0x5C2C0E00, // 0021 MOVE R11 R7 + 0x58300007, // 0022 LDCONST R12 K7 + 0x04340709, // 0023 SUB R13 R3 K9 + 0x58380007, // 0024 LDCONST R14 K7 + 0x543E0063, // 0025 LDINT R15 100 + 0x7C240C00, // 0026 CALL R9 6 + 0x98200C09, // 0027 SETIDX R8 R6 R9 + 0x00180D09, // 0028 ADD R6 R6 K9 + 0x7001FFEF, // 0029 JMP #001A + 0x80000000, // 002A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: PaletteGradientAnimation +********************************************************************/ +extern const bclass be_class_PalettePatternAnimation; +be_local_class(PaletteGradientAnimation, + 0, + &be_class_PalettePatternAnimation, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(shift_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(10000) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_PaletteGradientAnimation_init_closure) }, + { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteGradientAnimation__update_value_buffer_closure) }, + })), + be_str_weak(PaletteGradientAnimation) +); extern const bclass be_class_FrameBuffer; // compact class 'FrameBuffer' ktab size: 34, total: 122 (saved 704 bytes) static const bvalue be_ktab_class_FrameBuffer[34] = { @@ -13313,6 +14828,55 @@ be_local_class(FrameBuffer, })), be_str_weak(FrameBuffer) ); + +/******************************************************************** +** Solidified function: twinkle_gentle +********************************************************************/ +be_local_closure(twinkle_gentle, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(twinkle_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(density), + /* K4 */ be_nested_str_weak(twinkle_speed), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str_weak(fade_speed), + /* K7 */ be_nested_str_weak(min_brightness), + /* K8 */ be_nested_str_weak(max_brightness), + }), + be_str_weak(twinkle_gentle), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409D6FF, // 0004 LDINT R2 -10496 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x540A003F, // 0006 LDINT R2 64 + 0x90060602, // 0007 SETMBR R1 K3 R2 + 0x90060905, // 0008 SETMBR R1 K4 K5 + 0x540A0077, // 0009 LDINT R2 120 + 0x90060C02, // 000A SETMBR R1 K6 R2 + 0x540A000F, // 000B LDINT R2 16 + 0x90060E02, // 000C SETMBR R1 K7 R2 + 0x540A00B3, // 000D LDINT R2 180 + 0x90061002, // 000E SETMBR R1 K8 R2 + 0x80040200, // 000F RET 1 R1 + }) + ) +); +/*******************************************************************/ + // compact class 'CompositeColorProvider' ktab size: 15, total: 25 (saved 80 bytes) static const bvalue be_ktab_class_CompositeColorProvider[15] = { /* K0 */ be_nested_str_weak(providers), @@ -13783,145 +15347,39 @@ be_local_class(CompositeColorProvider, be_str_weak(CompositeColorProvider) ); -extern const bclass be_class_PaletteGradientAnimation; - /******************************************************************** -** Solidified function: init +** Solidified function: solid ********************************************************************/ -be_local_closure(class_PaletteGradientAnimation_init, /* name */ +be_local_closure(solid, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(init), + /* K0 */ be_nested_str_weak(animation), /* K1 */ be_nested_str_weak(name), - /* K2 */ be_nested_str_weak(palette_gradient), + /* K2 */ be_nested_str_weak(solid), }), - be_str_weak(init), + be_str_weak(solid), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080500, // 0003 GETMET R2 R2 K0 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x90020302, // 0006 SETMBR R0 K1 K2 - 0x80000000, // 0007 RET 0 + ( &(const binstruction[ 6]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040300, // 0001 GETMET R1 R1 K0 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060302, // 0004 SETMBR R1 K1 K2 + 0x80040200, // 0005 RET 1 R1 }) ) ); /*******************************************************************/ -/******************************************************************** -** Solidified function: _update_value_buffer -********************************************************************/ -be_local_closure(class_PaletteGradientAnimation__update_value_buffer, /* name */ - be_nested_proto( - 16, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(shift_period), - /* K1 */ be_nested_str_weak(engine), - /* K2 */ be_nested_str_weak(get_strip_length), - /* K3 */ be_nested_str_weak(value_buffer), - /* K4 */ be_nested_str_weak(resize), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(scale_uint), - /* K7 */ be_const_int(0), - /* K8 */ be_const_real_hex(0x447A0000), - /* K9 */ be_const_int(1), - }), - be_str_weak(_update_value_buffer), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x8C0C0702, // 0002 GETMET R3 R3 K2 - 0x7C0C0200, // 0003 CALL R3 1 - 0x6010000C, // 0004 GETGBL R4 G12 - 0x88140103, // 0005 GETMBR R5 R0 K3 - 0x7C100200, // 0006 CALL R4 1 - 0x20100803, // 0007 NE R4 R4 R3 - 0x78120003, // 0008 JMPF R4 #000D - 0x88100103, // 0009 GETMBR R4 R0 K3 - 0x8C100904, // 000A GETMET R4 R4 K4 - 0x5C180600, // 000B MOVE R6 R3 - 0x7C100400, // 000C CALL R4 2 - 0xB8120A00, // 000D GETNGBL R4 K5 - 0x8C100906, // 000E GETMET R4 R4 K6 - 0x10180202, // 000F MOD R6 R1 R2 - 0x581C0007, // 0010 LDCONST R7 K7 - 0x5C200400, // 0011 MOVE R8 R2 - 0x58240007, // 0012 LDCONST R9 K7 - 0x542A03E7, // 0013 LDINT R10 1000 - 0x7C100C00, // 0014 CALL R4 6 - 0x0C100908, // 0015 DIV R4 R4 K8 - 0x60140009, // 0016 GETGBL R5 G9 - 0x08180803, // 0017 MUL R6 R4 R3 - 0x7C140200, // 0018 CALL R5 1 - 0x58180007, // 0019 LDCONST R6 K7 - 0x141C0C03, // 001A LT R7 R6 R3 - 0x781E000D, // 001B JMPF R7 #002A - 0x001C0C05, // 001C ADD R7 R6 R5 - 0x101C0E03, // 001D MOD R7 R7 R3 - 0x88200103, // 001E GETMBR R8 R0 K3 - 0xB8260A00, // 001F GETNGBL R9 K5 - 0x8C241306, // 0020 GETMET R9 R9 K6 - 0x5C2C0E00, // 0021 MOVE R11 R7 - 0x58300007, // 0022 LDCONST R12 K7 - 0x04340709, // 0023 SUB R13 R3 K9 - 0x58380007, // 0024 LDCONST R14 K7 - 0x543E0063, // 0025 LDINT R15 100 - 0x7C240C00, // 0026 CALL R9 6 - 0x98200C09, // 0027 SETIDX R8 R6 R9 - 0x00180D09, // 0028 ADD R6 R6 K9 - 0x7001FFEF, // 0029 JMP #001A - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: PaletteGradientAnimation -********************************************************************/ -extern const bclass be_class_PalettePatternAnimation; -be_local_class(PaletteGradientAnimation, - 0, - &be_class_PalettePatternAnimation, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(shift_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(10000) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_PaletteGradientAnimation_init_closure) }, - { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteGradientAnimation__update_value_buffer_closure) }, - })), - be_str_weak(PaletteGradientAnimation) -); - /******************************************************************** ** Solidified function: create_engine ********************************************************************/ @@ -13952,582 +15410,43 @@ be_local_closure(create_engine, /* name */ ); /*******************************************************************/ -// compact class 'EventManager' ktab size: 30, total: 61 (saved 248 bytes) -static const bvalue be_ktab_class_EventManager[30] = { - /* K0 */ be_nested_str_weak(event_name), - /* K1 */ be_nested_str_weak(_X2A), - /* K2 */ be_nested_str_weak(global_handlers), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(remove), - /* K5 */ be_nested_str_weak(handlers), - /* K6 */ be_nested_str_weak(set_active), - /* K7 */ be_nested_str_weak(stop_iteration), - /* K8 */ be_nested_str_weak(push), - /* K9 */ be_nested_str_weak(get_info), - /* K10 */ be_nested_str_weak(keys), - /* K11 */ be_nested_str_weak(event_queue), - /* K12 */ be_nested_str_weak(is_processing), - /* K13 */ be_nested_str_weak(clear), - /* K14 */ be_const_int(1), - /* K15 */ be_const_int(0), - /* K16 */ be_nested_str_weak(priority), - /* K17 */ be_nested_str_weak(animation), - /* K18 */ be_nested_str_weak(event_handler), - /* K19 */ be_nested_str_weak(_sort_handlers), - /* K20 */ be_nested_str_weak(contains), - /* K21 */ be_nested_str_weak(name), - /* K22 */ be_nested_str_weak(data), - /* K23 */ be_nested_str_weak(is_active), - /* K24 */ be_nested_str_weak(execute), - /* K25 */ be_nested_str_weak(Event_X20processing_X20error_X3A), - /* K26 */ be_nested_str_weak(_process_queued_events), - /* K27 */ be_nested_str_weak(size), - /* K28 */ be_nested_str_weak(pop), - /* K29 */ be_nested_str_weak(trigger_event), -}; - - -extern const bclass be_class_EventManager; /******************************************************************** -** Solidified function: unregister_handler +** Solidified function: smooth ********************************************************************/ -be_local_closure(class_EventManager_unregister_handler, /* name */ +be_local_closure(smooth, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(unregister_handler), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0x1C080501, // 0001 EQ R2 R2 K1 - 0x780A000B, // 0002 JMPF R2 #000F - 0x88080102, // 0003 GETMBR R2 R0 K2 - 0x8C080503, // 0004 GETMET R2 R2 K3 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x4C0C0000, // 0007 LDNIL R3 - 0x200C0403, // 0008 NE R3 R2 R3 - 0x780E0003, // 0009 JMPF R3 #000E - 0x880C0102, // 000A GETMBR R3 R0 K2 - 0x8C0C0704, // 000B GETMET R3 R3 K4 - 0x5C140400, // 000C MOVE R5 R2 - 0x7C0C0400, // 000D CALL R3 2 - 0x7002000F, // 000E JMP #001F - 0x88080105, // 000F GETMBR R2 R0 K5 - 0x8C080503, // 0010 GETMET R2 R2 K3 - 0x88100300, // 0011 GETMBR R4 R1 K0 - 0x7C080400, // 0012 CALL R2 2 - 0x4C0C0000, // 0013 LDNIL R3 - 0x200C0403, // 0014 NE R3 R2 R3 - 0x780E0008, // 0015 JMPF R3 #001F - 0x8C0C0503, // 0016 GETMET R3 R2 K3 - 0x5C140200, // 0017 MOVE R5 R1 - 0x7C0C0400, // 0018 CALL R3 2 - 0x4C100000, // 0019 LDNIL R4 - 0x20100604, // 001A NE R4 R3 R4 - 0x78120002, // 001B JMPF R4 #001F - 0x8C100504, // 001C GETMET R4 R2 K4 - 0x5C180600, // 001D MOVE R6 R3 - 0x7C100400, // 001E CALL R4 2 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_event_active -********************************************************************/ -be_local_closure(class_EventManager_set_event_active, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(set_event_active), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x880C0105, // 0000 GETMBR R3 R0 K5 - 0x8C0C0703, // 0001 GETMET R3 R3 K3 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x20100604, // 0005 NE R4 R3 R4 - 0x7812000C, // 0006 JMPF R4 #0014 - 0x60100010, // 0007 GETGBL R4 G16 - 0x5C140600, // 0008 MOVE R5 R3 - 0x7C100200, // 0009 CALL R4 1 - 0xA8020005, // 000A EXBLK 0 #0011 - 0x5C140800, // 000B MOVE R5 R4 - 0x7C140000, // 000C CALL R5 0 - 0x8C180B06, // 000D GETMET R6 R5 K6 - 0x5C200400, // 000E MOVE R8 R2 - 0x7C180400, // 000F CALL R6 2 - 0x7001FFF9, // 0010 JMP #000B - 0x58100007, // 0011 LDCONST R4 K7 - 0xAC100200, // 0012 CATCH R4 1 0 - 0xB0080000, // 0013 RAISE 2 R0 R0 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_handlers -********************************************************************/ -be_local_closure(class_EventManager_get_handlers, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(get_handlers), - &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x88100102, // 0003 GETMBR R4 R0 K2 - 0x7C0C0200, // 0004 CALL R3 1 - 0xA8020006, // 0005 EXBLK 0 #000D - 0x5C100600, // 0006 MOVE R4 R3 - 0x7C100000, // 0007 CALL R4 0 - 0x8C140508, // 0008 GETMET R5 R2 K8 - 0x8C1C0909, // 0009 GETMET R7 R4 K9 - 0x7C1C0200, // 000A CALL R7 1 - 0x7C140400, // 000B CALL R5 2 - 0x7001FFF8, // 000C JMP #0006 - 0x580C0007, // 000D LDCONST R3 K7 - 0xAC0C0200, // 000E CATCH R3 1 0 - 0xB0080000, // 000F RAISE 2 R0 R0 - 0x880C0105, // 0010 GETMBR R3 R0 K5 - 0x8C0C0703, // 0011 GETMET R3 R3 K3 - 0x5C140200, // 0012 MOVE R5 R1 - 0x7C0C0400, // 0013 CALL R3 2 - 0x4C100000, // 0014 LDNIL R4 - 0x20100604, // 0015 NE R4 R3 R4 - 0x7812000D, // 0016 JMPF R4 #0025 - 0x60100010, // 0017 GETGBL R4 G16 - 0x5C140600, // 0018 MOVE R5 R3 - 0x7C100200, // 0019 CALL R4 1 - 0xA8020006, // 001A EXBLK 0 #0022 - 0x5C140800, // 001B MOVE R5 R4 - 0x7C140000, // 001C CALL R5 0 - 0x8C180508, // 001D GETMET R6 R2 K8 - 0x8C200B09, // 001E GETMET R8 R5 K9 - 0x7C200200, // 001F CALL R8 1 - 0x7C180400, // 0020 CALL R6 2 - 0x7001FFF8, // 0021 JMP #001B - 0x58100007, // 0022 LDCONST R4 K7 - 0xAC100200, // 0023 CATCH R4 1 0 - 0xB0080000, // 0024 RAISE 2 R0 R0 - 0x80040400, // 0025 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_registered_events -********************************************************************/ -be_local_closure(class_EventManager_get_registered_events, /* name */ - be_nested_proto( - 7, /* nstack */ + 4, /* nstack */ 1, /* argc */ - 10, /* varg */ + 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(get_registered_events), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(animation), + /* K1 */ be_nested_str_weak(oscillator_value), + /* K2 */ be_nested_str_weak(form), + /* K3 */ be_nested_str_weak(COSINE), + }), + be_str_weak(smooth), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x60080010, // 0002 GETGBL R2 G16 - 0x880C0105, // 0003 GETMBR R3 R0 K5 - 0x8C0C070A, // 0004 GETMET R3 R3 K10 - 0x7C0C0200, // 0005 CALL R3 1 - 0x7C080200, // 0006 CALL R2 1 - 0xA8020005, // 0007 EXBLK 0 #000E - 0x5C0C0400, // 0008 MOVE R3 R2 - 0x7C0C0000, // 0009 CALL R3 0 - 0x8C100308, // 000A GETMET R4 R1 K8 - 0x5C180600, // 000B MOVE R6 R3 - 0x7C100400, // 000C CALL R4 2 - 0x7001FFF9, // 000D JMP #0008 - 0x58080007, // 000E LDCONST R2 K7 - 0xAC080200, // 000F CATCH R2 1 0 - 0xB0080000, // 0010 RAISE 2 R0 R0 - 0x80040200, // 0011 RET 1 R1 + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x90060402, // 0006 SETMBR R1 K2 R2 + 0x80040200, // 0007 RET 1 R1 }) ) ); /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_EventManager_init, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60040013, // 0000 GETGBL R1 G19 - 0x7C040000, // 0001 CALL R1 0 - 0x90020A01, // 0002 SETMBR R0 K5 R1 - 0x60040012, // 0003 GETGBL R1 G18 - 0x7C040000, // 0004 CALL R1 0 - 0x90020401, // 0005 SETMBR R0 K2 R1 - 0x60040012, // 0006 GETGBL R1 G18 - 0x7C040000, // 0007 CALL R1 0 - 0x90021601, // 0008 SETMBR R0 K11 R1 - 0x50040000, // 0009 LDBOOL R1 0 0 - 0x90021801, // 000A SETMBR R0 K12 R1 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: clear_all_handlers -********************************************************************/ -be_local_closure(class_EventManager_clear_all_handlers, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(clear_all_handlers), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x88040105, // 0000 GETMBR R1 R0 K5 - 0x8C04030D, // 0001 GETMET R1 R1 K13 - 0x7C040200, // 0002 CALL R1 1 - 0x88040102, // 0003 GETMBR R1 R0 K2 - 0x8C04030D, // 0004 GETMET R1 R1 K13 - 0x7C040200, // 0005 CALL R1 1 - 0x8804010B, // 0006 GETMBR R1 R0 K11 - 0x8C04030D, // 0007 GETMET R1 R1 K13 - 0x7C040200, // 0008 CALL R1 1 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _sort_handlers -********************************************************************/ -be_local_closure(class_EventManager__sort_handlers, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(_sort_handlers), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0x60080010, // 0000 GETGBL R2 G16 - 0x600C000C, // 0001 GETGBL R3 G12 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x040C070E, // 0004 SUB R3 R3 K14 - 0x400E1C03, // 0005 CONNECT R3 K14 R3 - 0x7C080200, // 0006 CALL R2 1 - 0xA8020012, // 0007 EXBLK 0 #001B - 0x5C0C0400, // 0008 MOVE R3 R2 - 0x7C0C0000, // 0009 CALL R3 0 - 0x94100203, // 000A GETIDX R4 R1 R3 - 0x5C140600, // 000B MOVE R5 R3 - 0x24180B0F, // 000C GT R6 R5 K15 - 0x781A000A, // 000D JMPF R6 #0019 - 0x04180B0E, // 000E SUB R6 R5 K14 - 0x94180206, // 000F GETIDX R6 R1 R6 - 0x88180D10, // 0010 GETMBR R6 R6 K16 - 0x881C0910, // 0011 GETMBR R7 R4 K16 - 0x14180C07, // 0012 LT R6 R6 R7 - 0x781A0004, // 0013 JMPF R6 #0019 - 0x04180B0E, // 0014 SUB R6 R5 K14 - 0x94180206, // 0015 GETIDX R6 R1 R6 - 0x98040A06, // 0016 SETIDX R1 R5 R6 - 0x04140B0E, // 0017 SUB R5 R5 K14 - 0x7001FFF2, // 0018 JMP #000C - 0x98040A04, // 0019 SETIDX R1 R5 R4 - 0x7001FFEC, // 001A JMP #0008 - 0x58080007, // 001B LDCONST R2 K7 - 0xAC080200, // 001C CATCH R2 1 0 - 0xB0080000, // 001D RAISE 2 R0 R0 - 0x80000000, // 001E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_handler -********************************************************************/ -be_local_closure(class_EventManager_register_handler, /* name */ - be_nested_proto( - 13, /* nstack */ - 6, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(register_handler), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0xB81A2200, // 0000 GETNGBL R6 K17 - 0x8C180D12, // 0001 GETMET R6 R6 K18 - 0x5C200200, // 0002 MOVE R8 R1 - 0x5C240400, // 0003 MOVE R9 R2 - 0x5C280600, // 0004 MOVE R10 R3 - 0x5C2C0800, // 0005 MOVE R11 R4 - 0x5C300A00, // 0006 MOVE R12 R5 - 0x7C180C00, // 0007 CALL R6 6 - 0x1C1C0301, // 0008 EQ R7 R1 K1 - 0x781E0007, // 0009 JMPF R7 #0012 - 0x881C0102, // 000A GETMBR R7 R0 K2 - 0x8C1C0F08, // 000B GETMET R7 R7 K8 - 0x5C240C00, // 000C MOVE R9 R6 - 0x7C1C0400, // 000D CALL R7 2 - 0x8C1C0113, // 000E GETMET R7 R0 K19 - 0x88240102, // 000F GETMBR R9 R0 K2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020011, // 0011 JMP #0024 - 0x881C0105, // 0012 GETMBR R7 R0 K5 - 0x8C1C0F14, // 0013 GETMET R7 R7 K20 - 0x5C240200, // 0014 MOVE R9 R1 - 0x7C1C0400, // 0015 CALL R7 2 - 0x741E0003, // 0016 JMPT R7 #001B - 0x881C0105, // 0017 GETMBR R7 R0 K5 - 0x60200012, // 0018 GETGBL R8 G18 - 0x7C200000, // 0019 CALL R8 0 - 0x981C0208, // 001A SETIDX R7 R1 R8 - 0x881C0105, // 001B GETMBR R7 R0 K5 - 0x941C0E01, // 001C GETIDX R7 R7 R1 - 0x8C1C0F08, // 001D GETMET R7 R7 K8 - 0x5C240C00, // 001E MOVE R9 R6 - 0x7C1C0400, // 001F CALL R7 2 - 0x8C1C0113, // 0020 GETMET R7 R0 K19 - 0x88240105, // 0021 GETMBR R9 R0 K5 - 0x94241201, // 0022 GETIDX R9 R9 R1 - 0x7C1C0400, // 0023 CALL R7 2 - 0x80040C00, // 0024 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: trigger_event -********************************************************************/ -be_local_closure(class_EventManager_trigger_event, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(trigger_event), - &be_const_str_solidified, - ( &(const binstruction[69]) { /* code */ - 0x880C010C, // 0000 GETMBR R3 R0 K12 - 0x780E0007, // 0001 JMPF R3 #000A - 0x880C010B, // 0002 GETMBR R3 R0 K11 - 0x8C0C0708, // 0003 GETMET R3 R3 K8 - 0x60140013, // 0004 GETGBL R5 G19 - 0x7C140000, // 0005 CALL R5 0 - 0x98162A01, // 0006 SETIDX R5 K21 R1 - 0x98162C02, // 0007 SETIDX R5 K22 R2 - 0x7C0C0400, // 0008 CALL R3 2 - 0x80000600, // 0009 RET 0 - 0x500C0200, // 000A LDBOOL R3 1 0 - 0x90021803, // 000B SETMBR R0 K12 R3 - 0xA8020029, // 000C EXBLK 0 #0037 - 0x600C0010, // 000D GETGBL R3 G16 - 0x88100102, // 000E GETMBR R4 R0 K2 - 0x7C0C0200, // 000F CALL R3 1 - 0xA802000A, // 0010 EXBLK 0 #001C - 0x5C100600, // 0011 MOVE R4 R3 - 0x7C100000, // 0012 CALL R4 0 - 0x88140917, // 0013 GETMBR R5 R4 K23 - 0x78160005, // 0014 JMPF R5 #001B - 0x8C140918, // 0015 GETMET R5 R4 K24 - 0x601C0013, // 0016 GETGBL R7 G19 - 0x7C1C0000, // 0017 CALL R7 0 - 0x981E0001, // 0018 SETIDX R7 K0 R1 - 0x981E2C02, // 0019 SETIDX R7 K22 R2 - 0x7C140400, // 001A CALL R5 2 - 0x7001FFF4, // 001B JMP #0011 - 0x580C0007, // 001C LDCONST R3 K7 - 0xAC0C0200, // 001D CATCH R3 1 0 - 0xB0080000, // 001E RAISE 2 R0 R0 - 0x880C0105, // 001F GETMBR R3 R0 K5 - 0x8C0C0703, // 0020 GETMET R3 R3 K3 - 0x5C140200, // 0021 MOVE R5 R1 - 0x7C0C0400, // 0022 CALL R3 2 - 0x4C100000, // 0023 LDNIL R4 - 0x20100604, // 0024 NE R4 R3 R4 - 0x7812000E, // 0025 JMPF R4 #0035 - 0x60100010, // 0026 GETGBL R4 G16 - 0x5C140600, // 0027 MOVE R5 R3 - 0x7C100200, // 0028 CALL R4 1 - 0xA8020007, // 0029 EXBLK 0 #0032 - 0x5C140800, // 002A MOVE R5 R4 - 0x7C140000, // 002B CALL R5 0 - 0x88180B17, // 002C GETMBR R6 R5 K23 - 0x781A0002, // 002D JMPF R6 #0031 - 0x8C180B18, // 002E GETMET R6 R5 K24 - 0x5C200400, // 002F MOVE R8 R2 - 0x7C180400, // 0030 CALL R6 2 - 0x7001FFF7, // 0031 JMP #002A - 0x58100007, // 0032 LDCONST R4 K7 - 0xAC100200, // 0033 CATCH R4 1 0 - 0xB0080000, // 0034 RAISE 2 R0 R0 - 0xA8040001, // 0035 EXBLK 1 1 - 0x70020008, // 0036 JMP #0040 - 0xAC0C0002, // 0037 CATCH R3 0 2 - 0x70020005, // 0038 JMP #003F - 0x60140001, // 0039 GETGBL R5 G1 - 0x58180019, // 003A LDCONST R6 K25 - 0x5C1C0600, // 003B MOVE R7 R3 - 0x5C200800, // 003C MOVE R8 R4 - 0x7C140600, // 003D CALL R5 3 - 0x70020000, // 003E JMP #0040 - 0xB0080000, // 003F RAISE 2 R0 R0 - 0x500C0000, // 0040 LDBOOL R3 0 0 - 0x90021803, // 0041 SETMBR R0 K12 R3 - 0x8C0C011A, // 0042 GETMET R3 R0 K26 - 0x7C0C0200, // 0043 CALL R3 1 - 0x80000000, // 0044 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _process_queued_events -********************************************************************/ -be_local_closure(class_EventManager__process_queued_events, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_EventManager, /* shared constants */ - be_str_weak(_process_queued_events), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x8804010B, // 0000 GETMBR R1 R0 K11 - 0x8C04031B, // 0001 GETMET R1 R1 K27 - 0x7C040200, // 0002 CALL R1 1 - 0x2404030F, // 0003 GT R1 R1 K15 - 0x78060008, // 0004 JMPF R1 #000E - 0x8804010B, // 0005 GETMBR R1 R0 K11 - 0x8C04031C, // 0006 GETMET R1 R1 K28 - 0x580C000F, // 0007 LDCONST R3 K15 - 0x7C040400, // 0008 CALL R1 2 - 0x8C08011D, // 0009 GETMET R2 R0 K29 - 0x94100315, // 000A GETIDX R4 R1 K21 - 0x94140316, // 000B GETIDX R5 R1 K22 - 0x7C080600, // 000C CALL R2 3 - 0x7001FFF1, // 000D JMP #0000 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: EventManager -********************************************************************/ -be_local_class(EventManager, - 4, - NULL, - be_nested_map(14, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(unregister_handler, -1), be_const_closure(class_EventManager_unregister_handler_closure) }, - { be_const_key_weak(set_event_active, -1), be_const_closure(class_EventManager_set_event_active_closure) }, - { be_const_key_weak(handlers, -1), be_const_var(0) }, - { be_const_key_weak(init, -1), be_const_closure(class_EventManager_init_closure) }, - { be_const_key_weak(trigger_event, -1), be_const_closure(class_EventManager_trigger_event_closure) }, - { be_const_key_weak(get_handlers, 3), be_const_closure(class_EventManager_get_handlers_closure) }, - { be_const_key_weak(clear_all_handlers, -1), be_const_closure(class_EventManager_clear_all_handlers_closure) }, - { be_const_key_weak(event_queue, -1), be_const_var(2) }, - { be_const_key_weak(_sort_handlers, -1), be_const_closure(class_EventManager__sort_handlers_closure) }, - { be_const_key_weak(is_processing, 7), be_const_var(3) }, - { be_const_key_weak(global_handlers, -1), be_const_var(1) }, - { be_const_key_weak(register_handler, -1), be_const_closure(class_EventManager_register_handler_closure) }, - { be_const_key_weak(get_registered_events, 4), be_const_closure(class_EventManager_get_registered_events_closure) }, - { be_const_key_weak(_process_queued_events, -1), be_const_closure(class_EventManager__process_queued_events_closure) }, - })), - be_str_weak(EventManager) -); - /******************************************************************** ** Solidified function: cosine_osc ********************************************************************/ @@ -15319,133 +16238,57 @@ be_local_class(WaveAnimation, })), be_str_weak(WaveAnimation) ); +// compact class 'BreatheColorProvider' ktab size: 18, total: 29 (saved 88 bytes) +static const bvalue be_ktab_class_BreatheColorProvider[18] = { + /* K0 */ be_nested_str_weak(BreatheColorProvider_X28base_color_X3D0x_X2508x_X2C_X20min_brightness_X3D_X25s_X2C_X20max_brightness_X3D_X25s_X2C_X20duration_X3D_X25s_X2C_X20curve_factor_X3D_X25s_X29), + /* K1 */ be_nested_str_weak(base_color), + /* K2 */ be_nested_str_weak(min_brightness), + /* K3 */ be_nested_str_weak(max_brightness), + /* K4 */ be_nested_str_weak(duration), + /* K5 */ be_nested_str_weak(curve_factor), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(form), + /* K8 */ be_nested_str_weak(animation), + /* K9 */ be_nested_str_weak(COSINE), + /* K10 */ be_nested_str_weak(on_param_changed), + /* K11 */ be_nested_str_weak(produce_value), + /* K12 */ be_nested_str_weak(tasmota), + /* K13 */ be_nested_str_weak(scale_uint), + /* K14 */ be_const_int(0), + /* K15 */ be_nested_str_weak(init), + /* K16 */ be_nested_str_weak(min_value), + /* K17 */ be_nested_str_weak(max_value), +}; + + +extern const bclass be_class_BreatheColorProvider; /******************************************************************** -** Solidified function: color_cycle_rainbow +** Solidified function: tostring ********************************************************************/ -be_local_closure(color_cycle_rainbow, /* name */ +be_local_closure(class_BreatheColorProvider_tostring, /* name */ be_nested_proto( - 19, /* nstack */ - 3, /* argc */ - 0, /* varg */ + 8, /* nstack */ + 1, /* argc */ + 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_const_int(2), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(scale_uint), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(push), - /* K7 */ be_nested_str_weak(animation), - /* K8 */ be_nested_str_weak(color_cycle), - /* K9 */ be_nested_str_weak(palette), - /* K10 */ be_nested_str_weak(cycle_period), - }), - be_str_weak(color_cycle_rainbow), + &be_ktab_class_BreatheColorProvider, /* shared constants */ + be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[97]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0203, // 0001 EQ R3 R1 R3 - 0x740E0001, // 0002 JMPT R3 #0005 - 0x140C0300, // 0003 LT R3 R1 K0 - 0x780E0000, // 0004 JMPF R3 #0006 - 0x54060005, // 0005 LDINT R1 6 - 0x600C0012, // 0006 GETGBL R3 G18 - 0x7C0C0000, // 0007 CALL R3 0 - 0x58100001, // 0008 LDCONST R4 K1 - 0x14140801, // 0009 LT R5 R4 R1 - 0x7816004B, // 000A JMPF R5 #0057 - 0xB8160400, // 000B GETNGBL R5 K2 - 0x8C140B03, // 000C GETMET R5 R5 K3 - 0x5C1C0800, // 000D MOVE R7 R4 - 0x58200001, // 000E LDCONST R8 K1 - 0x5C240200, // 000F MOVE R9 R1 - 0x58280001, // 0010 LDCONST R10 K1 - 0x542E0167, // 0011 LDINT R11 360 - 0x7C140C00, // 0012 CALL R5 6 - 0x4C180000, // 0013 LDNIL R6 - 0x4C1C0000, // 0014 LDNIL R7 - 0x4C200000, // 0015 LDNIL R8 - 0x5426003B, // 0016 LDINT R9 60 - 0x0C240A09, // 0017 DIV R9 R5 R9 - 0x542A0005, // 0018 LDINT R10 6 - 0x1024120A, // 0019 MOD R9 R9 R10 - 0x542A003B, // 001A LDINT R10 60 - 0x0C280A0A, // 001B DIV R10 R5 R10 - 0x04281409, // 001C SUB R10 R10 R9 - 0x542E00FE, // 001D LDINT R11 255 - 0x58300001, // 001E LDCONST R12 K1 - 0x60340009, // 001F GETGBL R13 G9 - 0x043A080A, // 0020 SUB R14 K4 R10 - 0x0838160E, // 0021 MUL R14 R11 R14 - 0x7C340200, // 0022 CALL R13 1 - 0x60380009, // 0023 GETGBL R14 G9 - 0x083C160A, // 0024 MUL R15 R11 R10 - 0x7C380200, // 0025 CALL R14 1 - 0x1C3C1301, // 0026 EQ R15 R9 K1 - 0x783E0003, // 0027 JMPF R15 #002C - 0x5C181600, // 0028 MOVE R6 R11 - 0x5C1C1C00, // 0029 MOVE R7 R14 - 0x5C201800, // 002A MOVE R8 R12 - 0x7002001B, // 002B JMP #0048 - 0x1C3C1304, // 002C EQ R15 R9 K4 - 0x783E0003, // 002D JMPF R15 #0032 - 0x5C181A00, // 002E MOVE R6 R13 - 0x5C1C1600, // 002F MOVE R7 R11 - 0x5C201800, // 0030 MOVE R8 R12 - 0x70020015, // 0031 JMP #0048 - 0x1C3C1300, // 0032 EQ R15 R9 K0 - 0x783E0003, // 0033 JMPF R15 #0038 - 0x5C181800, // 0034 MOVE R6 R12 - 0x5C1C1600, // 0035 MOVE R7 R11 - 0x5C201C00, // 0036 MOVE R8 R14 - 0x7002000F, // 0037 JMP #0048 - 0x1C3C1305, // 0038 EQ R15 R9 K5 - 0x783E0003, // 0039 JMPF R15 #003E - 0x5C181800, // 003A MOVE R6 R12 - 0x5C1C1A00, // 003B MOVE R7 R13 - 0x5C201600, // 003C MOVE R8 R11 - 0x70020009, // 003D JMP #0048 - 0x543E0003, // 003E LDINT R15 4 - 0x1C3C120F, // 003F EQ R15 R9 R15 - 0x783E0003, // 0040 JMPF R15 #0045 - 0x5C181C00, // 0041 MOVE R6 R14 - 0x5C1C1800, // 0042 MOVE R7 R12 - 0x5C201600, // 0043 MOVE R8 R11 - 0x70020002, // 0044 JMP #0048 - 0x5C181600, // 0045 MOVE R6 R11 - 0x5C1C1800, // 0046 MOVE R7 R12 - 0x5C201A00, // 0047 MOVE R8 R13 - 0x543E00FE, // 0048 LDINT R15 255 - 0x54420017, // 0049 LDINT R16 24 - 0x383C1E10, // 004A SHL R15 R15 R16 - 0x5442000F, // 004B LDINT R16 16 - 0x38400C10, // 004C SHL R16 R6 R16 - 0x303C1E10, // 004D OR R15 R15 R16 - 0x54420007, // 004E LDINT R16 8 - 0x38400E10, // 004F SHL R16 R7 R16 - 0x303C1E10, // 0050 OR R15 R15 R16 - 0x303C1E08, // 0051 OR R15 R15 R8 - 0x8C400706, // 0052 GETMET R16 R3 K6 - 0x5C481E00, // 0053 MOVE R18 R15 - 0x7C400400, // 0054 CALL R16 2 - 0x00100904, // 0055 ADD R4 R4 K4 - 0x7001FFB1, // 0056 JMP #0009 - 0xB8160E00, // 0057 GETNGBL R5 K7 - 0x8C140B08, // 0058 GETMET R5 R5 K8 - 0x5C1C0000, // 0059 MOVE R7 R0 - 0x7C140400, // 005A CALL R5 2 - 0x90161203, // 005B SETMBR R5 K9 R3 - 0x4C180000, // 005C LDNIL R6 - 0x20180406, // 005D NE R6 R2 R6 - 0x781A0000, // 005E JMPF R6 #0060 - 0x90161402, // 005F SETMBR R5 K10 R2 - 0x80040A00, // 0060 RET 1 R5 + ( &(const binstruction[ 9]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x88100102, // 0003 GETMBR R4 R0 K2 + 0x88140103, // 0004 GETMBR R5 R0 K3 + 0x88180104, // 0005 GETMBR R6 R0 K4 + 0x881C0105, // 0006 GETMBR R7 R0 K5 + 0x7C040C00, // 0007 CALL R1 6 + 0x80040200, // 0008 RET 1 R1 }) ) ); @@ -15453,11 +16296,243 @@ be_local_closure(color_cycle_rainbow, /* name */ /******************************************************************** -** Solidified function: sparkle_white +** Solidified function: on_param_changed ********************************************************************/ -be_local_closure(sparkle_white, /* name */ +be_local_closure(class_BreatheColorProvider_on_param_changed, /* name */ be_nested_proto( - 4, /* nstack */ + 7, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_BreatheColorProvider, /* shared constants */ + be_str_weak(on_param_changed), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x1C0C0305, // 0000 EQ R3 R1 K5 + 0x780E0008, // 0001 JMPF R3 #000B + 0x1C0C0506, // 0002 EQ R3 R2 K6 + 0x780E0003, // 0003 JMPF R3 #0008 + 0xB80E1000, // 0004 GETNGBL R3 K8 + 0x880C0709, // 0005 GETMBR R3 R3 K9 + 0x90020E03, // 0006 SETMBR R0 K7 R3 + 0x70020002, // 0007 JMP #000B + 0xB80E1000, // 0008 GETNGBL R3 K8 + 0x880C0709, // 0009 GETMBR R3 R3 K9 + 0x90020E03, // 000A SETMBR R0 K7 R3 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C070A, // 000E GETMET R3 R3 K10 + 0x5C140200, // 000F MOVE R5 R1 + 0x5C180400, // 0010 MOVE R6 R2 + 0x7C0C0600, // 0011 CALL R3 3 + 0x80000000, // 0012 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: produce_value +********************************************************************/ +be_local_closure(class_BreatheColorProvider_produce_value, /* name */ + be_nested_proto( + 15, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_BreatheColorProvider, /* shared constants */ + be_str_weak(produce_value), + &be_const_str_solidified, + ( &(const binstruction[82]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C070B, // 0003 GETMET R3 R3 K11 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x88100105, // 0007 GETMBR R4 R0 K5 + 0x5C140600, // 0008 MOVE R5 R3 + 0x24180906, // 0009 GT R6 R4 K6 + 0x781A0019, // 000A JMPF R6 #0025 + 0xB81A1800, // 000B GETNGBL R6 K12 + 0x8C180D0D, // 000C GETMET R6 R6 K13 + 0x5C200600, // 000D MOVE R8 R3 + 0x5824000E, // 000E LDCONST R9 K14 + 0x542A00FE, // 000F LDINT R10 255 + 0x582C000E, // 0010 LDCONST R11 K14 + 0x54321FFF, // 0011 LDINT R12 8192 + 0x7C180C00, // 0012 CALL R6 6 + 0x5C1C0800, // 0013 MOVE R7 R4 + 0x24200F06, // 0014 GT R8 R7 K6 + 0x78220005, // 0015 JMPF R8 #001C + 0x08200C06, // 0016 MUL R8 R6 R6 + 0x54261FFF, // 0017 LDINT R9 8192 + 0x0C201009, // 0018 DIV R8 R8 R9 + 0x5C181000, // 0019 MOVE R6 R8 + 0x041C0F06, // 001A SUB R7 R7 K6 + 0x7001FFF7, // 001B JMP #0014 + 0xB8221800, // 001C GETNGBL R8 K12 + 0x8C20110D, // 001D GETMET R8 R8 K13 + 0x5C280C00, // 001E MOVE R10 R6 + 0x582C000E, // 001F LDCONST R11 K14 + 0x54321FFF, // 0020 LDINT R12 8192 + 0x5834000E, // 0021 LDCONST R13 K14 + 0x543A00FE, // 0022 LDINT R14 255 + 0x7C200C00, // 0023 CALL R8 6 + 0x5C141000, // 0024 MOVE R5 R8 + 0xB81A1800, // 0025 GETNGBL R6 K12 + 0x8C180D0D, // 0026 GETMET R6 R6 K13 + 0x5C200A00, // 0027 MOVE R8 R5 + 0x5824000E, // 0028 LDCONST R9 K14 + 0x542A00FE, // 0029 LDINT R10 255 + 0x882C0102, // 002A GETMBR R11 R0 K2 + 0x88300103, // 002B GETMBR R12 R0 K3 + 0x7C180C00, // 002C CALL R6 6 + 0x881C0101, // 002D GETMBR R7 R0 K1 + 0x54220017, // 002E LDINT R8 24 + 0x3C200E08, // 002F SHR R8 R7 R8 + 0x542600FE, // 0030 LDINT R9 255 + 0x2C201009, // 0031 AND R8 R8 R9 + 0x5426000F, // 0032 LDINT R9 16 + 0x3C240E09, // 0033 SHR R9 R7 R9 + 0x542A00FE, // 0034 LDINT R10 255 + 0x2C24120A, // 0035 AND R9 R9 R10 + 0x542A0007, // 0036 LDINT R10 8 + 0x3C280E0A, // 0037 SHR R10 R7 R10 + 0x542E00FE, // 0038 LDINT R11 255 + 0x2C28140B, // 0039 AND R10 R10 R11 + 0x542E00FE, // 003A LDINT R11 255 + 0x2C2C0E0B, // 003B AND R11 R7 R11 + 0x08301206, // 003C MUL R12 R9 R6 + 0x543600FE, // 003D LDINT R13 255 + 0x0C30180D, // 003E DIV R12 R12 R13 + 0x5C241800, // 003F MOVE R9 R12 + 0x08301406, // 0040 MUL R12 R10 R6 + 0x543600FE, // 0041 LDINT R13 255 + 0x0C30180D, // 0042 DIV R12 R12 R13 + 0x5C281800, // 0043 MOVE R10 R12 + 0x08301606, // 0044 MUL R12 R11 R6 + 0x543600FE, // 0045 LDINT R13 255 + 0x0C30180D, // 0046 DIV R12 R12 R13 + 0x5C2C1800, // 0047 MOVE R11 R12 + 0x54320017, // 0048 LDINT R12 24 + 0x3830100C, // 0049 SHL R12 R8 R12 + 0x5436000F, // 004A LDINT R13 16 + 0x3834120D, // 004B SHL R13 R9 R13 + 0x3030180D, // 004C OR R12 R12 R13 + 0x54360007, // 004D LDINT R13 8 + 0x3834140D, // 004E SHL R13 R10 R13 + 0x3030180D, // 004F OR R12 R12 R13 + 0x3030180B, // 0050 OR R12 R12 R11 + 0x80041800, // 0051 RET 1 R12 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_BreatheColorProvider_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_BreatheColorProvider, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C08050F, // 0003 GETMET R2 R2 K15 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0xB80A1000, // 0006 GETNGBL R2 K8 + 0x88080509, // 0007 GETMBR R2 R2 K9 + 0x90020E02, // 0008 SETMBR R0 K7 R2 + 0x9002210E, // 0009 SETMBR R0 K16 K14 + 0x540A00FE, // 000A LDINT R2 255 + 0x90022202, // 000B SETMBR R0 K17 R2 + 0x540A0BB7, // 000C LDINT R2 3000 + 0x90020802, // 000D SETMBR R0 K4 R2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: BreatheColorProvider +********************************************************************/ +extern const bclass be_class_OscillatorValueProvider; +be_local_class(BreatheColorProvider, + 0, + &be_class_OscillatorValueProvider, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(tostring, 1), be_const_closure(class_BreatheColorProvider_tostring_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_BreatheColorProvider_init_closure) }, + { be_const_key_weak(on_param_changed, -1), be_const_closure(class_BreatheColorProvider_on_param_changed_closure) }, + { be_const_key_weak(PARAMS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(base_color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-1) }, + })) ) } )) }, + { be_const_key_weak(max_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(255) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(curve_factor, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(2) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + { be_const_key_weak(max, 1), be_const_int(5) }, + })) ) } )) }, + { be_const_key_weak(min_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(produce_value, -1), be_const_closure(class_BreatheColorProvider_produce_value_closure) }, + })), + be_str_weak(BreatheColorProvider) +); + +/******************************************************************** +** Solidified function: noise_rainbow +********************************************************************/ +be_local_closure(noise_rainbow, /* name */ + be_nested_proto( + 5, /* nstack */ 1, /* argc */ 0, /* varg */ 0, /* has upvals */ @@ -15465,24 +16540,53 @@ be_local_closure(sparkle_white, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ + ( &(const bvalue[16]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(sparkle_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(name), - /* K4 */ be_nested_str_weak(sparkle_white), + /* K1 */ be_nested_str_weak(noise_animation), + /* K2 */ be_nested_str_weak(rich_palette), + /* K3 */ be_nested_str_weak(palette), + /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), + /* K5 */ be_nested_str_weak(cycle_period), + /* K6 */ be_nested_str_weak(transition_type), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(brightness), + /* K9 */ be_nested_str_weak(range_min), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(range_max), + /* K12 */ be_nested_str_weak(color), + /* K13 */ be_nested_str_weak(scale), + /* K14 */ be_nested_str_weak(speed), + /* K15 */ be_nested_str_weak(octaves), }), - be_str_weak(sparkle_white), + be_str_weak(noise_rainbow), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ + ( &(const binstruction[26]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x5C0C0000, // 0002 MOVE R3 R0 0x7C040400, // 0003 CALL R1 2 - 0x5409FFFE, // 0004 LDINT R2 -1 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x90060704, // 0006 SETMBR R1 K3 K4 - 0x80040200, // 0007 RET 1 R1 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x8C080502, // 0005 GETMET R2 R2 K2 + 0x5C100000, // 0006 MOVE R4 R0 + 0x7C080400, // 0007 CALL R2 2 + 0xB80E0000, // 0008 GETNGBL R3 K0 + 0x880C0704, // 0009 GETMBR R3 R3 K4 + 0x900A0603, // 000A SETMBR R2 K3 R3 + 0x540E1387, // 000B LDINT R3 5000 + 0x900A0A03, // 000C SETMBR R2 K5 R3 + 0x900A0D07, // 000D SETMBR R2 K6 K7 + 0x540E00FE, // 000E LDINT R3 255 + 0x900A1003, // 000F SETMBR R2 K8 R3 + 0x900A130A, // 0010 SETMBR R2 K9 K10 + 0x540E00FE, // 0011 LDINT R3 255 + 0x900A1603, // 0012 SETMBR R2 K11 R3 + 0x90061802, // 0013 SETMBR R1 K12 R2 + 0x540E0031, // 0014 LDINT R3 50 + 0x90061A03, // 0015 SETMBR R1 K13 R3 + 0x540E001D, // 0016 LDINT R3 30 + 0x90061C03, // 0017 SETMBR R1 K14 R3 + 0x90061F07, // 0018 SETMBR R1 K15 K7 + 0x80040200, // 0019 RET 1 R1 }) ) ); @@ -16242,236 +17346,47 @@ be_local_closure(register_user_function, /* name */ ); /*******************************************************************/ -// compact class 'BeaconAnimation' ktab size: 17, total: 21 (saved 32 bytes) -static const bvalue be_ktab_class_BeaconAnimation[17] = { - /* K0 */ be_nested_str_weak(engine), - /* K1 */ be_nested_str_weak(time_ms), - /* K2 */ be_nested_str_weak(width), - /* K3 */ be_nested_str_weak(back_color), - /* K4 */ be_nested_str_weak(pos), - /* K5 */ be_nested_str_weak(slew_size), - /* K6 */ be_nested_str_weak(beacon_size), - /* K7 */ be_nested_str_weak(color), - /* K8 */ be_const_int(-16777216), - /* K9 */ be_nested_str_weak(fill_pixels), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(set_pixel_color), - /* K12 */ be_const_int(1), - /* K13 */ be_nested_str_weak(tasmota), - /* K14 */ be_nested_str_weak(scale_int), - /* K15 */ be_nested_str_weak(blend_linear), - /* K16 */ be_nested_str_weak(BeaconAnimation_X28color_X3D0x_X2508x_X2C_X20pos_X3D_X25s_X2C_X20beacon_size_X3D_X25s_X2C_X20slew_size_X3D_X25s_X29), -}; - - -extern const bclass be_class_BeaconAnimation; /******************************************************************** -** Solidified function: render +** Solidified function: shift_scroll_right ********************************************************************/ -be_local_closure(class_BeaconAnimation_render, /* name */ +be_local_closure(shift_scroll_right, /* name */ be_nested_proto( - 23, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_BeaconAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[106]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0203, // 0001 EQ R3 R1 R3 - 0x780E0001, // 0002 JMPF R3 #0005 - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x80040600, // 0004 RET 1 R3 - 0x4C0C0000, // 0005 LDNIL R3 - 0x1C0C0403, // 0006 EQ R3 R2 R3 - 0x780E0001, // 0007 JMPF R3 #000A - 0x880C0100, // 0008 GETMBR R3 R0 K0 - 0x88080701, // 0009 GETMBR R2 R3 K1 - 0x880C0302, // 000A GETMBR R3 R1 K2 - 0x88100103, // 000B GETMBR R4 R0 K3 - 0x88140104, // 000C GETMBR R5 R0 K4 - 0x88180105, // 000D GETMBR R6 R0 K5 - 0x881C0106, // 000E GETMBR R7 R0 K6 - 0x88200107, // 000F GETMBR R8 R0 K7 - 0x20240908, // 0010 NE R9 R4 K8 - 0x78260002, // 0011 JMPF R9 #0015 - 0x8C240309, // 0012 GETMET R9 R1 K9 - 0x5C2C0800, // 0013 MOVE R11 R4 - 0x7C240400, // 0014 CALL R9 2 - 0x5C240A00, // 0015 MOVE R9 R5 - 0x00280A07, // 0016 ADD R10 R5 R7 - 0x142C130A, // 0017 LT R11 R9 K10 - 0x782E0000, // 0018 JMPF R11 #001A - 0x5824000A, // 0019 LDCONST R9 K10 - 0x282C1403, // 001A GE R11 R10 R3 - 0x782E0000, // 001B JMPF R11 #001D - 0x5C280600, // 001C MOVE R10 R3 - 0x5C2C1200, // 001D MOVE R11 R9 - 0x1430160A, // 001E LT R12 R11 R10 - 0x78320005, // 001F JMPF R12 #0026 - 0x8C30030B, // 0020 GETMET R12 R1 K11 - 0x5C381600, // 0021 MOVE R14 R11 - 0x5C3C1000, // 0022 MOVE R15 R8 - 0x7C300600, // 0023 CALL R12 3 - 0x002C170C, // 0024 ADD R11 R11 K12 - 0x7001FFF7, // 0025 JMP #001E - 0x24300D0A, // 0026 GT R12 R6 K10 - 0x7832003F, // 0027 JMPF R12 #0068 - 0x04300A06, // 0028 SUB R12 R5 R6 - 0x5C340A00, // 0029 MOVE R13 R5 - 0x1438190A, // 002A LT R14 R12 K10 - 0x783A0000, // 002B JMPF R14 #002D - 0x5830000A, // 002C LDCONST R12 K10 - 0x28381A03, // 002D GE R14 R13 R3 - 0x783A0000, // 002E JMPF R14 #0030 - 0x5C340600, // 002F MOVE R13 R3 - 0x5C2C1800, // 0030 MOVE R11 R12 - 0x1438160D, // 0031 LT R14 R11 R13 - 0x783A0013, // 0032 JMPF R14 #0047 - 0xB83A1A00, // 0033 GETNGBL R14 K13 - 0x8C381D0E, // 0034 GETMET R14 R14 K14 - 0x5C401600, // 0035 MOVE R16 R11 - 0x04440A06, // 0036 SUB R17 R5 R6 - 0x0444230C, // 0037 SUB R17 R17 K12 - 0x5C480A00, // 0038 MOVE R18 R5 - 0x544E00FE, // 0039 LDINT R19 255 - 0x5850000A, // 003A LDCONST R20 K10 - 0x7C380C00, // 003B CALL R14 6 - 0x8C3C030F, // 003C GETMET R15 R1 K15 - 0x5C440800, // 003D MOVE R17 R4 - 0x5C481000, // 003E MOVE R18 R8 - 0x5C4C1C00, // 003F MOVE R19 R14 - 0x7C3C0800, // 0040 CALL R15 4 - 0x8C40030B, // 0041 GETMET R16 R1 K11 - 0x5C481600, // 0042 MOVE R18 R11 - 0x5C4C1E00, // 0043 MOVE R19 R15 - 0x7C400600, // 0044 CALL R16 3 - 0x002C170C, // 0045 ADD R11 R11 K12 - 0x7001FFE9, // 0046 JMP #0031 - 0x00380A07, // 0047 ADD R14 R5 R7 - 0x003C0A07, // 0048 ADD R15 R5 R7 - 0x003C1E06, // 0049 ADD R15 R15 R6 - 0x14401D0A, // 004A LT R16 R14 K10 - 0x78420000, // 004B JMPF R16 #004D - 0x5838000A, // 004C LDCONST R14 K10 - 0x28401E03, // 004D GE R16 R15 R3 - 0x78420000, // 004E JMPF R16 #0050 - 0x5C3C0600, // 004F MOVE R15 R3 - 0x5C2C1C00, // 0050 MOVE R11 R14 - 0x1440160F, // 0051 LT R16 R11 R15 - 0x78420014, // 0052 JMPF R16 #0068 - 0xB8421A00, // 0053 GETNGBL R16 K13 - 0x8C40210E, // 0054 GETMET R16 R16 K14 - 0x5C481600, // 0055 MOVE R18 R11 - 0x004C0A07, // 0056 ADD R19 R5 R7 - 0x044C270C, // 0057 SUB R19 R19 K12 - 0x00500A07, // 0058 ADD R20 R5 R7 - 0x00502806, // 0059 ADD R20 R20 R6 - 0x5854000A, // 005A LDCONST R21 K10 - 0x545A00FE, // 005B LDINT R22 255 - 0x7C400C00, // 005C CALL R16 6 - 0x8C44030F, // 005D GETMET R17 R1 K15 - 0x5C4C0800, // 005E MOVE R19 R4 - 0x5C501000, // 005F MOVE R20 R8 - 0x5C542000, // 0060 MOVE R21 R16 - 0x7C440800, // 0061 CALL R17 4 - 0x8C48030B, // 0062 GETMET R18 R1 K11 - 0x5C501600, // 0063 MOVE R20 R11 - 0x5C542200, // 0064 MOVE R21 R17 - 0x7C480600, // 0065 CALL R18 3 - 0x002C170C, // 0066 ADD R11 R11 K12 - 0x7001FFE8, // 0067 JMP #0051 - 0x50300200, // 0068 LDBOOL R12 1 0 - 0x80041800, // 0069 RET 1 R12 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_BeaconAnimation_tostring, /* name */ - be_nested_proto( - 7, /* nstack */ + 4, /* nstack */ 1, /* argc */ - 10, /* varg */ + 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_BeaconAnimation, /* shared constants */ - be_str_weak(tostring), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(animation), + /* K1 */ be_nested_str_weak(shift_animation), + /* K2 */ be_nested_str_weak(direction), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(shift_speed), + /* K5 */ be_nested_str_weak(wrap_around), + }), + be_str_weak(shift_scroll_right), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x60040018, // 0000 GETGBL R1 G24 - 0x58080010, // 0001 LDCONST R2 K16 - 0x880C0107, // 0002 GETMBR R3 R0 K7 - 0x88100104, // 0003 GETMBR R4 R0 K4 - 0x88140106, // 0004 GETMBR R5 R0 K6 - 0x88180105, // 0005 GETMBR R6 R0 K5 - 0x7C040A00, // 0006 CALL R1 5 - 0x80040200, // 0007 RET 1 R1 + ( &(const binstruction[10]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A007F, // 0005 LDINT R2 128 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x50080200, // 0007 LDBOOL R2 1 0 + 0x90060A02, // 0008 SETMBR R1 K5 R2 + 0x80040200, // 0009 RET 1 R1 }) ) ); /*******************************************************************/ -/******************************************************************** -** Solidified class: BeaconAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(BeaconAnimation, - 0, - &be_class_Animation, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(PARAMS, -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_weak(back_color, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-16777216) }, - })) ) } )) }, - { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-1) }, - })) ) } )) }, - { be_const_key_weak(slew_size, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(beacon_size, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(1) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - })) ) } )) }, - { be_const_key_weak(pos, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(render, 2), be_const_closure(class_BeaconAnimation_render_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_BeaconAnimation_tostring_closure) }, - })), - be_str_weak(BeaconAnimation) -); - /******************************************************************** ** Solidified function: animation_version_string ********************************************************************/ @@ -16554,8 +17469,376 @@ be_local_closure(is_value_provider, /* name */ ); /*******************************************************************/ -// compact class 'AnimationEngine' ktab size: 50, total: 143 (saved 744 bytes) -static const bvalue be_ktab_class_AnimationEngine[50] = { + +/******************************************************************** +** Solidified function: elastic +********************************************************************/ +be_local_closure(elastic, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(oscillator_value), + /* K2 */ be_nested_str_weak(form), + /* K3 */ be_nested_str_weak(ELASTIC), + }), + be_str_weak(elastic), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x90060402, // 0006 SETMBR R1 K2 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: noise_single_color +********************************************************************/ +be_local_closure(noise_single_color, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(noise_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(scale), + /* K4 */ be_nested_str_weak(speed), + /* K5 */ be_nested_str_weak(octaves), + /* K6 */ be_const_int(1), + }), + be_str_weak(noise_single_color), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409FFFE, // 0004 LDINT R2 -1 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x540A0031, // 0006 LDINT R2 50 + 0x90060602, // 0007 SETMBR R1 K3 R2 + 0x540A001D, // 0008 LDINT R2 30 + 0x90060802, // 0009 SETMBR R1 K4 R2 + 0x90060B06, // 000A SETMBR R1 K5 K6 + 0x80040200, // 000B RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +extern const bclass be_class_PaletteMeterAnimation; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_PaletteMeterAnimation_init, /* 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(init), + /* K1 */ be_nested_str_weak(name), + /* K2 */ be_nested_str_weak(palette_meter), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080500, // 0003 GETMET R2 R2 K0 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x90020302, // 0006 SETMBR R0 K1 K2 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _update_value_buffer +********************************************************************/ +be_local_closure(class_PaletteMeterAnimation__update_value_buffer, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* 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(value_func), + /* K1 */ be_nested_str_weak(engine), + /* K2 */ be_nested_str_weak(get_strip_length), + /* K3 */ be_nested_str_weak(value_buffer), + /* K4 */ be_nested_str_weak(resize), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(scale_uint), + /* K7 */ be_const_int(0), + /* K8 */ be_const_int(1), + }), + be_str_weak(_update_value_buffer), + &be_const_str_solidified, + ( &(const binstruction[42]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x1C0C0403, // 0002 EQ R3 R2 R3 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x80000600, // 0004 RET 0 + 0x880C0101, // 0005 GETMBR R3 R0 K1 + 0x8C0C0702, // 0006 GETMET R3 R3 K2 + 0x7C0C0200, // 0007 CALL R3 1 + 0x6010000C, // 0008 GETGBL R4 G12 + 0x88140103, // 0009 GETMBR R5 R0 K3 + 0x7C100200, // 000A CALL R4 1 + 0x20100803, // 000B NE R4 R4 R3 + 0x78120003, // 000C JMPF R4 #0011 + 0x88100103, // 000D GETMBR R4 R0 K3 + 0x8C100904, // 000E GETMET R4 R4 K4 + 0x5C180600, // 000F MOVE R6 R3 + 0x7C100400, // 0010 CALL R4 2 + 0x5C100400, // 0011 MOVE R4 R2 + 0x5C140200, // 0012 MOVE R5 R1 + 0x5C180000, // 0013 MOVE R6 R0 + 0x7C100400, // 0014 CALL R4 2 + 0xB8160A00, // 0015 GETNGBL R5 K5 + 0x8C140B06, // 0016 GETMET R5 R5 K6 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x58200007, // 0018 LDCONST R8 K7 + 0x54260063, // 0019 LDINT R9 100 + 0x58280007, // 001A LDCONST R10 K7 + 0x5C2C0600, // 001B MOVE R11 R3 + 0x7C140C00, // 001C CALL R5 6 + 0x58180007, // 001D LDCONST R6 K7 + 0x141C0C03, // 001E LT R7 R6 R3 + 0x781E0008, // 001F JMPF R7 #0029 + 0x881C0103, // 0020 GETMBR R7 R0 K3 + 0x14200C05, // 0021 LT R8 R6 R5 + 0x78220001, // 0022 JMPF R8 #0025 + 0x54220063, // 0023 LDINT R8 100 + 0x70020000, // 0024 JMP #0026 + 0x58200007, // 0025 LDCONST R8 K7 + 0x981C0C08, // 0026 SETIDX R7 R6 R8 + 0x00180D08, // 0027 ADD R6 R6 K8 + 0x7001FFF4, // 0028 JMP #001E + 0x80000000, // 0029 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: PaletteMeterAnimation +********************************************************************/ +extern const bclass be_class_PalettePatternAnimation; +be_local_class(PaletteMeterAnimation, + 0, + &be_class_PalettePatternAnimation, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(value_func, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_nil() }, + { be_const_key_weak(type, -1), be_nested_str_weak(function) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_PaletteMeterAnimation_init_closure) }, + { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteMeterAnimation__update_value_buffer_closure) }, + })), + be_str_weak(PaletteMeterAnimation) +); + +/******************************************************************** +** Solidified function: pulsating_animation +********************************************************************/ +be_local_closure(pulsating_animation, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(breathe_animation), + /* K2 */ be_nested_str_weak(curve_factor), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(period), + }), + be_str_weak(pulsating_animation), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A03E7, // 0005 LDINT R2 1000 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ramp +********************************************************************/ +be_local_closure(ramp, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(oscillator_value), + /* K2 */ be_nested_str_weak(form), + /* K3 */ be_nested_str_weak(SAWTOOTH), + }), + be_str_weak(ramp), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x90060402, // 0006 SETMBR R1 K2 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: wave_custom +********************************************************************/ +be_local_closure(wave_custom, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(wave_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(wave_type), + /* K4 */ be_const_int(2), + /* K5 */ be_nested_str_weak(frequency), + /* K6 */ be_nested_str_weak(wave_speed), + }), + be_str_weak(wave_custom), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409FEFF, // 0004 LDINT R2 -256 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x90060704, // 0006 SETMBR R1 K3 K4 + 0x540A0027, // 0007 LDINT R2 40 + 0x90060A02, // 0008 SETMBR R1 K5 R2 + 0x540A001D, // 0009 LDINT R2 30 + 0x90060C02, // 000A SETMBR R1 K6 R2 + 0x80040200, // 000B RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ease_in +********************************************************************/ +be_local_closure(ease_in, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(oscillator_value), + /* K2 */ be_nested_str_weak(form), + /* K3 */ be_nested_str_weak(EASE_IN), + }), + be_str_weak(ease_in), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x88080503, // 0005 GETMBR R2 R2 K3 + 0x90060402, // 0006 SETMBR R1 K2 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + +// compact class 'AnimationEngine' ktab size: 49, total: 144 (saved 760 bytes) +static const bvalue be_ktab_class_AnimationEngine[49] = { /* K0 */ be_nested_str_weak(animations), /* K1 */ be_const_int(1), /* K2 */ be_const_int(0), @@ -16581,31 +17864,30 @@ static const bvalue be_ktab_class_AnimationEngine[50] = { /* K22 */ be_nested_str_weak(time_ms), /* K23 */ be_nested_str_weak(fast_loop_closure), /* K24 */ be_nested_str_weak(render_needed), - /* K25 */ be_nested_str_weak(stop_sequence), + /* K25 */ be_nested_str_weak(stop), /* K26 */ be_nested_str_weak(render), /* K27 */ be_nested_str_weak(blend_pixels), /* K28 */ be_nested_str_weak(_output_to_strip), /* K29 */ be_nested_str_weak(name), - /* K30 */ be_nested_str_weak(stop), - /* K31 */ be_nested_str_weak(update), - /* K32 */ be_nested_str_weak(_clear_strip), - /* K33 */ be_nested_str_weak(_render_animations), - /* K34 */ be_nested_str_weak(resume), - /* K35 */ be_nested_str_weak(tasmota), - /* K36 */ be_nested_str_weak(millis), - /* K37 */ be_nested_str_weak(start), - /* K38 */ be_nested_str_weak(add_fast_loop), - /* K39 */ be_nested_str_weak(_sort_animations), - /* K40 */ be_nested_str_weak(_handle_strip_length_change), - /* K41 */ be_nested_str_weak(check_strip_length), - /* K42 */ be_nested_str_weak(resize), - /* K43 */ be_nested_str_weak(stop_iteration), - /* K44 */ be_nested_str_weak(can_show), - /* K45 */ be_nested_str_weak(_process_events), - /* K46 */ be_nested_str_weak(_update_and_render), - /* K47 */ be_nested_str_weak(remove_fast_loop), - /* K48 */ be_nested_str_weak(event_manager), - /* K49 */ be_nested_str_weak(_process_queued_events), + /* K30 */ be_nested_str_weak(update), + /* K31 */ be_nested_str_weak(_clear_strip), + /* K32 */ be_nested_str_weak(_render_animations), + /* K33 */ be_nested_str_weak(resume), + /* K34 */ be_nested_str_weak(tasmota), + /* K35 */ be_nested_str_weak(millis), + /* K36 */ be_nested_str_weak(start), + /* K37 */ be_nested_str_weak(add_fast_loop), + /* K38 */ be_nested_str_weak(_sort_animations), + /* K39 */ be_nested_str_weak(_handle_strip_length_change), + /* K40 */ be_nested_str_weak(check_strip_length), + /* K41 */ be_nested_str_weak(resize), + /* K42 */ be_nested_str_weak(stop_iteration), + /* K43 */ be_nested_str_weak(can_show), + /* K44 */ be_nested_str_weak(_process_events), + /* K45 */ be_nested_str_weak(_update_and_render), + /* K46 */ be_nested_str_weak(remove_fast_loop), + /* K47 */ be_nested_str_weak(event_manager), + /* K48 */ be_nested_str_weak(_process_queued_events), }; @@ -17106,7 +18388,7 @@ be_local_closure(class_AnimationEngine_interrupt_animation, /* name */ 0x8810071D, // 000C GETMBR R4 R3 K29 0x1C100801, // 000D EQ R4 R4 R1 0x78120007, // 000E JMPF R4 #0017 - 0x8C10071E, // 000F GETMET R4 R3 K30 + 0x8C100719, // 000F GETMET R4 R3 K25 0x5C180600, // 0010 MOVE R6 R3 0x7C100400, // 0011 CALL R4 2 0x88100100, // 0012 GETMBR R4 R0 K0 @@ -17149,7 +18431,7 @@ be_local_closure(class_AnimationEngine__update_and_render, /* name */ 0x78120011, // 0006 JMPF R4 #0019 0x88100100, // 0007 GETMBR R4 R0 K0 0x94100803, // 0008 GETIDX R4 R4 R3 - 0x8C14091F, // 0009 GETMET R5 R4 K31 + 0x8C14091E, // 0009 GETMET R5 R4 K30 0x5C1C0200, // 000A MOVE R7 R1 0x7C140400, // 000B CALL R5 2 0x78160004, // 000C JMPF R5 #0012 @@ -17169,12 +18451,12 @@ be_local_closure(class_AnimationEngine__update_and_render, /* name */ 0x78120006, // 001A JMPF R4 #0022 0x88100118, // 001B GETMBR R4 R0 K24 0x78120003, // 001C JMPF R4 #0021 - 0x8C100120, // 001D GETMET R4 R0 K32 + 0x8C10011F, // 001D GETMET R4 R0 K31 0x7C100200, // 001E CALL R4 1 0x50100000, // 001F LDBOOL R4 0 0 0x90023004, // 0020 SETMBR R0 K24 R4 0x80000800, // 0021 RET 0 - 0x8C100121, // 0022 GETMET R4 R0 K33 + 0x8C100120, // 0022 GETMET R4 R0 K32 0x88180100, // 0023 GETMBR R6 R0 K0 0x5C1C0200, // 0024 MOVE R7 R1 0x7C100600, // 0025 CALL R4 3 @@ -17204,7 +18486,7 @@ be_local_closure(class_AnimationEngine_resume_after, /* name */ be_str_weak(resume_after), &be_const_str_solidified, ( &(const binstruction[ 3]) { /* code */ - 0x8C080122, // 0000 GETMET R2 R0 K34 + 0x8C080121, // 0000 GETMET R2 R0 K33 0x7C080200, // 0001 CALL R2 1 0x80000000, // 0002 RET 0 }) @@ -17253,13 +18535,13 @@ be_local_closure(class_AnimationEngine_start, /* name */ &be_ktab_class_AnimationEngine, /* shared constants */ be_str_weak(start), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ + ( &(const binstruction[51]) { /* code */ 0x88040108, // 0000 GETMBR R1 R0 K8 - 0x74060021, // 0001 JMPT R1 #0024 + 0x7406002E, // 0001 JMPT R1 #0031 0x50040200, // 0002 LDBOOL R1 1 0 0x90021001, // 0003 SETMBR R0 K8 R1 - 0xB8064600, // 0004 GETNGBL R1 K35 - 0x8C040324, // 0005 GETMET R1 R1 K36 + 0xB8064400, // 0004 GETNGBL R1 K34 + 0x8C040323, // 0005 GETMET R1 R1 K35 0x7C040200, // 0006 CALL R1 1 0x540A0009, // 0007 LDINT R2 10 0x04040202, // 0008 SUB R1 R1 R2 @@ -17271,8 +18553,8 @@ be_local_closure(class_AnimationEngine_start, /* name */ 0x84040000, // 000E CLOSURE R1 P0 0x90022E01, // 000F SETMBR R0 K23 R1 0x58040002, // 0010 LDCONST R1 K2 - 0xB80A4600, // 0011 GETNGBL R2 K35 - 0x8C080524, // 0012 GETMET R2 R2 K36 + 0xB80A4400, // 0011 GETNGBL R2 K34 + 0x8C080523, // 0012 GETMET R2 R2 K35 0x7C080200, // 0013 CALL R2 1 0x600C000C, // 0014 GETGBL R3 G12 0x88100100, // 0015 GETMBR R4 R0 K0 @@ -17281,17 +18563,30 @@ be_local_closure(class_AnimationEngine_start, /* name */ 0x780E0006, // 0018 JMPF R3 #0020 0x880C0100, // 0019 GETMBR R3 R0 K0 0x940C0601, // 001A GETIDX R3 R3 R1 - 0x8C0C0725, // 001B GETMET R3 R3 K37 + 0x8C0C0724, // 001B GETMET R3 R3 K36 0x5C140400, // 001C MOVE R5 R2 0x7C0C0400, // 001D CALL R3 2 0x00040301, // 001E ADD R1 R1 K1 0x7001FFF3, // 001F JMP #0014 - 0xB80E4600, // 0020 GETNGBL R3 K35 - 0x8C0C0726, // 0021 GETMET R3 R3 K38 - 0x88140117, // 0022 GETMBR R5 R0 K23 - 0x7C0C0400, // 0023 CALL R3 2 - 0xA0000000, // 0024 CLOSE R0 - 0x80040000, // 0025 RET 1 R0 + 0x58040002, // 0020 LDCONST R1 K2 + 0x600C000C, // 0021 GETGBL R3 G12 + 0x8810010A, // 0022 GETMBR R4 R0 K10 + 0x7C0C0200, // 0023 CALL R3 1 + 0x140C0203, // 0024 LT R3 R1 R3 + 0x780E0006, // 0025 JMPF R3 #002D + 0x880C010A, // 0026 GETMBR R3 R0 K10 + 0x940C0601, // 0027 GETIDX R3 R3 R1 + 0x8C0C0724, // 0028 GETMET R3 R3 K36 + 0x5C140400, // 0029 MOVE R5 R2 + 0x7C0C0400, // 002A CALL R3 2 + 0x00040301, // 002B ADD R1 R1 K1 + 0x7001FFF3, // 002C JMP #0021 + 0xB80E4400, // 002D GETNGBL R3 K34 + 0x8C0C0725, // 002E GETMET R3 R3 K37 + 0x88140117, // 002F GETMBR R5 R0 K23 + 0x7C0C0400, // 0030 CALL R3 2 + 0xA0000000, // 0031 CLOSE R0 + 0x80040000, // 0032 RET 1 R0 }) ) ); @@ -17383,11 +18678,11 @@ be_local_closure(class_AnimationEngine_add_animation, /* name */ 0x8C0C070C, // 000F GETMET R3 R3 K12 0x5C140200, // 0010 MOVE R5 R1 0x7C0C0400, // 0011 CALL R3 2 - 0x8C0C0127, // 0012 GETMET R3 R0 K39 + 0x8C0C0126, // 0012 GETMET R3 R0 K38 0x7C0C0200, // 0013 CALL R3 1 0x880C0108, // 0014 GETMBR R3 R0 K8 0x780E0001, // 0015 JMPF R3 #0018 - 0x8C0C0325, // 0016 GETMET R3 R1 K37 + 0x8C0C0324, // 0016 GETMET R3 R1 K36 0x7C0C0200, // 0017 CALL R3 1 0x500C0200, // 0018 LDBOOL R3 1 0 0x90023003, // 0019 SETMBR R0 K24 R3 @@ -17418,7 +18713,7 @@ be_local_closure(class_AnimationEngine_resume, /* name */ ( &(const binstruction[ 5]) { /* code */ 0x88040108, // 0000 GETMBR R1 R0 K8 0x74060001, // 0001 JMPT R1 #0004 - 0x8C040125, // 0002 GETMET R1 R0 K37 + 0x8C040124, // 0002 GETMET R1 R0 K36 0x7C040200, // 0003 CALL R1 1 0x80000000, // 0004 RET 0 }) @@ -17450,7 +18745,7 @@ be_local_closure(class_AnimationEngine_check_strip_length, /* name */ 0x88080109, // 0003 GETMBR R2 R0 K9 0x20080202, // 0004 NE R2 R1 R2 0x780A0004, // 0005 JMPF R2 #000B - 0x8C080128, // 0006 GETMET R2 R0 K40 + 0x8C080127, // 0006 GETMET R2 R0 K39 0x5C100200, // 0007 MOVE R4 R1 0x7C080400, // 0008 CALL R2 2 0x50080200, // 0009 LDBOOL R2 1 0 @@ -17480,7 +18775,7 @@ be_local_closure(class_AnimationEngine_get_strip_length, /* name */ be_str_weak(get_strip_length), &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ - 0x8C040129, // 0000 GETMET R1 R0 K41 + 0x8C040128, // 0000 GETMET R1 R0 K40 0x7C040200, // 0001 CALL R1 1 0x88040109, // 0002 GETMBR R1 R0 K9 0x80040200, // 0003 RET 1 R1 @@ -17512,11 +18807,11 @@ be_local_closure(class_AnimationEngine__handle_strip_length_change, /* name */ 0x80000400, // 0002 RET 0 0x90021201, // 0003 SETMBR R0 K9 R1 0x8808010E, // 0004 GETMBR R2 R0 K14 - 0x8C08052A, // 0005 GETMET R2 R2 K42 + 0x8C080529, // 0005 GETMET R2 R2 K41 0x5C100200, // 0006 MOVE R4 R1 0x7C080400, // 0007 CALL R2 2 0x88080114, // 0008 GETMBR R2 R0 K20 - 0x8C08052A, // 0009 GETMET R2 R2 K42 + 0x8C080529, // 0009 GETMET R2 R2 K41 0x5C100200, // 000A MOVE R4 R1 0x7C080400, // 000B CALL R2 2 0x50080200, // 000C LDBOOL R2 1 0 @@ -17578,10 +18873,10 @@ be_local_closure(class_AnimationEngine_interrupt_current, /* name */ 0x7C080000, // 0005 CALL R2 0 0x880C0508, // 0006 GETMBR R3 R2 K8 0x780E0001, // 0007 JMPF R3 #000A - 0x8C0C051E, // 0008 GETMET R3 R2 K30 + 0x8C0C0519, // 0008 GETMET R3 R2 K25 0x7C0C0200, // 0009 CALL R3 1 0x7001FFF8, // 000A JMP #0004 - 0x5804002B, // 000B LDCONST R1 K43 + 0x5804002A, // 000B LDCONST R1 K42 0xAC040200, // 000C CATCH R1 1 0 0xB0080000, // 000D RAISE 2 R0 R0 0x80000000, // 000E RET 0 @@ -17608,7 +18903,7 @@ be_local_closure(class_AnimationEngine_cleanup, /* name */ be_str_weak(cleanup), &be_const_str_solidified, ( &(const binstruction[11]) { /* code */ - 0x8C04011E, // 0000 GETMET R1 R0 K30 + 0x8C040119, // 0000 GETMET R1 R0 K25 0x7C040200, // 0001 CALL R1 1 0x8C040105, // 0002 GETMET R1 R0 K5 0x7C040200, // 0003 CALL R1 1 @@ -17641,7 +18936,7 @@ be_local_closure(class_AnimationEngine_on_tick, /* name */ &be_ktab_class_AnimationEngine, /* shared constants */ be_str_weak(on_tick), &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ + ( &(const binstruction[54]) { /* code */ 0x88080108, // 0000 GETMBR R2 R0 K8 0x740A0001, // 0001 JMPT R2 #0004 0x50080000, // 0002 LDBOOL R2 0 0 @@ -17649,11 +18944,11 @@ be_local_closure(class_AnimationEngine_on_tick, /* name */ 0x4C080000, // 0004 LDNIL R2 0x1C080202, // 0005 EQ R2 R1 R2 0x780A0003, // 0006 JMPF R2 #000B - 0xB80A4600, // 0007 GETNGBL R2 K35 - 0x8C080524, // 0008 GETMET R2 R2 K36 + 0xB80A4400, // 0007 GETNGBL R2 K34 + 0x8C080523, // 0008 GETMET R2 R2 K35 0x7C080200, // 0009 CALL R2 1 0x5C040400, // 000A MOVE R1 R2 - 0x8C080129, // 000B GETMET R2 R0 K41 + 0x8C080128, // 000B GETMET R2 R0 K40 0x7C080200, // 000C CALL R2 1 0x90022C01, // 000D SETMBR R0 K22 R1 0x88080115, // 000E GETMBR R2 R0 K21 @@ -17665,12 +18960,12 @@ be_local_closure(class_AnimationEngine_on_tick, /* name */ 0x80040600, // 0014 RET 1 R3 0x90022A01, // 0015 SETMBR R0 K21 R1 0x880C0104, // 0016 GETMBR R3 R0 K4 - 0x880C072C, // 0017 GETMBR R3 R3 K44 + 0x880C072B, // 0017 GETMBR R3 R3 K43 0x4C100000, // 0018 LDNIL R4 0x200C0604, // 0019 NE R3 R3 R4 0x780E0005, // 001A JMPF R3 #0021 0x880C0104, // 001B GETMBR R3 R0 K4 - 0x8C0C072C, // 001C GETMET R3 R3 K44 + 0x8C0C072B, // 001C GETMET R3 R3 K43 0x7C0C0200, // 001D CALL R3 1 0x740E0001, // 001E JMPT R3 #0021 0x500C0200, // 001F LDBOOL R3 1 0 @@ -17680,21 +18975,22 @@ be_local_closure(class_AnimationEngine_on_tick, /* name */ 0x8814010A, // 0023 GETMBR R5 R0 K10 0x7C100200, // 0024 CALL R4 1 0x14100604, // 0025 LT R4 R3 R4 - 0x78120005, // 0026 JMPF R4 #002D + 0x78120006, // 0026 JMPF R4 #002E 0x8810010A, // 0027 GETMBR R4 R0 K10 0x94100803, // 0028 GETIDX R4 R4 R3 - 0x8C10091F, // 0029 GETMET R4 R4 K31 - 0x7C100200, // 002A CALL R4 1 - 0x000C0701, // 002B ADD R3 R3 K1 - 0x7001FFF4, // 002C JMP #0022 - 0x8C10012D, // 002D GETMET R4 R0 K45 - 0x5C180200, // 002E MOVE R6 R1 - 0x7C100400, // 002F CALL R4 2 - 0x8C10012E, // 0030 GETMET R4 R0 K46 - 0x5C180200, // 0031 MOVE R6 R1 - 0x7C100400, // 0032 CALL R4 2 - 0x50100200, // 0033 LDBOOL R4 1 0 - 0x80040800, // 0034 RET 1 R4 + 0x8C10091E, // 0029 GETMET R4 R4 K30 + 0x5C180200, // 002A MOVE R6 R1 + 0x7C100400, // 002B CALL R4 2 + 0x000C0701, // 002C ADD R3 R3 K1 + 0x7001FFF3, // 002D JMP #0022 + 0x8C10012C, // 002E GETMET R4 R0 K44 + 0x5C180200, // 002F MOVE R6 R1 + 0x7C100400, // 0030 CALL R4 2 + 0x8C10012D, // 0031 GETMET R4 R0 K45 + 0x5C180200, // 0032 MOVE R6 R1 + 0x7C100400, // 0033 CALL R4 2 + 0x50100200, // 0034 LDBOOL R4 1 0 + 0x80040800, // 0035 RET 1 R4 }) ) ); @@ -17726,8 +19022,8 @@ be_local_closure(class_AnimationEngine_stop, /* name */ 0x4C080000, // 0005 LDNIL R2 0x20040202, // 0006 NE R1 R1 R2 0x78060003, // 0007 JMPF R1 #000C - 0xB8064600, // 0008 GETNGBL R1 K35 - 0x8C04032F, // 0009 GETMET R1 R1 K47 + 0xB8064400, // 0008 GETNGBL R1 K34 + 0x8C04032E, // 0009 GETMET R1 R1 K46 0x880C0117, // 000A GETMBR R3 R0 K23 0x7C040400, // 000B CALL R1 2 0x80040000, // 000C RET 1 R0 @@ -17780,13 +19076,13 @@ be_local_closure(class_AnimationEngine__process_events, /* name */ &be_const_str_solidified, ( &(const binstruction[10]) { /* code */ 0xB80A2600, // 0000 GETNGBL R2 K19 - 0x88080530, // 0001 GETMBR R2 R2 K48 + 0x8808052F, // 0001 GETMBR R2 R2 K47 0x4C0C0000, // 0002 LDNIL R3 0x20080403, // 0003 NE R2 R2 R3 0x780A0003, // 0004 JMPF R2 #0009 0xB80A2600, // 0005 GETNGBL R2 K19 - 0x88080530, // 0006 GETMBR R2 R2 K48 - 0x8C080531, // 0007 GETMET R2 R2 K49 + 0x8808052F, // 0006 GETMBR R2 R2 K47 + 0x8C080530, // 0007 GETMET R2 R2 K48 0x7C080200, // 0008 CALL R2 1 0x80000000, // 0009 RET 0 }) @@ -17846,667 +19142,43 @@ be_local_class(AnimationEngine, })), be_str_weak(AnimationEngine) ); - -/******************************************************************** -** Solidified function: pulsating_animation -********************************************************************/ -be_local_closure(pulsating_animation, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(breathe_animation), - /* K2 */ be_nested_str_weak(curve_factor), - /* K3 */ be_const_int(1), - /* K4 */ be_nested_str_weak(period), - }), - be_str_weak(pulsating_animation), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A03E7, // 0005 LDINT R2 1000 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: noise_single_color -********************************************************************/ -be_local_closure(noise_single_color, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(noise_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(scale), - /* K4 */ be_nested_str_weak(speed), - /* K5 */ be_nested_str_weak(octaves), - /* K6 */ be_const_int(1), - }), - be_str_weak(noise_single_color), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x5409FFFE, // 0004 LDINT R2 -1 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x540A0031, // 0006 LDINT R2 50 - 0x90060602, // 0007 SETMBR R1 K3 R2 - 0x540A001D, // 0008 LDINT R2 30 - 0x90060802, // 0009 SETMBR R1 K4 R2 - 0x90060B06, // 000A SETMBR R1 K5 K6 - 0x80040200, // 000B RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -extern const bclass be_class_PaletteMeterAnimation; - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_PaletteMeterAnimation_init, /* 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(init), - /* K1 */ be_nested_str_weak(name), - /* K2 */ be_nested_str_weak(palette_meter), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080500, // 0003 GETMET R2 R2 K0 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x90020302, // 0006 SETMBR R0 K1 K2 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _update_value_buffer -********************************************************************/ -be_local_closure(class_PaletteMeterAnimation__update_value_buffer, /* name */ - be_nested_proto( - 12, /* nstack */ - 2, /* 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(value_func), - /* K1 */ be_nested_str_weak(engine), - /* K2 */ be_nested_str_weak(get_strip_length), - /* K3 */ be_nested_str_weak(value_buffer), - /* K4 */ be_nested_str_weak(resize), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(scale_uint), - /* K7 */ be_const_int(0), - /* K8 */ be_const_int(1), - }), - be_str_weak(_update_value_buffer), - &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x1C0C0403, // 0002 EQ R3 R2 R3 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x80000600, // 0004 RET 0 - 0x880C0101, // 0005 GETMBR R3 R0 K1 - 0x8C0C0702, // 0006 GETMET R3 R3 K2 - 0x7C0C0200, // 0007 CALL R3 1 - 0x6010000C, // 0008 GETGBL R4 G12 - 0x88140103, // 0009 GETMBR R5 R0 K3 - 0x7C100200, // 000A CALL R4 1 - 0x20100803, // 000B NE R4 R4 R3 - 0x78120003, // 000C JMPF R4 #0011 - 0x88100103, // 000D GETMBR R4 R0 K3 - 0x8C100904, // 000E GETMET R4 R4 K4 - 0x5C180600, // 000F MOVE R6 R3 - 0x7C100400, // 0010 CALL R4 2 - 0x5C100400, // 0011 MOVE R4 R2 - 0x5C140200, // 0012 MOVE R5 R1 - 0x5C180000, // 0013 MOVE R6 R0 - 0x7C100400, // 0014 CALL R4 2 - 0xB8160A00, // 0015 GETNGBL R5 K5 - 0x8C140B06, // 0016 GETMET R5 R5 K6 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x58200007, // 0018 LDCONST R8 K7 - 0x54260063, // 0019 LDINT R9 100 - 0x58280007, // 001A LDCONST R10 K7 - 0x5C2C0600, // 001B MOVE R11 R3 - 0x7C140C00, // 001C CALL R5 6 - 0x58180007, // 001D LDCONST R6 K7 - 0x141C0C03, // 001E LT R7 R6 R3 - 0x781E0008, // 001F JMPF R7 #0029 - 0x881C0103, // 0020 GETMBR R7 R0 K3 - 0x14200C05, // 0021 LT R8 R6 R5 - 0x78220001, // 0022 JMPF R8 #0025 - 0x54220063, // 0023 LDINT R8 100 - 0x70020000, // 0024 JMP #0026 - 0x58200007, // 0025 LDCONST R8 K7 - 0x981C0C08, // 0026 SETIDX R7 R6 R8 - 0x00180D08, // 0027 ADD R6 R6 K8 - 0x7001FFF4, // 0028 JMP #001E - 0x80000000, // 0029 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: PaletteMeterAnimation -********************************************************************/ -extern const bclass be_class_PalettePatternAnimation; -be_local_class(PaletteMeterAnimation, - 0, - &be_class_PalettePatternAnimation, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(value_func, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - { be_const_key_weak(type, -1), be_nested_str_weak(function) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_PaletteMeterAnimation_init_closure) }, - { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteMeterAnimation__update_value_buffer_closure) }, - })), - be_str_weak(PaletteMeterAnimation) -); - -/******************************************************************** -** Solidified function: ease_in -********************************************************************/ -be_local_closure(ease_in, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(oscillator_value), - /* K2 */ be_nested_str_weak(form), - /* K3 */ be_nested_str_weak(EASE_IN), - }), - be_str_weak(ease_in), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x88080503, // 0005 GETMBR R2 R2 K3 - 0x90060402, // 0006 SETMBR R1 K2 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: ramp -********************************************************************/ -be_local_closure(ramp, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(oscillator_value), - /* K2 */ be_nested_str_weak(form), - /* K3 */ be_nested_str_weak(SAWTOOTH), - }), - be_str_weak(ramp), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x88080503, // 0005 GETMBR R2 R2 K3 - 0x90060402, // 0006 SETMBR R1 K2 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: wave_custom -********************************************************************/ -be_local_closure(wave_custom, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(wave_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(wave_type), - /* K4 */ be_const_int(2), - /* K5 */ be_nested_str_weak(frequency), - /* K6 */ be_nested_str_weak(wave_speed), - }), - be_str_weak(wave_custom), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x5409FEFF, // 0004 LDINT R2 -256 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x90060704, // 0006 SETMBR R1 K3 K4 - 0x540A0027, // 0007 LDINT R2 40 - 0x90060A02, // 0008 SETMBR R1 K5 R2 - 0x540A001D, // 0009 LDINT R2 30 - 0x90060C02, // 000A SETMBR R1 K6 R2 - 0x80040200, // 000B RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: pulsating_color_provider -********************************************************************/ -be_local_closure(pulsating_color_provider, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(breathe_color), - /* K2 */ be_nested_str_weak(curve_factor), - /* K3 */ be_const_int(1), - /* K4 */ be_nested_str_weak(duration), - }), - be_str_weak(pulsating_color_provider), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060503, // 0004 SETMBR R1 K2 K3 - 0x540A03E7, // 0005 LDINT R2 1000 - 0x90060802, // 0006 SETMBR R1 K4 R2 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: solid -********************************************************************/ -be_local_closure(solid, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(name), - /* K2 */ be_nested_str_weak(solid), - }), - be_str_weak(solid), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040300, // 0001 GETMET R1 R1 K0 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x90060302, // 0004 SETMBR R1 K1 K2 - 0x80040200, // 0005 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -extern const bclass be_class_PaletteWaveAnimation; - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_PaletteWaveAnimation_init, /* 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(init), - /* K1 */ be_nested_str_weak(name), - /* K2 */ be_nested_str_weak(palette_wave), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080500, // 0003 GETMET R2 R2 K0 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x90020302, // 0006 SETMBR R0 K1 K2 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _update_value_buffer -********************************************************************/ -be_local_closure(class_PaletteWaveAnimation__update_value_buffer, /* name */ - be_nested_proto( - 19, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(wave_period), - /* K1 */ be_nested_str_weak(wave_length), - /* K2 */ be_nested_str_weak(engine), - /* K3 */ be_nested_str_weak(get_strip_length), - /* K4 */ be_nested_str_weak(value_buffer), - /* K5 */ be_nested_str_weak(resize), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(scale_uint), - /* K8 */ be_const_int(0), - /* K9 */ be_const_real_hex(0x447A0000), - /* K10 */ be_nested_str_weak(sine_int), - /* K11 */ be_nested_str_weak(scale_int), - /* K12 */ be_const_int(1), - }), - be_str_weak(_update_value_buffer), - &be_const_str_solidified, - ( &(const binstruction[56]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x88100102, // 0002 GETMBR R4 R0 K2 - 0x8C100903, // 0003 GETMET R4 R4 K3 - 0x7C100200, // 0004 CALL R4 1 - 0x6014000C, // 0005 GETGBL R5 G12 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x7C140200, // 0007 CALL R5 1 - 0x20140A04, // 0008 NE R5 R5 R4 - 0x78160003, // 0009 JMPF R5 #000E - 0x88140104, // 000A GETMBR R5 R0 K4 - 0x8C140B05, // 000B GETMET R5 R5 K5 - 0x5C1C0800, // 000C MOVE R7 R4 - 0x7C140400, // 000D CALL R5 2 - 0xB8160C00, // 000E GETNGBL R5 K6 - 0x8C140B07, // 000F GETMET R5 R5 K7 - 0x101C0202, // 0010 MOD R7 R1 R2 - 0x58200008, // 0011 LDCONST R8 K8 - 0x5C240400, // 0012 MOVE R9 R2 - 0x58280008, // 0013 LDCONST R10 K8 - 0x542E03E7, // 0014 LDINT R11 1000 - 0x7C140C00, // 0015 CALL R5 6 - 0x0C140B09, // 0016 DIV R5 R5 K9 - 0x60180009, // 0017 GETGBL R6 G9 - 0x081C0A03, // 0018 MUL R7 R5 R3 - 0x7C180200, // 0019 CALL R6 1 - 0x581C0008, // 001A LDCONST R7 K8 - 0x14200E04, // 001B LT R8 R7 R4 - 0x78220019, // 001C JMPF R8 #0037 - 0x00200E06, // 001D ADD R8 R7 R6 - 0x10201003, // 001E MOD R8 R8 R3 - 0xB8260C00, // 001F GETNGBL R9 K6 - 0x8C241307, // 0020 GETMET R9 R9 K7 - 0x5C2C1000, // 0021 MOVE R11 R8 - 0x58300008, // 0022 LDCONST R12 K8 - 0x5C340600, // 0023 MOVE R13 R3 - 0x58380008, // 0024 LDCONST R14 K8 - 0x543E7FFE, // 0025 LDINT R15 32767 - 0x7C240C00, // 0026 CALL R9 6 - 0xB82A0C00, // 0027 GETNGBL R10 K6 - 0x8C28150A, // 0028 GETMET R10 R10 K10 - 0x5C301200, // 0029 MOVE R12 R9 - 0x7C280400, // 002A CALL R10 2 - 0x882C0104, // 002B GETMBR R11 R0 K4 - 0xB8320C00, // 002C GETNGBL R12 K6 - 0x8C30190B, // 002D GETMET R12 R12 K11 - 0x5C381400, // 002E MOVE R14 R10 - 0x543DEFFF, // 002F LDINT R15 -4096 - 0x54420FFF, // 0030 LDINT R16 4096 - 0x58440008, // 0031 LDCONST R17 K8 - 0x544A0063, // 0032 LDINT R18 100 - 0x7C300C00, // 0033 CALL R12 6 - 0x982C0E0C, // 0034 SETIDX R11 R7 R12 - 0x001C0F0C, // 0035 ADD R7 R7 K12 - 0x7001FFE3, // 0036 JMP #001B - 0x80000000, // 0037 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: PaletteWaveAnimation -********************************************************************/ -extern const bclass be_class_PalettePatternAnimation; -be_local_class(PaletteWaveAnimation, - 0, - &be_class_PalettePatternAnimation, - be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(PARAMS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(wave_period, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(5000) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(wave_length, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(10) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_PaletteWaveAnimation_init_closure) }, - { be_const_key_weak(_update_value_buffer, -1), be_const_closure(class_PaletteWaveAnimation__update_value_buffer_closure) }, - })), - be_str_weak(PaletteWaveAnimation) -); -// compact class 'PlasmaAnimation' ktab size: 46, total: 93 (saved 376 bytes) -static const bvalue be_ktab_class_PlasmaAnimation[46] = { - /* K0 */ be_nested_str_weak(start), - /* K1 */ be_nested_str_weak(color), - /* K2 */ be_nested_str_weak(animation), - /* K3 */ be_nested_str_weak(rich_palette), - /* K4 */ be_nested_str_weak(engine), - /* K5 */ be_nested_str_weak(palette), - /* K6 */ be_nested_str_weak(PALETTE_RAINBOW), - /* K7 */ be_nested_str_weak(cycle_period), - /* K8 */ be_nested_str_weak(transition_type), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(brightness), - /* K11 */ be_nested_str_weak(range_min), - /* K12 */ be_const_int(0), - /* K13 */ be_nested_str_weak(range_max), - /* K14 */ be_nested_str_weak(time_phase), - /* K15 */ be_nested_str_weak(is_value_provider), - /* K16 */ be_nested_str_weak(0x_X2508x), - /* K17 */ be_nested_str_weak(PlasmaAnimation_X28color_X3D_X25s_X2C_X20freq_x_X3D_X25s_X2C_X20freq_y_X3D_X25s_X2C_X20time_speed_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), - /* K18 */ be_nested_str_weak(freq_x), - /* K19 */ be_nested_str_weak(freq_y), - /* K20 */ be_nested_str_weak(time_speed), - /* K21 */ be_nested_str_weak(priority), - /* K22 */ be_nested_str_weak(is_running), - /* K23 */ be_nested_str_weak(init), - /* K24 */ be_nested_str_weak(current_colors), - /* K25 */ be_nested_str_weak(_initialize_colors), - /* K26 */ be_nested_str_weak(update), - /* K27 */ be_nested_str_weak(start_time), - /* K28 */ be_nested_str_weak(tasmota), - /* K29 */ be_nested_str_weak(scale_uint), - /* K30 */ be_nested_str_weak(_calculate_plasma), - /* K31 */ be_nested_str_weak(get_strip_length), - /* K32 */ be_nested_str_weak(resize), - /* K33 */ be_const_int(-16777216), - /* K34 */ be_nested_str_weak(set_param), - /* K35 */ be_nested_str_weak(phase_x), - /* K36 */ be_nested_str_weak(phase_y), - /* K37 */ be_nested_str_weak(blend_mode), - /* K38 */ be_nested_str_weak(_sine), - /* K39 */ be_const_int(2), - /* K40 */ be_nested_str_weak(is_color_provider), - /* K41 */ be_nested_str_weak(get_color_for_value), - /* K42 */ be_nested_str_weak(resolve_value), - /* K43 */ be_nested_str_weak(width), - /* K44 */ be_nested_str_weak(set_pixel_color), - /* K45 */ be_nested_str_weak(sine_int), +// compact class 'StripLengthProvider' ktab size: 5, total: 8 (saved 24 bytes) +static const bvalue be_ktab_class_StripLengthProvider[5] = { + /* K0 */ be_nested_str_weak(engine), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(width), + /* K3 */ be_nested_str_weak(StripLengthProvider_X28length_X3D_X25s_X29), + /* K4 */ be_nested_str_weak(StripLengthProvider_X28length_X3Dunknown_X29), }; -extern const bclass be_class_PlasmaAnimation; +extern const bclass be_class_StripLengthProvider; /******************************************************************** -** Solidified function: start +** Solidified function: produce_value ********************************************************************/ -be_local_closure(class_PlasmaAnimation_start, /* name */ +be_local_closure(class_StripLengthProvider_produce_value, /* name */ be_nested_proto( 5, /* nstack */ - 2, /* argc */ + 3, /* argc */ 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(start), + &be_ktab_class_StripLengthProvider, /* shared constants */ + be_str_weak(produce_value), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080500, // 0003 GETMET R2 R2 K0 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x88080101, // 0006 GETMBR R2 R0 K1 - 0x4C0C0000, // 0007 LDNIL R3 - 0x1C080403, // 0008 EQ R2 R2 R3 - 0x780A000F, // 0009 JMPF R2 #001A - 0xB80A0400, // 000A GETNGBL R2 K2 - 0x8C080503, // 000B GETMET R2 R2 K3 - 0x88100104, // 000C GETMBR R4 R0 K4 - 0x7C080400, // 000D CALL R2 2 - 0xB80E0400, // 000E GETNGBL R3 K2 - 0x880C0706, // 000F GETMBR R3 R3 K6 - 0x900A0A03, // 0010 SETMBR R2 K5 R3 - 0x540E1387, // 0011 LDINT R3 5000 - 0x900A0E03, // 0012 SETMBR R2 K7 R3 - 0x900A1109, // 0013 SETMBR R2 K8 K9 - 0x540E00FE, // 0014 LDINT R3 255 - 0x900A1403, // 0015 SETMBR R2 K10 R3 - 0x900A170C, // 0016 SETMBR R2 K11 K12 - 0x540E00FE, // 0017 LDINT R3 255 - 0x900A1A03, // 0018 SETMBR R2 K13 R3 - 0x90020202, // 0019 SETMBR R0 K1 R2 - 0x90021D0C, // 001A SETMBR R0 K14 K12 - 0x80040000, // 001B RET 1 R0 + ( &(const binstruction[ 8]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x4C100000, // 0001 LDNIL R4 + 0x1C0C0604, // 0002 EQ R3 R3 R4 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x80060200, // 0004 RET 1 K1 + 0x880C0100, // 0005 GETMBR R3 R0 K0 + 0x880C0702, // 0006 GETMBR R3 R3 K2 + 0x80040600, // 0007 RET 1 R3 }) ) ); @@ -18516,9 +19188,9 @@ be_local_closure(class_PlasmaAnimation_start, /* name */ /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(class_PlasmaAnimation_tostring, /* name */ +be_local_closure(class_StripLengthProvider_tostring, /* name */ be_nested_proto( - 11, /* nstack */ + 5, /* nstack */ 1, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -18526,37 +19198,33 @@ be_local_closure(class_PlasmaAnimation_tostring, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ + &be_ktab_class_StripLengthProvider, /* shared constants */ be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x4C040000, // 0000 LDNIL R1 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0xB80E0400, // 0002 GETNGBL R3 K2 - 0x8C0C070F, // 0003 GETMET R3 R3 K15 - 0x5C140400, // 0004 MOVE R5 R2 - 0x7C0C0400, // 0005 CALL R3 2 - 0x780E0004, // 0006 JMPF R3 #000C - 0x600C0008, // 0007 GETGBL R3 G8 - 0x5C100400, // 0008 MOVE R4 R2 - 0x7C0C0200, // 0009 CALL R3 1 - 0x5C040600, // 000A MOVE R1 R3 - 0x70020004, // 000B JMP #0011 - 0x600C0018, // 000C GETGBL R3 G24 - 0x58100010, // 000D LDCONST R4 K16 - 0x5C140400, // 000E MOVE R5 R2 - 0x7C0C0400, // 000F CALL R3 2 - 0x5C040600, // 0010 MOVE R1 R3 - 0x600C0018, // 0011 GETGBL R3 G24 - 0x58100011, // 0012 LDCONST R4 K17 - 0x5C140200, // 0013 MOVE R5 R1 - 0x88180112, // 0014 GETMBR R6 R0 K18 - 0x881C0113, // 0015 GETMBR R7 R0 K19 - 0x88200114, // 0016 GETMBR R8 R0 K20 - 0x88240115, // 0017 GETMBR R9 R0 K21 - 0x88280116, // 0018 GETMBR R10 R0 K22 - 0x7C0C0E00, // 0019 CALL R3 7 - 0x80040600, // 001A RET 1 R3 + ( &(const binstruction[23]) { /* code */ + 0xA802000F, // 0000 EXBLK 0 #0011 + 0x88040100, // 0001 GETMBR R1 R0 K0 + 0x4C080000, // 0002 LDNIL R2 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060002, // 0004 JMPF R1 #0008 + 0x88040100, // 0005 GETMBR R1 R0 K0 + 0x88040302, // 0006 GETMBR R1 R1 K2 + 0x70020000, // 0007 JMP #0009 + 0x58040001, // 0008 LDCONST R1 K1 + 0x60080018, // 0009 GETGBL R2 G24 + 0x580C0003, // 000A LDCONST R3 K3 + 0x5C100200, // 000B MOVE R4 R1 + 0x7C080400, // 000C CALL R2 2 + 0xA8040001, // 000D EXBLK 1 1 + 0x80040400, // 000E RET 1 R2 + 0xA8040001, // 000F EXBLK 1 1 + 0x70020004, // 0010 JMP #0016 + 0xAC040000, // 0011 CATCH R1 0 0 + 0x70020001, // 0012 JMP #0015 + 0x80060800, // 0013 RET 1 K4 + 0x70020000, // 0014 JMP #0016 + 0xB0080000, // 0015 RAISE 2 R0 R0 + 0x80000000, // 0016 RET 0 }) ) ); @@ -18564,476 +19232,18 @@ be_local_closure(class_PlasmaAnimation_tostring, /* name */ /******************************************************************** -** Solidified function: init +** Solidified class: StripLengthProvider ********************************************************************/ -be_local_closure(class_PlasmaAnimation_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080517, // 0003 GETMET R2 R2 K23 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x90021D0C, // 0006 SETMBR R0 K14 K12 - 0x60080012, // 0007 GETGBL R2 G18 - 0x7C080000, // 0008 CALL R2 0 - 0x90023002, // 0009 SETMBR R0 K24 R2 - 0x8C080119, // 000A GETMET R2 R0 K25 - 0x7C080200, // 000B CALL R2 1 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_PlasmaAnimation_update, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C08051A, // 0003 GETMET R2 R2 K26 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x740A0001, // 0006 JMPT R2 #0009 - 0x50080000, // 0007 LDBOOL R2 0 0 - 0x80040400, // 0008 RET 1 R2 - 0x88080114, // 0009 GETMBR R2 R0 K20 - 0x240C050C, // 000A GT R3 R2 K12 - 0x780E0011, // 000B JMPF R3 #001E - 0x880C011B, // 000C GETMBR R3 R0 K27 - 0x040C0203, // 000D SUB R3 R1 R3 - 0xB8123800, // 000E GETNGBL R4 K28 - 0x8C10091D, // 000F GETMET R4 R4 K29 - 0x5C180400, // 0010 MOVE R6 R2 - 0x581C000C, // 0011 LDCONST R7 K12 - 0x542200FE, // 0012 LDINT R8 255 - 0x5824000C, // 0013 LDCONST R9 K12 - 0x542A0007, // 0014 LDINT R10 8 - 0x7C100C00, // 0015 CALL R4 6 - 0x2414090C, // 0016 GT R5 R4 K12 - 0x78160005, // 0017 JMPF R5 #001E - 0x08140604, // 0018 MUL R5 R3 R4 - 0x541A03E7, // 0019 LDINT R6 1000 - 0x0C140A06, // 001A DIV R5 R5 R6 - 0x541A00FF, // 001B LDINT R6 256 - 0x10140A06, // 001C MOD R5 R5 R6 - 0x90021C05, // 001D SETMBR R0 K14 R5 - 0x8C0C011E, // 001E GETMET R3 R0 K30 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x500C0200, // 0021 LDBOOL R3 1 0 - 0x80040600, // 0022 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _initialize_colors -********************************************************************/ -be_local_closure(class_PlasmaAnimation__initialize_colors, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(_initialize_colors), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C04031F, // 0001 GETMET R1 R1 K31 - 0x7C040200, // 0002 CALL R1 1 - 0x88080118, // 0003 GETMBR R2 R0 K24 - 0x8C080520, // 0004 GETMET R2 R2 K32 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x5808000C, // 0007 LDCONST R2 K12 - 0x140C0401, // 0008 LT R3 R2 R1 - 0x780E0003, // 0009 JMPF R3 #000E - 0x880C0118, // 000A GETMBR R3 R0 K24 - 0x980C0521, // 000B SETIDX R3 R2 K33 - 0x00080509, // 000C ADD R2 R2 K9 - 0x7001FFF9, // 000D JMP #0008 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: on_param_changed -********************************************************************/ -be_local_closure(class_PlasmaAnimation_on_param_changed, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(on_param_changed), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x1C0C0301, // 0000 EQ R3 R1 K1 - 0x780E0015, // 0001 JMPF R3 #0018 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0403, // 0003 EQ R3 R2 R3 - 0x780E0012, // 0004 JMPF R3 #0018 - 0xB80E0400, // 0005 GETNGBL R3 K2 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x88140104, // 0007 GETMBR R5 R0 K4 - 0x7C0C0400, // 0008 CALL R3 2 - 0xB8120400, // 0009 GETNGBL R4 K2 - 0x88100906, // 000A GETMBR R4 R4 K6 - 0x900E0A04, // 000B SETMBR R3 K5 R4 - 0x54121387, // 000C LDINT R4 5000 - 0x900E0E04, // 000D SETMBR R3 K7 R4 - 0x900E1109, // 000E SETMBR R3 K8 K9 - 0x541200FE, // 000F LDINT R4 255 - 0x900E1404, // 0010 SETMBR R3 K10 R4 - 0x900E170C, // 0011 SETMBR R3 K11 K12 - 0x541200FE, // 0012 LDINT R4 255 - 0x900E1A04, // 0013 SETMBR R3 K13 R4 - 0x8C100122, // 0014 GETMET R4 R0 K34 - 0x58180001, // 0015 LDCONST R6 K1 - 0x5C1C0600, // 0016 MOVE R7 R3 - 0x7C100600, // 0017 CALL R4 3 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _calculate_plasma -********************************************************************/ -be_local_closure(class_PlasmaAnimation__calculate_plasma, /* name */ - be_nested_proto( - 21, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(_calculate_plasma), - &be_const_str_solidified, - ( &(const binstruction[103]) { /* code */ - 0x88080104, // 0000 GETMBR R2 R0 K4 - 0x8C08051F, // 0001 GETMET R2 R2 K31 - 0x7C080200, // 0002 CALL R2 1 - 0x600C000C, // 0003 GETGBL R3 G12 - 0x88100118, // 0004 GETMBR R4 R0 K24 - 0x7C0C0200, // 0005 CALL R3 1 - 0x200C0602, // 0006 NE R3 R3 R2 - 0x780E0001, // 0007 JMPF R3 #000A - 0x8C0C0119, // 0008 GETMET R3 R0 K25 - 0x7C0C0200, // 0009 CALL R3 1 - 0x880C0112, // 000A GETMBR R3 R0 K18 - 0x88100113, // 000B GETMBR R4 R0 K19 - 0x88140123, // 000C GETMBR R5 R0 K35 - 0x88180124, // 000D GETMBR R6 R0 K36 - 0x881C0125, // 000E GETMBR R7 R0 K37 - 0x88200101, // 000F GETMBR R8 R0 K1 - 0x5824000C, // 0010 LDCONST R9 K12 - 0x14281202, // 0011 LT R10 R9 R2 - 0x782A0052, // 0012 JMPF R10 #0066 - 0xB82A3800, // 0013 GETNGBL R10 K28 - 0x8C28151D, // 0014 GETMET R10 R10 K29 - 0x5C301200, // 0015 MOVE R12 R9 - 0x5834000C, // 0016 LDCONST R13 K12 - 0x04380509, // 0017 SUB R14 R2 K9 - 0x583C000C, // 0018 LDCONST R15 K12 - 0x544200FE, // 0019 LDINT R16 255 - 0x7C280C00, // 001A CALL R10 6 - 0x8C2C0126, // 001B GETMET R11 R0 K38 - 0x08341403, // 001C MUL R13 R10 R3 - 0x543A001F, // 001D LDINT R14 32 - 0x0C341A0E, // 001E DIV R13 R13 R14 - 0x00341A05, // 001F ADD R13 R13 R5 - 0x8838010E, // 0020 GETMBR R14 R0 K14 - 0x00341A0E, // 0021 ADD R13 R13 R14 - 0x7C2C0400, // 0022 CALL R11 2 - 0x8C300126, // 0023 GETMET R12 R0 K38 - 0x08381404, // 0024 MUL R14 R10 R4 - 0x543E001F, // 0025 LDINT R15 32 - 0x0C381C0F, // 0026 DIV R14 R14 R15 - 0x00381C06, // 0027 ADD R14 R14 R6 - 0x883C010E, // 0028 GETMBR R15 R0 K14 - 0x083C1F27, // 0029 MUL R15 R15 K39 - 0x00381C0F, // 002A ADD R14 R14 R15 - 0x7C300400, // 002B CALL R12 2 - 0x5834000C, // 002C LDCONST R13 K12 - 0x1C380F0C, // 002D EQ R14 R7 K12 - 0x783A0003, // 002E JMPF R14 #0033 - 0x0038160C, // 002F ADD R14 R11 R12 - 0x0C381D27, // 0030 DIV R14 R14 K39 - 0x5C341C00, // 0031 MOVE R13 R14 - 0x7002000E, // 0032 JMP #0042 - 0x1C380F09, // 0033 EQ R14 R7 K9 - 0x783A0009, // 0034 JMPF R14 #003F - 0xB83A3800, // 0035 GETNGBL R14 K28 - 0x8C381D1D, // 0036 GETMET R14 R14 K29 - 0x5C401600, // 0037 MOVE R16 R11 - 0x5844000C, // 0038 LDCONST R17 K12 - 0x544A00FE, // 0039 LDINT R18 255 - 0x584C000C, // 003A LDCONST R19 K12 - 0x5C501800, // 003B MOVE R20 R12 - 0x7C380C00, // 003C CALL R14 6 - 0x5C341C00, // 003D MOVE R13 R14 - 0x70020002, // 003E JMP #0042 - 0x0038160C, // 003F ADD R14 R11 R12 - 0x0C381D27, // 0040 DIV R14 R14 K39 - 0x5C341C00, // 0041 MOVE R13 R14 - 0x543A00FE, // 0042 LDINT R14 255 - 0x24381A0E, // 0043 GT R14 R13 R14 - 0x783A0001, // 0044 JMPF R14 #0047 - 0x543600FE, // 0045 LDINT R13 255 - 0x70020002, // 0046 JMP #004A - 0x14381B0C, // 0047 LT R14 R13 K12 - 0x783A0000, // 0048 JMPF R14 #004A - 0x5834000C, // 0049 LDCONST R13 K12 - 0x58380021, // 004A LDCONST R14 K33 - 0xB83E0400, // 004B GETNGBL R15 K2 - 0x8C3C1F28, // 004C GETMET R15 R15 K40 - 0x5C441000, // 004D MOVE R17 R8 - 0x7C3C0400, // 004E CALL R15 2 - 0x783E0009, // 004F JMPF R15 #005A - 0x883C1129, // 0050 GETMBR R15 R8 K41 - 0x4C400000, // 0051 LDNIL R16 - 0x203C1E10, // 0052 NE R15 R15 R16 - 0x783E0005, // 0053 JMPF R15 #005A - 0x8C3C1129, // 0054 GETMET R15 R8 K41 - 0x5C441A00, // 0055 MOVE R17 R13 - 0x5848000C, // 0056 LDCONST R18 K12 - 0x7C3C0600, // 0057 CALL R15 3 - 0x5C381E00, // 0058 MOVE R14 R15 - 0x70020007, // 0059 JMP #0062 - 0x8C3C012A, // 005A GETMET R15 R0 K42 - 0x5C441000, // 005B MOVE R17 R8 - 0x58480001, // 005C LDCONST R18 K1 - 0x544E0009, // 005D LDINT R19 10 - 0x084C1A13, // 005E MUL R19 R13 R19 - 0x004C0213, // 005F ADD R19 R1 R19 - 0x7C3C0800, // 0060 CALL R15 4 - 0x5C381E00, // 0061 MOVE R14 R15 - 0x883C0118, // 0062 GETMBR R15 R0 K24 - 0x983C120E, // 0063 SETIDX R15 R9 R14 - 0x00241309, // 0064 ADD R9 R9 K9 - 0x7001FFAA, // 0065 JMP #0011 - 0x80000000, // 0066 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: render -********************************************************************/ -be_local_closure(class_PlasmaAnimation_render, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x880C0116, // 0000 GETMBR R3 R0 K22 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0203, // 0003 EQ R3 R1 R3 - 0x780E0001, // 0004 JMPF R3 #0007 - 0x500C0000, // 0005 LDBOOL R3 0 0 - 0x80040600, // 0006 RET 1 R3 - 0x880C0104, // 0007 GETMBR R3 R0 K4 - 0x8C0C071F, // 0008 GETMET R3 R3 K31 - 0x7C0C0200, // 0009 CALL R3 1 - 0x5810000C, // 000A LDCONST R4 K12 - 0x14140803, // 000B LT R5 R4 R3 - 0x78160009, // 000C JMPF R5 #0017 - 0x8814032B, // 000D GETMBR R5 R1 K43 - 0x14140805, // 000E LT R5 R4 R5 - 0x78160004, // 000F JMPF R5 #0015 - 0x8C14032C, // 0010 GETMET R5 R1 K44 - 0x5C1C0800, // 0011 MOVE R7 R4 - 0x88200118, // 0012 GETMBR R8 R0 K24 - 0x94201004, // 0013 GETIDX R8 R8 R4 - 0x7C140600, // 0014 CALL R5 3 - 0x00100909, // 0015 ADD R4 R4 K9 - 0x7001FFF3, // 0016 JMP #000B - 0x50140200, // 0017 LDBOOL R5 1 0 - 0x80040A00, // 0018 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _sine -********************************************************************/ -be_local_closure(class_PlasmaAnimation__sine, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_PlasmaAnimation, /* shared constants */ - be_str_weak(_sine), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0xB80A3800, // 0000 GETNGBL R2 K28 - 0x8C08051D, // 0001 GETMET R2 R2 K29 - 0x5C100200, // 0002 MOVE R4 R1 - 0x5814000C, // 0003 LDCONST R5 K12 - 0x541A00FE, // 0004 LDINT R6 255 - 0x581C000C, // 0005 LDCONST R7 K12 - 0x54227FFE, // 0006 LDINT R8 32767 - 0x7C080C00, // 0007 CALL R2 6 - 0xB80E3800, // 0008 GETNGBL R3 K28 - 0x8C0C072D, // 0009 GETMET R3 R3 K45 - 0x5C140400, // 000A MOVE R5 R2 - 0x7C0C0400, // 000B CALL R3 2 - 0xB8123800, // 000C GETNGBL R4 K28 - 0x8C10091D, // 000D GETMET R4 R4 K29 - 0x5C180600, // 000E MOVE R6 R3 - 0x541DEFFF, // 000F LDINT R7 -4096 - 0x54220FFF, // 0010 LDINT R8 4096 - 0x5824000C, // 0011 LDCONST R9 K12 - 0x542A00FE, // 0012 LDINT R10 255 - 0x7C100C00, // 0013 CALL R4 6 - 0x80040800, // 0014 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: PlasmaAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(PlasmaAnimation, - 2, - &be_class_Animation, - be_nested_map(12, +extern const bclass be_class_ValueProvider; +be_local_class(StripLengthProvider, + 0, + &be_class_ValueProvider, + be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_sine, -1), be_const_closure(class_PlasmaAnimation__sine_closure) }, - { be_const_key_weak(tostring, 2), be_const_closure(class_PlasmaAnimation_tostring_closure) }, - { be_const_key_weak(render, 5), be_const_closure(class_PlasmaAnimation_render_closure) }, - { be_const_key_weak(init, 9), be_const_closure(class_PlasmaAnimation_init_closure) }, - { be_const_key_weak(update, -1), be_const_closure(class_PlasmaAnimation_update_closure) }, - { be_const_key_weak(_calculate_plasma, 7), be_const_closure(class_PlasmaAnimation__calculate_plasma_closure) }, - { be_const_key_weak(_initialize_colors, -1), be_const_closure(class_PlasmaAnimation__initialize_colors_closure) }, - { be_const_key_weak(on_param_changed, 6), be_const_closure(class_PlasmaAnimation_on_param_changed_closure) }, - { be_const_key_weak(time_phase, -1), be_const_var(1) }, - { be_const_key_weak(current_colors, 10), be_const_var(0) }, - { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(7, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(phase_y, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(64) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(freq_x, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(32) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(blend_mode, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(time_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(50) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(color, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_nil() }, - })) ) } )) }, - { be_const_key_weak(phase_x, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(0) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(freq_y, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(23) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(start, 0), be_const_closure(class_PlasmaAnimation_start_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_StripLengthProvider_tostring_closure) }, + { be_const_key_weak(produce_value, 0), be_const_closure(class_StripLengthProvider_produce_value_closure) }, })), - be_str_weak(PlasmaAnimation) + be_str_weak(StripLengthProvider) ); /******************************************************************** @@ -19474,8 +19684,8 @@ be_local_closure(animation_init, /* name */ ); /*******************************************************************/ -// compact class 'ParameterizedObject' ktab size: 44, total: 88 (saved 352 bytes) -static const bvalue be_ktab_class_ParameterizedObject[44] = { +// compact class 'ParameterizedObject' ktab size: 45, total: 90 (saved 360 bytes) +static const bvalue be_ktab_class_ParameterizedObject[45] = { /* K0 */ be_nested_str_weak(introspect), /* K1 */ be_nested_str_weak(contains), /* K2 */ be_nested_str_weak(PARAMS), @@ -19506,20 +19716,21 @@ static const bvalue be_ktab_class_ParameterizedObject[44] = { /* K27 */ be_nested_str_weak(real), /* K28 */ be_nested_str_weak(math), /* K29 */ be_nested_str_weak(round), - /* K30 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20expects_X20type_X20_X27_X25s_X27_X20but_X20got_X20_X27_X25s_X27_X20_X28value_X3A_X20_X25s_X29), - /* K31 */ be_nested_str_weak(min), - /* K32 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20below_X20minimum_X20_X25s), - /* K33 */ be_nested_str_weak(max), - /* K34 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20above_X20maximum_X20_X25s), - /* K35 */ be_nested_str_weak(enum), - /* K36 */ be_nested_str_weak(size), - /* K37 */ be_const_int(0), - /* K38 */ be_const_int(1), - /* K39 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20not_X20in_X20allowed_X20values_X20_X25s), - /* K40 */ be_nested_str_weak(toptr), - /* K41 */ be_nested_str_weak(produce_value), - /* K42 */ be_nested_str_weak(_validate_param), - /* K43 */ be_nested_str_weak(on_param_changed), + /* K30 */ be_nested_str_weak(bytes), + /* K31 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20expects_X20type_X20_X27_X25s_X27_X20but_X20got_X20_X27_X25s_X27_X20_X28value_X3A_X20_X25s_X29), + /* K32 */ be_nested_str_weak(min), + /* K33 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20below_X20minimum_X20_X25s), + /* K34 */ be_nested_str_weak(max), + /* K35 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20above_X20maximum_X20_X25s), + /* K36 */ be_nested_str_weak(enum), + /* K37 */ be_nested_str_weak(size), + /* K38 */ be_const_int(0), + /* K39 */ be_const_int(1), + /* K40 */ be_nested_str_weak(Parameter_X20_X27_X25s_X27_X20value_X20_X25s_X20is_X20not_X20in_X20allowed_X20values_X20_X25s), + /* K41 */ be_nested_str_weak(toptr), + /* K42 */ be_nested_str_weak(produce_value), + /* K43 */ be_nested_str_weak(_validate_param), + /* K44 */ be_nested_str_weak(on_param_changed), }; @@ -19972,7 +20183,7 @@ be_local_closure(class_ParameterizedObject__validate_param, /* name */ &be_ktab_class_ParameterizedObject, /* shared constants */ be_str_weak(_validate_param), &be_const_str_solidified, - ( &(const binstruction[135]) { /* code */ + ( &(const binstruction[162]) { /* code */ 0x8C0C0105, // 0000 GETMET R3 R0 K5 0x5C140200, // 0001 MOVE R5 R1 0x7C0C0400, // 0002 CALL R3 2 @@ -20025,7 +20236,7 @@ be_local_closure(class_ParameterizedObject__validate_param, /* name */ 0x5C180400, // 0031 MOVE R6 R2 0x7C140200, // 0032 CALL R5 1 0x2018091A, // 0033 NE R6 R4 K26 - 0x781A0016, // 0034 JMPF R6 #004C + 0x781A0031, // 0034 JMPF R6 #0067 0x1C180918, // 0035 EQ R6 R4 K24 0x781A000A, // 0036 JMPF R6 #0042 0x1C180B1B, // 0037 EQ R6 R5 K27 @@ -20038,76 +20249,103 @@ be_local_closure(class_ParameterizedObject__validate_param, /* name */ 0x7C1C0200, // 003E CALL R7 1 0x5C080E00, // 003F MOVE R2 R7 0x58140018, // 0040 LDCONST R5 K24 - 0x70020009, // 0041 JMP #004C - 0x20180805, // 0042 NE R6 R4 R5 - 0x781A0007, // 0043 JMPF R6 #004C - 0x60180018, // 0044 GETGBL R6 G24 - 0x581C001E, // 0045 LDCONST R7 K30 - 0x5C200200, // 0046 MOVE R8 R1 - 0x5C240800, // 0047 MOVE R9 R4 - 0x5C280A00, // 0048 MOVE R10 R5 - 0x5C2C0400, // 0049 MOVE R11 R2 - 0x7C180A00, // 004A CALL R6 5 - 0xB0061E06, // 004B RAISE 1 K15 R6 - 0x1C180B18, // 004C EQ R6 R5 K24 - 0x781A001B, // 004D JMPF R6 #006A - 0x8C180701, // 004E GETMET R6 R3 K1 - 0x5820001F, // 004F LDCONST R8 K31 - 0x7C180400, // 0050 CALL R6 2 - 0x781A0009, // 0051 JMPF R6 #005C - 0x9418071F, // 0052 GETIDX R6 R3 K31 - 0x14180406, // 0053 LT R6 R2 R6 - 0x781A0006, // 0054 JMPF R6 #005C - 0x60180018, // 0055 GETGBL R6 G24 - 0x581C0020, // 0056 LDCONST R7 K32 - 0x5C200200, // 0057 MOVE R8 R1 - 0x5C240400, // 0058 MOVE R9 R2 - 0x9428071F, // 0059 GETIDX R10 R3 K31 - 0x7C180800, // 005A CALL R6 4 + 0x70020024, // 0041 JMP #0067 + 0x1C18091E, // 0042 EQ R6 R4 K30 + 0x781A0018, // 0043 JMPF R6 #005D + 0x1C180B0E, // 0044 EQ R6 R5 K14 + 0x781A0006, // 0045 JMPF R6 #004D + 0x6018000F, // 0046 GETGBL R6 G15 + 0x5C1C0400, // 0047 MOVE R7 R2 + 0x60200015, // 0048 GETGBL R8 G21 + 0x7C180400, // 0049 CALL R6 2 + 0x781A0001, // 004A JMPF R6 #004D + 0x5814001E, // 004B LDCONST R5 K30 + 0x7002000E, // 004C JMP #005C + 0x20180B0E, // 004D NE R6 R5 K14 + 0x741A0004, // 004E JMPT R6 #0054 + 0x6018000F, // 004F GETGBL R6 G15 + 0x5C1C0400, // 0050 MOVE R7 R2 + 0x60200015, // 0051 GETGBL R8 G21 + 0x7C180400, // 0052 CALL R6 2 + 0x741A0007, // 0053 JMPT R6 #005C + 0x60180018, // 0054 GETGBL R6 G24 + 0x581C001F, // 0055 LDCONST R7 K31 + 0x5C200200, // 0056 MOVE R8 R1 + 0x5C240800, // 0057 MOVE R9 R4 + 0x5C280A00, // 0058 MOVE R10 R5 + 0x5C2C0400, // 0059 MOVE R11 R2 + 0x7C180A00, // 005A CALL R6 5 0xB0061E06, // 005B RAISE 1 K15 R6 - 0x8C180701, // 005C GETMET R6 R3 K1 - 0x58200021, // 005D LDCONST R8 K33 - 0x7C180400, // 005E CALL R6 2 - 0x781A0009, // 005F JMPF R6 #006A - 0x94180721, // 0060 GETIDX R6 R3 K33 - 0x24180406, // 0061 GT R6 R2 R6 - 0x781A0006, // 0062 JMPF R6 #006A - 0x60180018, // 0063 GETGBL R6 G24 - 0x581C0022, // 0064 LDCONST R7 K34 - 0x5C200200, // 0065 MOVE R8 R1 - 0x5C240400, // 0066 MOVE R9 R2 - 0x94280721, // 0067 GETIDX R10 R3 K33 - 0x7C180800, // 0068 CALL R6 4 - 0xB0061E06, // 0069 RAISE 1 K15 R6 - 0x8C180701, // 006A GETMET R6 R3 K1 - 0x58200023, // 006B LDCONST R8 K35 - 0x7C180400, // 006C CALL R6 2 - 0x781A0017, // 006D JMPF R6 #0086 - 0x50180000, // 006E LDBOOL R6 0 0 - 0xA41E0000, // 006F IMPORT R7 K0 - 0x94200723, // 0070 GETIDX R8 R3 K35 - 0x8C241124, // 0071 GETMET R9 R8 K36 - 0x7C240200, // 0072 CALL R9 1 - 0x58280025, // 0073 LDCONST R10 K37 - 0x142C1409, // 0074 LT R11 R10 R9 - 0x782E0006, // 0075 JMPF R11 #007D - 0x942C100A, // 0076 GETIDX R11 R8 R10 - 0x1C30040B, // 0077 EQ R12 R2 R11 - 0x78320001, // 0078 JMPF R12 #007B - 0x50180200, // 0079 LDBOOL R6 1 0 - 0x70020001, // 007A JMP #007D - 0x00281526, // 007B ADD R10 R10 K38 - 0x7001FFF6, // 007C JMP #0074 - 0x5C2C0C00, // 007D MOVE R11 R6 - 0x742E0006, // 007E JMPT R11 #0086 - 0x602C0018, // 007F GETGBL R11 G24 - 0x58300027, // 0080 LDCONST R12 K39 - 0x5C340200, // 0081 MOVE R13 R1 - 0x5C380400, // 0082 MOVE R14 R2 - 0x5C3C1000, // 0083 MOVE R15 R8 - 0x7C2C0800, // 0084 CALL R11 4 - 0xB0061E0B, // 0085 RAISE 1 K15 R11 - 0x80040400, // 0086 RET 1 R2 + 0x70020009, // 005C JMP #0067 + 0x20180805, // 005D NE R6 R4 R5 + 0x781A0007, // 005E JMPF R6 #0067 + 0x60180018, // 005F GETGBL R6 G24 + 0x581C001F, // 0060 LDCONST R7 K31 + 0x5C200200, // 0061 MOVE R8 R1 + 0x5C240800, // 0062 MOVE R9 R4 + 0x5C280A00, // 0063 MOVE R10 R5 + 0x5C2C0400, // 0064 MOVE R11 R2 + 0x7C180A00, // 0065 CALL R6 5 + 0xB0061E06, // 0066 RAISE 1 K15 R6 + 0x1C180B18, // 0067 EQ R6 R5 K24 + 0x781A001B, // 0068 JMPF R6 #0085 + 0x8C180701, // 0069 GETMET R6 R3 K1 + 0x58200020, // 006A LDCONST R8 K32 + 0x7C180400, // 006B CALL R6 2 + 0x781A0009, // 006C JMPF R6 #0077 + 0x94180720, // 006D GETIDX R6 R3 K32 + 0x14180406, // 006E LT R6 R2 R6 + 0x781A0006, // 006F JMPF R6 #0077 + 0x60180018, // 0070 GETGBL R6 G24 + 0x581C0021, // 0071 LDCONST R7 K33 + 0x5C200200, // 0072 MOVE R8 R1 + 0x5C240400, // 0073 MOVE R9 R2 + 0x94280720, // 0074 GETIDX R10 R3 K32 + 0x7C180800, // 0075 CALL R6 4 + 0xB0061E06, // 0076 RAISE 1 K15 R6 + 0x8C180701, // 0077 GETMET R6 R3 K1 + 0x58200022, // 0078 LDCONST R8 K34 + 0x7C180400, // 0079 CALL R6 2 + 0x781A0009, // 007A JMPF R6 #0085 + 0x94180722, // 007B GETIDX R6 R3 K34 + 0x24180406, // 007C GT R6 R2 R6 + 0x781A0006, // 007D JMPF R6 #0085 + 0x60180018, // 007E GETGBL R6 G24 + 0x581C0023, // 007F LDCONST R7 K35 + 0x5C200200, // 0080 MOVE R8 R1 + 0x5C240400, // 0081 MOVE R9 R2 + 0x94280722, // 0082 GETIDX R10 R3 K34 + 0x7C180800, // 0083 CALL R6 4 + 0xB0061E06, // 0084 RAISE 1 K15 R6 + 0x8C180701, // 0085 GETMET R6 R3 K1 + 0x58200024, // 0086 LDCONST R8 K36 + 0x7C180400, // 0087 CALL R6 2 + 0x781A0017, // 0088 JMPF R6 #00A1 + 0x50180000, // 0089 LDBOOL R6 0 0 + 0xA41E0000, // 008A IMPORT R7 K0 + 0x94200724, // 008B GETIDX R8 R3 K36 + 0x8C241125, // 008C GETMET R9 R8 K37 + 0x7C240200, // 008D CALL R9 1 + 0x58280026, // 008E LDCONST R10 K38 + 0x142C1409, // 008F LT R11 R10 R9 + 0x782E0006, // 0090 JMPF R11 #0098 + 0x942C100A, // 0091 GETIDX R11 R8 R10 + 0x1C30040B, // 0092 EQ R12 R2 R11 + 0x78320001, // 0093 JMPF R12 #0096 + 0x50180200, // 0094 LDBOOL R6 1 0 + 0x70020001, // 0095 JMP #0098 + 0x00281527, // 0096 ADD R10 R10 K39 + 0x7001FFF6, // 0097 JMP #008F + 0x5C2C0C00, // 0098 MOVE R11 R6 + 0x742E0006, // 0099 JMPT R11 #00A1 + 0x602C0018, // 009A GETGBL R11 G24 + 0x58300028, // 009B LDCONST R12 K40 + 0x5C340200, // 009C MOVE R13 R1 + 0x5C380400, // 009D MOVE R14 R2 + 0x5C3C1000, // 009E MOVE R15 R8 + 0x7C2C0800, // 009F CALL R11 4 + 0xB0061E0B, // 00A0 RAISE 1 K15 R11 + 0x80040400, // 00A1 RET 1 R2 }) ) ); @@ -20247,10 +20485,10 @@ be_local_closure(class_ParameterizedObject__X3D_X3D, /* name */ &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0528, // 0001 GETMET R3 R2 K40 + 0x8C0C0529, // 0001 GETMET R3 R2 K41 0x5C140000, // 0002 MOVE R5 R0 0x7C0C0400, // 0003 CALL R3 2 - 0x8C100528, // 0004 GETMET R4 R2 K40 + 0x8C100529, // 0004 GETMET R4 R2 K41 0x5C180200, // 0005 MOVE R6 R1 0x7C100400, // 0006 CALL R4 2 0x1C0C0604, // 0007 EQ R3 R3 R4 @@ -20304,7 +20542,7 @@ be_local_closure(class_ParameterizedObject__resolve_parameter_value, /* name * 0x5C180600, // 0017 MOVE R6 R3 0x7C100400, // 0018 CALL R4 2 0x78120005, // 0019 JMPF R4 #0020 - 0x8C100729, // 001A GETMET R4 R3 K41 + 0x8C10072A, // 001A GETMET R4 R3 K42 0x5C180200, // 001B MOVE R6 R1 0x5C1C0400, // 001C MOVE R7 R2 0x7C100600, // 001D CALL R4 3 @@ -20368,14 +20606,14 @@ be_local_closure(class_ParameterizedObject__set_parameter_value, /* name */ 0x5C140400, // 0002 MOVE R5 R2 0x7C0C0400, // 0003 CALL R3 2 0x740E0004, // 0004 JMPT R3 #000A - 0x8C0C012A, // 0005 GETMET R3 R0 K42 + 0x8C0C012B, // 0005 GETMET R3 R0 K43 0x5C140200, // 0006 MOVE R5 R1 0x5C180400, // 0007 MOVE R6 R2 0x7C0C0600, // 0008 CALL R3 3 0x5C080600, // 0009 MOVE R2 R3 0x880C0106, // 000A GETMBR R3 R0 K6 0x980C0202, // 000B SETIDX R3 R1 R2 - 0x8C0C012B, // 000C GETMET R3 R0 K43 + 0x8C0C012C, // 000C GETMET R3 R0 K44 0x5C140200, // 000D MOVE R5 R1 0x5C180400, // 000E MOVE R6 R2 0x7C0C0600, // 000F CALL R3 3 @@ -20413,7 +20651,7 @@ be_local_closure(class_ParameterizedObject_resolve_value, /* name */ 0x5C180200, // 0007 MOVE R6 R1 0x7C100400, // 0008 CALL R4 2 0x78120005, // 0009 JMPF R4 #0010 - 0x8C100329, // 000A GETMET R4 R1 K41 + 0x8C10032A, // 000A GETMET R4 R1 K42 0x5C180400, // 000B MOVE R6 R2 0x5C1C0600, // 000C MOVE R7 R3 0x7C100600, // 000D CALL R4 3 @@ -20463,854 +20701,34 @@ be_local_class(ParameterizedObject, })), be_str_weak(ParameterizedObject) ); -// compact class 'SparkleAnimation' ktab size: 42, total: 76 (saved 272 bytes) -static const bvalue be_ktab_class_SparkleAnimation[42] = { - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(_random), - /* K2 */ be_nested_str_weak(init), - /* K3 */ be_nested_str_weak(random_seed), - /* K4 */ be_nested_str_weak(engine), - /* K5 */ be_nested_str_weak(time_ms), - /* K6 */ be_nested_str_weak(current_colors), - /* K7 */ be_nested_str_weak(sparkle_states), - /* K8 */ be_nested_str_weak(sparkle_ages), - /* K9 */ be_nested_str_weak(last_update), - /* K10 */ be_nested_str_weak(_initialize_buffers), - /* K11 */ be_nested_str_weak(update), - /* K12 */ be_nested_str_weak(_update_sparkles), - /* K13 */ be_nested_str_weak(get_param), - /* K14 */ be_nested_str_weak(color), - /* K15 */ be_nested_str_weak(animation), - /* K16 */ be_nested_str_weak(is_value_provider), - /* K17 */ be_nested_str_weak(0x_X2508x), - /* K18 */ be_nested_str_weak(SparkleAnimation_X28color_X3D_X25s_X2C_X20density_X3D_X25s_X2C_X20fade_speed_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), - /* K19 */ be_nested_str_weak(density), - /* K20 */ be_nested_str_weak(fade_speed), - /* K21 */ be_nested_str_weak(priority), - /* K22 */ be_nested_str_weak(is_running), - /* K23 */ be_nested_str_weak(get_strip_length), - /* K24 */ be_nested_str_weak(sparkle_duration), - /* K25 */ be_nested_str_weak(min_brightness), - /* K26 */ be_nested_str_weak(max_brightness), - /* K27 */ be_nested_str_weak(back_color), - /* K28 */ be_const_int(1), - /* K29 */ be_nested_str_weak(tasmota), - /* K30 */ be_nested_str_weak(scale_uint), - /* K31 */ be_nested_str_weak(_update_sparkle_color), - /* K32 */ be_nested_str_weak(_random_range), - /* K33 */ be_const_int(1103515245), - /* K34 */ be_const_int(2147483647), - /* K35 */ be_nested_str_weak(resize), - /* K36 */ be_nested_str_weak(width), - /* K37 */ be_nested_str_weak(set_pixel_color), - /* K38 */ be_nested_str_weak(is_color_provider), - /* K39 */ be_nested_str_weak(get_color_for_value), - /* K40 */ be_nested_str_weak(get_param_value), - /* K41 */ be_nested_str_weak(start), -}; - - -extern const bclass be_class_SparkleAnimation; /******************************************************************** -** Solidified function: _random_range +** Solidified function: create_closure_value ********************************************************************/ -be_local_closure(class_SparkleAnimation__random_range, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(_random_range), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x18080300, // 0000 LE R2 R1 K0 - 0x780A0000, // 0001 JMPF R2 #0003 - 0x80060000, // 0002 RET 1 K0 - 0x8C080101, // 0003 GETMET R2 R0 K1 - 0x7C080200, // 0004 CALL R2 1 - 0x10080401, // 0005 MOD R2 R2 R1 - 0x80040400, // 0006 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_SparkleAnimation_init, /* name */ +be_local_closure(create_closure_value, /* name */ be_nested_proto( 5, /* nstack */ 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x88080104, // 0006 GETMBR R2 R0 K4 - 0x88080505, // 0007 GETMBR R2 R2 K5 - 0x540EFFFF, // 0008 LDINT R3 65536 - 0x10080403, // 0009 MOD R2 R2 R3 - 0x90020602, // 000A SETMBR R0 K3 R2 - 0x60080012, // 000B GETGBL R2 G18 - 0x7C080000, // 000C CALL R2 0 - 0x90020C02, // 000D SETMBR R0 K6 R2 - 0x60080012, // 000E GETGBL R2 G18 - 0x7C080000, // 000F CALL R2 0 - 0x90020E02, // 0010 SETMBR R0 K7 R2 - 0x60080012, // 0011 GETGBL R2 G18 - 0x7C080000, // 0012 CALL R2 0 - 0x90021002, // 0013 SETMBR R0 K8 R2 - 0x90021300, // 0014 SETMBR R0 K9 K0 - 0x8C08010A, // 0015 GETMET R2 R0 K10 - 0x7C080200, // 0016 CALL R2 1 - 0x80000000, // 0017 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update -********************************************************************/ -be_local_closure(class_SparkleAnimation_update, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(update), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C08050B, // 0003 GETMET R2 R2 K11 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x540A0020, // 0006 LDINT R2 33 - 0x880C0109, // 0007 GETMBR R3 R0 K9 - 0x040C0203, // 0008 SUB R3 R1 R3 - 0x140C0602, // 0009 LT R3 R3 R2 - 0x780E0001, // 000A JMPF R3 #000D - 0x500C0200, // 000B LDBOOL R3 1 0 - 0x80040600, // 000C RET 1 R3 - 0x90021201, // 000D SETMBR R0 K9 R1 - 0x8C0C010C, // 000E GETMET R3 R0 K12 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x500C0200, // 0011 LDBOOL R3 1 0 - 0x80040600, // 0012 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -be_local_closure(class_SparkleAnimation_tostring, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x8C04010D, // 0000 GETMET R1 R0 K13 - 0x580C000E, // 0001 LDCONST R3 K14 - 0x7C040400, // 0002 CALL R1 2 - 0x4C080000, // 0003 LDNIL R2 - 0xB80E1E00, // 0004 GETNGBL R3 K15 - 0x8C0C0710, // 0005 GETMET R3 R3 K16 - 0x5C140200, // 0006 MOVE R5 R1 - 0x7C0C0400, // 0007 CALL R3 2 - 0x780E0004, // 0008 JMPF R3 #000E - 0x600C0008, // 0009 GETGBL R3 G8 - 0x5C100200, // 000A MOVE R4 R1 - 0x7C0C0200, // 000B CALL R3 1 - 0x5C080600, // 000C MOVE R2 R3 - 0x70020004, // 000D JMP #0013 - 0x600C0018, // 000E GETGBL R3 G24 - 0x58100011, // 000F LDCONST R4 K17 - 0x8814010E, // 0010 GETMBR R5 R0 K14 - 0x7C0C0400, // 0011 CALL R3 2 - 0x5C080600, // 0012 MOVE R2 R3 - 0x600C0018, // 0013 GETGBL R3 G24 - 0x58100012, // 0014 LDCONST R4 K18 - 0x5C140400, // 0015 MOVE R5 R2 - 0x88180113, // 0016 GETMBR R6 R0 K19 - 0x881C0114, // 0017 GETMBR R7 R0 K20 - 0x88200115, // 0018 GETMBR R8 R0 K21 - 0x88240116, // 0019 GETMBR R9 R0 K22 - 0x7C0C0C00, // 001A CALL R3 6 - 0x80040600, // 001B RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _update_sparkles -********************************************************************/ -be_local_closure(class_SparkleAnimation__update_sparkles, /* name */ - be_nested_proto( - 19, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(_update_sparkles), - &be_const_str_solidified, - ( &(const binstruction[100]) { /* code */ - 0x88080104, // 0000 GETMBR R2 R0 K4 - 0x8C080517, // 0001 GETMET R2 R2 K23 - 0x7C080200, // 0002 CALL R2 1 - 0x880C0118, // 0003 GETMBR R3 R0 K24 - 0x88100114, // 0004 GETMBR R4 R0 K20 - 0x88140113, // 0005 GETMBR R5 R0 K19 - 0x88180119, // 0006 GETMBR R6 R0 K25 - 0x881C011A, // 0007 GETMBR R7 R0 K26 - 0x8820011B, // 0008 GETMBR R8 R0 K27 - 0x58240000, // 0009 LDCONST R9 K0 - 0x14281202, // 000A LT R10 R9 R2 - 0x782A0056, // 000B JMPF R10 #0063 - 0x88280107, // 000C GETMBR R10 R0 K7 - 0x94281409, // 000D GETIDX R10 R10 R9 - 0x24281500, // 000E GT R10 R10 K0 - 0x782A003A, // 000F JMPF R10 #004B - 0x88280108, // 0010 GETMBR R10 R0 K8 - 0x942C1409, // 0011 GETIDX R11 R10 R9 - 0x002C171C, // 0012 ADD R11 R11 K28 - 0x9828120B, // 0013 SETIDX R10 R9 R11 - 0x88280108, // 0014 GETMBR R10 R0 K8 - 0x94281409, // 0015 GETIDX R10 R10 R9 - 0x28281403, // 0016 GE R10 R10 R3 - 0x782A0006, // 0017 JMPF R10 #001F - 0x88280107, // 0018 GETMBR R10 R0 K7 - 0x98281300, // 0019 SETIDX R10 R9 K0 - 0x88280108, // 001A GETMBR R10 R0 K8 - 0x98281300, // 001B SETIDX R10 R9 K0 - 0x88280106, // 001C GETMBR R10 R0 K6 - 0x98281208, // 001D SETIDX R10 R9 R8 - 0x7002002A, // 001E JMP #004A - 0xB82A3A00, // 001F GETNGBL R10 K29 - 0x8C28151E, // 0020 GETMET R10 R10 K30 - 0x88300108, // 0021 GETMBR R12 R0 K8 - 0x94301809, // 0022 GETIDX R12 R12 R9 - 0x58340000, // 0023 LDCONST R13 K0 - 0x5C380600, // 0024 MOVE R14 R3 - 0x583C0000, // 0025 LDCONST R15 K0 - 0x544200FE, // 0026 LDINT R16 255 - 0x7C280C00, // 0027 CALL R10 6 - 0x542E00FE, // 0028 LDINT R11 255 - 0xB8323A00, // 0029 GETNGBL R12 K29 - 0x8C30191E, // 002A GETMET R12 R12 K30 - 0x5C381400, // 002B MOVE R14 R10 - 0x583C0000, // 002C LDCONST R15 K0 - 0x544200FE, // 002D LDINT R16 255 - 0x58440000, // 002E LDCONST R17 K0 - 0x5C480800, // 002F MOVE R18 R4 - 0x7C300C00, // 0030 CALL R12 6 - 0x042C160C, // 0031 SUB R11 R11 R12 - 0xB8323A00, // 0032 GETNGBL R12 K29 - 0x8C30191E, // 0033 GETMET R12 R12 K30 - 0x88380107, // 0034 GETMBR R14 R0 K7 - 0x94381C09, // 0035 GETIDX R14 R14 R9 - 0x583C0000, // 0036 LDCONST R15 K0 - 0x544200FE, // 0037 LDINT R16 255 - 0x58440000, // 0038 LDCONST R17 K0 - 0x5C481600, // 0039 MOVE R18 R11 - 0x7C300C00, // 003A CALL R12 6 - 0x54360009, // 003B LDINT R13 10 - 0x1434180D, // 003C LT R13 R12 R13 - 0x78360006, // 003D JMPF R13 #0045 - 0x88340107, // 003E GETMBR R13 R0 K7 - 0x98341300, // 003F SETIDX R13 R9 K0 - 0x88340108, // 0040 GETMBR R13 R0 K8 - 0x98341300, // 0041 SETIDX R13 R9 K0 - 0x88340106, // 0042 GETMBR R13 R0 K6 - 0x98341208, // 0043 SETIDX R13 R9 R8 - 0x70020004, // 0044 JMP #004A - 0x8C34011F, // 0045 GETMET R13 R0 K31 - 0x5C3C1200, // 0046 MOVE R15 R9 - 0x5C401800, // 0047 MOVE R16 R12 - 0x5C440200, // 0048 MOVE R17 R1 - 0x7C340800, // 0049 CALL R13 4 - 0x70020015, // 004A JMP #0061 - 0x8C280120, // 004B GETMET R10 R0 K32 - 0x543200FF, // 004C LDINT R12 256 - 0x7C280400, // 004D CALL R10 2 - 0x14281405, // 004E LT R10 R10 R5 - 0x782A000E, // 004F JMPF R10 #005F - 0x8C280120, // 0050 GETMET R10 R0 K32 - 0x04300E06, // 0051 SUB R12 R7 R6 - 0x0030191C, // 0052 ADD R12 R12 K28 - 0x7C280400, // 0053 CALL R10 2 - 0x00280C0A, // 0054 ADD R10 R6 R10 - 0x882C0107, // 0055 GETMBR R11 R0 K7 - 0x982C120A, // 0056 SETIDX R11 R9 R10 - 0x882C0108, // 0057 GETMBR R11 R0 K8 - 0x982C1300, // 0058 SETIDX R11 R9 K0 - 0x8C2C011F, // 0059 GETMET R11 R0 K31 - 0x5C341200, // 005A MOVE R13 R9 - 0x5C381400, // 005B MOVE R14 R10 - 0x5C3C0200, // 005C MOVE R15 R1 - 0x7C2C0800, // 005D CALL R11 4 - 0x70020001, // 005E JMP #0061 - 0x88280106, // 005F GETMBR R10 R0 K6 - 0x98281208, // 0060 SETIDX R10 R9 R8 - 0x0024131C, // 0061 ADD R9 R9 K28 - 0x7001FFA6, // 0062 JMP #000A - 0x80000000, // 0063 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _random -********************************************************************/ -be_local_closure(class_SparkleAnimation__random, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(_random), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88040103, // 0000 GETMBR R1 R0 K3 - 0x08040321, // 0001 MUL R1 R1 K33 - 0x540A3038, // 0002 LDINT R2 12345 - 0x00040202, // 0003 ADD R1 R1 R2 - 0x2C040322, // 0004 AND R1 R1 K34 - 0x90020601, // 0005 SETMBR R0 K3 R1 - 0x88040103, // 0006 GETMBR R1 R0 K3 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _initialize_buffers -********************************************************************/ -be_local_closure(class_SparkleAnimation__initialize_buffers, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(_initialize_buffers), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C040317, // 0001 GETMET R1 R1 K23 - 0x7C040200, // 0002 CALL R1 1 - 0x88080106, // 0003 GETMBR R2 R0 K6 - 0x8C080523, // 0004 GETMET R2 R2 K35 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x88080107, // 0007 GETMBR R2 R0 K7 - 0x8C080523, // 0008 GETMET R2 R2 K35 - 0x5C100200, // 0009 MOVE R4 R1 - 0x7C080400, // 000A CALL R2 2 - 0x88080108, // 000B GETMBR R2 R0 K8 - 0x8C080523, // 000C GETMET R2 R2 K35 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x8808011B, // 000F GETMBR R2 R0 K27 - 0x580C0000, // 0010 LDCONST R3 K0 - 0x14100601, // 0011 LT R4 R3 R1 - 0x78120007, // 0012 JMPF R4 #001B - 0x88100106, // 0013 GETMBR R4 R0 K6 - 0x98100602, // 0014 SETIDX R4 R3 R2 - 0x88100107, // 0015 GETMBR R4 R0 K7 - 0x98100700, // 0016 SETIDX R4 R3 K0 - 0x88100108, // 0017 GETMBR R4 R0 K8 - 0x98100700, // 0018 SETIDX R4 R3 K0 - 0x000C071C, // 0019 ADD R3 R3 K28 - 0x7001FFF5, // 001A JMP #0011 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: render -********************************************************************/ -be_local_closure(class_SparkleAnimation_render, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(render), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x880C0116, // 0000 GETMBR R3 R0 K22 - 0x780E0002, // 0001 JMPF R3 #0005 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C0C0203, // 0003 EQ R3 R1 R3 - 0x780E0001, // 0004 JMPF R3 #0007 - 0x500C0000, // 0005 LDBOOL R3 0 0 - 0x80040600, // 0006 RET 1 R3 - 0x880C0104, // 0007 GETMBR R3 R0 K4 - 0x8C0C0717, // 0008 GETMET R3 R3 K23 - 0x7C0C0200, // 0009 CALL R3 1 - 0x58100000, // 000A LDCONST R4 K0 - 0x14140803, // 000B LT R5 R4 R3 - 0x78160009, // 000C JMPF R5 #0017 - 0x88140324, // 000D GETMBR R5 R1 K36 - 0x14140805, // 000E LT R5 R4 R5 - 0x78160004, // 000F JMPF R5 #0015 - 0x8C140325, // 0010 GETMET R5 R1 K37 - 0x5C1C0800, // 0011 MOVE R7 R4 - 0x88200106, // 0012 GETMBR R8 R0 K6 - 0x94201004, // 0013 GETIDX R8 R8 R4 - 0x7C140600, // 0014 CALL R5 3 - 0x0010091C, // 0015 ADD R4 R4 K28 - 0x7001FFF3, // 0016 JMP #000B - 0x50140200, // 0017 LDBOOL R5 1 0 - 0x80040A00, // 0018 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _update_sparkle_color -********************************************************************/ -be_local_closure(class_SparkleAnimation__update_sparkle_color, /* name */ - be_nested_proto( - 17, /* nstack */ - 4, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(_update_sparkle_color), - &be_const_str_solidified, - ( &(const binstruction[77]) { /* code */ - 0x5411FFFE, // 0000 LDINT R4 -1 - 0x8814010E, // 0001 GETMBR R5 R0 K14 - 0xB81A1E00, // 0002 GETNGBL R6 K15 - 0x8C180D26, // 0003 GETMET R6 R6 K38 - 0x5C200A00, // 0004 MOVE R8 R5 - 0x7C180400, // 0005 CALL R6 2 - 0x781A0009, // 0006 JMPF R6 #0011 - 0x88180B27, // 0007 GETMBR R6 R5 K39 - 0x4C1C0000, // 0008 LDNIL R7 - 0x20180C07, // 0009 NE R6 R6 R7 - 0x781A0005, // 000A JMPF R6 #0011 - 0x8C180B27, // 000B GETMET R6 R5 K39 - 0x5C200400, // 000C MOVE R8 R2 - 0x58240000, // 000D LDCONST R9 K0 - 0x7C180600, // 000E CALL R6 3 - 0x5C100C00, // 000F MOVE R4 R6 - 0x70020006, // 0010 JMP #0018 - 0x8C180128, // 0011 GETMET R6 R0 K40 - 0x5820000E, // 0012 LDCONST R8 K14 - 0x54260009, // 0013 LDINT R9 10 - 0x08240209, // 0014 MUL R9 R1 R9 - 0x00240609, // 0015 ADD R9 R3 R9 - 0x7C180600, // 0016 CALL R6 3 - 0x5C100C00, // 0017 MOVE R4 R6 - 0x541A0017, // 0018 LDINT R6 24 - 0x3C180806, // 0019 SHR R6 R4 R6 - 0x541E00FE, // 001A LDINT R7 255 - 0x2C180C07, // 001B AND R6 R6 R7 - 0x541E000F, // 001C LDINT R7 16 - 0x3C1C0807, // 001D SHR R7 R4 R7 - 0x542200FE, // 001E LDINT R8 255 - 0x2C1C0E08, // 001F AND R7 R7 R8 - 0x54220007, // 0020 LDINT R8 8 - 0x3C200808, // 0021 SHR R8 R4 R8 - 0x542600FE, // 0022 LDINT R9 255 - 0x2C201009, // 0023 AND R8 R8 R9 - 0x542600FE, // 0024 LDINT R9 255 - 0x2C240809, // 0025 AND R9 R4 R9 - 0xB82A3A00, // 0026 GETNGBL R10 K29 - 0x8C28151E, // 0027 GETMET R10 R10 K30 - 0x5C300400, // 0028 MOVE R12 R2 - 0x58340000, // 0029 LDCONST R13 K0 - 0x543A00FE, // 002A LDINT R14 255 - 0x583C0000, // 002B LDCONST R15 K0 - 0x5C400E00, // 002C MOVE R16 R7 - 0x7C280C00, // 002D CALL R10 6 - 0x5C1C1400, // 002E MOVE R7 R10 - 0xB82A3A00, // 002F GETNGBL R10 K29 - 0x8C28151E, // 0030 GETMET R10 R10 K30 - 0x5C300400, // 0031 MOVE R12 R2 - 0x58340000, // 0032 LDCONST R13 K0 - 0x543A00FE, // 0033 LDINT R14 255 - 0x583C0000, // 0034 LDCONST R15 K0 - 0x5C401000, // 0035 MOVE R16 R8 - 0x7C280C00, // 0036 CALL R10 6 - 0x5C201400, // 0037 MOVE R8 R10 - 0xB82A3A00, // 0038 GETNGBL R10 K29 - 0x8C28151E, // 0039 GETMET R10 R10 K30 - 0x5C300400, // 003A MOVE R12 R2 - 0x58340000, // 003B LDCONST R13 K0 - 0x543A00FE, // 003C LDINT R14 255 - 0x583C0000, // 003D LDCONST R15 K0 - 0x5C401200, // 003E MOVE R16 R9 - 0x7C280C00, // 003F CALL R10 6 - 0x5C241400, // 0040 MOVE R9 R10 - 0x88280106, // 0041 GETMBR R10 R0 K6 - 0x542E0017, // 0042 LDINT R11 24 - 0x382C0C0B, // 0043 SHL R11 R6 R11 - 0x5432000F, // 0044 LDINT R12 16 - 0x38300E0C, // 0045 SHL R12 R7 R12 - 0x302C160C, // 0046 OR R11 R11 R12 - 0x54320007, // 0047 LDINT R12 8 - 0x3830100C, // 0048 SHL R12 R8 R12 - 0x302C160C, // 0049 OR R11 R11 R12 - 0x302C1609, // 004A OR R11 R11 R9 - 0x9828020B, // 004B SETIDX R10 R1 R11 - 0x80000000, // 004C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start -********************************************************************/ -be_local_closure(class_SparkleAnimation_start, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_SparkleAnimation, /* shared constants */ - be_str_weak(start), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x60080003, // 0000 GETGBL R2 G3 - 0x5C0C0000, // 0001 MOVE R3 R0 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080529, // 0003 GETMET R2 R2 K41 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x88080104, // 0006 GETMBR R2 R0 K4 - 0x88080505, // 0007 GETMBR R2 R2 K5 - 0x540EFFFF, // 0008 LDINT R3 65536 - 0x10080403, // 0009 MOD R2 R2 R3 - 0x90020602, // 000A SETMBR R0 K3 R2 - 0x8C08010A, // 000B GETMET R2 R0 K10 - 0x7C080200, // 000C CALL R2 1 - 0x80040000, // 000D RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: SparkleAnimation -********************************************************************/ -extern const bclass be_class_Animation; -be_local_class(SparkleAnimation, - 5, - &be_class_Animation, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(sparkle_states, -1), be_const_var(1) }, - { be_const_key_weak(start, -1), be_const_closure(class_SparkleAnimation_start_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_SparkleAnimation_init_closure) }, - { be_const_key_weak(PARAMS, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(7, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(fade_speed, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(50) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(density, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(30) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(color, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-1) }, - })) ) } )) }, - { be_const_key_weak(max_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(255) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(sparkle_duration, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(60) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(back_color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-16777216) }, - })) ) } )) }, - { be_const_key_weak(min_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(100) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(update, -1), be_const_closure(class_SparkleAnimation_update_closure) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_SparkleAnimation_tostring_closure) }, - { be_const_key_weak(sparkle_ages, -1), be_const_var(2) }, - { be_const_key_weak(current_colors, -1), be_const_var(0) }, - { be_const_key_weak(last_update, -1), be_const_var(4) }, - { be_const_key_weak(_random, -1), be_const_closure(class_SparkleAnimation__random_closure) }, - { be_const_key_weak(random_seed, -1), be_const_var(3) }, - { be_const_key_weak(_update_sparkles, 8), be_const_closure(class_SparkleAnimation__update_sparkles_closure) }, - { be_const_key_weak(_initialize_buffers, -1), be_const_closure(class_SparkleAnimation__initialize_buffers_closure) }, - { be_const_key_weak(render, -1), be_const_closure(class_SparkleAnimation_render_closure) }, - { be_const_key_weak(_update_sparkle_color, -1), be_const_closure(class_SparkleAnimation__update_sparkle_color_closure) }, - { be_const_key_weak(_random_range, 1), be_const_closure(class_SparkleAnimation__random_range_closure) }, - })), - be_str_weak(SparkleAnimation) -); - -/******************************************************************** -** Solidified function: twinkle_classic -********************************************************************/ -be_local_closure(twinkle_classic, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ + ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(twinkle_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(density), - /* K4 */ be_nested_str_weak(twinkle_speed), - /* K5 */ be_nested_str_weak(fade_speed), - /* K6 */ be_nested_str_weak(min_brightness), - /* K7 */ be_nested_str_weak(max_brightness), + /* K1 */ be_nested_str_weak(closure_value), + /* K2 */ be_nested_str_weak(closure), }), - be_str_weak(twinkle_classic), + be_str_weak(create_closure_value), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x5409FFFE, // 0004 LDINT R2 -1 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x540A0095, // 0006 LDINT R2 150 - 0x90060602, // 0007 SETMBR R1 K3 R2 - 0x540A0005, // 0008 LDINT R2 6 - 0x90060802, // 0009 SETMBR R1 K4 R2 - 0x540A00B3, // 000A LDINT R2 180 - 0x90060A02, // 000B SETMBR R1 K5 R2 - 0x540A001F, // 000C LDINT R2 32 - 0x90060C02, // 000D SETMBR R1 K6 R2 - 0x540A00FE, // 000E LDINT R2 255 - 0x90060E02, // 000F SETMBR R1 K7 R2 - 0x80040200, // 0010 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: twinkle_gentle -********************************************************************/ -be_local_closure(twinkle_gentle, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* 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(animation), - /* K1 */ be_nested_str_weak(twinkle_animation), - /* K2 */ be_nested_str_weak(color), - /* K3 */ be_nested_str_weak(density), - /* K4 */ be_nested_str_weak(twinkle_speed), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(fade_speed), - /* K7 */ be_nested_str_weak(min_brightness), - /* K8 */ be_nested_str_weak(max_brightness), - }), - be_str_weak(twinkle_gentle), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x5409D6FF, // 0004 LDINT R2 -10496 - 0x90060402, // 0005 SETMBR R1 K2 R2 - 0x540A003F, // 0006 LDINT R2 64 - 0x90060602, // 0007 SETMBR R1 K3 R2 - 0x90060905, // 0008 SETMBR R1 K4 K5 - 0x540A0077, // 0009 LDINT R2 120 - 0x90060C02, // 000A SETMBR R1 K6 R2 - 0x540A000F, // 000B LDINT R2 16 - 0x90060E02, // 000C SETMBR R1 K7 R2 - 0x540A00B3, // 000D LDINT R2 180 - 0x90061002, // 000E SETMBR R1 K8 R2 - 0x80040200, // 000F RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: noise_fractal -********************************************************************/ -be_local_closure(noise_fractal, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(animation), - /* K1 */ be_nested_str_weak(noise_animation), - /* K2 */ be_nested_str_weak(rich_palette), - /* K3 */ be_nested_str_weak(palette), - /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), - /* K5 */ be_nested_str_weak(cycle_period), - /* K6 */ be_nested_str_weak(transition_type), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(brightness), - /* K9 */ be_nested_str_weak(range_min), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(range_max), - /* K12 */ be_nested_str_weak(color), - /* K13 */ be_nested_str_weak(scale), - /* K14 */ be_nested_str_weak(speed), - /* K15 */ be_nested_str_weak(octaves), - /* K16 */ be_const_int(3), - /* K17 */ be_nested_str_weak(persistence), - }), - be_str_weak(noise_fractal), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x8C080502, // 0005 GETMET R2 R2 K2 - 0x5C100000, // 0006 MOVE R4 R0 - 0x7C080400, // 0007 CALL R2 2 - 0xB80E0000, // 0008 GETNGBL R3 K0 - 0x880C0704, // 0009 GETMBR R3 R3 K4 - 0x900A0603, // 000A SETMBR R2 K3 R3 - 0x540E1387, // 000B LDINT R3 5000 - 0x900A0A03, // 000C SETMBR R2 K5 R3 - 0x900A0D07, // 000D SETMBR R2 K6 K7 - 0x540E00FE, // 000E LDINT R3 255 - 0x900A1003, // 000F SETMBR R2 K8 R3 - 0x900A130A, // 0010 SETMBR R2 K9 K10 - 0x540E00FE, // 0011 LDINT R3 255 - 0x900A1603, // 0012 SETMBR R2 K11 R3 - 0x90061802, // 0013 SETMBR R1 K12 R2 - 0x540E001D, // 0014 LDINT R3 30 - 0x90061A03, // 0015 SETMBR R1 K13 R3 - 0x540E0013, // 0016 LDINT R3 20 - 0x90061C03, // 0017 SETMBR R1 K14 R3 - 0x90061F10, // 0018 SETMBR R1 K15 K16 - 0x540E007F, // 0019 LDINT R3 128 - 0x90062203, // 001A SETMBR R1 K17 R3 - 0x80040200, // 001B RET 1 R1 + ( &(const binstruction[ 6]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100000, // 0002 MOVE R4 R0 + 0x7C080400, // 0003 CALL R2 2 + 0x900A0401, // 0004 SETMBR R2 K2 R1 + 0x80040400, // 0005 RET 1 R2 }) ) ); @@ -21907,37 +21325,214 @@ be_local_class(TwinkleAnimation, })), be_str_weak(TwinkleAnimation) ); -// compact class 'BreatheColorProvider' ktab size: 18, total: 29 (saved 88 bytes) -static const bvalue be_ktab_class_BreatheColorProvider[18] = { - /* K0 */ be_nested_str_weak(BreatheColorProvider_X28base_color_X3D0x_X2508x_X2C_X20min_brightness_X3D_X25s_X2C_X20max_brightness_X3D_X25s_X2C_X20duration_X3D_X25s_X2C_X20curve_factor_X3D_X25s_X29), - /* K1 */ be_nested_str_weak(base_color), - /* K2 */ be_nested_str_weak(min_brightness), - /* K3 */ be_nested_str_weak(max_brightness), - /* K4 */ be_nested_str_weak(duration), - /* K5 */ be_nested_str_weak(curve_factor), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_weak(form), - /* K8 */ be_nested_str_weak(animation), - /* K9 */ be_nested_str_weak(COSINE), - /* K10 */ be_nested_str_weak(on_param_changed), - /* K11 */ be_nested_str_weak(produce_value), - /* K12 */ be_nested_str_weak(tasmota), - /* K13 */ be_nested_str_weak(scale_uint), - /* K14 */ be_const_int(0), - /* K15 */ be_nested_str_weak(init), - /* K16 */ be_nested_str_weak(min_value), - /* K17 */ be_nested_str_weak(max_value), + +/******************************************************************** +** Solidified function: twinkle_classic +********************************************************************/ +be_local_closure(twinkle_classic, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(twinkle_animation), + /* K2 */ be_nested_str_weak(color), + /* K3 */ be_nested_str_weak(density), + /* K4 */ be_nested_str_weak(twinkle_speed), + /* K5 */ be_nested_str_weak(fade_speed), + /* K6 */ be_nested_str_weak(min_brightness), + /* K7 */ be_nested_str_weak(max_brightness), + }), + be_str_weak(twinkle_classic), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x5409FFFE, // 0004 LDINT R2 -1 + 0x90060402, // 0005 SETMBR R1 K2 R2 + 0x540A0095, // 0006 LDINT R2 150 + 0x90060602, // 0007 SETMBR R1 K3 R2 + 0x540A0005, // 0008 LDINT R2 6 + 0x90060802, // 0009 SETMBR R1 K4 R2 + 0x540A00B3, // 000A LDINT R2 180 + 0x90060A02, // 000B SETMBR R1 K5 R2 + 0x540A001F, // 000C LDINT R2 32 + 0x90060C02, // 000D SETMBR R1 K6 R2 + 0x540A00FE, // 000E LDINT R2 255 + 0x90060E02, // 000F SETMBR R1 K7 R2 + 0x80040200, // 0010 RET 1 R1 + }) + ) +); +/*******************************************************************/ + +// compact class 'BeaconAnimation' ktab size: 17, total: 21 (saved 32 bytes) +static const bvalue be_ktab_class_BeaconAnimation[17] = { + /* K0 */ be_nested_str_weak(engine), + /* K1 */ be_nested_str_weak(time_ms), + /* K2 */ be_nested_str_weak(width), + /* K3 */ be_nested_str_weak(back_color), + /* K4 */ be_nested_str_weak(pos), + /* K5 */ be_nested_str_weak(slew_size), + /* K6 */ be_nested_str_weak(beacon_size), + /* K7 */ be_nested_str_weak(color), + /* K8 */ be_const_int(-16777216), + /* K9 */ be_nested_str_weak(fill_pixels), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(set_pixel_color), + /* K12 */ be_const_int(1), + /* K13 */ be_nested_str_weak(tasmota), + /* K14 */ be_nested_str_weak(scale_int), + /* K15 */ be_nested_str_weak(blend_linear), + /* K16 */ be_nested_str_weak(BeaconAnimation_X28color_X3D0x_X2508x_X2C_X20pos_X3D_X25s_X2C_X20beacon_size_X3D_X25s_X2C_X20slew_size_X3D_X25s_X29), }; -extern const bclass be_class_BreatheColorProvider; +extern const bclass be_class_BeaconAnimation; + +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_BeaconAnimation_render, /* name */ + be_nested_proto( + 23, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_BeaconAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[106]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x1C0C0203, // 0001 EQ R3 R1 R3 + 0x780E0001, // 0002 JMPF R3 #0005 + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x80040600, // 0004 RET 1 R3 + 0x4C0C0000, // 0005 LDNIL R3 + 0x1C0C0403, // 0006 EQ R3 R2 R3 + 0x780E0001, // 0007 JMPF R3 #000A + 0x880C0100, // 0008 GETMBR R3 R0 K0 + 0x88080701, // 0009 GETMBR R2 R3 K1 + 0x880C0302, // 000A GETMBR R3 R1 K2 + 0x88100103, // 000B GETMBR R4 R0 K3 + 0x88140104, // 000C GETMBR R5 R0 K4 + 0x88180105, // 000D GETMBR R6 R0 K5 + 0x881C0106, // 000E GETMBR R7 R0 K6 + 0x88200107, // 000F GETMBR R8 R0 K7 + 0x20240908, // 0010 NE R9 R4 K8 + 0x78260002, // 0011 JMPF R9 #0015 + 0x8C240309, // 0012 GETMET R9 R1 K9 + 0x5C2C0800, // 0013 MOVE R11 R4 + 0x7C240400, // 0014 CALL R9 2 + 0x5C240A00, // 0015 MOVE R9 R5 + 0x00280A07, // 0016 ADD R10 R5 R7 + 0x142C130A, // 0017 LT R11 R9 K10 + 0x782E0000, // 0018 JMPF R11 #001A + 0x5824000A, // 0019 LDCONST R9 K10 + 0x282C1403, // 001A GE R11 R10 R3 + 0x782E0000, // 001B JMPF R11 #001D + 0x5C280600, // 001C MOVE R10 R3 + 0x5C2C1200, // 001D MOVE R11 R9 + 0x1430160A, // 001E LT R12 R11 R10 + 0x78320005, // 001F JMPF R12 #0026 + 0x8C30030B, // 0020 GETMET R12 R1 K11 + 0x5C381600, // 0021 MOVE R14 R11 + 0x5C3C1000, // 0022 MOVE R15 R8 + 0x7C300600, // 0023 CALL R12 3 + 0x002C170C, // 0024 ADD R11 R11 K12 + 0x7001FFF7, // 0025 JMP #001E + 0x24300D0A, // 0026 GT R12 R6 K10 + 0x7832003F, // 0027 JMPF R12 #0068 + 0x04300A06, // 0028 SUB R12 R5 R6 + 0x5C340A00, // 0029 MOVE R13 R5 + 0x1438190A, // 002A LT R14 R12 K10 + 0x783A0000, // 002B JMPF R14 #002D + 0x5830000A, // 002C LDCONST R12 K10 + 0x28381A03, // 002D GE R14 R13 R3 + 0x783A0000, // 002E JMPF R14 #0030 + 0x5C340600, // 002F MOVE R13 R3 + 0x5C2C1800, // 0030 MOVE R11 R12 + 0x1438160D, // 0031 LT R14 R11 R13 + 0x783A0013, // 0032 JMPF R14 #0047 + 0xB83A1A00, // 0033 GETNGBL R14 K13 + 0x8C381D0E, // 0034 GETMET R14 R14 K14 + 0x5C401600, // 0035 MOVE R16 R11 + 0x04440A06, // 0036 SUB R17 R5 R6 + 0x0444230C, // 0037 SUB R17 R17 K12 + 0x5C480A00, // 0038 MOVE R18 R5 + 0x544E00FE, // 0039 LDINT R19 255 + 0x5850000A, // 003A LDCONST R20 K10 + 0x7C380C00, // 003B CALL R14 6 + 0x8C3C030F, // 003C GETMET R15 R1 K15 + 0x5C440800, // 003D MOVE R17 R4 + 0x5C481000, // 003E MOVE R18 R8 + 0x5C4C1C00, // 003F MOVE R19 R14 + 0x7C3C0800, // 0040 CALL R15 4 + 0x8C40030B, // 0041 GETMET R16 R1 K11 + 0x5C481600, // 0042 MOVE R18 R11 + 0x5C4C1E00, // 0043 MOVE R19 R15 + 0x7C400600, // 0044 CALL R16 3 + 0x002C170C, // 0045 ADD R11 R11 K12 + 0x7001FFE9, // 0046 JMP #0031 + 0x00380A07, // 0047 ADD R14 R5 R7 + 0x003C0A07, // 0048 ADD R15 R5 R7 + 0x003C1E06, // 0049 ADD R15 R15 R6 + 0x14401D0A, // 004A LT R16 R14 K10 + 0x78420000, // 004B JMPF R16 #004D + 0x5838000A, // 004C LDCONST R14 K10 + 0x28401E03, // 004D GE R16 R15 R3 + 0x78420000, // 004E JMPF R16 #0050 + 0x5C3C0600, // 004F MOVE R15 R3 + 0x5C2C1C00, // 0050 MOVE R11 R14 + 0x1440160F, // 0051 LT R16 R11 R15 + 0x78420014, // 0052 JMPF R16 #0068 + 0xB8421A00, // 0053 GETNGBL R16 K13 + 0x8C40210E, // 0054 GETMET R16 R16 K14 + 0x5C481600, // 0055 MOVE R18 R11 + 0x004C0A07, // 0056 ADD R19 R5 R7 + 0x044C270C, // 0057 SUB R19 R19 K12 + 0x00500A07, // 0058 ADD R20 R5 R7 + 0x00502806, // 0059 ADD R20 R20 R6 + 0x5854000A, // 005A LDCONST R21 K10 + 0x545A00FE, // 005B LDINT R22 255 + 0x7C400C00, // 005C CALL R16 6 + 0x8C44030F, // 005D GETMET R17 R1 K15 + 0x5C4C0800, // 005E MOVE R19 R4 + 0x5C501000, // 005F MOVE R20 R8 + 0x5C542000, // 0060 MOVE R21 R16 + 0x7C440800, // 0061 CALL R17 4 + 0x8C48030B, // 0062 GETMET R18 R1 K11 + 0x5C501600, // 0063 MOVE R20 R11 + 0x5C542200, // 0064 MOVE R21 R17 + 0x7C480600, // 0065 CALL R18 3 + 0x002C170C, // 0066 ADD R11 R11 K12 + 0x7001FFE8, // 0067 JMP #0051 + 0x50300200, // 0068 LDBOOL R12 1 0 + 0x80041800, // 0069 RET 1 R12 + }) + ) +); +/*******************************************************************/ + /******************************************************************** ** Solidified function: tostring ********************************************************************/ -be_local_closure(class_BreatheColorProvider_tostring, /* name */ +be_local_closure(class_BeaconAnimation_tostring, /* name */ be_nested_proto( - 8, /* nstack */ + 7, /* nstack */ 1, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -21945,19 +21540,466 @@ be_local_closure(class_BreatheColorProvider_tostring, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_BreatheColorProvider, /* shared constants */ + &be_ktab_class_BeaconAnimation, /* shared constants */ be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ + ( &(const binstruction[ 8]) { /* code */ 0x60040018, // 0000 GETGBL R1 G24 - 0x58080000, // 0001 LDCONST R2 K0 + 0x58080010, // 0001 LDCONST R2 K16 + 0x880C0107, // 0002 GETMBR R3 R0 K7 + 0x88100104, // 0003 GETMBR R4 R0 K4 + 0x88140106, // 0004 GETMBR R5 R0 K6 + 0x88180105, // 0005 GETMBR R6 R0 K5 + 0x7C040A00, // 0006 CALL R1 5 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: BeaconAnimation +********************************************************************/ +extern const bclass be_class_Animation; +be_local_class(BeaconAnimation, + 0, + &be_class_Animation, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(PARAMS, -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_weak(back_color, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-16777216) }, + })) ) } )) }, + { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(-1) }, + })) ) } )) }, + { be_const_key_weak(slew_size, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(beacon_size, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(1) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + })) ) } )) }, + { be_const_key_weak(pos, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(render, 2), be_const_closure(class_BeaconAnimation_render_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_BeaconAnimation_tostring_closure) }, + })), + be_str_weak(BeaconAnimation) +); + +/******************************************************************** +** Solidified function: pulsating_color_provider +********************************************************************/ +be_local_closure(pulsating_color_provider, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* 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(animation), + /* K1 */ be_nested_str_weak(breathe_color), + /* K2 */ be_nested_str_weak(curve_factor), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(duration), + }), + be_str_weak(pulsating_color_provider), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x90060503, // 0004 SETMBR R1 K2 K3 + 0x540A03E7, // 0005 LDINT R2 1000 + 0x90060802, // 0006 SETMBR R1 K4 R2 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: noise_fractal +********************************************************************/ +be_local_closure(noise_fractal, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(animation), + /* K1 */ be_nested_str_weak(noise_animation), + /* K2 */ be_nested_str_weak(rich_palette), + /* K3 */ be_nested_str_weak(palette), + /* K4 */ be_nested_str_weak(PALETTE_RAINBOW), + /* K5 */ be_nested_str_weak(cycle_period), + /* K6 */ be_nested_str_weak(transition_type), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(brightness), + /* K9 */ be_nested_str_weak(range_min), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(range_max), + /* K12 */ be_nested_str_weak(color), + /* K13 */ be_nested_str_weak(scale), + /* K14 */ be_nested_str_weak(speed), + /* K15 */ be_nested_str_weak(octaves), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(persistence), + }), + be_str_weak(noise_fractal), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0xB80A0000, // 0004 GETNGBL R2 K0 + 0x8C080502, // 0005 GETMET R2 R2 K2 + 0x5C100000, // 0006 MOVE R4 R0 + 0x7C080400, // 0007 CALL R2 2 + 0xB80E0000, // 0008 GETNGBL R3 K0 + 0x880C0704, // 0009 GETMBR R3 R3 K4 + 0x900A0603, // 000A SETMBR R2 K3 R3 + 0x540E1387, // 000B LDINT R3 5000 + 0x900A0A03, // 000C SETMBR R2 K5 R3 + 0x900A0D07, // 000D SETMBR R2 K6 K7 + 0x540E00FE, // 000E LDINT R3 255 + 0x900A1003, // 000F SETMBR R2 K8 R3 + 0x900A130A, // 0010 SETMBR R2 K9 K10 + 0x540E00FE, // 0011 LDINT R3 255 + 0x900A1603, // 0012 SETMBR R2 K11 R3 + 0x90061802, // 0013 SETMBR R1 K12 R2 + 0x540E001D, // 0014 LDINT R3 30 + 0x90061A03, // 0015 SETMBR R1 K13 R3 + 0x540E0013, // 0016 LDINT R3 20 + 0x90061C03, // 0017 SETMBR R1 K14 R3 + 0x90061F10, // 0018 SETMBR R1 K15 K16 + 0x540E007F, // 0019 LDINT R3 128 + 0x90062203, // 001A SETMBR R1 K17 R3 + 0x80040200, // 001B RET 1 R1 + }) + ) +); +/*******************************************************************/ + +// compact class 'GradientAnimation' ktab size: 43, total: 82 (saved 312 bytes) +static const bvalue be_ktab_class_GradientAnimation[43] = { + /* K0 */ be_nested_str_weak(update), + /* K1 */ be_nested_str_weak(movement_speed), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(start_time), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(scale_uint), + /* K6 */ be_nested_str_weak(phase_offset), + /* K7 */ be_nested_str_weak(_calculate_gradient), + /* K8 */ be_const_int(1), + /* K9 */ be_nested_str_weak(direction), + /* K10 */ be_nested_str_weak(spread), + /* K11 */ be_nested_str_weak(gradient_type), + /* K12 */ be_nested_str_weak(color), + /* K13 */ be_nested_str_weak(priority), + /* K14 */ be_nested_str_weak(linear), + /* K15 */ be_nested_str_weak(radial), + /* K16 */ be_nested_str_weak(animation), + /* K17 */ be_nested_str_weak(is_value_provider), + /* K18 */ be_nested_str_weak(rainbow), + /* K19 */ be_nested_str_weak(0x_X2508x), + /* K20 */ be_nested_str_weak(GradientAnimation_X28_X25s_X2C_X20color_X3D_X25s_X2C_X20movement_X3D_X25s_X2C_X20priority_X3D_X25s_X2C_X20running_X3D_X25s_X29), + /* K21 */ be_nested_str_weak(is_running), + /* K22 */ be_nested_str_weak(engine), + /* K23 */ be_nested_str_weak(get_strip_length), + /* K24 */ be_nested_str_weak(width), + /* K25 */ be_nested_str_weak(current_colors), + /* K26 */ be_nested_str_weak(set_pixel_color), + /* K27 */ be_nested_str_weak(resize), + /* K28 */ be_const_int(-16777216), + /* K29 */ be_nested_str_weak(_calculate_linear_position), + /* K30 */ be_nested_str_weak(_calculate_radial_position), + /* K31 */ be_nested_str_weak(light_state), + /* K32 */ be_const_int(3), + /* K33 */ be_nested_str_weak(HsToRgb), + /* K34 */ be_nested_str_weak(r), + /* K35 */ be_nested_str_weak(g), + /* K36 */ be_nested_str_weak(b), + /* K37 */ be_nested_str_weak(is_color_provider), + /* K38 */ be_nested_str_weak(get_color_for_value), + /* K39 */ be_nested_str_weak(resolve_value), + /* K40 */ be_nested_str_weak(int), + /* K41 */ be_nested_str_weak(init), + /* K42 */ be_nested_str_weak(center_pos), +}; + + +extern const bclass be_class_GradientAnimation; + +/******************************************************************** +** Solidified function: update +********************************************************************/ +be_local_closure(class_GradientAnimation_update, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(update), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080500, // 0003 GETMET R2 R2 K0 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x740A0001, // 0006 JMPT R2 #0009 + 0x50080000, // 0007 LDBOOL R2 0 0 + 0x80040400, // 0008 RET 1 R2 + 0x88080101, // 0009 GETMBR R2 R0 K1 + 0x240C0502, // 000A GT R3 R2 K2 + 0x780E0011, // 000B JMPF R3 #001E + 0x880C0103, // 000C GETMBR R3 R0 K3 + 0x040C0203, // 000D SUB R3 R1 R3 + 0xB8120800, // 000E GETNGBL R4 K4 + 0x8C100905, // 000F GETMET R4 R4 K5 + 0x5C180400, // 0010 MOVE R6 R2 + 0x581C0002, // 0011 LDCONST R7 K2 + 0x542200FE, // 0012 LDINT R8 255 + 0x58240002, // 0013 LDCONST R9 K2 + 0x542A0009, // 0014 LDINT R10 10 + 0x7C100C00, // 0015 CALL R4 6 + 0x24140902, // 0016 GT R5 R4 K2 + 0x78160005, // 0017 JMPF R5 #001E + 0x08140604, // 0018 MUL R5 R3 R4 + 0x541A03E7, // 0019 LDINT R6 1000 + 0x0C140A06, // 001A DIV R5 R5 R6 + 0x541A00FF, // 001B LDINT R6 256 + 0x10140A06, // 001C MOD R5 R5 R6 + 0x90020C05, // 001D SETMBR R0 K6 R5 + 0x8C0C0107, // 001E GETMET R3 R0 K7 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0x500C0200, // 0021 LDBOOL R3 1 0 + 0x80040600, // 0022 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _calculate_linear_position +********************************************************************/ +be_local_closure(class_GradientAnimation__calculate_linear_position, /* name */ + be_nested_proto( + 13, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(_calculate_linear_position), + &be_const_str_solidified, + ( &(const binstruction[50]) { /* code */ + 0xB80E0800, // 0000 GETNGBL R3 K4 + 0x8C0C0705, // 0001 GETMET R3 R3 K5 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x041C0508, // 0004 SUB R7 R2 K8 + 0x58200002, // 0005 LDCONST R8 K2 + 0x542600FE, // 0006 LDINT R9 255 + 0x7C0C0C00, // 0007 CALL R3 6 + 0x88100109, // 0008 GETMBR R4 R0 K9 + 0x8814010A, // 0009 GETMBR R5 R0 K10 + 0x541A007F, // 000A LDINT R6 128 + 0x18180806, // 000B LE R6 R4 R6 + 0x781A000C, // 000C JMPF R6 #001A + 0xB81A0800, // 000D GETNGBL R6 K4 + 0x8C180D05, // 000E GETMET R6 R6 K5 + 0x5C200800, // 000F MOVE R8 R4 + 0x58240002, // 0010 LDCONST R9 K2 + 0x542A007F, // 0011 LDINT R10 128 + 0x582C0002, // 0012 LDCONST R11 K2 + 0x5432007F, // 0013 LDINT R12 128 + 0x7C180C00, // 0014 CALL R6 6 + 0x001C0606, // 0015 ADD R7 R3 R6 + 0x542200FF, // 0016 LDINT R8 256 + 0x101C0E08, // 0017 MOD R7 R7 R8 + 0x5C0C0E00, // 0018 MOVE R3 R7 + 0x7002000D, // 0019 JMP #0028 + 0xB81A0800, // 001A GETNGBL R6 K4 + 0x8C180D05, // 001B GETMET R6 R6 K5 + 0x5C200800, // 001C MOVE R8 R4 + 0x5426007F, // 001D LDINT R9 128 + 0x542A00FE, // 001E LDINT R10 255 + 0x582C0002, // 001F LDCONST R11 K2 + 0x543200FE, // 0020 LDINT R12 255 + 0x7C180C00, // 0021 CALL R6 6 + 0x541E00FE, // 0022 LDINT R7 255 + 0x00200606, // 0023 ADD R8 R3 R6 + 0x542600FF, // 0024 LDINT R9 256 + 0x10201009, // 0025 MOD R8 R8 R9 + 0x041C0E08, // 0026 SUB R7 R7 R8 + 0x5C0C0E00, // 0027 MOVE R3 R7 + 0xB81A0800, // 0028 GETNGBL R6 K4 + 0x8C180D05, // 0029 GETMET R6 R6 K5 + 0x5C200600, // 002A MOVE R8 R3 + 0x58240002, // 002B LDCONST R9 K2 + 0x542A00FE, // 002C LDINT R10 255 + 0x582C0002, // 002D LDCONST R11 K2 + 0x5C300A00, // 002E MOVE R12 R5 + 0x7C180C00, // 002F CALL R6 6 + 0x5C0C0C00, // 0030 MOVE R3 R6 + 0x80040600, // 0031 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +be_local_closure(class_GradientAnimation_tostring, /* name */ + be_nested_proto( + 14, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(tostring), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0x8804010B, // 0000 GETMBR R1 R0 K11 + 0x8808010C, // 0001 GETMBR R2 R0 K12 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x88100102, // 0003 GETMBR R4 R0 K2 - 0x88140103, // 0004 GETMBR R5 R0 K3 - 0x88180104, // 0005 GETMBR R6 R0 K4 - 0x881C0105, // 0006 GETMBR R7 R0 K5 - 0x7C040C00, // 0007 CALL R1 6 - 0x80040200, // 0008 RET 1 R1 + 0x8810010D, // 0003 GETMBR R4 R0 K13 + 0x1C140302, // 0004 EQ R5 R1 K2 + 0x78160001, // 0005 JMPF R5 #0008 + 0x5814000E, // 0006 LDCONST R5 K14 + 0x70020000, // 0007 JMP #0009 + 0x5814000F, // 0008 LDCONST R5 K15 + 0x4C180000, // 0009 LDNIL R6 + 0xB81E2000, // 000A GETNGBL R7 K16 + 0x8C1C0F11, // 000B GETMET R7 R7 K17 + 0x5C240400, // 000C MOVE R9 R2 + 0x7C1C0400, // 000D CALL R7 2 + 0x781E0004, // 000E JMPF R7 #0014 + 0x601C0008, // 000F GETGBL R7 G8 + 0x5C200400, // 0010 MOVE R8 R2 + 0x7C1C0200, // 0011 CALL R7 1 + 0x5C180E00, // 0012 MOVE R6 R7 + 0x70020009, // 0013 JMP #001E + 0x4C1C0000, // 0014 LDNIL R7 + 0x1C1C0407, // 0015 EQ R7 R2 R7 + 0x781E0001, // 0016 JMPF R7 #0019 + 0x58180012, // 0017 LDCONST R6 K18 + 0x70020004, // 0018 JMP #001E + 0x601C0018, // 0019 GETGBL R7 G24 + 0x58200013, // 001A LDCONST R8 K19 + 0x5C240400, // 001B MOVE R9 R2 + 0x7C1C0400, // 001C CALL R7 2 + 0x5C180E00, // 001D MOVE R6 R7 + 0x601C0018, // 001E GETGBL R7 G24 + 0x58200014, // 001F LDCONST R8 K20 + 0x5C240A00, // 0020 MOVE R9 R5 + 0x5C280C00, // 0021 MOVE R10 R6 + 0x5C2C0600, // 0022 MOVE R11 R3 + 0x5C300800, // 0023 MOVE R12 R4 + 0x88340115, // 0024 GETMBR R13 R0 K21 + 0x7C1C0C00, // 0025 CALL R7 6 + 0x80040E00, // 0026 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: render +********************************************************************/ +be_local_closure(class_GradientAnimation_render, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(render), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x880C0115, // 0000 GETMBR R3 R0 K21 + 0x780E0002, // 0001 JMPF R3 #0005 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0203, // 0003 EQ R3 R1 R3 + 0x780E0001, // 0004 JMPF R3 #0007 + 0x500C0000, // 0005 LDBOOL R3 0 0 + 0x80040600, // 0006 RET 1 R3 + 0x880C0116, // 0007 GETMBR R3 R0 K22 + 0x8C0C0717, // 0008 GETMET R3 R3 K23 + 0x7C0C0200, // 0009 CALL R3 1 + 0x58100002, // 000A LDCONST R4 K2 + 0x14140803, // 000B LT R5 R4 R3 + 0x7816000E, // 000C JMPF R5 #001C + 0x88140318, // 000D GETMBR R5 R1 K24 + 0x14140805, // 000E LT R5 R4 R5 + 0x7816000B, // 000F JMPF R5 #001C + 0x6014000C, // 0010 GETGBL R5 G12 + 0x88180119, // 0011 GETMBR R6 R0 K25 + 0x7C140200, // 0012 CALL R5 1 + 0x14140805, // 0013 LT R5 R4 R5 + 0x78160004, // 0014 JMPF R5 #001A + 0x8C14031A, // 0015 GETMET R5 R1 K26 + 0x5C1C0800, // 0016 MOVE R7 R4 + 0x88200119, // 0017 GETMBR R8 R0 K25 + 0x94201004, // 0018 GETIDX R8 R8 R4 + 0x7C140600, // 0019 CALL R5 3 + 0x00100908, // 001A ADD R4 R4 K8 + 0x7001FFEE, // 001B JMP #000B + 0x50140200, // 001C LDBOOL R5 1 0 + 0x80040A00, // 001D RET 1 R5 }) ) ); @@ -21967,7 +22009,7 @@ be_local_closure(class_BreatheColorProvider_tostring, /* name */ /******************************************************************** ** Solidified function: on_param_changed ********************************************************************/ -be_local_closure(class_BreatheColorProvider_on_param_changed, /* name */ +be_local_closure(class_GradientAnimation_on_param_changed, /* name */ be_nested_proto( 7, /* nstack */ 3, /* argc */ @@ -21977,29 +22019,47 @@ be_local_closure(class_BreatheColorProvider_on_param_changed, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_BreatheColorProvider, /* shared constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ be_str_weak(on_param_changed), &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x1C0C0305, // 0000 EQ R3 R1 K5 - 0x780E0008, // 0001 JMPF R3 #000B - 0x1C0C0506, // 0002 EQ R3 R2 K6 - 0x780E0003, // 0003 JMPF R3 #0008 - 0xB80E1000, // 0004 GETNGBL R3 K8 - 0x880C0709, // 0005 GETMBR R3 R3 K9 - 0x90020E03, // 0006 SETMBR R0 K7 R3 - 0x70020002, // 0007 JMP #000B - 0xB80E1000, // 0008 GETNGBL R3 K8 - 0x880C0709, // 0009 GETMBR R3 R3 K9 - 0x90020E03, // 000A SETMBR R0 K7 R3 - 0x600C0003, // 000B GETGBL R3 G3 - 0x5C100000, // 000C MOVE R4 R0 - 0x7C0C0200, // 000D CALL R3 1 - 0x8C0C070A, // 000E GETMET R3 R3 K10 - 0x5C140200, // 000F MOVE R5 R1 - 0x5C180400, // 0010 MOVE R6 R2 - 0x7C0C0600, // 0011 CALL R3 3 - 0x80000000, // 0012 RET 0 + ( &(const binstruction[37]) { /* code */ + 0x880C0116, // 0000 GETMBR R3 R0 K22 + 0x8C0C0717, // 0001 GETMET R3 R3 K23 + 0x7C0C0200, // 0002 CALL R3 1 + 0x6010000C, // 0003 GETGBL R4 G12 + 0x88140119, // 0004 GETMBR R5 R0 K25 + 0x7C100200, // 0005 CALL R4 1 + 0x20100803, // 0006 NE R4 R4 R3 + 0x7812001B, // 0007 JMPF R4 #0024 + 0x88100119, // 0008 GETMBR R4 R0 K25 + 0x8C10091B, // 0009 GETMET R4 R4 K27 + 0x5C180600, // 000A MOVE R6 R3 + 0x7C100400, // 000B CALL R4 2 + 0x6010000C, // 000C GETGBL R4 G12 + 0x88140119, // 000D GETMBR R5 R0 K25 + 0x7C100200, // 000E CALL R4 1 + 0x14140803, // 000F LT R5 R4 R3 + 0x78160012, // 0010 JMPF R5 #0024 + 0x6014000C, // 0011 GETGBL R5 G12 + 0x88180119, // 0012 GETMBR R6 R0 K25 + 0x7C140200, // 0013 CALL R5 1 + 0x28140805, // 0014 GE R5 R4 R5 + 0x74160004, // 0015 JMPT R5 #001B + 0x88140119, // 0016 GETMBR R5 R0 K25 + 0x94140A04, // 0017 GETIDX R5 R5 R4 + 0x4C180000, // 0018 LDNIL R6 + 0x1C140A06, // 0019 EQ R5 R5 R6 + 0x78160006, // 001A JMPF R5 #0022 + 0x6014000C, // 001B GETGBL R5 G12 + 0x88180119, // 001C GETMBR R6 R0 K25 + 0x7C140200, // 001D CALL R5 1 + 0x14140805, // 001E LT R5 R4 R5 + 0x78160001, // 001F JMPF R5 #0022 + 0x88140119, // 0020 GETMBR R5 R0 K25 + 0x9814091C, // 0021 SETIDX R5 R4 K28 + 0x00100908, // 0022 ADD R4 R4 K8 + 0x7001FFEA, // 0023 JMP #000F + 0x80000000, // 0024 RET 0 }) ) ); @@ -22007,104 +22067,171 @@ be_local_closure(class_BreatheColorProvider_on_param_changed, /* name */ /******************************************************************** -** Solidified function: produce_value +** Solidified function: _calculate_gradient ********************************************************************/ -be_local_closure(class_BreatheColorProvider_produce_value, /* name */ +be_local_closure(class_GradientAnimation__calculate_gradient, /* name */ be_nested_proto( - 15, /* nstack */ - 3, /* argc */ + 18, /* nstack */ + 2, /* argc */ 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_BreatheColorProvider, /* shared constants */ - be_str_weak(produce_value), + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(_calculate_gradient), &be_const_str_solidified, - ( &(const binstruction[82]) { /* code */ - 0x600C0003, // 0000 GETGBL R3 G3 - 0x5C100000, // 0001 MOVE R4 R0 - 0x7C0C0200, // 0002 CALL R3 1 - 0x8C0C070B, // 0003 GETMET R3 R3 K11 - 0x5C140200, // 0004 MOVE R5 R1 - 0x5C180400, // 0005 MOVE R6 R2 - 0x7C0C0600, // 0006 CALL R3 3 - 0x88100105, // 0007 GETMBR R4 R0 K5 - 0x5C140600, // 0008 MOVE R5 R3 - 0x24180906, // 0009 GT R6 R4 K6 - 0x781A0019, // 000A JMPF R6 #0025 - 0xB81A1800, // 000B GETNGBL R6 K12 - 0x8C180D0D, // 000C GETMET R6 R6 K13 - 0x5C200600, // 000D MOVE R8 R3 - 0x5824000E, // 000E LDCONST R9 K14 - 0x542A00FE, // 000F LDINT R10 255 - 0x582C000E, // 0010 LDCONST R11 K14 - 0x54321FFF, // 0011 LDINT R12 8192 - 0x7C180C00, // 0012 CALL R6 6 - 0x5C1C0800, // 0013 MOVE R7 R4 - 0x24200F06, // 0014 GT R8 R7 K6 - 0x78220005, // 0015 JMPF R8 #001C - 0x08200C06, // 0016 MUL R8 R6 R6 - 0x54261FFF, // 0017 LDINT R9 8192 - 0x0C201009, // 0018 DIV R8 R8 R9 - 0x5C181000, // 0019 MOVE R6 R8 - 0x041C0F06, // 001A SUB R7 R7 K6 - 0x7001FFF7, // 001B JMP #0014 - 0xB8221800, // 001C GETNGBL R8 K12 - 0x8C20110D, // 001D GETMET R8 R8 K13 - 0x5C280C00, // 001E MOVE R10 R6 - 0x582C000E, // 001F LDCONST R11 K14 - 0x54321FFF, // 0020 LDINT R12 8192 - 0x5834000E, // 0021 LDCONST R13 K14 - 0x543A00FE, // 0022 LDINT R14 255 - 0x7C200C00, // 0023 CALL R8 6 - 0x5C141000, // 0024 MOVE R5 R8 - 0xB81A1800, // 0025 GETNGBL R6 K12 - 0x8C180D0D, // 0026 GETMET R6 R6 K13 - 0x5C200A00, // 0027 MOVE R8 R5 - 0x5824000E, // 0028 LDCONST R9 K14 - 0x542A00FE, // 0029 LDINT R10 255 - 0x882C0102, // 002A GETMBR R11 R0 K2 - 0x88300103, // 002B GETMBR R12 R0 K3 - 0x7C180C00, // 002C CALL R6 6 - 0x881C0101, // 002D GETMBR R7 R0 K1 - 0x54220017, // 002E LDINT R8 24 - 0x3C200E08, // 002F SHR R8 R7 R8 - 0x542600FE, // 0030 LDINT R9 255 - 0x2C201009, // 0031 AND R8 R8 R9 - 0x5426000F, // 0032 LDINT R9 16 - 0x3C240E09, // 0033 SHR R9 R7 R9 - 0x542A00FE, // 0034 LDINT R10 255 - 0x2C24120A, // 0035 AND R9 R9 R10 - 0x542A0007, // 0036 LDINT R10 8 - 0x3C280E0A, // 0037 SHR R10 R7 R10 - 0x542E00FE, // 0038 LDINT R11 255 - 0x2C28140B, // 0039 AND R10 R10 R11 - 0x542E00FE, // 003A LDINT R11 255 - 0x2C2C0E0B, // 003B AND R11 R7 R11 - 0x08301206, // 003C MUL R12 R9 R6 - 0x543600FE, // 003D LDINT R13 255 - 0x0C30180D, // 003E DIV R12 R12 R13 - 0x5C241800, // 003F MOVE R9 R12 - 0x08301406, // 0040 MUL R12 R10 R6 - 0x543600FE, // 0041 LDINT R13 255 - 0x0C30180D, // 0042 DIV R12 R12 R13 - 0x5C281800, // 0043 MOVE R10 R12 - 0x08301606, // 0044 MUL R12 R11 R6 - 0x543600FE, // 0045 LDINT R13 255 - 0x0C30180D, // 0046 DIV R12 R12 R13 - 0x5C2C1800, // 0047 MOVE R11 R12 - 0x54320017, // 0048 LDINT R12 24 - 0x3830100C, // 0049 SHL R12 R8 R12 - 0x5436000F, // 004A LDINT R13 16 - 0x3834120D, // 004B SHL R13 R9 R13 - 0x3030180D, // 004C OR R12 R12 R13 - 0x54360007, // 004D LDINT R13 8 - 0x3834140D, // 004E SHL R13 R10 R13 - 0x3030180D, // 004F OR R12 R12 R13 - 0x3030180B, // 0050 OR R12 R12 R11 - 0x80041800, // 0051 RET 1 R12 + ( &(const binstruction[149]) { /* code */ + 0x8808010B, // 0000 GETMBR R2 R0 K11 + 0x880C010C, // 0001 GETMBR R3 R0 K12 + 0x88100116, // 0002 GETMBR R4 R0 K22 + 0x8C100917, // 0003 GETMET R4 R4 K23 + 0x7C100200, // 0004 CALL R4 1 + 0x6014000C, // 0005 GETGBL R5 G12 + 0x88180119, // 0006 GETMBR R6 R0 K25 + 0x7C140200, // 0007 CALL R5 1 + 0x20140A04, // 0008 NE R5 R5 R4 + 0x78160003, // 0009 JMPF R5 #000E + 0x88140119, // 000A GETMBR R5 R0 K25 + 0x8C140B1B, // 000B GETMET R5 R5 K27 + 0x5C1C0800, // 000C MOVE R7 R4 + 0x7C140400, // 000D CALL R5 2 + 0x58140002, // 000E LDCONST R5 K2 + 0x14180A04, // 000F LT R6 R5 R4 + 0x781A0082, // 0010 JMPF R6 #0094 + 0x58180002, // 0011 LDCONST R6 K2 + 0x1C1C0502, // 0012 EQ R7 R2 K2 + 0x781E0005, // 0013 JMPF R7 #001A + 0x8C1C011D, // 0014 GETMET R7 R0 K29 + 0x5C240A00, // 0015 MOVE R9 R5 + 0x5C280800, // 0016 MOVE R10 R4 + 0x7C1C0600, // 0017 CALL R7 3 + 0x5C180E00, // 0018 MOVE R6 R7 + 0x70020004, // 0019 JMP #001F + 0x8C1C011E, // 001A GETMET R7 R0 K30 + 0x5C240A00, // 001B MOVE R9 R5 + 0x5C280800, // 001C MOVE R10 R4 + 0x7C1C0600, // 001D CALL R7 3 + 0x5C180E00, // 001E MOVE R6 R7 + 0x881C0106, // 001F GETMBR R7 R0 K6 + 0x001C0C07, // 0020 ADD R7 R6 R7 + 0x542200FF, // 0021 LDINT R8 256 + 0x101C0E08, // 0022 MOD R7 R7 R8 + 0x5C180E00, // 0023 MOVE R6 R7 + 0x581C001C, // 0024 LDCONST R7 K28 + 0x4C200000, // 0025 LDNIL R8 + 0x1C200608, // 0026 EQ R8 R3 R8 + 0x7822001B, // 0027 JMPF R8 #0044 + 0xB8220800, // 0028 GETNGBL R8 K4 + 0x8C201105, // 0029 GETMET R8 R8 K5 + 0x5C280C00, // 002A MOVE R10 R6 + 0x582C0002, // 002B LDCONST R11 K2 + 0x543200FE, // 002C LDINT R12 255 + 0x58340002, // 002D LDCONST R13 K2 + 0x543A0166, // 002E LDINT R14 359 + 0x7C200C00, // 002F CALL R8 6 + 0xA4263E00, // 0030 IMPORT R9 K31 + 0x5C281200, // 0031 MOVE R10 R9 + 0x582C0020, // 0032 LDCONST R11 K32 + 0x7C280200, // 0033 CALL R10 1 + 0x8C2C1521, // 0034 GETMET R11 R10 K33 + 0x5C341000, // 0035 MOVE R13 R8 + 0x543A00FE, // 0036 LDINT R14 255 + 0x7C2C0600, // 0037 CALL R11 3 + 0x882C1522, // 0038 GETMBR R11 R10 K34 + 0x5432000F, // 0039 LDINT R12 16 + 0x382C160C, // 003A SHL R11 R11 R12 + 0x302E380B, // 003B OR R11 K28 R11 + 0x88301523, // 003C GETMBR R12 R10 K35 + 0x54360007, // 003D LDINT R13 8 + 0x3830180D, // 003E SHL R12 R12 R13 + 0x302C160C, // 003F OR R11 R11 R12 + 0x88301524, // 0040 GETMBR R12 R10 K36 + 0x302C160C, // 0041 OR R11 R11 R12 + 0x5C1C1600, // 0042 MOVE R7 R11 + 0x7002004B, // 0043 JMP #0090 + 0xB8222000, // 0044 GETNGBL R8 K16 + 0x8C201125, // 0045 GETMET R8 R8 K37 + 0x5C280600, // 0046 MOVE R10 R3 + 0x7C200400, // 0047 CALL R8 2 + 0x78220009, // 0048 JMPF R8 #0053 + 0x88200726, // 0049 GETMBR R8 R3 K38 + 0x4C240000, // 004A LDNIL R9 + 0x20201009, // 004B NE R8 R8 R9 + 0x78220005, // 004C JMPF R8 #0053 + 0x8C200726, // 004D GETMET R8 R3 K38 + 0x5C280C00, // 004E MOVE R10 R6 + 0x582C0002, // 004F LDCONST R11 K2 + 0x7C200600, // 0050 CALL R8 3 + 0x5C1C1000, // 0051 MOVE R7 R8 + 0x7002003C, // 0052 JMP #0090 + 0xB8222000, // 0053 GETNGBL R8 K16 + 0x8C201111, // 0054 GETMET R8 R8 K17 + 0x5C280600, // 0055 MOVE R10 R3 + 0x7C200400, // 0056 CALL R8 2 + 0x78220008, // 0057 JMPF R8 #0061 + 0x8C200127, // 0058 GETMET R8 R0 K39 + 0x5C280600, // 0059 MOVE R10 R3 + 0x582C000C, // 005A LDCONST R11 K12 + 0x54320009, // 005B LDINT R12 10 + 0x08300C0C, // 005C MUL R12 R6 R12 + 0x0030020C, // 005D ADD R12 R1 R12 + 0x7C200800, // 005E CALL R8 4 + 0x5C1C1000, // 005F MOVE R7 R8 + 0x7002002E, // 0060 JMP #0090 + 0x60200004, // 0061 GETGBL R8 G4 + 0x5C240600, // 0062 MOVE R9 R3 + 0x7C200200, // 0063 CALL R8 1 + 0x1C201128, // 0064 EQ R8 R8 K40 + 0x78220028, // 0065 JMPF R8 #008F + 0x5C200C00, // 0066 MOVE R8 R6 + 0xB8260800, // 0067 GETNGBL R9 K4 + 0x8C241305, // 0068 GETMET R9 R9 K5 + 0x5C2C1000, // 0069 MOVE R11 R8 + 0x58300002, // 006A LDCONST R12 K2 + 0x543600FE, // 006B LDINT R13 255 + 0x58380002, // 006C LDCONST R14 K2 + 0x543E000F, // 006D LDINT R15 16 + 0x3C3C060F, // 006E SHR R15 R3 R15 + 0x544200FE, // 006F LDINT R16 255 + 0x2C3C1E10, // 0070 AND R15 R15 R16 + 0x7C240C00, // 0071 CALL R9 6 + 0xB82A0800, // 0072 GETNGBL R10 K4 + 0x8C281505, // 0073 GETMET R10 R10 K5 + 0x5C301000, // 0074 MOVE R12 R8 + 0x58340002, // 0075 LDCONST R13 K2 + 0x543A00FE, // 0076 LDINT R14 255 + 0x583C0002, // 0077 LDCONST R15 K2 + 0x54420007, // 0078 LDINT R16 8 + 0x3C400610, // 0079 SHR R16 R3 R16 + 0x544600FE, // 007A LDINT R17 255 + 0x2C402011, // 007B AND R16 R16 R17 + 0x7C280C00, // 007C CALL R10 6 + 0xB82E0800, // 007D GETNGBL R11 K4 + 0x8C2C1705, // 007E GETMET R11 R11 K5 + 0x5C341000, // 007F MOVE R13 R8 + 0x58380002, // 0080 LDCONST R14 K2 + 0x543E00FE, // 0081 LDINT R15 255 + 0x58400002, // 0082 LDCONST R16 K2 + 0x544600FE, // 0083 LDINT R17 255 + 0x2C440611, // 0084 AND R17 R3 R17 + 0x7C2C0C00, // 0085 CALL R11 6 + 0x5432000F, // 0086 LDINT R12 16 + 0x3830120C, // 0087 SHL R12 R9 R12 + 0x3032380C, // 0088 OR R12 K28 R12 + 0x54360007, // 0089 LDINT R13 8 + 0x3834140D, // 008A SHL R13 R10 R13 + 0x3030180D, // 008B OR R12 R12 R13 + 0x3030180B, // 008C OR R12 R12 R11 + 0x5C1C1800, // 008D MOVE R7 R12 + 0x70020000, // 008E JMP #0090 + 0x5C1C0600, // 008F MOVE R7 R3 + 0x88200119, // 0090 GETMBR R8 R0 K25 + 0x98200A07, // 0091 SETIDX R8 R5 R7 + 0x00140B08, // 0092 ADD R5 R5 K8 + 0x7001FF7A, // 0093 JMP #000F + 0x80000000, // 0094 RET 0 }) ) ); @@ -22114,9 +22241,9 @@ be_local_closure(class_BreatheColorProvider_produce_value, /* name */ /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(class_BreatheColorProvider_init, /* name */ +be_local_closure(class_GradientAnimation_init, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -22124,25 +22251,35 @@ be_local_closure(class_BreatheColorProvider_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - &be_ktab_class_BreatheColorProvider, /* shared constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ + ( &(const binstruction[25]) { /* code */ 0x60080003, // 0000 GETGBL R2 G3 0x5C0C0000, // 0001 MOVE R3 R0 0x7C080200, // 0002 CALL R2 1 - 0x8C08050F, // 0003 GETMET R2 R2 K15 + 0x8C080529, // 0003 GETMET R2 R2 K41 0x5C100200, // 0004 MOVE R4 R1 0x7C080400, // 0005 CALL R2 2 - 0xB80A1000, // 0006 GETNGBL R2 K8 - 0x88080509, // 0007 GETMBR R2 R2 K9 - 0x90020E02, // 0008 SETMBR R0 K7 R2 - 0x9002210E, // 0009 SETMBR R0 K16 K14 - 0x540A00FE, // 000A LDINT R2 255 - 0x90022202, // 000B SETMBR R0 K17 R2 - 0x540A0BB7, // 000C LDINT R2 3000 - 0x90020802, // 000D SETMBR R0 K4 R2 - 0x80000000, // 000E RET 0 + 0x60080012, // 0006 GETGBL R2 G18 + 0x7C080000, // 0007 CALL R2 0 + 0x90023202, // 0008 SETMBR R0 K25 R2 + 0x90020D02, // 0009 SETMBR R0 K6 K2 + 0x88080116, // 000A GETMBR R2 R0 K22 + 0x8C080517, // 000B GETMET R2 R2 K23 + 0x7C080200, // 000C CALL R2 1 + 0x880C0119, // 000D GETMBR R3 R0 K25 + 0x8C0C071B, // 000E GETMET R3 R3 K27 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x580C0002, // 0011 LDCONST R3 K2 + 0x14100602, // 0012 LT R4 R3 R2 + 0x78120003, // 0013 JMPF R4 #0018 + 0x88100119, // 0014 GETMBR R4 R0 K25 + 0x9810071C, // 0015 SETIDX R4 R3 K28 + 0x000C0708, // 0016 ADD R3 R3 K8 + 0x7001FFF9, // 0017 JMP #0012 + 0x80000000, // 0018 RET 0 }) ) ); @@ -22150,123 +22287,126 @@ be_local_closure(class_BreatheColorProvider_init, /* name */ /******************************************************************** -** Solidified class: BreatheColorProvider +** Solidified function: _calculate_radial_position ********************************************************************/ -extern const bclass be_class_OscillatorValueProvider; -be_local_class(BreatheColorProvider, - 0, - &be_class_OscillatorValueProvider, - be_nested_map(5, +be_local_closure(class_GradientAnimation__calculate_radial_position, /* name */ + be_nested_proto( + 14, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_GradientAnimation, /* shared constants */ + be_str_weak(_calculate_radial_position), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0xB80E0800, // 0000 GETNGBL R3 K4 + 0x8C0C0705, // 0001 GETMET R3 R3 K5 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x041C0508, // 0004 SUB R7 R2 K8 + 0x58200002, // 0005 LDCONST R8 K2 + 0x542600FE, // 0006 LDINT R9 255 + 0x7C0C0C00, // 0007 CALL R3 6 + 0x8810012A, // 0008 GETMBR R4 R0 K42 + 0x8814010A, // 0009 GETMBR R5 R0 K10 + 0x58180002, // 000A LDCONST R6 K2 + 0x281C0604, // 000B GE R7 R3 R4 + 0x781E0002, // 000C JMPF R7 #0010 + 0x041C0604, // 000D SUB R7 R3 R4 + 0x5C180E00, // 000E MOVE R6 R7 + 0x70020001, // 000F JMP #0012 + 0x041C0803, // 0010 SUB R7 R4 R3 + 0x5C180E00, // 0011 MOVE R6 R7 + 0xB81E0800, // 0012 GETNGBL R7 K4 + 0x8C1C0F05, // 0013 GETMET R7 R7 K5 + 0x5C240C00, // 0014 MOVE R9 R6 + 0x58280002, // 0015 LDCONST R10 K2 + 0x542E007F, // 0016 LDINT R11 128 + 0x58300002, // 0017 LDCONST R12 K2 + 0x5C340A00, // 0018 MOVE R13 R5 + 0x7C1C0C00, // 0019 CALL R7 6 + 0x5C180E00, // 001A MOVE R6 R7 + 0x541E00FE, // 001B LDINT R7 255 + 0x241C0C07, // 001C GT R7 R6 R7 + 0x781E0000, // 001D JMPF R7 #001F + 0x541A00FE, // 001E LDINT R6 255 + 0x80040C00, // 001F RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: GradientAnimation +********************************************************************/ +extern const bclass be_class_Animation; +be_local_class(GradientAnimation, + 2, + &be_class_Animation, + be_nested_map(11, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(tostring, 1), be_const_closure(class_BreatheColorProvider_tostring_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_BreatheColorProvider_init_closure) }, - { be_const_key_weak(on_param_changed, -1), be_const_closure(class_BreatheColorProvider_on_param_changed_closure) }, - { be_const_key_weak(PARAMS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(4, + { be_const_key_weak(current_colors, -1), be_const_var(0) }, + { be_const_key_weak(render, -1), be_const_closure(class_GradientAnimation_render_closure) }, + { be_const_key_weak(_calculate_linear_position, -1), be_const_closure(class_GradientAnimation__calculate_linear_position_closure) }, + { be_const_key_weak(tostring, -1), be_const_closure(class_GradientAnimation_tostring_closure) }, + { be_const_key_weak(update, 1), be_const_closure(class_GradientAnimation_update_closure) }, + { be_const_key_weak(on_param_changed, -1), be_const_closure(class_GradientAnimation_on_param_changed_closure) }, + { be_const_key_weak(phase_offset, -1), be_const_var(1) }, + { be_const_key_weak(_calculate_gradient, -1), be_const_closure(class_GradientAnimation__calculate_gradient_closure) }, + { be_const_key_weak(PARAMS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(base_color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(-1) }, - })) ) } )) }, - { be_const_key_weak(max_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(255) }, - { be_const_key_weak(min, -1), be_const_int(0) }, - { be_const_key_weak(max, 1), be_const_int(255) }, - })) ) } )) }, - { be_const_key_weak(curve_factor, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(3, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(default, -1), be_const_int(2) }, - { be_const_key_weak(min, -1), be_const_int(1) }, - { be_const_key_weak(max, 1), be_const_int(5) }, - })) ) } )) }, - { be_const_key_weak(min_brightness, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(direction, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_weak(default, -1), be_const_int(0) }, { be_const_key_weak(min, -1), be_const_int(0) }, { be_const_key_weak(max, 1), be_const_int(255) }, })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(produce_value, -1), be_const_closure(class_BreatheColorProvider_produce_value_closure) }, - })), - be_str_weak(BreatheColorProvider) -); - -extern const bclass be_class_ColorProvider; - -/******************************************************************** -** Solidified function: produce_value -********************************************************************/ -be_local_closure(class_ColorProvider_produce_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 3, /* 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(produce_value), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x540DFFFE, // 0000 LDINT R3 -1 - 0x80040600, // 0001 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_color_for_value -********************************************************************/ -be_local_closure(class_ColorProvider_get_color_for_value, /* 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[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(produce_value), - /* K1 */ be_nested_str_weak(color), - }), - be_str_weak(get_color_for_value), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x58140001, // 0001 LDCONST R5 K1 - 0x5C180400, // 0002 MOVE R6 R2 - 0x7C0C0600, // 0003 CALL R3 3 - 0x80040600, // 0004 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: ColorProvider -********************************************************************/ -extern const bclass be_class_ValueProvider; -be_local_class(ColorProvider, - 0, - &be_class_ValueProvider, - be_nested_map(2, + { be_const_key_weak(center_pos, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_color_for_value, -1), be_const_closure(class_ColorProvider_get_color_for_value_closure) }, - { be_const_key_weak(produce_value, 0), be_const_closure(class_ColorProvider_produce_value_closure) }, + { be_const_key_weak(default, -1), be_const_int(128) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(gradient_type, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(color, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, 1), be_const_nil() }, + { be_const_key_weak(nillable, -1), be_const_bool(1) }, + })) ) } )) }, + { be_const_key_weak(movement_speed, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(0) }, + { be_const_key_weak(min, -1), be_const_int(0) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + { be_const_key_weak(spread, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(default, -1), be_const_int(255) }, + { be_const_key_weak(min, -1), be_const_int(1) }, + { be_const_key_weak(max, 1), be_const_int(255) }, + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_GradientAnimation_init_closure) }, + { be_const_key_weak(_calculate_radial_position, -1), be_const_closure(class_GradientAnimation__calculate_radial_position_closure) }, })), - be_str_weak(ColorProvider) + be_str_weak(GradientAnimation) ); extern const bclass be_class_ValueProvider; @@ -22356,135 +22496,129 @@ be_local_class(ValueProvider, ********************************************************************/ be_local_module(animation, "animation", - be_nested_map(127, + be_nested_map(121, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init_strip, 111), be_const_closure(animation_init_strip_closure) }, - { be_const_key_weak(trigger_event, 40), be_const_closure(trigger_event_closure) }, - { be_const_key_weak(EASE_IN, -1), be_const_int(6) }, + { be_const_key_weak(static_color, 21), be_const_class(be_class_StaticColorProvider) }, + { be_const_key_weak(rich_palette_animation, 79), be_const_class(be_class_RichPaletteAnimation) }, + { be_const_key_weak(scale_animation, 64), be_const_class(be_class_ScaleAnimation) }, + { be_const_key_weak(rich_palette, 15), be_const_class(be_class_RichPaletteColorProvider) }, + { be_const_key_weak(color_cycle, -1), be_const_class(be_class_ColorCycleColorProvider) }, { be_const_key_weak(value_provider, -1), be_const_class(be_class_ValueProvider) }, - { be_const_key_weak(strip_length, 38), be_const_class(be_class_StripLengthProvider) }, - { be_const_key_weak(fire_animation, -1), be_const_class(be_class_FireAnimation) }, - { be_const_key_weak(oscillator_value, 119), be_const_class(be_class_OscillatorValueProvider) }, - { be_const_key_weak(closure_value, -1), be_const_class(be_class_ClosureValueProvider) }, - { be_const_key_weak(PALETTE_OCEAN, -1), be_const_bytes_instance(00000080400000FF8000FFFFC000FF80FF008000) }, - { be_const_key_weak(bounce_basic, 21), be_const_closure(bounce_basic_closure) }, - { be_const_key_weak(color_provider, 44), be_const_class(be_class_ColorProvider) }, - { be_const_key_weak(noise_animation, -1), be_const_class(be_class_NoiseAnimation) }, - { be_const_key_weak(set_event_active, 83), be_const_closure(set_event_active_closure) }, - { be_const_key_weak(linear, 26), be_const_closure(linear_closure) }, - { be_const_key_weak(PALETTE_SUNSET_TICKS, -1), be_const_bytes_instance(28FF450028FF8C0028FFD70028FF69B4288000802819197000000080) }, - { be_const_key_weak(jitter_color, 35), be_const_closure(jitter_color_closure) }, - { be_const_key_weak(breathe_color, -1), be_const_class(be_class_BreatheColorProvider) }, + { be_const_key_weak(palette_gradient_animation, -1), be_const_class(be_class_PaletteGradientAnimation) }, + { be_const_key_weak(set_event_active, -1), be_const_closure(set_event_active_closure) }, + { be_const_key_weak(sparkle_rainbow, -1), be_const_closure(sparkle_rainbow_closure) }, + { be_const_key_weak(animation_engine, -1), be_const_class(be_class_AnimationEngine) }, + { be_const_key_weak(gradient_animation, 66), be_const_class(be_class_GradientAnimation) }, + { be_const_key_weak(twinkle_gentle, -1), be_const_closure(twinkle_gentle_closure) }, + { be_const_key_weak(pulsating_animation, -1), be_const_closure(pulsating_animation_closure) }, + { be_const_key_weak(TRIANGLE, -1), be_const_int(2) }, + { be_const_key_weak(sparkle_animation, -1), be_const_class(be_class_SparkleAnimation) }, + { be_const_key_weak(jitter_position, -1), be_const_closure(jitter_position_closure) }, + { be_const_key_weak(pulsating_color, -1), be_const_closure(pulsating_color_provider_closure) }, + { be_const_key_weak(sparkle_white, -1), be_const_closure(sparkle_white_closure) }, + { be_const_key_weak(twinkle_intense, 43), be_const_closure(twinkle_intense_closure) }, + { be_const_key_weak(twinkle_classic, 16), be_const_closure(twinkle_classic_closure) }, + { be_const_key_weak(beacon_animation, -1), be_const_class(be_class_BeaconAnimation) }, + { be_const_key_weak(PALETTE_FOREST, -1), be_const_bytes_instance(0000640040228B228032CD32C09AFF9AFF90EE90) }, + { be_const_key_weak(strip_length, -1), be_const_class(be_class_StripLengthProvider) }, + { be_const_key_weak(is_color_provider, 30), be_const_closure(is_color_provider_closure) }, + { be_const_key_weak(ease_out, -1), be_const_closure(ease_out_closure) }, + { be_const_key_weak(COSINE, -1), be_const_int(4) }, { be_const_key_weak(twinkle_animation, -1), be_const_class(be_class_TwinkleAnimation) }, { be_const_key_weak(cosine_osc, -1), be_const_closure(cosine_osc_closure) }, - { be_const_key_weak(shift_animation, -1), be_const_class(be_class_ShiftAnimation) }, - { be_const_key_weak(plasma_rainbow, -1), be_const_closure(plasma_rainbow_closure) }, - { be_const_key_weak(PALETTE_FOREST, -1), be_const_bytes_instance(0000640040228B228032CD32C09AFF9AFF90EE90) }, - { be_const_key_weak(SAWTOOTH, 49), be_const_int(1) }, - { be_const_key_weak(static_value, -1), be_const_class(be_class_StaticValueProvider) }, - { be_const_key_weak(init, -1), be_const_closure(animation_init_closure) }, - { be_const_key_weak(wave_rainbow_sine, 60), be_const_closure(wave_rainbow_sine_closure) }, - { be_const_key_weak(twinkle_classic, -1), be_const_closure(twinkle_classic_closure) }, - { be_const_key_weak(scale_oscillate, -1), be_const_closure(scale_oscillate_closure) }, - { be_const_key_weak(wave_animation, 29), be_const_class(be_class_WaveAnimation) }, - { be_const_key_weak(EASE_OUT, -1), be_const_int(7) }, - { be_const_key_weak(noise_fractal, -1), be_const_closure(noise_fractal_closure) }, - { be_const_key_weak(plasma_fast, 33), be_const_closure(plasma_fast_closure) }, - { be_const_key_weak(jitter_animation, -1), be_const_class(be_class_JitterAnimation) }, - { be_const_key_weak(crenel_position_animation, 43), be_const_class(be_class_CrenelPositionAnimation) }, - { be_const_key_weak(sparkle_rainbow, -1), be_const_closure(sparkle_rainbow_closure) }, - { be_const_key_weak(shift_scroll_left, -1), be_const_closure(shift_scroll_left_closure) }, - { be_const_key_weak(plasma_animation, -1), be_const_class(be_class_PlasmaAnimation) }, - { be_const_key_weak(palette_gradient_animation, -1), be_const_class(be_class_PaletteGradientAnimation) }, - { be_const_key_weak(palette_wave_animation, -1), be_const_class(be_class_PaletteWaveAnimation) }, - { be_const_key_weak(twinkle_rainbow, -1), be_const_closure(twinkle_rainbow_closure) }, - { be_const_key_weak(solid, -1), be_const_closure(solid_closure) }, - { be_const_key_weak(global, 86), be_const_closure(animation_global_closure) }, - { be_const_key_weak(bounce_gravity, 66), be_const_closure(bounce_gravity_closure) }, - { be_const_key_weak(pulsating_color, -1), be_const_closure(pulsating_color_provider_closure) }, - { be_const_key_weak(wave_custom, -1), be_const_closure(wave_custom_closure) }, - { be_const_key_weak(gradient_rainbow_radial, 81), be_const_closure(gradient_rainbow_radial_closure) }, - { be_const_key_weak(SequenceManager, -1), be_const_class(be_class_SequenceManager) }, - { be_const_key_weak(create_stop_step, 116), be_const_closure(create_stop_step_closure) }, - { be_const_key_weak(create_wait_step, -1), be_const_closure(create_wait_step_closure) }, - { be_const_key_weak(ease_in, 72), be_const_closure(ease_in_closure) }, - { be_const_key_weak(palette_meter_animation, -1), be_const_class(be_class_PaletteMeterAnimation) }, - { be_const_key_weak(breathe_animation, -1), be_const_class(be_class_BreatheAnimation) }, - { be_const_key_weak(rich_palette_rainbow, -1), be_const_closure(rich_palette_rainbow_closure) }, - { be_const_key_weak(rich_palette_animation, 102), be_const_class(be_class_RichPaletteAnimation) }, - { be_const_key_weak(shift_scroll_right, -1), be_const_closure(shift_scroll_right_closure) }, - { be_const_key_weak(ramp, -1), be_const_closure(ramp_closure) }, - { be_const_key_weak(TRIANGLE, -1), be_const_int(2) }, - { be_const_key_weak(create_engine, 77), be_const_closure(create_engine_closure) }, - { be_const_key_weak(jitter_position, 27), be_const_closure(jitter_position_closure) }, - { be_const_key_weak(parameterized_object, 16), be_const_class(be_class_ParameterizedObject) }, - { be_const_key_weak(twinkle_solid, -1), be_const_closure(twinkle_solid_closure) }, - { be_const_key_weak(is_value_provider, -1), be_const_closure(is_value_provider_closure) }, - { be_const_key_weak(PALETTE_RAINBOW, -1), be_const_bytes_instance(00FF000024FFA50049FFFF006E00FF00920000FFB74B0082DBEE82EEFFFF0000) }, - { be_const_key_weak(gradient_animation, 69), be_const_class(be_class_GradientAnimation) }, - { be_const_key_weak(version_string, 96), be_const_closure(animation_version_string_closure) }, - { be_const_key_weak(register_user_function, -1), be_const_closure(register_user_function_closure) }, - { be_const_key_weak(beacon_animation, 94), be_const_class(be_class_BeaconAnimation) }, - { be_const_key_weak(frame_buffer, -1), be_const_class(be_class_FrameBuffer) }, - { be_const_key_weak(color_cycle_from_palette, 107), be_const_closure(color_cycle_from_palette_closure) }, - { be_const_key_weak(comet_animation, -1), be_const_class(be_class_CometAnimation) }, - { be_const_key_weak(LINEAR, 71), be_const_int(1) }, - { be_const_key_weak(SINE, -1), be_const_int(5) }, - { be_const_key_weak(event_handler, -1), be_const_class(be_class_EventHandler) }, - { be_const_key_weak(rich_palette, -1), be_const_class(be_class_RichPaletteColorProvider) }, + { be_const_key_weak(comet_animation, 103), be_const_class(be_class_CometAnimation) }, { be_const_key_weak(noise_single_color, -1), be_const_closure(noise_single_color_closure) }, - { be_const_key_weak(get_registered_events, -1), be_const_closure(get_registered_events_closure) }, - { be_const_key_weak(PALETTE_FIRE, 103), be_const_bytes_instance(000000004080000080FF0000C0FF8000FFFFFF00) }, - { be_const_key_weak(get_event_handlers, -1), be_const_closure(get_event_handlers_closure) }, - { be_const_key_weak(color_cycle, 99), be_const_class(be_class_ColorCycleColorProvider) }, - { be_const_key_weak(get_user_function, -1), be_const_closure(get_user_function_closure) }, - { be_const_key_weak(is_user_function, -1), be_const_closure(is_user_function_closure) }, - { be_const_key_weak(EventManager, 85), be_const_class(be_class_EventManager) }, - { be_const_key_weak(bounce_animation, -1), be_const_class(be_class_BounceAnimation) }, - { be_const_key_weak(animation_controller, -1), be_const_closure(animation_controller_closure) }, - { be_const_key_weak(create_closure_value, 10), be_const_closure(create_closure_value_closure) }, - { be_const_key_weak(clear_all_event_handlers, -1), be_const_closure(clear_all_event_handlers_closure) }, - { be_const_key_weak(gradient_rainbow_linear, -1), be_const_closure(gradient_rainbow_linear_closure) }, - { be_const_key_weak(triangle, -1), be_const_closure(triangle_closure) }, - { be_const_key_weak(scale_static, -1), be_const_closure(scale_static_closure) }, - { be_const_key_weak(sparkle_white, -1), be_const_closure(sparkle_white_closure) }, - { be_const_key_weak(noise_rainbow, 75), be_const_closure(noise_rainbow_closure) }, - { be_const_key_weak(sine_osc, -1), be_const_closure(sine_osc_closure) }, - { be_const_key_weak(scale_animation, 64), be_const_class(be_class_ScaleAnimation) }, - { be_const_key_weak(gradient_two_color_linear, -1), be_const_closure(gradient_two_color_linear_closure) }, - { be_const_key_weak(unregister_event_handler, 112), be_const_closure(unregister_event_handler_closure) }, - { be_const_key_weak(square, -1), be_const_closure(square_closure) }, - { be_const_key_weak(register_event_handler, 54), be_const_closure(register_event_handler_closure) }, - { be_const_key_weak(jitter_brightness, -1), be_const_closure(jitter_brightness_closure) }, - { be_const_key_weak(composite_color, -1), be_const_class(be_class_CompositeColorProvider) }, - { be_const_key_weak(jitter_all, -1), be_const_closure(jitter_all_closure) }, - { be_const_key_weak(sawtooth, -1), be_const_closure(sawtooth_closure) }, - { be_const_key_weak(elastic, -1), be_const_closure(elastic_closure) }, - { be_const_key_weak(bounce, 6), be_const_closure(bounce_closure) }, - { be_const_key_weak(shift_fast_scroll, 114), be_const_closure(shift_fast_scroll_closure) }, - { be_const_key_weak(BOUNCE, -1), be_const_int(9) }, - { be_const_key_weak(animation, 17), be_const_class(be_class_Animation) }, - { be_const_key_weak(SQUARE, -1), be_const_int(3) }, - { be_const_key_weak(VERSION, -1), be_const_int(65536) }, - { be_const_key_weak(create_play_step, 34), be_const_closure(create_play_step_closure) }, - { be_const_key_weak(color_cycle_rainbow, -1), be_const_closure(color_cycle_rainbow_closure) }, - { be_const_key_weak(twinkle_gentle, 3), be_const_closure(twinkle_gentle_closure) }, - { be_const_key_weak(palette_pattern_animation, -1), be_const_class(be_class_PalettePatternAnimation) }, - { be_const_key_weak(wave_single_sine, -1), be_const_closure(wave_single_sine_closure) }, - { be_const_key_weak(twinkle_intense, -1), be_const_closure(twinkle_intense_closure) }, + { be_const_key_weak(parameterized_object, -1), be_const_class(be_class_ParameterizedObject) }, + { be_const_key_weak(elastic, 36), be_const_closure(elastic_closure) }, + { be_const_key_weak(init, -1), be_const_closure(animation_init_closure) }, { be_const_key_weak(bounce_constrained, -1), be_const_closure(bounce_constrained_closure) }, - { be_const_key_weak(ease_out, 95), be_const_closure(ease_out_closure) }, - { be_const_key_weak(list_user_functions, 25), be_const_closure(list_user_functions_closure) }, - { be_const_key_weak(scale_grow, -1), be_const_closure(scale_grow_closure) }, - { be_const_key_weak(PALETTE_RGB, 20), be_const_bytes_instance(00FF00008000FF00FF0000FF) }, - { be_const_key_weak(ELASTIC, 48), be_const_int(8) }, - { be_const_key_weak(sparkle_animation, -1), be_const_class(be_class_SparkleAnimation) }, - { be_const_key_weak(static_color, 50), be_const_class(be_class_StaticColorProvider) }, - { be_const_key_weak(is_color_provider, 61), be_const_closure(is_color_provider_closure) }, - { be_const_key_weak(smooth, 2), be_const_closure(smooth_closure) }, - { be_const_key_weak(COSINE, 36), be_const_int(4) }, - { be_const_key_weak(animation_engine, -1), be_const_class(be_class_AnimationEngine) }, - { be_const_key_weak(pulsating_animation, -1), be_const_closure(pulsating_animation_closure) }, + { be_const_key_weak(jitter_animation, -1), be_const_class(be_class_JitterAnimation) }, + { be_const_key_weak(register_event_handler, 112), be_const_closure(register_event_handler_closure) }, + { be_const_key_weak(shift_scroll_left, -1), be_const_closure(shift_scroll_left_closure) }, + { be_const_key_weak(breathe_color, 78), be_const_class(be_class_BreatheColorProvider) }, + { be_const_key_weak(composite_color, -1), be_const_class(be_class_CompositeColorProvider) }, + { be_const_key_weak(BOUNCE, -1), be_const_int(9) }, + { be_const_key_weak(plasma_animation, -1), be_const_class(be_class_PlasmaAnimation) }, + { be_const_key_weak(EASE_OUT, 48), be_const_int(7) }, + { be_const_key_weak(SQUARE, 89), be_const_int(3) }, + { be_const_key_weak(ease_in, 40), be_const_closure(ease_in_closure) }, + { be_const_key_weak(jitter_brightness, -1), be_const_closure(jitter_brightness_closure) }, + { be_const_key_weak(sine_osc, -1), be_const_closure(sine_osc_closure) }, + { be_const_key_weak(twinkle_rainbow, 68), be_const_closure(twinkle_rainbow_closure) }, + { be_const_key_weak(clear_all_event_handlers, -1), be_const_closure(clear_all_event_handlers_closure) }, + { be_const_key_weak(ramp, -1), be_const_closure(ramp_closure) }, + { be_const_key_weak(breathe_animation, -1), be_const_class(be_class_BreatheAnimation) }, + { be_const_key_weak(palette_pattern_animation, 84), be_const_class(be_class_PalettePatternAnimation) }, + { be_const_key_weak(PALETTE_RGB, -1), be_const_bytes_instance(00FF00008000FF00FF0000FF) }, + { be_const_key_weak(crenel_position_animation, -1), be_const_class(be_class_CrenelPositionAnimation) }, + { be_const_key_weak(create_closure_value, -1), be_const_closure(create_closure_value_closure) }, + { be_const_key_weak(init_strip, 34), be_const_closure(animation_init_strip_closure) }, + { be_const_key_weak(square, -1), be_const_closure(square_closure) }, + { be_const_key_weak(bounce_gravity, -1), be_const_closure(bounce_gravity_closure) }, + { be_const_key_weak(shift_fast_scroll, 75), be_const_closure(shift_fast_scroll_closure) }, + { be_const_key_weak(gradient_rainbow_linear, -1), be_const_closure(gradient_rainbow_linear_closure) }, + { be_const_key_weak(smooth, 29), be_const_closure(smooth_closure) }, + { be_const_key_weak(bounce_animation, -1), be_const_class(be_class_BounceAnimation) }, + { be_const_key_weak(gradient_two_color_linear, -1), be_const_closure(gradient_two_color_linear_closure) }, + { be_const_key_weak(get_user_function, 5), be_const_closure(get_user_function_closure) }, + { be_const_key_weak(is_value_provider, 114), be_const_closure(is_value_provider_closure) }, + { be_const_key_weak(version_string, -1), be_const_closure(animation_version_string_closure) }, + { be_const_key_weak(ELASTIC, -1), be_const_int(8) }, + { be_const_key_weak(shift_scroll_right, -1), be_const_closure(shift_scroll_right_closure) }, + { be_const_key_weak(color_provider, 71), be_const_class(be_class_ColorProvider) }, + { be_const_key_weak(register_user_function, 81), be_const_closure(register_user_function_closure) }, + { be_const_key_weak(SequenceManager, -1), be_const_class(be_class_SequenceManager) }, + { be_const_key_weak(is_user_function, -1), be_const_closure(is_user_function_closure) }, + { be_const_key_weak(animation, -1), be_const_class(be_class_Animation) }, + { be_const_key_weak(gradient_rainbow_radial, -1), be_const_closure(gradient_rainbow_radial_closure) }, + { be_const_key_weak(palette_wave_animation, 47), be_const_class(be_class_PaletteWaveAnimation) }, + { be_const_key_weak(LINEAR, 107), be_const_int(1) }, + { be_const_key_weak(event_handler, -1), be_const_class(be_class_EventHandler) }, + { be_const_key_weak(PALETTE_FIRE, 111), be_const_bytes_instance(000000004080000080FF0000C0FF8000FFFFFF00) }, + { be_const_key_weak(EventManager, 63), be_const_class(be_class_EventManager) }, + { be_const_key_weak(noise_rainbow, -1), be_const_closure(noise_rainbow_closure) }, + { be_const_key_weak(wave_animation, 94), be_const_class(be_class_WaveAnimation) }, + { be_const_key_weak(get_event_handlers, -1), be_const_closure(get_event_handlers_closure) }, + { be_const_key_weak(create_engine, -1), be_const_closure(create_engine_closure) }, + { be_const_key_weak(scale_grow, 80), be_const_closure(scale_grow_closure) }, + { be_const_key_weak(wave_custom, -1), be_const_closure(wave_custom_closure) }, + { be_const_key_weak(shift_animation, -1), be_const_class(be_class_ShiftAnimation) }, + { be_const_key_weak(bounce_basic, -1), be_const_closure(bounce_basic_closure) }, + { be_const_key_weak(sawtooth, -1), be_const_closure(sawtooth_closure) }, + { be_const_key_weak(PALETTE_OCEAN, -1), be_const_bytes_instance(00000080400000FF8000FFFFC000FF80FF008000) }, + { be_const_key_weak(static_value, -1), be_const_class(be_class_StaticValueProvider) }, + { be_const_key_weak(plasma_fast, 120), be_const_closure(plasma_fast_closure) }, + { be_const_key_weak(plasma_rainbow, -1), be_const_closure(plasma_rainbow_closure) }, + { be_const_key_weak(solid, 26), be_const_closure(solid_closure) }, + { be_const_key_weak(twinkle_solid, 20), be_const_closure(twinkle_solid_closure) }, + { be_const_key_weak(linear, -1), be_const_closure(linear_closure) }, + { be_const_key_weak(jitter_color, -1), be_const_closure(jitter_color_closure) }, + { be_const_key_weak(noise_animation, -1), be_const_class(be_class_NoiseAnimation) }, + { be_const_key_weak(jitter_all, -1), be_const_closure(jitter_all_closure) }, + { be_const_key_weak(unregister_event_handler, 9), be_const_closure(unregister_event_handler_closure) }, + { be_const_key_weak(palette_meter_animation, -1), be_const_class(be_class_PaletteMeterAnimation) }, + { be_const_key_weak(trigger_event, 35), be_const_closure(trigger_event_closure) }, + { be_const_key_weak(SAWTOOTH, -1), be_const_int(1) }, + { be_const_key_weak(frame_buffer, -1), be_const_class(be_class_FrameBuffer) }, + { be_const_key_weak(global, -1), be_const_closure(animation_global_closure) }, + { be_const_key_weak(bounce, 118), be_const_closure(bounce_closure) }, + { be_const_key_weak(list_user_functions, 70), be_const_closure(list_user_functions_closure) }, + { be_const_key_weak(PALETTE_SUNSET_TICKS, -1), be_const_bytes_instance(28FF450028FF8C0028FFD70028FF69B4288000802819197000000080) }, + { be_const_key_weak(EASE_IN, -1), be_const_int(6) }, + { be_const_key_weak(oscillator_value, -1), be_const_class(be_class_OscillatorValueProvider) }, + { be_const_key_weak(scale_static, -1), be_const_closure(scale_static_closure) }, + { be_const_key_weak(wave_rainbow_sine, -1), be_const_closure(wave_rainbow_sine_closure) }, + { be_const_key_weak(wave_single_sine, 10), be_const_closure(wave_single_sine_closure) }, + { be_const_key_weak(SINE, -1), be_const_int(5) }, + { be_const_key_weak(VERSION, -1), be_const_int(65536) }, + { be_const_key_weak(closure_value, -1), be_const_class(be_class_ClosureValueProvider) }, + { be_const_key_weak(scale_oscillate, 3), be_const_closure(scale_oscillate_closure) }, + { be_const_key_weak(rich_palette_rainbow, 95), be_const_closure(rich_palette_rainbow_closure) }, + { be_const_key_weak(get_registered_events, -1), be_const_closure(get_registered_events_closure) }, + { be_const_key_weak(noise_fractal, -1), be_const_closure(noise_fractal_closure) }, + { be_const_key_weak(fire_animation, -1), be_const_class(be_class_FireAnimation) }, + { be_const_key_weak(triangle, 32), be_const_closure(triangle_closure) }, + { be_const_key_weak(PALETTE_RAINBOW, -1), be_const_bytes_instance(00FF000024FFA50049FFFF006E00FF00920000FFB74B0082DBEE82EEFFFF0000) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(animation); diff --git a/lib/libesp32/berry_animation/src/solidify/solidified_animation_dsl.h b/lib/libesp32/berry_animation/src/solidify/solidified_animation_dsl.h index e473b663b..ead1413eb 100644 --- a/lib/libesp32/berry_animation/src/solidify/solidified_animation_dsl.h +++ b/lib/libesp32/berry_animation/src/solidify/solidified_animation_dsl.h @@ -5,17 +5,17 @@ #include "be_constobj.h" // compact class 'DSLRuntime' ktab size: 26, total: 45 (saved 152 bytes) static const bvalue be_ktab_class_DSLRuntime[26] = { - /* K0 */ be_nested_str_weak(engine), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(debug_mode), - /* K3 */ be_nested_str_weak(DSL_X3A_X20Empty_X20source_X20code), - /* K4 */ be_nested_str_weak(DSL_X3A_X20Compiling_X20source_X2E_X2E_X2E), - /* K5 */ be_nested_str_weak(animation_dsl), - /* K6 */ be_nested_str_weak(compile), - /* K7 */ be_nested_str_weak(execute_berry_code), - /* K8 */ be_nested_str_weak(dsl_compilation_error), - /* K9 */ be_nested_str_weak(DSL_X3A_X20Compilation_X20failed_X20_X2D_X20), - /* K10 */ be_nested_str_weak(active_source), + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(debug_mode), + /* K2 */ be_nested_str_weak(DSL_X3A_X20Empty_X20source_X20code), + /* K3 */ be_nested_str_weak(DSL_X3A_X20Compiling_X20source_X2E_X2E_X2E), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(compile), + /* K6 */ be_nested_str_weak(execute_berry_code), + /* K7 */ be_nested_str_weak(dsl_compilation_error), + /* K8 */ be_nested_str_weak(DSL_X3A_X20Compilation_X20failed_X20_X2D_X20), + /* K9 */ be_nested_str_weak(active_source), + /* K10 */ be_nested_str_weak(engine), /* K11 */ be_nested_str_weak(r), /* K12 */ be_nested_str_weak(DSL_X3A_X20Cannot_X20open_X20file_X20_X25s), /* K13 */ be_nested_str_weak(read), @@ -36,31 +36,6 @@ static const bvalue be_ktab_class_DSLRuntime[26] = { extern const bclass be_class_DSLRuntime; -/******************************************************************** -** Solidified function: get_controller -********************************************************************/ -be_local_closure(class_DSLRuntime_get_controller, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_DSLRuntime, /* shared constants */ - be_str_weak(get_controller), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: load_dsl ********************************************************************/ @@ -84,26 +59,26 @@ be_local_closure(class_DSLRuntime_load_dsl, /* name */ 0x6008000C, // 0003 GETGBL R2 G12 0x5C0C0200, // 0004 MOVE R3 R1 0x7C080200, // 0005 CALL R2 1 - 0x1C080501, // 0006 EQ R2 R2 K1 + 0x1C080500, // 0006 EQ R2 R2 K0 0x780A0006, // 0007 JMPF R2 #000F - 0x88080102, // 0008 GETMBR R2 R0 K2 + 0x88080101, // 0008 GETMBR R2 R0 K1 0x780A0002, // 0009 JMPF R2 #000D 0x60080001, // 000A GETGBL R2 G1 - 0x580C0003, // 000B LDCONST R3 K3 + 0x580C0002, // 000B LDCONST R3 K2 0x7C080200, // 000C CALL R2 1 0x50080000, // 000D LDBOOL R2 0 0 0x80040400, // 000E RET 1 R2 - 0x88080102, // 000F GETMBR R2 R0 K2 + 0x88080101, // 000F GETMBR R2 R0 K1 0x780A0002, // 0010 JMPF R2 #0014 0x60080001, // 0011 GETGBL R2 G1 - 0x580C0004, // 0012 LDCONST R3 K4 + 0x580C0003, // 0012 LDCONST R3 K3 0x7C080200, // 0013 CALL R2 1 0xA802000B, // 0014 EXBLK 0 #0021 - 0xB80A0A00, // 0015 GETNGBL R2 K5 - 0x8C080506, // 0016 GETMET R2 R2 K6 + 0xB80A0800, // 0015 GETNGBL R2 K4 + 0x8C080505, // 0016 GETMET R2 R2 K5 0x5C100200, // 0017 MOVE R4 R1 0x7C080400, // 0018 CALL R2 2 - 0x8C0C0107, // 0019 GETMET R3 R0 K7 + 0x8C0C0106, // 0019 GETMET R3 R0 K6 0x5C140400, // 001A MOVE R5 R2 0x5C180200, // 001B MOVE R6 R1 0x7C0C0600, // 001C CALL R3 3 @@ -111,13 +86,13 @@ be_local_closure(class_DSLRuntime_load_dsl, /* name */ 0x80040600, // 001E RET 1 R3 0xA8040001, // 001F EXBLK 1 1 0x7002000B, // 0020 JMP #002D - 0x58080008, // 0021 LDCONST R2 K8 + 0x58080007, // 0021 LDCONST R2 K7 0xAC080202, // 0022 CATCH R2 1 2 0x70020007, // 0023 JMP #002C - 0x88100102, // 0024 GETMBR R4 R0 K2 + 0x88100101, // 0024 GETMBR R4 R0 K1 0x78120002, // 0025 JMPF R4 #0029 0x60100001, // 0026 GETGBL R4 G1 - 0x00161203, // 0027 ADD R5 K9 R3 + 0x00161003, // 0027 ADD R5 K8 R3 0x7C100200, // 0028 CALL R4 1 0x50100000, // 0029 LDBOOL R4 0 0 0x80040800, // 002A RET 1 R4 @@ -147,7 +122,7 @@ be_local_closure(class_DSLRuntime_get_active_source, /* name */ be_str_weak(get_active_source), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x8804010A, // 0000 GETMBR R1 R0 K10 + 0x88040109, // 0000 GETMBR R1 R0 K9 0x80040200, // 0001 RET 1 R1 }) ) @@ -172,16 +147,16 @@ be_local_closure(class_DSLRuntime_init, /* name */ be_str_weak(init), &be_const_str_solidified, ( &(const binstruction[11]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90021401, // 0000 SETMBR R0 K10 R1 0x4C0C0000, // 0001 LDNIL R3 - 0x90021403, // 0002 SETMBR R0 K10 R3 + 0x90021203, // 0002 SETMBR R0 K9 R3 0x4C0C0000, // 0003 LDNIL R3 0x200C0403, // 0004 NE R3 R2 R3 0x780E0001, // 0005 JMPF R3 #0008 0x5C0C0400, // 0006 MOVE R3 R2 0x70020000, // 0007 JMP #0009 0x500C0000, // 0008 LDBOOL R3 0 0 - 0x90020403, // 0009 SETMBR R0 K2 R3 + 0x90020203, // 0009 SETMBR R0 K1 R3 0x80000000, // 000A RET 0 }) ) @@ -214,7 +189,7 @@ be_local_closure(class_DSLRuntime_load_dsl_file, /* name */ 0x4C0C0000, // 0005 LDNIL R3 0x1C0C0403, // 0006 EQ R3 R2 R3 0x780E000A, // 0007 JMPF R3 #0013 - 0x880C0102, // 0008 GETMBR R3 R0 K2 + 0x880C0101, // 0008 GETMBR R3 R0 K1 0x780E0005, // 0009 JMPF R3 #0010 0x600C0001, // 000A GETGBL R3 G1 0x60100018, // 000B GETGBL R4 G24 @@ -229,7 +204,7 @@ be_local_closure(class_DSLRuntime_load_dsl_file, /* name */ 0x7C0C0200, // 0014 CALL R3 1 0x8C10050E, // 0015 GETMET R4 R2 K14 0x7C100200, // 0016 CALL R4 1 - 0x88100102, // 0017 GETMBR R4 R0 K2 + 0x88100101, // 0017 GETMBR R4 R0 K1 0x78120008, // 0018 JMPF R4 #0022 0x60100001, // 0019 GETGBL R4 G1 0x60140018, // 001A GETGBL R5 G24 @@ -249,7 +224,7 @@ be_local_closure(class_DSLRuntime_load_dsl_file, /* name */ 0x7002000D, // 0028 JMP #0037 0xAC080002, // 0029 CATCH R2 0 2 0x7002000A, // 002A JMP #0036 - 0x88100102, // 002B GETMBR R4 R0 K2 + 0x88100101, // 002B GETMBR R4 R0 K1 0x78120005, // 002C JMPF R4 #0033 0x60100001, // 002D GETGBL R4 G1 0x60140018, // 002E GETGBL R5 G24 @@ -268,6 +243,31 @@ be_local_closure(class_DSLRuntime_load_dsl_file, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: get_engine +********************************************************************/ +be_local_closure(class_DSLRuntime_get_engine, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_DSLRuntime, /* shared constants */ + be_str_weak(get_engine), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x8804010A, // 0000 GETMBR R1 R0 K10 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_generated_code ********************************************************************/ @@ -288,25 +288,25 @@ be_local_closure(class_DSLRuntime_get_generated_code, /* name */ 0x4C080000, // 0000 LDNIL R2 0x1C080202, // 0001 EQ R2 R1 R2 0x780A0000, // 0002 JMPF R2 #0004 - 0x8804010A, // 0003 GETMBR R1 R0 K10 + 0x88040109, // 0003 GETMBR R1 R0 K9 0x4C080000, // 0004 LDNIL R2 0x1C080202, // 0005 EQ R2 R1 R2 0x780A0001, // 0006 JMPF R2 #0009 0x4C080000, // 0007 LDNIL R2 0x80040400, // 0008 RET 1 R2 0xA8020007, // 0009 EXBLK 0 #0012 - 0xB80A0A00, // 000A GETNGBL R2 K5 - 0x8C080506, // 000B GETMET R2 R2 K6 + 0xB80A0800, // 000A GETNGBL R2 K4 + 0x8C080505, // 000B GETMET R2 R2 K5 0x5C100200, // 000C MOVE R4 R1 0x7C080400, // 000D CALL R2 2 0xA8040001, // 000E EXBLK 1 1 0x80040400, // 000F RET 1 R2 0xA8040001, // 0010 EXBLK 1 1 0x7002000B, // 0011 JMP #001E - 0x58080008, // 0012 LDCONST R2 K8 + 0x58080007, // 0012 LDCONST R2 K7 0xAC080202, // 0013 CATCH R2 1 2 0x70020007, // 0014 JMP #001D - 0x88100102, // 0015 GETMBR R4 R0 K2 + 0x88100101, // 0015 GETMBR R4 R0 K1 0x78120002, // 0016 JMPF R4 #001A 0x60100001, // 0017 GETGBL R4 G1 0x00162403, // 0018 ADD R5 K18 R3 @@ -339,30 +339,30 @@ be_local_closure(class_DSLRuntime_reload_dsl, /* name */ be_str_weak(reload_dsl), &be_const_str_solidified, ( &(const binstruction[26]) { /* code */ - 0x8804010A, // 0000 GETMBR R1 R0 K10 + 0x88040109, // 0000 GETMBR R1 R0 K9 0x4C080000, // 0001 LDNIL R2 0x1C040202, // 0002 EQ R1 R1 R2 0x78060006, // 0003 JMPF R1 #000B - 0x88040102, // 0004 GETMBR R1 R0 K2 + 0x88040101, // 0004 GETMBR R1 R0 K1 0x78060002, // 0005 JMPF R1 #0009 0x60040001, // 0006 GETGBL R1 G1 0x58080013, // 0007 LDCONST R2 K19 0x7C040200, // 0008 CALL R1 1 0x50040000, // 0009 LDBOOL R1 0 0 0x80040200, // 000A RET 1 R1 - 0x88040102, // 000B GETMBR R1 R0 K2 + 0x88040101, // 000B GETMBR R1 R0 K1 0x78060002, // 000C JMPF R1 #0010 0x60040001, // 000D GETGBL R1 G1 0x58080014, // 000E LDCONST R2 K20 0x7C040200, // 000F CALL R1 1 - 0x88040100, // 0010 GETMBR R1 R0 K0 + 0x8804010A, // 0010 GETMBR R1 R0 K10 0x8C040315, // 0011 GETMET R1 R1 K21 0x7C040200, // 0012 CALL R1 1 - 0x88040100, // 0013 GETMBR R1 R0 K0 + 0x8804010A, // 0013 GETMBR R1 R0 K10 0x8C040316, // 0014 GETMET R1 R1 K22 0x7C040200, // 0015 CALL R1 1 0x8C040110, // 0016 GETMET R1 R0 K16 - 0x880C010A, // 0017 GETMBR R3 R0 K10 + 0x880C0109, // 0017 GETMBR R3 R0 K9 0x7C040400, // 0018 CALL R1 2 0x80040200, // 0019 RET 1 R1 }) @@ -389,10 +389,10 @@ be_local_closure(class_DSLRuntime_execute_berry_code, /* name */ &be_const_str_solidified, ( &(const binstruction[49]) { /* code */ 0xA8020020, // 0000 EXBLK 0 #0022 - 0x880C0100, // 0001 GETMBR R3 R0 K0 + 0x880C010A, // 0001 GETMBR R3 R0 K10 0x8C0C0715, // 0002 GETMET R3 R3 K21 0x7C0C0200, // 0003 CALL R3 1 - 0x880C0100, // 0004 GETMBR R3 R0 K0 + 0x880C010A, // 0004 GETMBR R3 R0 K10 0x8C0C0716, // 0005 GETMET R3 R3 K22 0x7C0C0200, // 0006 CALL R3 1 0x600C000D, // 0007 GETGBL R3 G13 @@ -401,7 +401,7 @@ be_local_closure(class_DSLRuntime_execute_berry_code, /* name */ 0x4C100000, // 000A LDNIL R4 0x1C100604, // 000B EQ R4 R3 R4 0x78120007, // 000C JMPF R4 #0015 - 0x88100102, // 000D GETMBR R4 R0 K2 + 0x88100101, // 000D GETMBR R4 R0 K1 0x78120002, // 000E JMPF R4 #0012 0x60100001, // 000F GETGBL R4 G1 0x58140017, // 0010 LDCONST R5 K23 @@ -411,8 +411,8 @@ be_local_closure(class_DSLRuntime_execute_berry_code, /* name */ 0x80040800, // 0014 RET 1 R4 0x5C100600, // 0015 MOVE R4 R3 0x7C100000, // 0016 CALL R4 0 - 0x90021402, // 0017 SETMBR R0 K10 R2 - 0x88100102, // 0018 GETMBR R4 R0 K2 + 0x90021202, // 0017 SETMBR R0 K9 R2 + 0x88100101, // 0018 GETMBR R4 R0 K1 0x78120002, // 0019 JMPF R4 #001D 0x60100001, // 001A GETGBL R4 G1 0x58140018, // 001B LDCONST R5 K24 @@ -424,7 +424,7 @@ be_local_closure(class_DSLRuntime_execute_berry_code, /* name */ 0x7002000D, // 0021 JMP #0030 0xAC0C0002, // 0022 CATCH R3 0 2 0x7002000A, // 0023 JMP #002F - 0x88140102, // 0024 GETMBR R5 R0 K2 + 0x88140101, // 0024 GETMBR R5 R0 K1 0x78160005, // 0025 JMPF R5 #002C 0x60140001, // 0026 GETGBL R5 G1 0x60180018, // 0027 GETGBL R6 G24 @@ -460,7 +460,7 @@ be_local_closure(class_DSLRuntime_is_loaded, /* name */ be_str_weak(is_loaded), &be_const_str_solidified, ( &(const binstruction[ 4]) { /* code */ - 0x8804010A, // 0000 GETMBR R1 R0 K10 + 0x88040109, // 0000 GETMBR R1 R0 K9 0x4C080000, // 0001 LDNIL R2 0x20040202, // 0002 NE R1 R1 R2 0x80040200, // 0003 RET 1 R1 @@ -478,18 +478,18 @@ be_local_class(DSLRuntime, NULL, be_nested_map(12, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(get_controller, -1), be_const_closure(class_DSLRuntime_get_controller_closure) }, + { be_const_key_weak(is_loaded, -1), be_const_closure(class_DSLRuntime_is_loaded_closure) }, { be_const_key_weak(load_dsl, -1), be_const_closure(class_DSLRuntime_load_dsl_closure) }, { be_const_key_weak(get_active_source, -1), be_const_closure(class_DSLRuntime_get_active_source_closure) }, { be_const_key_weak(init, -1), be_const_closure(class_DSLRuntime_init_closure) }, { be_const_key_weak(load_dsl_file, -1), be_const_closure(class_DSLRuntime_load_dsl_file_closure) }, { be_const_key_weak(active_source, -1), be_const_var(1) }, - { be_const_key_weak(is_loaded, -1), be_const_closure(class_DSLRuntime_is_loaded_closure) }, + { be_const_key_weak(get_engine, -1), be_const_closure(class_DSLRuntime_get_engine_closure) }, { be_const_key_weak(get_generated_code, -1), be_const_closure(class_DSLRuntime_get_generated_code_closure) }, { be_const_key_weak(reload_dsl, -1), be_const_closure(class_DSLRuntime_reload_dsl_closure) }, { be_const_key_weak(execute_berry_code, -1), be_const_closure(class_DSLRuntime_execute_berry_code_closure) }, { be_const_key_weak(debug_mode, -1), be_const_var(2) }, - { be_const_key_weak(engine, 6), be_const_var(0) }, + { be_const_key_weak(engine, 0), be_const_var(0) }, })), be_str_weak(DSLRuntime) ); @@ -2353,11 +2353,11 @@ be_local_closure(create_eof_token, /* name */ extern const bclass be_class_SimpleDSLTranspiler; /******************************************************************** -** Solidified function: is_computed_expression_string +** Solidified function: process_named_arguments_for_variable ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_is_computed_expression_string, /* name */ +be_local_closure(class_SimpleDSLTranspiler_process_named_arguments_for_variable, /* name */ be_nested_proto( - 12, /* nstack */ + 16, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2365,325 +2365,177 @@ be_local_closure(class_SimpleDSLTranspiler_is_computed_expression_string, /* n 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(_X20_X2B_X20), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(_X20_X2D_X20), - /* K5 */ be_nested_str_weak(_X20_X2A_X20), - /* K6 */ be_nested_str_weak(_X20_X2F_X20), - /* K7 */ be_nested_str_weak(_X28), - /* K8 */ be_const_int(1), - /* K9 */ be_nested_str_weak(is_identifier_char), - /* K10 */ be_nested_str_weak(_is_simple_function_call), - }), - be_str_weak(is_computed_expression_string), - &be_const_str_solidified, - ( &(const binstruction[63]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x7C0C0600, // 0004 CALL R3 3 - 0x280C0703, // 0005 GE R3 R3 K3 - 0x740E0012, // 0006 JMPT R3 #001A - 0x8C0C0501, // 0007 GETMET R3 R2 K1 - 0x5C140200, // 0008 MOVE R5 R1 - 0x58180004, // 0009 LDCONST R6 K4 - 0x7C0C0600, // 000A CALL R3 3 - 0x280C0703, // 000B GE R3 R3 K3 - 0x740E000C, // 000C JMPT R3 #001A - 0x8C0C0501, // 000D GETMET R3 R2 K1 - 0x5C140200, // 000E MOVE R5 R1 - 0x58180005, // 000F LDCONST R6 K5 - 0x7C0C0600, // 0010 CALL R3 3 - 0x280C0703, // 0011 GE R3 R3 K3 - 0x740E0006, // 0012 JMPT R3 #001A - 0x8C0C0501, // 0013 GETMET R3 R2 K1 - 0x5C140200, // 0014 MOVE R5 R1 - 0x58180006, // 0015 LDCONST R6 K6 - 0x7C0C0600, // 0016 CALL R3 3 - 0x280C0703, // 0017 GE R3 R3 K3 - 0x740E0000, // 0018 JMPT R3 #001A - 0x500C0001, // 0019 LDBOOL R3 0 1 - 0x500C0200, // 001A LDBOOL R3 1 0 - 0x50100000, // 001B LDBOOL R4 0 0 - 0x8C140501, // 001C GETMET R5 R2 K1 - 0x5C1C0200, // 001D MOVE R7 R1 - 0x58200007, // 001E LDCONST R8 K7 - 0x7C140600, // 001F CALL R5 3 - 0x24180B03, // 0020 GT R6 R5 K3 - 0x781A0017, // 0021 JMPF R6 #003A - 0x04180B08, // 0022 SUB R6 R5 K8 - 0x94180206, // 0023 GETIDX R6 R1 R6 - 0x8C1C0109, // 0024 GETMET R7 R0 K9 - 0x5C240C00, // 0025 MOVE R9 R6 - 0x7C1C0400, // 0026 CALL R7 2 - 0x781E0011, // 0027 JMPF R7 #003A - 0x041C0B08, // 0028 SUB R7 R5 K8 - 0x28200F03, // 0029 GE R8 R7 K3 - 0x78220005, // 002A JMPF R8 #0031 - 0x8C200109, // 002B GETMET R8 R0 K9 - 0x94280207, // 002C GETIDX R10 R1 R7 - 0x7C200400, // 002D CALL R8 2 - 0x78220001, // 002E JMPF R8 #0031 - 0x041C0F08, // 002F SUB R7 R7 K8 - 0x7001FFF7, // 0030 JMP #0029 - 0x001C0F08, // 0031 ADD R7 R7 K8 - 0x04200B08, // 0032 SUB R8 R5 K8 - 0x40200E08, // 0033 CONNECT R8 R7 R8 - 0x94200208, // 0034 GETIDX R8 R1 R8 - 0x8C24010A, // 0035 GETMET R9 R0 K10 - 0x5C2C1000, // 0036 MOVE R11 R8 - 0x7C240400, // 0037 CALL R9 2 - 0x74260000, // 0038 JMPT R9 #003A - 0x50100200, // 0039 LDBOOL R4 1 0 - 0x740E0001, // 003A JMPT R3 #003D - 0x74120000, // 003B JMPT R4 #003D - 0x50180001, // 003C LDBOOL R6 0 1 - 0x50180200, // 003D LDBOOL R6 1 0 - 0x80040C00, // 003E RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_function_arguments_for_expression -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_function_arguments_for_expression, /* 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[20]) { /* constants */ + ( &(const bvalue[33]) { /* constants */ /* K0 */ be_nested_str_weak(expect_left_paren), - /* K1 */ be_nested_str_weak(at_end), - /* K2 */ be_nested_str_weak(check_right_paren), - /* K3 */ be_nested_str_weak(skip_whitespace), - /* K4 */ be_nested_str_weak(process_expression_argument), - /* K5 */ be_nested_str_weak(push), - /* K6 */ be_nested_str_weak(current), - /* K7 */ be_nested_str_weak(type), - /* K8 */ be_nested_str_weak(animation_dsl), - /* K9 */ be_nested_str_weak(Token), - /* K10 */ be_nested_str_weak(COMMA), - /* K11 */ be_nested_str_weak(next), - /* K12 */ be_nested_str_weak(error), - /* K13 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), - /* K14 */ be_nested_str_weak(expect_right_paren), - /* K15 */ be_nested_str_weak(), - /* K16 */ be_const_int(0), - /* K17 */ be_const_int(1), - /* K18 */ be_nested_str_weak(_X2C_X20), - /* K19 */ be_nested_str_weak(stop_iteration), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(string), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(temp_), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(split), + /* K7 */ be_nested_str_weak(_), + /* K8 */ be_const_int(2), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(_create_instance_for_validation), + /* K11 */ be_nested_str_weak(at_end), + /* K12 */ be_nested_str_weak(check_right_paren), + /* K13 */ be_nested_str_weak(skip_whitespace_including_newlines), + /* K14 */ be_nested_str_weak(expect_identifier), + /* K15 */ be_nested_str_weak(_validate_single_parameter), + /* K16 */ be_nested_str_weak(expect_assign), + /* K17 */ be_nested_str_weak(process_value), + /* K18 */ be_nested_str_weak(argument), + /* K19 */ be_nested_str_weak(collect_inline_comment), + /* K20 */ be_nested_str_weak(add), + /* K21 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), + /* K22 */ be_nested_str_weak(current), + /* K23 */ be_nested_str_weak(type), + /* K24 */ be_nested_str_weak(animation_dsl), + /* K25 */ be_nested_str_weak(Token), + /* K26 */ be_nested_str_weak(COMMENT), + /* K27 */ be_nested_str_weak(next), + /* K28 */ be_nested_str_weak(COMMA), + /* K29 */ be_nested_str_weak(NEWLINE), + /* K30 */ be_nested_str_weak(error), + /* K31 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), + /* K32 */ be_nested_str_weak(expect_right_paren), }), - be_str_weak(process_function_arguments_for_expression), + be_str_weak(process_named_arguments_for_variable), &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x60040012, // 0002 GETGBL R1 G18 - 0x7C040000, // 0003 CALL R1 0 - 0x8C080101, // 0004 GETMET R2 R0 K1 - 0x7C080200, // 0005 CALL R2 1 - 0x740A0029, // 0006 JMPT R2 #0031 - 0x8C080102, // 0007 GETMET R2 R0 K2 - 0x7C080200, // 0008 CALL R2 1 - 0x740A0026, // 0009 JMPT R2 #0031 - 0x8C080103, // 000A GETMET R2 R0 K3 - 0x7C080200, // 000B CALL R2 1 - 0x8C080102, // 000C GETMET R2 R0 K2 - 0x7C080200, // 000D CALL R2 1 - 0x780A0000, // 000E JMPF R2 #0010 - 0x70020020, // 000F JMP #0031 - 0x8C080104, // 0010 GETMET R2 R0 K4 - 0x7C080200, // 0011 CALL R2 1 - 0x8C0C0305, // 0012 GETMET R3 R1 K5 - 0x5C140400, // 0013 MOVE R5 R2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x8C0C0103, // 0015 GETMET R3 R0 K3 - 0x7C0C0200, // 0016 CALL R3 1 - 0x8C0C0106, // 0017 GETMET R3 R0 K6 - 0x7C0C0200, // 0018 CALL R3 1 - 0x4C100000, // 0019 LDNIL R4 - 0x200C0604, // 001A NE R3 R3 R4 - 0x780E000C, // 001B JMPF R3 #0029 - 0x8C0C0106, // 001C GETMET R3 R0 K6 - 0x7C0C0200, // 001D CALL R3 1 - 0x880C0707, // 001E GETMBR R3 R3 K7 - 0xB8121000, // 001F GETNGBL R4 K8 - 0x88100909, // 0020 GETMBR R4 R4 K9 - 0x8810090A, // 0021 GETMBR R4 R4 K10 - 0x1C0C0604, // 0022 EQ R3 R3 R4 - 0x780E0004, // 0023 JMPF R3 #0029 - 0x8C0C010B, // 0024 GETMET R3 R0 K11 - 0x7C0C0200, // 0025 CALL R3 1 - 0x8C0C0103, // 0026 GETMET R3 R0 K3 - 0x7C0C0200, // 0027 CALL R3 1 - 0x70020006, // 0028 JMP #0030 - 0x8C0C0102, // 0029 GETMET R3 R0 K2 - 0x7C0C0200, // 002A CALL R3 1 - 0x740E0003, // 002B JMPT R3 #0030 - 0x8C0C010C, // 002C GETMET R3 R0 K12 - 0x5814000D, // 002D LDCONST R5 K13 - 0x7C0C0400, // 002E CALL R3 2 - 0x70020000, // 002F JMP #0031 - 0x7001FFD2, // 0030 JMP #0004 - 0x8C08010E, // 0031 GETMET R2 R0 K14 - 0x7C080200, // 0032 CALL R2 1 - 0x5808000F, // 0033 LDCONST R2 K15 - 0x600C0010, // 0034 GETGBL R3 G16 - 0x6010000C, // 0035 GETGBL R4 G12 - 0x5C140200, // 0036 MOVE R5 R1 - 0x7C100200, // 0037 CALL R4 1 - 0x04100911, // 0038 SUB R4 R4 K17 - 0x40122004, // 0039 CONNECT R4 K16 R4 - 0x7C0C0200, // 003A CALL R3 1 - 0xA8020007, // 003B EXBLK 0 #0044 - 0x5C100600, // 003C MOVE R4 R3 - 0x7C100000, // 003D CALL R4 0 - 0x24140910, // 003E GT R5 R4 K16 - 0x78160000, // 003F JMPF R5 #0041 - 0x00080512, // 0040 ADD R2 R2 K18 - 0x94140204, // 0041 GETIDX R5 R1 R4 - 0x00080405, // 0042 ADD R2 R2 R5 - 0x7001FFF7, // 0043 JMP #003C - 0x580C0013, // 0044 LDCONST R3 K19 - 0xAC0C0200, // 0045 CATCH R3 1 0 - 0xB0080000, // 0046 RAISE 2 R0 R0 - 0x80040400, // 0047 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_right_brace -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_right_brace, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_BRACE), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X7D_X27), - }), - be_str_weak(expect_right_brace), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_identifier -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_identifier, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(IDENTIFIER), - /* K5 */ be_nested_str_weak(COLOR), - /* K6 */ be_nested_str_weak(KEYWORD), - /* K7 */ be_nested_str_weak(can_use_as_identifier), - /* K8 */ be_nested_str_weak(value), - /* K9 */ be_nested_str_weak(next), - /* K10 */ be_nested_str_weak(error), - /* K11 */ be_nested_str_weak(Expected_X20identifier), - /* K12 */ be_nested_str_weak(unknown), - }), - be_str_weak(expect_identifier), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A001A, // 0004 JMPF R2 #0020 - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x740A000F, // 000A JMPT R2 #001B - 0x88080301, // 000B GETMBR R2 R1 K1 - 0xB80E0400, // 000C GETNGBL R3 K2 - 0x880C0703, // 000D GETMBR R3 R3 K3 - 0x880C0705, // 000E GETMBR R3 R3 K5 - 0x1C080403, // 000F EQ R2 R2 R3 - 0x740A0009, // 0010 JMPT R2 #001B - 0x88080301, // 0011 GETMBR R2 R1 K1 - 0xB80E0400, // 0012 GETNGBL R3 K2 - 0x880C0703, // 0013 GETMBR R3 R3 K3 - 0x880C0706, // 0014 GETMBR R3 R3 K6 - 0x1C080403, // 0015 EQ R2 R2 R3 - 0x780A0008, // 0016 JMPF R2 #0020 - 0x8C080107, // 0017 GETMET R2 R0 K7 - 0x88100308, // 0018 GETMBR R4 R1 K8 - 0x7C080400, // 0019 CALL R2 2 - 0x780A0004, // 001A JMPF R2 #0020 - 0x88080308, // 001B GETMBR R2 R1 K8 - 0x8C0C0109, // 001C GETMET R3 R0 K9 - 0x7C0C0200, // 001D CALL R3 1 - 0x80040400, // 001E RET 1 R2 - 0x70020003, // 001F JMP #0024 - 0x8C08010A, // 0020 GETMET R2 R0 K10 - 0x5810000B, // 0021 LDCONST R4 K11 - 0x7C080400, // 0022 CALL R2 2 - 0x80061800, // 0023 RET 1 K12 - 0x80000000, // 0024 RET 0 + ( &(const binstruction[133]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x58080001, // 0002 LDCONST R2 K1 + 0xA40E0400, // 0003 IMPORT R3 K2 + 0x8C100703, // 0004 GETMET R4 R3 K3 + 0x5C180200, // 0005 MOVE R6 R1 + 0x581C0004, // 0006 LDCONST R7 K4 + 0x7C100600, // 0007 CALL R4 3 + 0x1C100905, // 0008 EQ R4 R4 K5 + 0x78120009, // 0009 JMPF R4 #0014 + 0x8C100706, // 000A GETMET R4 R3 K6 + 0x5C180200, // 000B MOVE R6 R1 + 0x581C0007, // 000C LDCONST R7 K7 + 0x7C100600, // 000D CALL R4 3 + 0x6014000C, // 000E GETGBL R5 G12 + 0x5C180800, // 000F MOVE R6 R4 + 0x7C140200, // 0010 CALL R5 1 + 0x28140B08, // 0011 GE R5 R5 K8 + 0x78160000, // 0012 JMPF R5 #0014 + 0x94080909, // 0013 GETIDX R2 R4 K9 + 0x4C100000, // 0014 LDNIL R4 + 0x20140501, // 0015 NE R5 R2 K1 + 0x78160003, // 0016 JMPF R5 #001B + 0x8C14010A, // 0017 GETMET R5 R0 K10 + 0x5C1C0400, // 0018 MOVE R7 R2 + 0x7C140400, // 0019 CALL R5 2 + 0x5C100A00, // 001A MOVE R4 R5 + 0x8C14010B, // 001B GETMET R5 R0 K11 + 0x7C140200, // 001C CALL R5 1 + 0x74160063, // 001D JMPT R5 #0082 + 0x8C14010C, // 001E GETMET R5 R0 K12 + 0x7C140200, // 001F CALL R5 1 + 0x74160060, // 0020 JMPT R5 #0082 + 0x8C14010D, // 0021 GETMET R5 R0 K13 + 0x7C140200, // 0022 CALL R5 1 + 0x8C14010C, // 0023 GETMET R5 R0 K12 + 0x7C140200, // 0024 CALL R5 1 + 0x78160000, // 0025 JMPF R5 #0027 + 0x7002005A, // 0026 JMP #0082 + 0x8C14010E, // 0027 GETMET R5 R0 K14 + 0x7C140200, // 0028 CALL R5 1 + 0x4C180000, // 0029 LDNIL R6 + 0x20180806, // 002A NE R6 R4 R6 + 0x781A0006, // 002B JMPF R6 #0033 + 0x20180501, // 002C NE R6 R2 K1 + 0x781A0004, // 002D JMPF R6 #0033 + 0x8C18010F, // 002E GETMET R6 R0 K15 + 0x5C200400, // 002F MOVE R8 R2 + 0x5C240A00, // 0030 MOVE R9 R5 + 0x5C280800, // 0031 MOVE R10 R4 + 0x7C180800, // 0032 CALL R6 4 + 0x8C180110, // 0033 GETMET R6 R0 K16 + 0x7C180200, // 0034 CALL R6 1 + 0x8C180111, // 0035 GETMET R6 R0 K17 + 0x58200012, // 0036 LDCONST R8 K18 + 0x7C180400, // 0037 CALL R6 2 + 0x8C1C0113, // 0038 GETMET R7 R0 K19 + 0x7C1C0200, // 0039 CALL R7 1 + 0x8C200114, // 003A GETMET R8 R0 K20 + 0x60280018, // 003B GETGBL R10 G24 + 0x582C0015, // 003C LDCONST R11 K21 + 0x5C300200, // 003D MOVE R12 R1 + 0x5C340A00, // 003E MOVE R13 R5 + 0x5C380C00, // 003F MOVE R14 R6 + 0x5C3C0E00, // 0040 MOVE R15 R7 + 0x7C280A00, // 0041 CALL R10 5 + 0x7C200400, // 0042 CALL R8 2 + 0x8C20010B, // 0043 GETMET R8 R0 K11 + 0x7C200200, // 0044 CALL R8 1 + 0x7422000F, // 0045 JMPT R8 #0056 + 0x8C200116, // 0046 GETMET R8 R0 K22 + 0x7C200200, // 0047 CALL R8 1 + 0x4C240000, // 0048 LDNIL R9 + 0x20241009, // 0049 NE R9 R8 R9 + 0x78260008, // 004A JMPF R9 #0054 + 0x88241117, // 004B GETMBR R9 R8 K23 + 0xB82A3000, // 004C GETNGBL R10 K24 + 0x88281519, // 004D GETMBR R10 R10 K25 + 0x8828151A, // 004E GETMBR R10 R10 K26 + 0x1C24120A, // 004F EQ R9 R9 R10 + 0x78260002, // 0050 JMPF R9 #0054 + 0x8C24011B, // 0051 GETMET R9 R0 K27 + 0x7C240200, // 0052 CALL R9 1 + 0x70020000, // 0053 JMP #0055 + 0x70020000, // 0054 JMP #0056 + 0x7001FFEC, // 0055 JMP #0043 + 0x8C200116, // 0056 GETMET R8 R0 K22 + 0x7C200200, // 0057 CALL R8 1 + 0x4C240000, // 0058 LDNIL R9 + 0x20201009, // 0059 NE R8 R8 R9 + 0x7822000C, // 005A JMPF R8 #0068 + 0x8C200116, // 005B GETMET R8 R0 K22 + 0x7C200200, // 005C CALL R8 1 + 0x88201117, // 005D GETMBR R8 R8 K23 + 0xB8263000, // 005E GETNGBL R9 K24 + 0x88241319, // 005F GETMBR R9 R9 K25 + 0x8824131C, // 0060 GETMBR R9 R9 K28 + 0x1C201009, // 0061 EQ R8 R8 R9 + 0x78220004, // 0062 JMPF R8 #0068 + 0x8C20011B, // 0063 GETMET R8 R0 K27 + 0x7C200200, // 0064 CALL R8 1 + 0x8C20010D, // 0065 GETMET R8 R0 K13 + 0x7C200200, // 0066 CALL R8 1 + 0x70020018, // 0067 JMP #0081 + 0x8C200116, // 0068 GETMET R8 R0 K22 + 0x7C200200, // 0069 CALL R8 1 + 0x4C240000, // 006A LDNIL R9 + 0x20201009, // 006B NE R8 R8 R9 + 0x7822000C, // 006C JMPF R8 #007A + 0x8C200116, // 006D GETMET R8 R0 K22 + 0x7C200200, // 006E CALL R8 1 + 0x88201117, // 006F GETMBR R8 R8 K23 + 0xB8263000, // 0070 GETNGBL R9 K24 + 0x88241319, // 0071 GETMBR R9 R9 K25 + 0x8824131D, // 0072 GETMBR R9 R9 K29 + 0x1C201009, // 0073 EQ R8 R8 R9 + 0x78220004, // 0074 JMPF R8 #007A + 0x8C20011B, // 0075 GETMET R8 R0 K27 + 0x7C200200, // 0076 CALL R8 1 + 0x8C20010D, // 0077 GETMET R8 R0 K13 + 0x7C200200, // 0078 CALL R8 1 + 0x70020006, // 0079 JMP #0081 + 0x8C20010C, // 007A GETMET R8 R0 K12 + 0x7C200200, // 007B CALL R8 1 + 0x74220003, // 007C JMPT R8 #0081 + 0x8C20011E, // 007D GETMET R8 R0 K30 + 0x5828001F, // 007E LDCONST R10 K31 + 0x7C200400, // 007F CALL R8 2 + 0x70020000, // 0080 JMP #0082 + 0x7001FF98, // 0081 JMP #001B + 0x8C140120, // 0082 GETMET R5 R0 K32 + 0x7C140200, // 0083 CALL R5 1 + 0x80000000, // 0084 RET 0 }) ) ); @@ -2768,39 +2620,9 @@ be_local_closure(class_SimpleDSLTranspiler_process_multiplicative_expression, /******************************************************************** -** Solidified function: _process_named_arguments_for_color_provider +** Solidified function: expect_identifier ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_for_color_provider, /* 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[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_process_named_arguments_generic), - }), - be_str_weak(_process_named_arguments_for_color_provider), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140200, // 0001 MOVE R5 R1 - 0x5C180400, // 0002 MOVE R6 R2 - 0x7C0C0600, // 0003 CALL R3 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_colon -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_colon, /* name */ +be_local_closure(class_SimpleDSLTranspiler_expect_identifier, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -2810,225 +2632,61 @@ be_local_closure(class_SimpleDSLTranspiler_expect_colon, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ + ( &(const bvalue[13]) { /* constants */ /* K0 */ be_nested_str_weak(current), /* K1 */ be_nested_str_weak(type), /* K2 */ be_nested_str_weak(animation_dsl), /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(COLON), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X3A_X27), - }), - be_str_weak(expect_colon), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_multiplicative_expression_raw -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_raw, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(process_unary_expression_raw), - /* K1 */ be_nested_str_weak(at_end), - /* K2 */ be_nested_str_weak(current), - /* K3 */ be_nested_str_weak(type), - /* K4 */ be_nested_str_weak(animation_dsl), - /* K5 */ be_nested_str_weak(Token), - /* K6 */ be_nested_str_weak(MULTIPLY), - /* K7 */ be_nested_str_weak(DIVIDE), + /* K4 */ be_nested_str_weak(IDENTIFIER), + /* K5 */ be_nested_str_weak(COLOR), + /* K6 */ be_nested_str_weak(KEYWORD), + /* K7 */ be_nested_str_weak(can_use_as_identifier), /* K8 */ be_nested_str_weak(value), /* K9 */ be_nested_str_weak(next), - /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), + /* K10 */ be_nested_str_weak(error), + /* K11 */ be_nested_str_weak(Expected_X20identifier), + /* K12 */ be_nested_str_weak(unknown), }), - be_str_weak(process_multiplicative_expression_raw), + be_str_weak(expect_identifier), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C080101, // 0002 GETMET R2 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x740A001F, // 0004 JMPT R2 #0025 - 0x8C080102, // 0005 GETMET R2 R0 K2 - 0x7C080200, // 0006 CALL R2 1 - 0x4C0C0000, // 0007 LDNIL R3 - 0x200C0403, // 0008 NE R3 R2 R3 - 0x780E0018, // 0009 JMPF R3 #0023 - 0x880C0503, // 000A GETMBR R3 R2 K3 - 0xB8120800, // 000B GETNGBL R4 K4 - 0x88100905, // 000C GETMBR R4 R4 K5 - 0x88100906, // 000D GETMBR R4 R4 K6 - 0x1C0C0604, // 000E EQ R3 R3 R4 - 0x740E0005, // 000F JMPT R3 #0016 - 0x880C0503, // 0010 GETMBR R3 R2 K3 - 0xB8120800, // 0011 GETNGBL R4 K4 - 0x88100905, // 0012 GETMBR R4 R4 K5 - 0x88100907, // 0013 GETMBR R4 R4 K7 - 0x1C0C0604, // 0014 EQ R3 R3 R4 - 0x780E000C, // 0015 JMPF R3 #0023 - 0x880C0508, // 0016 GETMBR R3 R2 K8 - 0x8C100109, // 0017 GETMET R4 R0 K9 - 0x7C100200, // 0018 CALL R4 1 - 0x8C100100, // 0019 GETMET R4 R0 K0 - 0x7C100200, // 001A CALL R4 1 - 0x60140018, // 001B GETGBL R5 G24 - 0x5818000A, // 001C LDCONST R6 K10 - 0x5C1C0200, // 001D MOVE R7 R1 - 0x5C200600, // 001E MOVE R8 R3 - 0x5C240800, // 001F MOVE R9 R4 - 0x7C140800, // 0020 CALL R5 4 - 0x5C040A00, // 0021 MOVE R1 R5 - 0x70020000, // 0022 JMP #0024 - 0x70020000, // 0023 JMP #0025 - 0x7001FFDC, // 0024 JMP #0002 - 0x80040200, // 0025 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_named_color_value -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_get_named_color_value, /* 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(animation_dsl), - /* K1 */ be_nested_str_weak(SimpleDSLTranspiler), - /* K2 */ be_nested_str_weak(named_colors), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(0xFFFFFFFF), - }), - be_str_weak(get_named_color_value), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x88080501, // 0001 GETMBR R2 R2 K1 - 0x88080502, // 0002 GETMBR R2 R2 K2 - 0x8C080503, // 0003 GETMET R2 R2 K3 - 0x5C100200, // 0004 MOVE R4 R1 - 0x58140004, // 0005 LDCONST R5 K4 - 0x7C080600, // 0006 CALL R2 3 - 0x80040400, // 0007 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_expression_argument -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_expression_argument, /* 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(process_additive_expression_raw), - }), - be_str_weak(process_expression_argument), - &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 function: expect_assign -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_assign, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(ASSIGN), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X3D_X27), - }), - be_str_weak(expect_assign), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ + ( &(const binstruction[37]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 0x4C080000, // 0002 LDNIL R2 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E + 0x780A001A, // 0004 JMPF R2 #0020 0x88080301, // 0005 GETMBR R2 R1 K1 0xB80E0400, // 0006 GETNGBL R3 K2 0x880C0703, // 0007 GETMBR R3 R3 K3 0x880C0704, // 0008 GETMBR R3 R3 K4 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 + 0x740A000F, // 000A JMPT R2 #001B + 0x88080301, // 000B GETMBR R2 R1 K1 + 0xB80E0400, // 000C GETNGBL R3 K2 + 0x880C0703, // 000D GETMBR R3 R3 K3 + 0x880C0705, // 000E GETMBR R3 R3 K5 + 0x1C080403, // 000F EQ R2 R2 R3 + 0x740A0009, // 0010 JMPT R2 #001B + 0x88080301, // 0011 GETMBR R2 R1 K1 + 0xB80E0400, // 0012 GETNGBL R3 K2 + 0x880C0703, // 0013 GETMBR R3 R3 K3 + 0x880C0706, // 0014 GETMBR R3 R3 K6 + 0x1C080403, // 0015 EQ R2 R2 R3 + 0x780A0008, // 0016 JMPF R2 #0020 + 0x8C080107, // 0017 GETMET R2 R0 K7 + 0x88100308, // 0018 GETMBR R4 R1 K8 + 0x7C080400, // 0019 CALL R2 2 + 0x780A0004, // 001A JMPF R2 #0020 + 0x88080308, // 001B GETMBR R2 R1 K8 + 0x8C0C0109, // 001C GETMET R3 R0 K9 + 0x7C0C0200, // 001D CALL R3 1 + 0x80040400, // 001E RET 1 R2 + 0x70020003, // 001F JMP #0024 + 0x8C08010A, // 0020 GETMET R2 R0 K10 + 0x5810000B, // 0021 LDCONST R4 K11 + 0x7C080400, // 0022 CALL R2 2 + 0x80061800, // 0023 RET 1 K12 + 0x80000000, // 0024 RET 0 }) ) ); @@ -3036,9 +2694,9 @@ be_local_closure(class_SimpleDSLTranspiler_expect_assign, /* name */ /******************************************************************** -** Solidified function: skip_function_arguments +** Solidified function: join_output ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_skip_function_arguments, /* name */ +be_local_closure(class_SimpleDSLTranspiler_join_output, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -3048,810 +2706,29 @@ be_local_closure(class_SimpleDSLTranspiler_skip_function_arguments, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(LEFT_PAREN), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_weak(at_end), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(RIGHT_PAREN), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(output), + /* K2 */ be_nested_str_weak(_X0A), + /* K3 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(skip_function_arguments), + be_str_weak(join_output), &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060023, // 0004 JMPF R1 #0029 - 0x8C040100, // 0005 GETMET R1 R0 K0 - 0x7C040200, // 0006 CALL R1 1 - 0x88040301, // 0007 GETMBR R1 R1 K1 - 0xB80A0400, // 0008 GETNGBL R2 K2 - 0x88080503, // 0009 GETMBR R2 R2 K3 - 0x88080504, // 000A GETMBR R2 R2 K4 - 0x1C040202, // 000B EQ R1 R1 R2 - 0x7806001B, // 000C JMPF R1 #0029 - 0x8C040105, // 000D GETMET R1 R0 K5 - 0x7C040200, // 000E CALL R1 1 - 0x58040006, // 000F LDCONST R1 K6 - 0x8C080107, // 0010 GETMET R2 R0 K7 - 0x7C080200, // 0011 CALL R2 1 - 0x740A0015, // 0012 JMPT R2 #0029 - 0x24080308, // 0013 GT R2 R1 K8 - 0x780A0013, // 0014 JMPF R2 #0029 - 0x8C080100, // 0015 GETMET R2 R0 K0 - 0x7C080200, // 0016 CALL R2 1 - 0x880C0501, // 0017 GETMBR R3 R2 K1 - 0xB8120400, // 0018 GETNGBL R4 K2 - 0x88100903, // 0019 GETMBR R4 R4 K3 - 0x88100904, // 001A GETMBR R4 R4 K4 - 0x1C0C0604, // 001B EQ R3 R3 R4 - 0x780E0001, // 001C JMPF R3 #001F - 0x00040306, // 001D ADD R1 R1 K6 - 0x70020006, // 001E JMP #0026 - 0x880C0501, // 001F GETMBR R3 R2 K1 - 0xB8120400, // 0020 GETNGBL R4 K2 - 0x88100903, // 0021 GETMBR R4 R4 K3 - 0x88100909, // 0022 GETMBR R4 R4 K9 - 0x1C0C0604, // 0023 EQ R3 R3 R4 - 0x780E0000, // 0024 JMPF R3 #0026 - 0x04040306, // 0025 SUB R1 R1 K6 - 0x8C0C0105, // 0026 GETMET R3 R0 K5 - 0x7C0C0200, // 0027 CALL R3 1 - 0x7001FFE6, // 0028 JMP #0010 - 0x80000000, // 0029 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: skip_whitespace -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_skip_whitespace, /* 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(at_end), - /* K1 */ be_nested_str_weak(current), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(NEWLINE), - /* K6 */ be_nested_str_weak(COMMENT), - /* K7 */ be_nested_str_weak(next), - }), - be_str_weak(skip_whitespace), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x74060015, // 0002 JMPT R1 #0019 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x7C040200, // 0004 CALL R1 1 - 0x4C080000, // 0005 LDNIL R2 - 0x20080202, // 0006 NE R2 R1 R2 - 0x780A000E, // 0007 JMPF R2 #0017 - 0x88080302, // 0008 GETMBR R2 R1 K2 - 0xB80E0600, // 0009 GETNGBL R3 K3 - 0x880C0704, // 000A GETMBR R3 R3 K4 - 0x880C0705, // 000B GETMBR R3 R3 K5 - 0x1C080403, // 000C EQ R2 R2 R3 - 0x740A0005, // 000D JMPT R2 #0014 - 0x88080302, // 000E GETMBR R2 R1 K2 - 0xB80E0600, // 000F GETNGBL R3 K3 - 0x880C0704, // 0010 GETMBR R3 R3 K4 - 0x880C0706, // 0011 GETMBR R3 R3 K6 - 0x1C080403, // 0012 EQ R2 R2 R3 - 0x780A0002, // 0013 JMPF R2 #0017 - 0x8C080107, // 0014 GETMET R2 R0 K7 - 0x7C080200, // 0015 CALL R2 1 - 0x70020000, // 0016 JMP #0018 - 0x70020000, // 0017 JMP #0019 - 0x7001FFE6, // 0018 JMP #0000 - 0x80000000, // 0019 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_number -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_number, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(NUMBER), - /* K5 */ be_nested_str_weak(value), - /* K6 */ be_nested_str_weak(next), - /* K7 */ be_nested_str_weak(error), - /* K8 */ be_nested_str_weak(Expected_X20number), - /* K9 */ be_nested_str_weak(0), - }), - be_str_weak(expect_number), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A000A, // 0004 JMPF R2 #0010 - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0004, // 000A JMPF R2 #0010 - 0x88080305, // 000B GETMBR R2 R1 K5 - 0x8C0C0106, // 000C GETMET R3 R0 K6 - 0x7C0C0200, // 000D CALL R3 1 - 0x80040400, // 000E RET 1 R2 - 0x70020003, // 000F JMP #0014 - 0x8C080107, // 0010 GETMET R2 R0 K7 - 0x58100008, // 0011 LDCONST R4 K8 - 0x7C080400, // 0012 CALL R2 2 - 0x80061200, // 0013 RET 1 K9 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _process_named_arguments_generic -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_generic, /* name */ - be_nested_proto( - 15, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ - /* K0 */ be_nested_str_weak(expect_left_paren), - /* K1 */ be_nested_str_weak(_create_instance_for_validation), - /* K2 */ be_nested_str_weak(at_end), - /* K3 */ be_nested_str_weak(check_right_paren), - /* K4 */ be_nested_str_weak(skip_whitespace_including_newlines), - /* K5 */ be_nested_str_weak(expect_identifier), - /* K6 */ be_nested_str_weak(_validate_single_parameter), - /* K7 */ be_nested_str_weak(expect_assign), - /* K8 */ be_nested_str_weak(process_value), - /* K9 */ be_nested_str_weak(argument), - /* K10 */ be_nested_str_weak(collect_inline_comment), - /* K11 */ be_nested_str_weak(add), - /* K12 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), - /* K13 */ be_nested_str_weak(current), - /* K14 */ be_nested_str_weak(type), - /* K15 */ be_nested_str_weak(animation_dsl), - /* K16 */ be_nested_str_weak(Token), - /* K17 */ be_nested_str_weak(COMMENT), - /* K18 */ be_nested_str_weak(next), - /* K19 */ be_nested_str_weak(COMMA), - /* K20 */ be_nested_str_weak(NEWLINE), - /* K21 */ be_nested_str_weak(error), - /* K22 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), - /* K23 */ be_nested_str_weak(expect_right_paren), - }), - be_str_weak(_process_named_arguments_generic), - &be_const_str_solidified, - ( &(const binstruction[109]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x7C0C0200, // 0001 CALL R3 1 - 0x8C0C0101, // 0002 GETMET R3 R0 K1 - 0x5C140400, // 0003 MOVE R5 R2 - 0x7C0C0400, // 0004 CALL R3 2 - 0x8C100102, // 0005 GETMET R4 R0 K2 - 0x7C100200, // 0006 CALL R4 1 - 0x74120061, // 0007 JMPT R4 #006A - 0x8C100103, // 0008 GETMET R4 R0 K3 - 0x7C100200, // 0009 CALL R4 1 - 0x7412005E, // 000A JMPT R4 #006A - 0x8C100104, // 000B GETMET R4 R0 K4 - 0x7C100200, // 000C CALL R4 1 - 0x8C100103, // 000D GETMET R4 R0 K3 - 0x7C100200, // 000E CALL R4 1 - 0x78120000, // 000F JMPF R4 #0011 - 0x70020058, // 0010 JMP #006A - 0x8C100105, // 0011 GETMET R4 R0 K5 - 0x7C100200, // 0012 CALL R4 1 - 0x4C140000, // 0013 LDNIL R5 - 0x20140605, // 0014 NE R5 R3 R5 - 0x78160004, // 0015 JMPF R5 #001B - 0x8C140106, // 0016 GETMET R5 R0 K6 - 0x5C1C0400, // 0017 MOVE R7 R2 - 0x5C200800, // 0018 MOVE R8 R4 - 0x5C240600, // 0019 MOVE R9 R3 - 0x7C140800, // 001A CALL R5 4 - 0x8C140107, // 001B GETMET R5 R0 K7 - 0x7C140200, // 001C CALL R5 1 - 0x8C140108, // 001D GETMET R5 R0 K8 - 0x581C0009, // 001E LDCONST R7 K9 - 0x7C140400, // 001F CALL R5 2 - 0x8C18010A, // 0020 GETMET R6 R0 K10 - 0x7C180200, // 0021 CALL R6 1 - 0x8C1C010B, // 0022 GETMET R7 R0 K11 - 0x60240018, // 0023 GETGBL R9 G24 - 0x5828000C, // 0024 LDCONST R10 K12 - 0x5C2C0200, // 0025 MOVE R11 R1 - 0x5C300800, // 0026 MOVE R12 R4 - 0x5C340A00, // 0027 MOVE R13 R5 - 0x5C380C00, // 0028 MOVE R14 R6 - 0x7C240A00, // 0029 CALL R9 5 - 0x7C1C0400, // 002A CALL R7 2 - 0x8C1C0102, // 002B GETMET R7 R0 K2 - 0x7C1C0200, // 002C CALL R7 1 - 0x741E000F, // 002D JMPT R7 #003E - 0x8C1C010D, // 002E GETMET R7 R0 K13 - 0x7C1C0200, // 002F CALL R7 1 - 0x4C200000, // 0030 LDNIL R8 - 0x20200E08, // 0031 NE R8 R7 R8 - 0x78220008, // 0032 JMPF R8 #003C - 0x88200F0E, // 0033 GETMBR R8 R7 K14 - 0xB8261E00, // 0034 GETNGBL R9 K15 - 0x88241310, // 0035 GETMBR R9 R9 K16 - 0x88241311, // 0036 GETMBR R9 R9 K17 - 0x1C201009, // 0037 EQ R8 R8 R9 - 0x78220002, // 0038 JMPF R8 #003C - 0x8C200112, // 0039 GETMET R8 R0 K18 - 0x7C200200, // 003A CALL R8 1 - 0x70020000, // 003B JMP #003D - 0x70020000, // 003C JMP #003E - 0x7001FFEC, // 003D JMP #002B - 0x8C1C010D, // 003E GETMET R7 R0 K13 - 0x7C1C0200, // 003F CALL R7 1 - 0x4C200000, // 0040 LDNIL R8 - 0x201C0E08, // 0041 NE R7 R7 R8 - 0x781E000C, // 0042 JMPF R7 #0050 - 0x8C1C010D, // 0043 GETMET R7 R0 K13 - 0x7C1C0200, // 0044 CALL R7 1 - 0x881C0F0E, // 0045 GETMBR R7 R7 K14 - 0xB8221E00, // 0046 GETNGBL R8 K15 - 0x88201110, // 0047 GETMBR R8 R8 K16 - 0x88201113, // 0048 GETMBR R8 R8 K19 - 0x1C1C0E08, // 0049 EQ R7 R7 R8 - 0x781E0004, // 004A JMPF R7 #0050 - 0x8C1C0112, // 004B GETMET R7 R0 K18 - 0x7C1C0200, // 004C CALL R7 1 - 0x8C1C0104, // 004D GETMET R7 R0 K4 - 0x7C1C0200, // 004E CALL R7 1 - 0x70020018, // 004F JMP #0069 - 0x8C1C010D, // 0050 GETMET R7 R0 K13 - 0x7C1C0200, // 0051 CALL R7 1 - 0x4C200000, // 0052 LDNIL R8 - 0x201C0E08, // 0053 NE R7 R7 R8 - 0x781E000C, // 0054 JMPF R7 #0062 - 0x8C1C010D, // 0055 GETMET R7 R0 K13 - 0x7C1C0200, // 0056 CALL R7 1 - 0x881C0F0E, // 0057 GETMBR R7 R7 K14 - 0xB8221E00, // 0058 GETNGBL R8 K15 - 0x88201110, // 0059 GETMBR R8 R8 K16 - 0x88201114, // 005A GETMBR R8 R8 K20 - 0x1C1C0E08, // 005B EQ R7 R7 R8 - 0x781E0004, // 005C JMPF R7 #0062 - 0x8C1C0112, // 005D GETMET R7 R0 K18 - 0x7C1C0200, // 005E CALL R7 1 - 0x8C1C0104, // 005F GETMET R7 R0 K4 - 0x7C1C0200, // 0060 CALL R7 1 - 0x70020006, // 0061 JMP #0069 - 0x8C1C0103, // 0062 GETMET R7 R0 K3 - 0x7C1C0200, // 0063 CALL R7 1 - 0x741E0003, // 0064 JMPT R7 #0069 - 0x8C1C0115, // 0065 GETMET R7 R0 K21 - 0x58240016, // 0066 LDCONST R9 K22 - 0x7C1C0400, // 0067 CALL R7 2 - 0x70020000, // 0068 JMP #006A - 0x7001FF9A, // 0069 JMP #0005 - 0x8C100117, // 006A GETMET R4 R0 K23 - 0x7C100200, // 006B CALL R4 1 - 0x80000000, // 006C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: at_end -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_at_end, /* 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[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(pos), - /* K1 */ be_nested_str_weak(tokens), - /* K2 */ be_nested_str_weak(current), - /* K3 */ be_nested_str_weak(type), - /* K4 */ be_nested_str_weak(animation_dsl), - /* K5 */ be_nested_str_weak(Token), - /* K6 */ be_nested_str_weak(EOF), - }), - be_str_weak(at_end), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x6008000C, // 0001 GETGBL R2 G12 + ( &(const binstruction[14]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x60080010, // 0001 GETGBL R2 G16 0x880C0101, // 0002 GETMBR R3 R0 K1 0x7C080200, // 0003 CALL R2 1 - 0x28040202, // 0004 GE R1 R1 R2 - 0x7406000D, // 0005 JMPT R1 #0014 - 0x8C040102, // 0006 GETMET R1 R0 K2 - 0x7C040200, // 0007 CALL R1 1 - 0x4C080000, // 0008 LDNIL R2 - 0x20040202, // 0009 NE R1 R1 R2 - 0x78060007, // 000A JMPF R1 #0013 - 0x8C040102, // 000B GETMET R1 R0 K2 - 0x7C040200, // 000C CALL R1 1 - 0x88040303, // 000D GETMBR R1 R1 K3 - 0xB80A0800, // 000E GETNGBL R2 K4 - 0x88080505, // 000F GETMBR R2 R2 K5 - 0x88080506, // 0010 GETMBR R2 R2 K6 - 0x1C040202, // 0011 EQ R1 R1 R2 - 0x74060000, // 0012 JMPT R1 #0014 - 0x50040001, // 0013 LDBOOL R1 0 1 - 0x50040200, // 0014 LDBOOL R1 1 0 - 0x80040200, // 0015 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_anonymous_function -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_is_anonymous_function, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(_X28def_X20), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(_X29_X28engine_X29), - }), - be_str_weak(is_anonymous_function), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x7C0C0600, // 0004 CALL R3 3 - 0x1C0C0703, // 0005 EQ R3 R3 K3 - 0x780E0005, // 0006 JMPF R3 #000D - 0x8C0C0501, // 0007 GETMET R3 R2 K1 - 0x5C140200, // 0008 MOVE R5 R1 - 0x58180004, // 0009 LDCONST R6 K4 - 0x7C0C0600, // 000A CALL R3 3 - 0x280C0703, // 000B GE R3 R3 K3 - 0x740E0000, // 000C JMPT R3 #000E - 0x500C0001, // 000D LDBOOL R3 0 1 - 0x500C0200, // 000E LDBOOL R3 1 0 - 0x80040600, // 000F RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _validate_color_provider_factory_exists -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_color_provider_factory_exists, /* 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[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(_validate_factory_function), - /* K1 */ be_nested_str_weak(animation), - /* K2 */ be_nested_str_weak(color_provider), - }), - be_str_weak(_validate_color_provider_factory_exists), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0xB8160200, // 0002 GETNGBL R5 K1 - 0x88140B02, // 0003 GETMBR R5 R5 K2 - 0x7C080600, // 0004 CALL R2 3 - 0x80040400, // 0005 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_percentage_value -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_percentage_value, /* 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[11]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(PERCENTAGE), - /* K5 */ be_nested_str_weak(value), - /* K6 */ be_nested_str_weak(next), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(NUMBER), - /* K9 */ be_nested_str_weak(error), - /* K10 */ be_nested_str_weak(Expected_X20percentage_X20value), - }), - be_str_weak(process_percentage_value), - &be_const_str_solidified, - ( &(const binstruction[52]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0015, // 0004 JMPF R2 #001B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A000F, // 000A JMPF R2 #001B - 0x88080305, // 000B GETMBR R2 R1 K5 - 0x8C0C0106, // 000C GETMET R3 R0 K6 - 0x7C0C0200, // 000D CALL R3 1 - 0x600C000A, // 000E GETGBL R3 G10 - 0x5411FFFD, // 000F LDINT R4 -2 - 0x40120E04, // 0010 CONNECT R4 K7 R4 - 0x94100404, // 0011 GETIDX R4 R2 R4 - 0x7C0C0200, // 0012 CALL R3 1 - 0x60100009, // 0013 GETGBL R4 G9 - 0x541600FE, // 0014 LDINT R5 255 - 0x08140605, // 0015 MUL R5 R3 R5 - 0x541A0063, // 0016 LDINT R6 100 - 0x0C140A06, // 0017 DIV R5 R5 R6 - 0x7C100200, // 0018 CALL R4 1 - 0x80040800, // 0019 RET 1 R4 - 0x70020017, // 001A JMP #0033 - 0x4C080000, // 001B LDNIL R2 - 0x20080202, // 001C NE R2 R1 R2 - 0x780A000F, // 001D JMPF R2 #002E - 0x88080301, // 001E GETMBR R2 R1 K1 - 0xB80E0400, // 001F GETNGBL R3 K2 - 0x880C0703, // 0020 GETMBR R3 R3 K3 - 0x880C0708, // 0021 GETMBR R3 R3 K8 - 0x1C080403, // 0022 EQ R2 R2 R3 - 0x780A0009, // 0023 JMPF R2 #002E - 0x88080305, // 0024 GETMBR R2 R1 K5 - 0x8C0C0106, // 0025 GETMET R3 R0 K6 - 0x7C0C0200, // 0026 CALL R3 1 - 0x600C0009, // 0027 GETGBL R3 G9 - 0x6010000A, // 0028 GETGBL R4 G10 - 0x5C140400, // 0029 MOVE R5 R2 - 0x7C100200, // 002A CALL R4 1 - 0x7C0C0200, // 002B CALL R3 1 - 0x80040600, // 002C RET 1 R3 - 0x70020004, // 002D JMP #0033 - 0x8C080109, // 002E GETMET R2 R0 K9 - 0x5810000A, // 002F LDCONST R4 K10 - 0x7C080400, // 0030 CALL R2 2 - 0x540A00FE, // 0031 LDINT R2 255 - 0x80040400, // 0032 RET 1 R2 - 0x80000000, // 0033 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _validate_animation_factory_creates_animation -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_animation_factory_creates_animation, /* 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[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_validate_factory_function), - /* K1 */ be_nested_str_weak(animation), - }), - be_str_weak(_validate_animation_factory_creates_animation), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0xB8160200, // 0002 GETNGBL R5 K1 - 0x88140B01, // 0003 GETMBR R5 R5 K1 - 0x7C080600, // 0004 CALL R2 3 - 0x80040400, // 0005 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: convert_color -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_convert_color, /* name */ - be_nested_proto( - 17, /* nstack */ - 2, /* 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(startswith), - /* K2 */ be_nested_str_weak(0x), - /* K3 */ be_nested_str_weak(0xFF_X25s), - /* K4 */ be_const_int(2), - /* K5 */ be_const_int(2147483647), - /* K6 */ be_nested_str_weak(_X23), - /* K7 */ be_nested_str_weak(0x_X25s), - /* K8 */ be_const_int(1), - /* K9 */ be_const_int(3), - /* K10 */ be_nested_str_weak(0x_X25s_X25s_X25s_X25s_X25s_X25s_X25s_X25s), - /* K11 */ be_nested_str_weak(0xFF_X25s_X25s_X25s_X25s_X25s_X25s), - /* K12 */ be_nested_str_weak(animation_dsl), - /* K13 */ be_nested_str_weak(is_color_name), - /* K14 */ be_nested_str_weak(get_named_color_value), - /* K15 */ be_nested_str_weak(0xFFFFFFFF), - }), - be_str_weak(convert_color), - &be_const_str_solidified, - ( &(const binstruction[110]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x7C0C0600, // 0004 CALL R3 3 - 0x780E0013, // 0005 JMPF R3 #001A - 0x600C000C, // 0006 GETGBL R3 G12 - 0x5C100200, // 0007 MOVE R4 R1 - 0x7C0C0200, // 0008 CALL R3 1 - 0x54120009, // 0009 LDINT R4 10 - 0x1C0C0604, // 000A EQ R3 R3 R4 - 0x780E0001, // 000B JMPF R3 #000E - 0x80040200, // 000C RET 1 R1 - 0x7002000B, // 000D JMP #001A - 0x600C000C, // 000E GETGBL R3 G12 - 0x5C100200, // 000F MOVE R4 R1 - 0x7C0C0200, // 0010 CALL R3 1 - 0x54120007, // 0011 LDINT R4 8 - 0x1C0C0604, // 0012 EQ R3 R3 R4 - 0x780E0005, // 0013 JMPF R3 #001A - 0x600C0018, // 0014 GETGBL R3 G24 - 0x58100003, // 0015 LDCONST R4 K3 - 0x40160905, // 0016 CONNECT R5 K4 K5 - 0x94140205, // 0017 GETIDX R5 R1 R5 - 0x7C0C0400, // 0018 CALL R3 2 - 0x80040600, // 0019 RET 1 R3 - 0x8C0C0501, // 001A GETMET R3 R2 K1 - 0x5C140200, // 001B MOVE R5 R1 - 0x58180006, // 001C LDCONST R6 K6 - 0x7C0C0600, // 001D CALL R3 3 - 0x780E0044, // 001E JMPF R3 #0064 - 0x600C000C, // 001F GETGBL R3 G12 - 0x5C100200, // 0020 MOVE R4 R1 - 0x7C0C0200, // 0021 CALL R3 1 - 0x54120008, // 0022 LDINT R4 9 - 0x1C0C0604, // 0023 EQ R3 R3 R4 - 0x780E0006, // 0024 JMPF R3 #002C - 0x600C0018, // 0025 GETGBL R3 G24 - 0x58100007, // 0026 LDCONST R4 K7 - 0x40161105, // 0027 CONNECT R5 K8 K5 - 0x94140205, // 0028 GETIDX R5 R1 R5 - 0x7C0C0400, // 0029 CALL R3 2 - 0x80040600, // 002A RET 1 R3 - 0x70020037, // 002B JMP #0064 - 0x600C000C, // 002C GETGBL R3 G12 - 0x5C100200, // 002D MOVE R4 R1 - 0x7C0C0200, // 002E CALL R3 1 - 0x54120006, // 002F LDINT R4 7 - 0x1C0C0604, // 0030 EQ R3 R3 R4 - 0x780E0006, // 0031 JMPF R3 #0039 - 0x600C0018, // 0032 GETGBL R3 G24 - 0x58100003, // 0033 LDCONST R4 K3 - 0x40161105, // 0034 CONNECT R5 K8 K5 - 0x94140205, // 0035 GETIDX R5 R1 R5 - 0x7C0C0400, // 0036 CALL R3 2 - 0x80040600, // 0037 RET 1 R3 - 0x7002002A, // 0038 JMP #0064 - 0x600C000C, // 0039 GETGBL R3 G12 - 0x5C100200, // 003A MOVE R4 R1 - 0x7C0C0200, // 003B CALL R3 1 - 0x54120004, // 003C LDINT R4 5 - 0x1C0C0604, // 003D EQ R3 R3 R4 - 0x780E0011, // 003E JMPF R3 #0051 - 0x940C0308, // 003F GETIDX R3 R1 K8 - 0x94100304, // 0040 GETIDX R4 R1 K4 - 0x94140309, // 0041 GETIDX R5 R1 K9 - 0x541A0003, // 0042 LDINT R6 4 - 0x94180206, // 0043 GETIDX R6 R1 R6 - 0x601C0018, // 0044 GETGBL R7 G24 - 0x5820000A, // 0045 LDCONST R8 K10 - 0x5C240600, // 0046 MOVE R9 R3 - 0x5C280600, // 0047 MOVE R10 R3 - 0x5C2C0800, // 0048 MOVE R11 R4 - 0x5C300800, // 0049 MOVE R12 R4 - 0x5C340A00, // 004A MOVE R13 R5 - 0x5C380A00, // 004B MOVE R14 R5 - 0x5C3C0C00, // 004C MOVE R15 R6 - 0x5C400C00, // 004D MOVE R16 R6 - 0x7C1C1200, // 004E CALL R7 9 - 0x80040E00, // 004F RET 1 R7 - 0x70020012, // 0050 JMP #0064 - 0x600C000C, // 0051 GETGBL R3 G12 - 0x5C100200, // 0052 MOVE R4 R1 - 0x7C0C0200, // 0053 CALL R3 1 - 0x54120003, // 0054 LDINT R4 4 - 0x1C0C0604, // 0055 EQ R3 R3 R4 - 0x780E000C, // 0056 JMPF R3 #0064 - 0x940C0308, // 0057 GETIDX R3 R1 K8 - 0x94100304, // 0058 GETIDX R4 R1 K4 - 0x94140309, // 0059 GETIDX R5 R1 K9 - 0x60180018, // 005A GETGBL R6 G24 - 0x581C000B, // 005B LDCONST R7 K11 - 0x5C200600, // 005C MOVE R8 R3 - 0x5C240600, // 005D MOVE R9 R3 - 0x5C280800, // 005E MOVE R10 R4 - 0x5C2C0800, // 005F MOVE R11 R4 - 0x5C300A00, // 0060 MOVE R12 R5 - 0x5C340A00, // 0061 MOVE R13 R5 - 0x7C180E00, // 0062 CALL R6 7 - 0x80040C00, // 0063 RET 1 R6 - 0xB80E1800, // 0064 GETNGBL R3 K12 - 0x8C0C070D, // 0065 GETMET R3 R3 K13 - 0x5C140200, // 0066 MOVE R5 R1 - 0x7C0C0400, // 0067 CALL R3 2 - 0x780E0003, // 0068 JMPF R3 #006D - 0x8C0C010E, // 0069 GETMET R3 R0 K14 - 0x5C140200, // 006A MOVE R5 R1 - 0x7C0C0400, // 006B CALL R3 2 - 0x80040600, // 006C RET 1 R3 - 0x80061E00, // 006D RET 1 K15 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: create_computation_closure -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_create_computation_closure, /* name */ - be_nested_proto( - 12, /* 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(string), - /* K1 */ be_nested_str_weak(transform_operand_for_closure), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(_X20_X20), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(replace), - /* K6 */ be_nested_str_weak(_X20), - /* K7 */ be_nested_str_weak(def_X20_X28self_X29_X20return_X20_X25s_X20_X25s_X20_X25s_X20end), - /* K8 */ be_nested_str_weak(animation_X2Ecreate_closure_value_X28engine_X2C_X20_X25s_X29), - }), - be_str_weak(create_computation_closure), - &be_const_str_solidified, - ( &(const binstruction[44]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x8C140101, // 0001 GETMET R5 R0 K1 - 0x5C1C0200, // 0002 MOVE R7 R1 - 0x7C140400, // 0003 CALL R5 2 - 0x8C180101, // 0004 GETMET R6 R0 K1 - 0x5C200600, // 0005 MOVE R8 R3 - 0x7C180400, // 0006 CALL R6 2 - 0x8C1C0902, // 0007 GETMET R7 R4 K2 - 0x5C240A00, // 0008 MOVE R9 R5 - 0x58280003, // 0009 LDCONST R10 K3 - 0x7C1C0600, // 000A CALL R7 3 - 0x281C0F04, // 000B GE R7 R7 K4 - 0x781E0006, // 000C JMPF R7 #0014 - 0x8C1C0905, // 000D GETMET R7 R4 K5 - 0x5C240A00, // 000E MOVE R9 R5 - 0x58280003, // 000F LDCONST R10 K3 - 0x582C0006, // 0010 LDCONST R11 K6 - 0x7C1C0800, // 0011 CALL R7 4 - 0x5C140E00, // 0012 MOVE R5 R7 - 0x7001FFF2, // 0013 JMP #0007 - 0x8C1C0902, // 0014 GETMET R7 R4 K2 - 0x5C240C00, // 0015 MOVE R9 R6 - 0x58280003, // 0016 LDCONST R10 K3 - 0x7C1C0600, // 0017 CALL R7 3 - 0x281C0F04, // 0018 GE R7 R7 K4 - 0x781E0006, // 0019 JMPF R7 #0021 - 0x8C1C0905, // 001A GETMET R7 R4 K5 - 0x5C240C00, // 001B MOVE R9 R6 - 0x58280003, // 001C LDCONST R10 K3 - 0x582C0006, // 001D LDCONST R11 K6 - 0x7C1C0800, // 001E CALL R7 4 - 0x5C180E00, // 001F MOVE R6 R7 - 0x7001FFF2, // 0020 JMP #0014 - 0x601C0018, // 0021 GETGBL R7 G24 - 0x58200007, // 0022 LDCONST R8 K7 - 0x5C240A00, // 0023 MOVE R9 R5 - 0x5C280400, // 0024 MOVE R10 R2 - 0x5C2C0C00, // 0025 MOVE R11 R6 - 0x7C1C0800, // 0026 CALL R7 4 - 0x60200018, // 0027 GETGBL R8 G24 - 0x58240008, // 0028 LDCONST R9 K8 - 0x5C280E00, // 0029 MOVE R10 R7 - 0x7C200400, // 002A CALL R8 2 - 0x80041000, // 002B RET 1 R8 + 0xA8020004, // 0004 EXBLK 0 #000A + 0x5C0C0400, // 0005 MOVE R3 R2 + 0x7C0C0000, // 0006 CALL R3 0 + 0x00100702, // 0007 ADD R4 R3 K2 + 0x00040204, // 0008 ADD R1 R1 R4 + 0x7001FFFA, // 0009 JMP #0005 + 0x58080003, // 000A LDCONST R2 K3 + 0xAC080200, // 000B CATCH R2 1 0 + 0xB0080000, // 000C RAISE 2 R0 R0 + 0x80040200, // 000D RET 1 R1 }) ) ); @@ -4120,61 +2997,11 @@ be_local_closure(class_SimpleDSLTranspiler_transform_expression_for_closure, / /******************************************************************** -** Solidified function: collect_inline_comment +** Solidified function: _validate_animation_factory_exists ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_collect_inline_comment, /* name */ +be_local_closure(class_SimpleDSLTranspiler__validate_animation_factory_exists, /* name */ be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(COMMENT), - /* K5 */ be_nested_str_weak(_X20_X20), - /* K6 */ be_nested_str_weak(value), - /* K7 */ be_nested_str_weak(next), - /* K8 */ be_nested_str_weak(), - }), - be_str_weak(collect_inline_comment), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A000A, // 0004 JMPF R2 #0010 - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0004, // 000A JMPF R2 #0010 - 0x88080306, // 000B GETMBR R2 R1 K6 - 0x000A0A02, // 000C ADD R2 K5 R2 - 0x8C0C0107, // 000D GETMET R3 R0 K7 - 0x7C0C0200, // 000E CALL R3 1 - 0x80040400, // 000F RET 1 R2 - 0x80061000, // 0010 RET 1 K8 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_add, /* name */ - be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4183,17 +3010,23 @@ be_local_closure(class_SimpleDSLTranspiler_add, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(output), - /* K1 */ be_nested_str_weak(push), + /* K0 */ be_nested_str_weak(is_math_method), + /* K1 */ be_nested_str_weak(_validate_factory_function), }), - be_str_weak(add), + be_str_weak(_validate_animation_factory_exists), &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 - 0x80000000, // 0004 RET 0 + ( &(const binstruction[11]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x780A0001, // 0003 JMPF R2 #0006 + 0x50080200, // 0004 LDBOOL R2 1 0 + 0x80040400, // 0005 RET 1 R2 + 0x8C080101, // 0006 GETMET R2 R0 K1 + 0x5C100200, // 0007 MOVE R4 R1 + 0x4C140000, // 0008 LDNIL R5 + 0x7C080600, // 0009 CALL R2 3 + 0x80040400, // 000A RET 1 R2 }) ) ); @@ -4201,289 +3034,9 @@ be_local_closure(class_SimpleDSLTranspiler_add, /* name */ /******************************************************************** -** Solidified function: convert_to_vrgb +** Solidified function: skip_whitespace ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_convert_to_vrgb, /* name */ - be_nested_proto( - 12, /* nstack */ - 3, /* 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(string), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(format), - /* K3 */ be_nested_str_weak(_X2502X), - /* K4 */ be_nested_str_weak(FFFFFF), - /* K5 */ be_nested_str_weak(startswith), - /* K6 */ be_nested_str_weak(0x), - /* K7 */ be_const_int(2), - }), - be_str_weak(convert_to_vrgb), - &be_const_str_solidified, - ( &(const binstruction[54]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0x60100009, // 0001 GETGBL R4 G9 - 0x6014000A, // 0002 GETGBL R5 G10 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C140200, // 0004 CALL R5 1 - 0x7C100200, // 0005 CALL R4 1 - 0x14140901, // 0006 LT R5 R4 K1 - 0x78160001, // 0007 JMPF R5 #000A - 0x58100001, // 0008 LDCONST R4 K1 - 0x70020003, // 0009 JMP #000E - 0x541600FE, // 000A LDINT R5 255 - 0x24140805, // 000B GT R5 R4 R5 - 0x78160000, // 000C JMPF R5 #000E - 0x541200FE, // 000D LDINT R4 255 - 0x8C140702, // 000E GETMET R5 R3 K2 - 0x581C0003, // 000F LDCONST R7 K3 - 0x5C200800, // 0010 MOVE R8 R4 - 0x7C140600, // 0011 CALL R5 3 - 0x60180008, // 0012 GETGBL R6 G8 - 0x5C1C0400, // 0013 MOVE R7 R2 - 0x7C180200, // 0014 CALL R6 1 - 0x581C0004, // 0015 LDCONST R7 K4 - 0x8C200705, // 0016 GETMET R8 R3 K5 - 0x5C280C00, // 0017 MOVE R10 R6 - 0x582C0006, // 0018 LDCONST R11 K6 - 0x7C200600, // 0019 CALL R8 3 - 0x7822000A, // 001A JMPF R8 #0026 - 0x6020000C, // 001B GETGBL R8 G12 - 0x5C240C00, // 001C MOVE R9 R6 - 0x7C200200, // 001D CALL R8 1 - 0x54260009, // 001E LDINT R9 10 - 0x28201009, // 001F GE R8 R8 R9 - 0x78220004, // 0020 JMPF R8 #0026 - 0x54220003, // 0021 LDINT R8 4 - 0x54260008, // 0022 LDINT R9 9 - 0x40201009, // 0023 CONNECT R8 R8 R9 - 0x941C0C08, // 0024 GETIDX R7 R6 R8 - 0x7002000D, // 0025 JMP #0034 - 0x8C200705, // 0026 GETMET R8 R3 K5 - 0x5C280C00, // 0027 MOVE R10 R6 - 0x582C0006, // 0028 LDCONST R11 K6 - 0x7C200600, // 0029 CALL R8 3 - 0x78220008, // 002A JMPF R8 #0034 - 0x6020000C, // 002B GETGBL R8 G12 - 0x5C240C00, // 002C MOVE R9 R6 - 0x7C200200, // 002D CALL R8 1 - 0x54260007, // 002E LDINT R9 8 - 0x1C201009, // 002F EQ R8 R8 R9 - 0x78220002, // 0030 JMPF R8 #0034 - 0x54220006, // 0031 LDINT R8 7 - 0x40220E08, // 0032 CONNECT R8 K7 R8 - 0x941C0C08, // 0033 GETIDX R7 R6 R8 - 0x00200A07, // 0034 ADD R8 R5 R7 - 0x80041000, // 0035 RET 1 R8 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_left_brace -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_left_brace, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(LEFT_BRACE), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X7B_X27), - }), - be_str_weak(expect_left_brace), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_time_value -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_time_value, /* 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[11]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(TIME), - /* K5 */ be_nested_str_weak(value), - /* K6 */ be_nested_str_weak(next), - /* K7 */ be_nested_str_weak(convert_time_to_ms), - /* K8 */ be_nested_str_weak(NUMBER), - /* K9 */ be_nested_str_weak(error), - /* K10 */ be_nested_str_weak(Expected_X20time_X20value), - }), - be_str_weak(process_time_value), - &be_const_str_solidified, - ( &(const binstruction[46]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A000D, // 0004 JMPF R2 #0013 - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0007, // 000A JMPF R2 #0013 - 0x88080305, // 000B GETMBR R2 R1 K5 - 0x8C0C0106, // 000C GETMET R3 R0 K6 - 0x7C0C0200, // 000D CALL R3 1 - 0x8C0C0107, // 000E GETMET R3 R0 K7 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x80040600, // 0011 RET 1 R3 - 0x70020019, // 0012 JMP #002D - 0x4C080000, // 0013 LDNIL R2 - 0x20080202, // 0014 NE R2 R1 R2 - 0x780A0011, // 0015 JMPF R2 #0028 - 0x88080301, // 0016 GETMBR R2 R1 K1 - 0xB80E0400, // 0017 GETNGBL R3 K2 - 0x880C0703, // 0018 GETMBR R3 R3 K3 - 0x880C0708, // 0019 GETMBR R3 R3 K8 - 0x1C080403, // 001A EQ R2 R2 R3 - 0x780A000B, // 001B JMPF R2 #0028 - 0x88080305, // 001C GETMBR R2 R1 K5 - 0x8C0C0106, // 001D GETMET R3 R0 K6 - 0x7C0C0200, // 001E CALL R3 1 - 0x600C0009, // 001F GETGBL R3 G9 - 0x6010000A, // 0020 GETGBL R4 G10 - 0x5C140400, // 0021 MOVE R5 R2 - 0x7C100200, // 0022 CALL R4 1 - 0x7C0C0200, // 0023 CALL R3 1 - 0x541203E7, // 0024 LDINT R4 1000 - 0x080C0604, // 0025 MUL R3 R3 R4 - 0x80040600, // 0026 RET 1 R3 - 0x70020004, // 0027 JMP #002D - 0x8C080109, // 0028 GETMET R2 R0 K9 - 0x5810000A, // 0029 LDCONST R4 K10 - 0x7C080400, // 002A CALL R2 2 - 0x540A03E7, // 002B LDINT R2 1000 - 0x80040400, // 002C RET 1 R2 - 0x80000000, // 002D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_init, /* name */ - be_nested_proto( - 3, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(tokens), - /* K1 */ be_nested_str_weak(pos), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(output), - /* K4 */ be_nested_str_weak(errors), - /* K5 */ be_nested_str_weak(run_statements), - /* K6 */ be_nested_str_weak(first_statement), - /* K7 */ be_nested_str_weak(strip_initialized), - /* K8 */ be_nested_str_weak(sequence_names), - /* K9 */ be_nested_str_weak(symbol_table), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[29]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x5C080200, // 0003 MOVE R2 R1 - 0x70020001, // 0004 JMP #0007 - 0x60080012, // 0005 GETGBL R2 G18 - 0x7C080000, // 0006 CALL R2 0 - 0x90020002, // 0007 SETMBR R0 K0 R2 - 0x90020302, // 0008 SETMBR R0 K1 K2 - 0x60080012, // 0009 GETGBL R2 G18 - 0x7C080000, // 000A CALL R2 0 - 0x90020602, // 000B SETMBR R0 K3 R2 - 0x60080012, // 000C GETGBL R2 G18 - 0x7C080000, // 000D CALL R2 0 - 0x90020802, // 000E SETMBR R0 K4 R2 - 0x60080012, // 000F GETGBL R2 G18 - 0x7C080000, // 0010 CALL R2 0 - 0x90020A02, // 0011 SETMBR R0 K5 R2 - 0x50080200, // 0012 LDBOOL R2 1 0 - 0x90020C02, // 0013 SETMBR R0 K6 R2 - 0x50080000, // 0014 LDBOOL R2 0 0 - 0x90020E02, // 0015 SETMBR R0 K7 R2 - 0x60080013, // 0016 GETGBL R2 G19 - 0x7C080000, // 0017 CALL R2 0 - 0x90021002, // 0018 SETMBR R0 K8 R2 - 0x60080013, // 0019 GETGBL R2 G19 - 0x7C080000, // 001A CALL R2 0 - 0x90021202, // 001B SETMBR R0 K9 R2 - 0x80000000, // 001C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: next -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_next, /* name */ +be_local_closure(class_SimpleDSLTranspiler_skip_whitespace, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -4493,24 +3046,45 @@ be_local_closure(class_SimpleDSLTranspiler_next, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(pos), - /* K1 */ be_nested_str_weak(tokens), - /* K2 */ be_const_int(1), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(at_end), + /* K1 */ be_nested_str_weak(current), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(NEWLINE), + /* K6 */ be_nested_str_weak(COMMENT), + /* K7 */ be_nested_str_weak(next), }), - be_str_weak(next), + be_str_weak(skip_whitespace), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x6008000C, // 0001 GETGBL R2 G12 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x14040202, // 0004 LT R1 R1 R2 - 0x78060002, // 0005 JMPF R1 #0009 - 0x88040100, // 0006 GETMBR R1 R0 K0 - 0x00040302, // 0007 ADD R1 R1 K2 - 0x90020001, // 0008 SETMBR R0 K0 R1 - 0x80000000, // 0009 RET 0 + ( &(const binstruction[26]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x74060015, // 0002 JMPT R1 #0019 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x7C040200, // 0004 CALL R1 1 + 0x4C080000, // 0005 LDNIL R2 + 0x20080202, // 0006 NE R2 R1 R2 + 0x780A000E, // 0007 JMPF R2 #0017 + 0x88080302, // 0008 GETMBR R2 R1 K2 + 0xB80E0600, // 0009 GETNGBL R3 K3 + 0x880C0704, // 000A GETMBR R3 R3 K4 + 0x880C0705, // 000B GETMBR R3 R3 K5 + 0x1C080403, // 000C EQ R2 R2 R3 + 0x740A0005, // 000D JMPT R2 #0014 + 0x88080302, // 000E GETMBR R2 R1 K2 + 0xB80E0600, // 000F GETNGBL R3 K3 + 0x880C0704, // 0010 GETMBR R3 R3 K4 + 0x880C0706, // 0011 GETMBR R3 R3 K6 + 0x1C080403, // 0012 EQ R2 R2 R3 + 0x780A0002, // 0013 JMPF R2 #0017 + 0x8C080107, // 0014 GETMET R2 R0 K7 + 0x7C080200, // 0015 CALL R2 1 + 0x70020000, // 0016 JMP #0018 + 0x70020000, // 0017 JMP #0019 + 0x7001FFE6, // 0018 JMP #0000 + 0x80000000, // 0019 RET 0 }) ) ); @@ -4518,9 +3092,193 @@ be_local_closure(class_SimpleDSLTranspiler_next, /* name */ /******************************************************************** -** Solidified function: expect_right_bracket +** Solidified function: get_errors ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_right_bracket, /* name */ +be_local_closure(class_SimpleDSLTranspiler_get_errors, /* 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(errors), + }), + be_str_weak(get_errors), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _process_named_arguments_generic +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_generic, /* name */ + be_nested_proto( + 15, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[24]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_left_paren), + /* K1 */ be_nested_str_weak(_create_instance_for_validation), + /* K2 */ be_nested_str_weak(at_end), + /* K3 */ be_nested_str_weak(check_right_paren), + /* K4 */ be_nested_str_weak(skip_whitespace_including_newlines), + /* K5 */ be_nested_str_weak(expect_identifier), + /* K6 */ be_nested_str_weak(_validate_single_parameter), + /* K7 */ be_nested_str_weak(expect_assign), + /* K8 */ be_nested_str_weak(process_value), + /* K9 */ be_nested_str_weak(argument), + /* K10 */ be_nested_str_weak(collect_inline_comment), + /* K11 */ be_nested_str_weak(add), + /* K12 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), + /* K13 */ be_nested_str_weak(current), + /* K14 */ be_nested_str_weak(type), + /* K15 */ be_nested_str_weak(animation_dsl), + /* K16 */ be_nested_str_weak(Token), + /* K17 */ be_nested_str_weak(COMMENT), + /* K18 */ be_nested_str_weak(next), + /* K19 */ be_nested_str_weak(COMMA), + /* K20 */ be_nested_str_weak(NEWLINE), + /* K21 */ be_nested_str_weak(error), + /* K22 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), + /* K23 */ be_nested_str_weak(expect_right_paren), + }), + be_str_weak(_process_named_arguments_generic), + &be_const_str_solidified, + ( &(const binstruction[109]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x7C0C0200, // 0001 CALL R3 1 + 0x8C0C0101, // 0002 GETMET R3 R0 K1 + 0x5C140400, // 0003 MOVE R5 R2 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C100102, // 0005 GETMET R4 R0 K2 + 0x7C100200, // 0006 CALL R4 1 + 0x74120061, // 0007 JMPT R4 #006A + 0x8C100103, // 0008 GETMET R4 R0 K3 + 0x7C100200, // 0009 CALL R4 1 + 0x7412005E, // 000A JMPT R4 #006A + 0x8C100104, // 000B GETMET R4 R0 K4 + 0x7C100200, // 000C CALL R4 1 + 0x8C100103, // 000D GETMET R4 R0 K3 + 0x7C100200, // 000E CALL R4 1 + 0x78120000, // 000F JMPF R4 #0011 + 0x70020058, // 0010 JMP #006A + 0x8C100105, // 0011 GETMET R4 R0 K5 + 0x7C100200, // 0012 CALL R4 1 + 0x4C140000, // 0013 LDNIL R5 + 0x20140605, // 0014 NE R5 R3 R5 + 0x78160004, // 0015 JMPF R5 #001B + 0x8C140106, // 0016 GETMET R5 R0 K6 + 0x5C1C0400, // 0017 MOVE R7 R2 + 0x5C200800, // 0018 MOVE R8 R4 + 0x5C240600, // 0019 MOVE R9 R3 + 0x7C140800, // 001A CALL R5 4 + 0x8C140107, // 001B GETMET R5 R0 K7 + 0x7C140200, // 001C CALL R5 1 + 0x8C140108, // 001D GETMET R5 R0 K8 + 0x581C0009, // 001E LDCONST R7 K9 + 0x7C140400, // 001F CALL R5 2 + 0x8C18010A, // 0020 GETMET R6 R0 K10 + 0x7C180200, // 0021 CALL R6 1 + 0x8C1C010B, // 0022 GETMET R7 R0 K11 + 0x60240018, // 0023 GETGBL R9 G24 + 0x5828000C, // 0024 LDCONST R10 K12 + 0x5C2C0200, // 0025 MOVE R11 R1 + 0x5C300800, // 0026 MOVE R12 R4 + 0x5C340A00, // 0027 MOVE R13 R5 + 0x5C380C00, // 0028 MOVE R14 R6 + 0x7C240A00, // 0029 CALL R9 5 + 0x7C1C0400, // 002A CALL R7 2 + 0x8C1C0102, // 002B GETMET R7 R0 K2 + 0x7C1C0200, // 002C CALL R7 1 + 0x741E000F, // 002D JMPT R7 #003E + 0x8C1C010D, // 002E GETMET R7 R0 K13 + 0x7C1C0200, // 002F CALL R7 1 + 0x4C200000, // 0030 LDNIL R8 + 0x20200E08, // 0031 NE R8 R7 R8 + 0x78220008, // 0032 JMPF R8 #003C + 0x88200F0E, // 0033 GETMBR R8 R7 K14 + 0xB8261E00, // 0034 GETNGBL R9 K15 + 0x88241310, // 0035 GETMBR R9 R9 K16 + 0x88241311, // 0036 GETMBR R9 R9 K17 + 0x1C201009, // 0037 EQ R8 R8 R9 + 0x78220002, // 0038 JMPF R8 #003C + 0x8C200112, // 0039 GETMET R8 R0 K18 + 0x7C200200, // 003A CALL R8 1 + 0x70020000, // 003B JMP #003D + 0x70020000, // 003C JMP #003E + 0x7001FFEC, // 003D JMP #002B + 0x8C1C010D, // 003E GETMET R7 R0 K13 + 0x7C1C0200, // 003F CALL R7 1 + 0x4C200000, // 0040 LDNIL R8 + 0x201C0E08, // 0041 NE R7 R7 R8 + 0x781E000C, // 0042 JMPF R7 #0050 + 0x8C1C010D, // 0043 GETMET R7 R0 K13 + 0x7C1C0200, // 0044 CALL R7 1 + 0x881C0F0E, // 0045 GETMBR R7 R7 K14 + 0xB8221E00, // 0046 GETNGBL R8 K15 + 0x88201110, // 0047 GETMBR R8 R8 K16 + 0x88201113, // 0048 GETMBR R8 R8 K19 + 0x1C1C0E08, // 0049 EQ R7 R7 R8 + 0x781E0004, // 004A JMPF R7 #0050 + 0x8C1C0112, // 004B GETMET R7 R0 K18 + 0x7C1C0200, // 004C CALL R7 1 + 0x8C1C0104, // 004D GETMET R7 R0 K4 + 0x7C1C0200, // 004E CALL R7 1 + 0x70020018, // 004F JMP #0069 + 0x8C1C010D, // 0050 GETMET R7 R0 K13 + 0x7C1C0200, // 0051 CALL R7 1 + 0x4C200000, // 0052 LDNIL R8 + 0x201C0E08, // 0053 NE R7 R7 R8 + 0x781E000C, // 0054 JMPF R7 #0062 + 0x8C1C010D, // 0055 GETMET R7 R0 K13 + 0x7C1C0200, // 0056 CALL R7 1 + 0x881C0F0E, // 0057 GETMBR R7 R7 K14 + 0xB8221E00, // 0058 GETNGBL R8 K15 + 0x88201110, // 0059 GETMBR R8 R8 K16 + 0x88201114, // 005A GETMBR R8 R8 K20 + 0x1C1C0E08, // 005B EQ R7 R7 R8 + 0x781E0004, // 005C JMPF R7 #0062 + 0x8C1C0112, // 005D GETMET R7 R0 K18 + 0x7C1C0200, // 005E CALL R7 1 + 0x8C1C0104, // 005F GETMET R7 R0 K4 + 0x7C1C0200, // 0060 CALL R7 1 + 0x70020006, // 0061 JMP #0069 + 0x8C1C0103, // 0062 GETMET R7 R0 K3 + 0x7C1C0200, // 0063 CALL R7 1 + 0x741E0003, // 0064 JMPT R7 #0069 + 0x8C1C0115, // 0065 GETMET R7 R0 K21 + 0x58240016, // 0066 LDCONST R9 K22 + 0x7C1C0400, // 0067 CALL R7 2 + 0x70020000, // 0068 JMP #006A + 0x7001FF9A, // 0069 JMP #0005 + 0x8C100117, // 006A GETMET R4 R0 K23 + 0x7C100200, // 006B CALL R4 1 + 0x80000000, // 006C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_right_brace +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_right_brace, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -4535,12 +3293,12 @@ be_local_closure(class_SimpleDSLTranspiler_expect_right_bracket, /* name */ /* K1 */ be_nested_str_weak(type), /* K2 */ be_nested_str_weak(animation_dsl), /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_BRACKET), + /* K4 */ be_nested_str_weak(RIGHT_BRACE), /* K5 */ be_nested_str_weak(next), /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X5D_X27), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X7D_X27), }), - be_str_weak(expect_right_bracket), + be_str_weak(expect_right_brace), &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 @@ -4568,69 +3326,36 @@ be_local_closure(class_SimpleDSLTranspiler_expect_right_bracket, /* name */ /******************************************************************** -** Solidified function: _validate_single_parameter +** Solidified function: get_named_color_value ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_single_parameter, /* name */ +be_local_closure(class_SimpleDSLTranspiler_get_named_color_value, /* name */ be_nested_proto( - 12, /* nstack */ - 4, /* argc */ + 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[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(_has_param), - /* K3 */ be_nested_str_weak(current), - /* K4 */ be_nested_str_weak(line), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Animation_X20_X27_X25s_X27_X20does_X20not_X20have_X20parameter_X20_X27_X25s_X27_X2E_X20Check_X20the_X20animation_X20documentation_X20for_X20valid_X20parameters_X2E), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(animation_dsl), + /* K1 */ be_nested_str_weak(SimpleDSLTranspiler), + /* K2 */ be_nested_str_weak(named_colors), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(0xFFFFFFFF), }), - be_str_weak(_validate_single_parameter), + be_str_weak(get_named_color_value), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0xA802001F, // 0000 EXBLK 0 #0021 - 0xA4120000, // 0001 IMPORT R4 K0 - 0x4C140000, // 0002 LDNIL R5 - 0x20140605, // 0003 NE R5 R3 R5 - 0x78160019, // 0004 JMPF R5 #001F - 0x8C140901, // 0005 GETMET R5 R4 K1 - 0x5C1C0600, // 0006 MOVE R7 R3 - 0x58200002, // 0007 LDCONST R8 K2 - 0x7C140600, // 0008 CALL R5 3 - 0x78160014, // 0009 JMPF R5 #001F - 0x8C140702, // 000A GETMET R5 R3 K2 - 0x5C1C0400, // 000B MOVE R7 R2 - 0x7C140400, // 000C CALL R5 2 - 0x74160010, // 000D JMPT R5 #001F - 0x8C140103, // 000E GETMET R5 R0 K3 - 0x7C140200, // 000F CALL R5 1 - 0x4C180000, // 0010 LDNIL R6 - 0x20140A06, // 0011 NE R5 R5 R6 - 0x78160003, // 0012 JMPF R5 #0017 - 0x8C140103, // 0013 GETMET R5 R0 K3 - 0x7C140200, // 0014 CALL R5 1 - 0x88140B04, // 0015 GETMBR R5 R5 K4 - 0x70020000, // 0016 JMP #0018 - 0x58140005, // 0017 LDCONST R5 K5 - 0x8C180106, // 0018 GETMET R6 R0 K6 - 0x60200018, // 0019 GETGBL R8 G24 - 0x58240007, // 001A LDCONST R9 K7 - 0x5C280200, // 001B MOVE R10 R1 - 0x5C2C0400, // 001C MOVE R11 R2 - 0x7C200600, // 001D CALL R8 3 - 0x7C180400, // 001E CALL R6 2 - 0xA8040001, // 001F EXBLK 1 1 - 0x70020003, // 0020 JMP #0025 - 0xAC100002, // 0021 CATCH R4 0 2 - 0x70020000, // 0022 JMP #0024 - 0x70020000, // 0023 JMP #0025 - 0xB0080000, // 0024 RAISE 2 R0 R0 - 0x80000000, // 0025 RET 0 + ( &(const binstruction[ 8]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x88080501, // 0001 GETMBR R2 R2 K1 + 0x88080502, // 0002 GETMBR R2 R2 K2 + 0x8C080503, // 0003 GETMET R2 R2 K3 + 0x5C100200, // 0004 MOVE R4 R1 + 0x58140004, // 0005 LDCONST R5 K4 + 0x7C080600, // 0006 CALL R2 3 + 0x80040400, // 0007 RET 1 R2 }) ) ); @@ -4638,217 +3363,9 @@ be_local_closure(class_SimpleDSLTranspiler__validate_single_parameter, /* name /******************************************************************** -** Solidified function: process_palette +** Solidified function: expect_colon ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_palette, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[37]) { /* constants */ - /* K0 */ be_nested_str_weak(next), - /* K1 */ be_nested_str_weak(expect_identifier), - /* K2 */ be_nested_str_weak(validate_user_name), - /* K3 */ be_nested_str_weak(palette), - /* K4 */ be_nested_str_weak(skip_statement), - /* K5 */ be_nested_str_weak(expect_assign), - /* K6 */ be_nested_str_weak(expect_left_bracket), - /* K7 */ be_nested_str_weak(at_end), - /* K8 */ be_nested_str_weak(check_right_bracket), - /* K9 */ be_nested_str_weak(skip_whitespace_including_newlines), - /* K10 */ be_nested_str_weak(expect_left_paren), - /* K11 */ be_nested_str_weak(expect_number), - /* K12 */ be_nested_str_weak(expect_comma), - /* K13 */ be_nested_str_weak(process_value), - /* K14 */ be_nested_str_weak(color), - /* K15 */ be_nested_str_weak(expect_right_paren), - /* K16 */ be_nested_str_weak(convert_to_vrgb), - /* K17 */ be_nested_str_weak(push), - /* K18 */ be_nested_str_weak(_X22_X25s_X22), - /* K19 */ be_nested_str_weak(current), - /* K20 */ be_nested_str_weak(type), - /* K21 */ be_nested_str_weak(animation_dsl), - /* K22 */ be_nested_str_weak(Token), - /* K23 */ be_nested_str_weak(COMMENT), - /* K24 */ be_nested_str_weak(COMMA), - /* K25 */ be_nested_str_weak(NEWLINE), - /* K26 */ be_nested_str_weak(error), - /* K27 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X5D_X27_X20in_X20palette_X20definition), - /* K28 */ be_nested_str_weak(expect_right_bracket), - /* K29 */ be_nested_str_weak(collect_inline_comment), - /* K30 */ be_nested_str_weak(), - /* K31 */ be_const_int(0), - /* K32 */ be_const_int(1), - /* K33 */ be_nested_str_weak(_X20), - /* K34 */ be_nested_str_weak(stop_iteration), - /* K35 */ be_nested_str_weak(add), - /* K36 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20bytes_X28_X25s_X29_X25s), - }), - be_str_weak(process_palette), - &be_const_str_solidified, - ( &(const binstruction[147]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C040101, // 0002 GETMET R1 R0 K1 - 0x7C040200, // 0003 CALL R1 1 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x5C100200, // 0005 MOVE R4 R1 - 0x58140003, // 0006 LDCONST R5 K3 - 0x7C080600, // 0007 CALL R2 3 - 0x740A0002, // 0008 JMPT R2 #000C - 0x8C080104, // 0009 GETMET R2 R0 K4 - 0x7C080200, // 000A CALL R2 1 - 0x80000400, // 000B RET 0 - 0x8C080105, // 000C GETMET R2 R0 K5 - 0x7C080200, // 000D CALL R2 1 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x7C080200, // 000F CALL R2 1 - 0x60080012, // 0010 GETGBL R2 G18 - 0x7C080000, // 0011 CALL R2 0 - 0x8C0C0107, // 0012 GETMET R3 R0 K7 - 0x7C0C0200, // 0013 CALL R3 1 - 0x740E005C, // 0014 JMPT R3 #0072 - 0x8C0C0108, // 0015 GETMET R3 R0 K8 - 0x7C0C0200, // 0016 CALL R3 1 - 0x740E0059, // 0017 JMPT R3 #0072 - 0x8C0C0109, // 0018 GETMET R3 R0 K9 - 0x7C0C0200, // 0019 CALL R3 1 - 0x8C0C0108, // 001A GETMET R3 R0 K8 - 0x7C0C0200, // 001B CALL R3 1 - 0x780E0000, // 001C JMPF R3 #001E - 0x70020053, // 001D JMP #0072 - 0x8C0C010A, // 001E GETMET R3 R0 K10 - 0x7C0C0200, // 001F CALL R3 1 - 0x8C0C010B, // 0020 GETMET R3 R0 K11 - 0x7C0C0200, // 0021 CALL R3 1 - 0x8C10010C, // 0022 GETMET R4 R0 K12 - 0x7C100200, // 0023 CALL R4 1 - 0x8C10010D, // 0024 GETMET R4 R0 K13 - 0x5818000E, // 0025 LDCONST R6 K14 - 0x7C100400, // 0026 CALL R4 2 - 0x8C14010F, // 0027 GETMET R5 R0 K15 - 0x7C140200, // 0028 CALL R5 1 - 0x8C140110, // 0029 GETMET R5 R0 K16 - 0x5C1C0600, // 002A MOVE R7 R3 - 0x5C200800, // 002B MOVE R8 R4 - 0x7C140600, // 002C CALL R5 3 - 0x8C180511, // 002D GETMET R6 R2 K17 - 0x60200018, // 002E GETGBL R8 G24 - 0x58240012, // 002F LDCONST R9 K18 - 0x5C280A00, // 0030 MOVE R10 R5 - 0x7C200400, // 0031 CALL R8 2 - 0x7C180400, // 0032 CALL R6 2 - 0x8C180107, // 0033 GETMET R6 R0 K7 - 0x7C180200, // 0034 CALL R6 1 - 0x741A000F, // 0035 JMPT R6 #0046 - 0x8C180113, // 0036 GETMET R6 R0 K19 - 0x7C180200, // 0037 CALL R6 1 - 0x4C1C0000, // 0038 LDNIL R7 - 0x201C0C07, // 0039 NE R7 R6 R7 - 0x781E0008, // 003A JMPF R7 #0044 - 0x881C0D14, // 003B GETMBR R7 R6 K20 - 0xB8222A00, // 003C GETNGBL R8 K21 - 0x88201116, // 003D GETMBR R8 R8 K22 - 0x88201117, // 003E GETMBR R8 R8 K23 - 0x1C1C0E08, // 003F EQ R7 R7 R8 - 0x781E0002, // 0040 JMPF R7 #0044 - 0x8C1C0100, // 0041 GETMET R7 R0 K0 - 0x7C1C0200, // 0042 CALL R7 1 - 0x70020000, // 0043 JMP #0045 - 0x70020000, // 0044 JMP #0046 - 0x7001FFEC, // 0045 JMP #0033 - 0x8C180113, // 0046 GETMET R6 R0 K19 - 0x7C180200, // 0047 CALL R6 1 - 0x4C1C0000, // 0048 LDNIL R7 - 0x20180C07, // 0049 NE R6 R6 R7 - 0x781A000C, // 004A JMPF R6 #0058 - 0x8C180113, // 004B GETMET R6 R0 K19 - 0x7C180200, // 004C CALL R6 1 - 0x88180D14, // 004D GETMBR R6 R6 K20 - 0xB81E2A00, // 004E GETNGBL R7 K21 - 0x881C0F16, // 004F GETMBR R7 R7 K22 - 0x881C0F18, // 0050 GETMBR R7 R7 K24 - 0x1C180C07, // 0051 EQ R6 R6 R7 - 0x781A0004, // 0052 JMPF R6 #0058 - 0x8C180100, // 0053 GETMET R6 R0 K0 - 0x7C180200, // 0054 CALL R6 1 - 0x8C180109, // 0055 GETMET R6 R0 K9 - 0x7C180200, // 0056 CALL R6 1 - 0x70020018, // 0057 JMP #0071 - 0x8C180113, // 0058 GETMET R6 R0 K19 - 0x7C180200, // 0059 CALL R6 1 - 0x4C1C0000, // 005A LDNIL R7 - 0x20180C07, // 005B NE R6 R6 R7 - 0x781A000C, // 005C JMPF R6 #006A - 0x8C180113, // 005D GETMET R6 R0 K19 - 0x7C180200, // 005E CALL R6 1 - 0x88180D14, // 005F GETMBR R6 R6 K20 - 0xB81E2A00, // 0060 GETNGBL R7 K21 - 0x881C0F16, // 0061 GETMBR R7 R7 K22 - 0x881C0F19, // 0062 GETMBR R7 R7 K25 - 0x1C180C07, // 0063 EQ R6 R6 R7 - 0x781A0004, // 0064 JMPF R6 #006A - 0x8C180100, // 0065 GETMET R6 R0 K0 - 0x7C180200, // 0066 CALL R6 1 - 0x8C180109, // 0067 GETMET R6 R0 K9 - 0x7C180200, // 0068 CALL R6 1 - 0x70020006, // 0069 JMP #0071 - 0x8C180108, // 006A GETMET R6 R0 K8 - 0x7C180200, // 006B CALL R6 1 - 0x741A0003, // 006C JMPT R6 #0071 - 0x8C18011A, // 006D GETMET R6 R0 K26 - 0x5820001B, // 006E LDCONST R8 K27 - 0x7C180400, // 006F CALL R6 2 - 0x70020000, // 0070 JMP #0072 - 0x7001FF9F, // 0071 JMP #0012 - 0x8C0C011C, // 0072 GETMET R3 R0 K28 - 0x7C0C0200, // 0073 CALL R3 1 - 0x8C0C011D, // 0074 GETMET R3 R0 K29 - 0x7C0C0200, // 0075 CALL R3 1 - 0x5810001E, // 0076 LDCONST R4 K30 - 0x60140010, // 0077 GETGBL R5 G16 - 0x6018000C, // 0078 GETGBL R6 G12 - 0x5C1C0400, // 0079 MOVE R7 R2 - 0x7C180200, // 007A CALL R6 1 - 0x04180D20, // 007B SUB R6 R6 K32 - 0x401A3E06, // 007C CONNECT R6 K31 R6 - 0x7C140200, // 007D CALL R5 1 - 0xA8020007, // 007E EXBLK 0 #0087 - 0x5C180A00, // 007F MOVE R6 R5 - 0x7C180000, // 0080 CALL R6 0 - 0x241C0D1F, // 0081 GT R7 R6 K31 - 0x781E0000, // 0082 JMPF R7 #0084 - 0x00100921, // 0083 ADD R4 R4 K33 - 0x941C0406, // 0084 GETIDX R7 R2 R6 - 0x00100807, // 0085 ADD R4 R4 R7 - 0x7001FFF7, // 0086 JMP #007F - 0x58140022, // 0087 LDCONST R5 K34 - 0xAC140200, // 0088 CATCH R5 1 0 - 0xB0080000, // 0089 RAISE 2 R0 R0 - 0x8C140123, // 008A GETMET R5 R0 K35 - 0x601C0018, // 008B GETGBL R7 G24 - 0x58200024, // 008C LDCONST R8 K36 - 0x5C240200, // 008D MOVE R9 R1 - 0x5C280800, // 008E MOVE R10 R4 - 0x5C2C0600, // 008F MOVE R11 R3 - 0x7C1C0800, // 0090 CALL R7 4 - 0x7C140400, // 0091 CALL R5 2 - 0x80000000, // 0092 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_comma -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_comma, /* name */ +be_local_closure(class_SimpleDSLTranspiler_expect_colon, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -4863,12 +3380,855 @@ be_local_closure(class_SimpleDSLTranspiler_expect_comma, /* name */ /* K1 */ be_nested_str_weak(type), /* K2 */ be_nested_str_weak(animation_dsl), /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(COMMA), + /* K4 */ be_nested_str_weak(COLON), /* K5 */ be_nested_str_weak(next), /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X2C_X27), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X3A_X27), }), - be_str_weak(expect_comma), + be_str_weak(expect_colon), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_sequence_assignment_fluent +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_assignment_fluent, /* name */ + be_nested_proto( + 13, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_identifier), + /* K1 */ be_nested_str_weak(expect_dot), + /* K2 */ be_nested_str_weak(expect_assign), + /* K3 */ be_nested_str_weak(process_value), + /* K4 */ be_nested_str_weak(property), + /* K5 */ be_nested_str_weak(collect_inline_comment), + /* K6 */ be_nested_str_weak(def_X20_X28engine_X29_X20_X25s__X2E_X25s_X20_X3D_X20_X25s_X20end), + /* K7 */ be_nested_str_weak(add), + /* K8 */ be_nested_str_weak(_X25s_X2Epush_assign_step_X28_X25s_X29_X25s), + /* K9 */ be_nested_str_weak(get_indent), + }), + be_str_weak(process_sequence_assignment_fluent), + &be_const_str_solidified, + ( &(const binstruction[29]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x8C080100, // 0004 GETMET R2 R0 K0 + 0x7C080200, // 0005 CALL R2 1 + 0x8C0C0102, // 0006 GETMET R3 R0 K2 + 0x7C0C0200, // 0007 CALL R3 1 + 0x8C0C0103, // 0008 GETMET R3 R0 K3 + 0x58140004, // 0009 LDCONST R5 K4 + 0x7C0C0400, // 000A CALL R3 2 + 0x8C100105, // 000B GETMET R4 R0 K5 + 0x7C100200, // 000C CALL R4 1 + 0x60140018, // 000D GETGBL R5 G24 + 0x58180006, // 000E LDCONST R6 K6 + 0x5C1C0200, // 000F MOVE R7 R1 + 0x5C200400, // 0010 MOVE R8 R2 + 0x5C240600, // 0011 MOVE R9 R3 + 0x7C140800, // 0012 CALL R5 4 + 0x8C180107, // 0013 GETMET R6 R0 K7 + 0x60200018, // 0014 GETGBL R8 G24 + 0x58240008, // 0015 LDCONST R9 K8 + 0x8C280109, // 0016 GETMET R10 R0 K9 + 0x7C280200, // 0017 CALL R10 1 + 0x5C2C0A00, // 0018 MOVE R11 R5 + 0x5C300800, // 0019 MOVE R12 R4 + 0x7C200800, // 001A CALL R8 4 + 0x7C180400, // 001B CALL R6 2 + 0x80000000, // 001C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: skip_whitespace_including_newlines +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_skip_whitespace_including_newlines, /* 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(at_end), + /* K1 */ be_nested_str_weak(current), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(COMMENT), + /* K6 */ be_nested_str_weak(NEWLINE), + /* K7 */ be_nested_str_weak(next), + }), + be_str_weak(skip_whitespace_including_newlines), + &be_const_str_solidified, + ( &(const binstruction[26]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x74060015, // 0002 JMPT R1 #0019 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x7C040200, // 0004 CALL R1 1 + 0x4C080000, // 0005 LDNIL R2 + 0x20080202, // 0006 NE R2 R1 R2 + 0x780A000E, // 0007 JMPF R2 #0017 + 0x88080302, // 0008 GETMBR R2 R1 K2 + 0xB80E0600, // 0009 GETNGBL R3 K3 + 0x880C0704, // 000A GETMBR R3 R3 K4 + 0x880C0705, // 000B GETMBR R3 R3 K5 + 0x1C080403, // 000C EQ R2 R2 R3 + 0x740A0005, // 000D JMPT R2 #0014 + 0x88080302, // 000E GETMBR R2 R1 K2 + 0xB80E0600, // 000F GETNGBL R3 K3 + 0x880C0704, // 0010 GETMBR R3 R3 K4 + 0x880C0706, // 0011 GETMBR R3 R3 K6 + 0x1C080403, // 0012 EQ R2 R2 R3 + 0x780A0002, // 0013 JMPF R2 #0017 + 0x8C080107, // 0014 GETMET R2 R0 K7 + 0x7C080200, // 0015 CALL R2 1 + 0x70020000, // 0016 JMP #0018 + 0x70020000, // 0017 JMP #0019 + 0x7001FFE6, // 0018 JMP #0000 + 0x80000000, // 0019 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_play_statement +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_play_statement, /* name */ + be_nested_proto( + 14, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[22]) { /* constants */ + /* K0 */ be_nested_str_weak(next), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(IDENTIFIER), + /* K7 */ be_nested_str_weak(KEYWORD), + /* K8 */ be_nested_str_weak(peek), + /* K9 */ be_nested_str_weak(LEFT_PAREN), + /* K10 */ be_nested_str_weak(process_nested_function_call), + /* K11 */ be_nested_str_weak(expect_identifier), + /* K12 */ be_nested_str_weak(_validate_object_reference), + /* K13 */ be_nested_str_weak(sequence_X20play), + /* K14 */ be_nested_str_weak(animation_X2Eglobal_X28_X27_X25s__X27_X29), + /* K15 */ be_nested_str_weak(0), + /* K16 */ be_nested_str_weak(value), + /* K17 */ be_nested_str_weak(for), + /* K18 */ be_nested_str_weak(process_time_value), + /* K19 */ be_nested_str_weak(collect_inline_comment), + /* K20 */ be_nested_str_weak(add), + /* K21 */ be_nested_str_weak(_X20_X20_X25s_X2Epush_X28animation_X2Ecreate_play_step_X28_X25s_X2C_X20_X25s_X29_X29_X25s), + }), + be_str_weak(process_play_statement), + &be_const_str_solidified, + ( &(const binstruction[86]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x58080001, // 0002 LDCONST R2 K1 + 0x8C0C0102, // 0003 GETMET R3 R0 K2 + 0x7C0C0200, // 0004 CALL R3 1 + 0x4C100000, // 0005 LDNIL R4 + 0x20100604, // 0006 NE R4 R3 R4 + 0x7812001C, // 0007 JMPF R4 #0025 + 0x88100703, // 0008 GETMBR R4 R3 K3 + 0xB8160800, // 0009 GETNGBL R5 K4 + 0x88140B05, // 000A GETMBR R5 R5 K5 + 0x88140B06, // 000B GETMBR R5 R5 K6 + 0x1C100805, // 000C EQ R4 R4 R5 + 0x74120005, // 000D JMPT R4 #0014 + 0x88100703, // 000E GETMBR R4 R3 K3 + 0xB8160800, // 000F GETNGBL R5 K4 + 0x88140B05, // 0010 GETMBR R5 R5 K5 + 0x88140B07, // 0011 GETMBR R5 R5 K7 + 0x1C100805, // 0012 EQ R4 R4 R5 + 0x78120010, // 0013 JMPF R4 #0025 + 0x8C100108, // 0014 GETMET R4 R0 K8 + 0x7C100200, // 0015 CALL R4 1 + 0x4C140000, // 0016 LDNIL R5 + 0x20100805, // 0017 NE R4 R4 R5 + 0x7812000B, // 0018 JMPF R4 #0025 + 0x8C100108, // 0019 GETMET R4 R0 K8 + 0x7C100200, // 001A CALL R4 1 + 0x88100903, // 001B GETMBR R4 R4 K3 + 0xB8160800, // 001C GETNGBL R5 K4 + 0x88140B05, // 001D GETMBR R5 R5 K5 + 0x88140B09, // 001E GETMBR R5 R5 K9 + 0x1C100805, // 001F EQ R4 R4 R5 + 0x78120003, // 0020 JMPF R4 #0025 + 0x8C10010A, // 0021 GETMET R4 R0 K10 + 0x7C100200, // 0022 CALL R4 1 + 0x5C080800, // 0023 MOVE R2 R4 + 0x7002000A, // 0024 JMP #0030 + 0x8C10010B, // 0025 GETMET R4 R0 K11 + 0x7C100200, // 0026 CALL R4 1 + 0x8C14010C, // 0027 GETMET R5 R0 K12 + 0x5C1C0800, // 0028 MOVE R7 R4 + 0x5820000D, // 0029 LDCONST R8 K13 + 0x7C140600, // 002A CALL R5 3 + 0x60140018, // 002B GETGBL R5 G24 + 0x5818000E, // 002C LDCONST R6 K14 + 0x5C1C0800, // 002D MOVE R7 R4 + 0x7C140400, // 002E CALL R5 2 + 0x5C080A00, // 002F MOVE R2 R5 + 0x5810000F, // 0030 LDCONST R4 K15 + 0x8C140102, // 0031 GETMET R5 R0 K2 + 0x7C140200, // 0032 CALL R5 1 + 0x4C180000, // 0033 LDNIL R6 + 0x20140A06, // 0034 NE R5 R5 R6 + 0x78160013, // 0035 JMPF R5 #004A + 0x8C140102, // 0036 GETMET R5 R0 K2 + 0x7C140200, // 0037 CALL R5 1 + 0x88140B03, // 0038 GETMBR R5 R5 K3 + 0xB81A0800, // 0039 GETNGBL R6 K4 + 0x88180D05, // 003A GETMBR R6 R6 K5 + 0x88180D07, // 003B GETMBR R6 R6 K7 + 0x1C140A06, // 003C EQ R5 R5 R6 + 0x7816000B, // 003D JMPF R5 #004A + 0x8C140102, // 003E GETMET R5 R0 K2 + 0x7C140200, // 003F CALL R5 1 + 0x88140B10, // 0040 GETMBR R5 R5 K16 + 0x1C140B11, // 0041 EQ R5 R5 K17 + 0x78160006, // 0042 JMPF R5 #004A + 0x8C140100, // 0043 GETMET R5 R0 K0 + 0x7C140200, // 0044 CALL R5 1 + 0x60140008, // 0045 GETGBL R5 G8 + 0x8C180112, // 0046 GETMET R6 R0 K18 + 0x7C180200, // 0047 CALL R6 1 + 0x7C140200, // 0048 CALL R5 1 + 0x5C100A00, // 0049 MOVE R4 R5 + 0x8C140113, // 004A GETMET R5 R0 K19 + 0x7C140200, // 004B CALL R5 1 + 0x8C180114, // 004C GETMET R6 R0 K20 + 0x60200018, // 004D GETGBL R8 G24 + 0x58240015, // 004E LDCONST R9 K21 + 0x5C280200, // 004F MOVE R10 R1 + 0x5C2C0400, // 0050 MOVE R11 R2 + 0x5C300800, // 0051 MOVE R12 R4 + 0x5C340A00, // 0052 MOVE R13 R5 + 0x7C200A00, // 0053 CALL R8 5 + 0x7C180400, // 0054 CALL R6 2 + 0x80000000, // 0055 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_function_call +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_function_call, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[22]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(IDENTIFIER), + /* K6 */ be_nested_str_weak(KEYWORD), + /* K7 */ be_nested_str_weak(value), + /* K8 */ be_nested_str_weak(next), + /* K9 */ be_nested_str_weak(error), + /* K10 */ be_nested_str_weak(Expected_X20function_X20name), + /* K11 */ be_nested_str_weak(nil), + /* K12 */ be_nested_str_weak(is_math_method), + /* K13 */ be_nested_str_weak(process_function_arguments), + /* K14 */ be_nested_str_weak(_X25s_X28_X25s_X29), + /* K15 */ be_nested_str_weak(animation), + /* K16 */ be_nested_str_weak(is_user_function), + /* K17 */ be_nested_str_weak(engine_X2C_X20_X25s), + /* K18 */ be_nested_str_weak(engine), + /* K19 */ be_nested_str_weak(animation_X2Eget_user_function_X28_X27_X25s_X27_X29_X28_X25s_X29), + /* K20 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X2C_X20_X25s_X29), + /* K21 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X29), + }), + be_str_weak(process_function_call), + &be_const_str_solidified, + ( &(const binstruction[75]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x580C0001, // 0002 LDCONST R3 K1 + 0x4C100000, // 0003 LDNIL R4 + 0x20100404, // 0004 NE R4 R2 R4 + 0x7812000F, // 0005 JMPF R4 #0016 + 0x88100502, // 0006 GETMBR R4 R2 K2 + 0xB8160600, // 0007 GETNGBL R5 K3 + 0x88140B04, // 0008 GETMBR R5 R5 K4 + 0x88140B05, // 0009 GETMBR R5 R5 K5 + 0x1C100805, // 000A EQ R4 R4 R5 + 0x74120005, // 000B JMPT R4 #0012 + 0x88100502, // 000C GETMBR R4 R2 K2 + 0xB8160600, // 000D GETNGBL R5 K3 + 0x88140B04, // 000E GETMBR R5 R5 K4 + 0x88140B06, // 000F GETMBR R5 R5 K6 + 0x1C100805, // 0010 EQ R4 R4 R5 + 0x78120003, // 0011 JMPF R4 #0016 + 0x880C0507, // 0012 GETMBR R3 R2 K7 + 0x8C100108, // 0013 GETMET R4 R0 K8 + 0x7C100200, // 0014 CALL R4 1 + 0x70020003, // 0015 JMP #001A + 0x8C100109, // 0016 GETMET R4 R0 K9 + 0x5818000A, // 0017 LDCONST R6 K10 + 0x7C100400, // 0018 CALL R4 2 + 0x80061600, // 0019 RET 1 K11 + 0x8C10010C, // 001A GETMET R4 R0 K12 + 0x5C180600, // 001B MOVE R6 R3 + 0x7C100400, // 001C CALL R4 2 + 0x78120007, // 001D JMPF R4 #0026 + 0x8C10010D, // 001E GETMET R4 R0 K13 + 0x7C100200, // 001F CALL R4 1 + 0x60140018, // 0020 GETGBL R5 G24 + 0x5818000E, // 0021 LDCONST R6 K14 + 0x5C1C0600, // 0022 MOVE R7 R3 + 0x5C200800, // 0023 MOVE R8 R4 + 0x7C140600, // 0024 CALL R5 3 + 0x80040A00, // 0025 RET 1 R5 + 0x8C10010D, // 0026 GETMET R4 R0 K13 + 0x7C100200, // 0027 CALL R4 1 + 0xB8161E00, // 0028 GETNGBL R5 K15 + 0x8C140B10, // 0029 GETMET R5 R5 K16 + 0x5C1C0600, // 002A MOVE R7 R3 + 0x7C140400, // 002B CALL R5 2 + 0x7816000E, // 002C JMPF R5 #003C + 0x20140901, // 002D NE R5 R4 K1 + 0x78160004, // 002E JMPF R5 #0034 + 0x60140018, // 002F GETGBL R5 G24 + 0x58180011, // 0030 LDCONST R6 K17 + 0x5C1C0800, // 0031 MOVE R7 R4 + 0x7C140400, // 0032 CALL R5 2 + 0x70020000, // 0033 JMP #0035 + 0x58140012, // 0034 LDCONST R5 K18 + 0x60180018, // 0035 GETGBL R6 G24 + 0x581C0013, // 0036 LDCONST R7 K19 + 0x5C200600, // 0037 MOVE R8 R3 + 0x5C240A00, // 0038 MOVE R9 R5 + 0x7C180600, // 0039 CALL R6 3 + 0x80040C00, // 003A RET 1 R6 + 0x7002000D, // 003B JMP #004A + 0x20140901, // 003C NE R5 R4 K1 + 0x78160006, // 003D JMPF R5 #0045 + 0x60140018, // 003E GETGBL R5 G24 + 0x58180014, // 003F LDCONST R6 K20 + 0x5C1C0600, // 0040 MOVE R7 R3 + 0x5C200800, // 0041 MOVE R8 R4 + 0x7C140600, // 0042 CALL R5 3 + 0x80040A00, // 0043 RET 1 R5 + 0x70020004, // 0044 JMP #004A + 0x60140018, // 0045 GETGBL R5 G24 + 0x58180015, // 0046 LDCONST R6 K21 + 0x5C1C0600, // 0047 MOVE R7 R3 + 0x7C140400, // 0048 CALL R5 2 + 0x80040A00, // 0049 RET 1 R5 + 0x80000000, // 004A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _generate_anonymous_function_call +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__generate_anonymous_function_call, /* name */ + be_nested_proto( + 14, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[33]) { /* constants */ + /* K0 */ be_nested_str_weak(push), + /* K1 */ be_nested_str_weak(_X28def_X20_X28engine_X29), + /* K2 */ be_nested_str_weak(_X20_X20var_X20provider_X20_X3D_X20animation_X2E_X25s_X28engine_X29), + /* K3 */ be_nested_str_weak(expect_left_paren), + /* K4 */ be_nested_str_weak(_create_instance_for_validation), + /* K5 */ be_nested_str_weak(at_end), + /* K6 */ be_nested_str_weak(check_right_paren), + /* K7 */ be_nested_str_weak(skip_whitespace_including_newlines), + /* K8 */ be_nested_str_weak(expect_identifier), + /* K9 */ be_nested_str_weak(_validate_single_parameter), + /* K10 */ be_nested_str_weak(expect_assign), + /* K11 */ be_nested_str_weak(process_value), + /* K12 */ be_nested_str_weak(argument), + /* K13 */ be_nested_str_weak(collect_inline_comment), + /* K14 */ be_nested_str_weak(_X20_X20provider_X2E_X25s_X20_X3D_X20_X25s_X25s), + /* K15 */ be_nested_str_weak(current), + /* K16 */ be_nested_str_weak(type), + /* K17 */ be_nested_str_weak(animation_dsl), + /* K18 */ be_nested_str_weak(Token), + /* K19 */ be_nested_str_weak(COMMENT), + /* K20 */ be_nested_str_weak(next), + /* K21 */ be_nested_str_weak(COMMA), + /* K22 */ be_nested_str_weak(NEWLINE), + /* K23 */ be_nested_str_weak(error), + /* K24 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), + /* K25 */ be_nested_str_weak(expect_right_paren), + /* K26 */ be_nested_str_weak(_X20_X20return_X20provider), + /* K27 */ be_nested_str_weak(end_X29_X28engine_X29), + /* K28 */ be_nested_str_weak(), + /* K29 */ be_const_int(0), + /* K30 */ be_const_int(1), + /* K31 */ be_nested_str_weak(_X0A), + /* K32 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(_generate_anonymous_function_call), + &be_const_str_solidified, + ( &(const binstruction[145]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x8C0C0500, // 0002 GETMET R3 R2 K0 + 0x58140001, // 0003 LDCONST R5 K1 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C0C0500, // 0005 GETMET R3 R2 K0 + 0x60140018, // 0006 GETGBL R5 G24 + 0x58180002, // 0007 LDCONST R6 K2 + 0x5C1C0200, // 0008 MOVE R7 R1 + 0x7C140400, // 0009 CALL R5 2 + 0x7C0C0400, // 000A CALL R3 2 + 0x8C0C0103, // 000B GETMET R3 R0 K3 + 0x7C0C0200, // 000C CALL R3 1 + 0x8C0C0104, // 000D GETMET R3 R0 K4 + 0x5C140200, // 000E MOVE R5 R1 + 0x7C0C0400, // 000F CALL R3 2 + 0x8C100105, // 0010 GETMET R4 R0 K5 + 0x7C100200, // 0011 CALL R4 1 + 0x74120060, // 0012 JMPT R4 #0074 + 0x8C100106, // 0013 GETMET R4 R0 K6 + 0x7C100200, // 0014 CALL R4 1 + 0x7412005D, // 0015 JMPT R4 #0074 + 0x8C100107, // 0016 GETMET R4 R0 K7 + 0x7C100200, // 0017 CALL R4 1 + 0x8C100106, // 0018 GETMET R4 R0 K6 + 0x7C100200, // 0019 CALL R4 1 + 0x78120000, // 001A JMPF R4 #001C + 0x70020057, // 001B JMP #0074 + 0x8C100108, // 001C GETMET R4 R0 K8 + 0x7C100200, // 001D CALL R4 1 + 0x4C140000, // 001E LDNIL R5 + 0x20140605, // 001F NE R5 R3 R5 + 0x78160004, // 0020 JMPF R5 #0026 + 0x8C140109, // 0021 GETMET R5 R0 K9 + 0x5C1C0200, // 0022 MOVE R7 R1 + 0x5C200800, // 0023 MOVE R8 R4 + 0x5C240600, // 0024 MOVE R9 R3 + 0x7C140800, // 0025 CALL R5 4 + 0x8C14010A, // 0026 GETMET R5 R0 K10 + 0x7C140200, // 0027 CALL R5 1 + 0x8C14010B, // 0028 GETMET R5 R0 K11 + 0x581C000C, // 0029 LDCONST R7 K12 + 0x7C140400, // 002A CALL R5 2 + 0x8C18010D, // 002B GETMET R6 R0 K13 + 0x7C180200, // 002C CALL R6 1 + 0x8C1C0500, // 002D GETMET R7 R2 K0 + 0x60240018, // 002E GETGBL R9 G24 + 0x5828000E, // 002F LDCONST R10 K14 + 0x5C2C0800, // 0030 MOVE R11 R4 + 0x5C300A00, // 0031 MOVE R12 R5 + 0x5C340C00, // 0032 MOVE R13 R6 + 0x7C240800, // 0033 CALL R9 4 + 0x7C1C0400, // 0034 CALL R7 2 + 0x8C1C0105, // 0035 GETMET R7 R0 K5 + 0x7C1C0200, // 0036 CALL R7 1 + 0x741E000F, // 0037 JMPT R7 #0048 + 0x8C1C010F, // 0038 GETMET R7 R0 K15 + 0x7C1C0200, // 0039 CALL R7 1 + 0x4C200000, // 003A LDNIL R8 + 0x20200E08, // 003B NE R8 R7 R8 + 0x78220008, // 003C JMPF R8 #0046 + 0x88200F10, // 003D GETMBR R8 R7 K16 + 0xB8262200, // 003E GETNGBL R9 K17 + 0x88241312, // 003F GETMBR R9 R9 K18 + 0x88241313, // 0040 GETMBR R9 R9 K19 + 0x1C201009, // 0041 EQ R8 R8 R9 + 0x78220002, // 0042 JMPF R8 #0046 + 0x8C200114, // 0043 GETMET R8 R0 K20 + 0x7C200200, // 0044 CALL R8 1 + 0x70020000, // 0045 JMP #0047 + 0x70020000, // 0046 JMP #0048 + 0x7001FFEC, // 0047 JMP #0035 + 0x8C1C010F, // 0048 GETMET R7 R0 K15 + 0x7C1C0200, // 0049 CALL R7 1 + 0x4C200000, // 004A LDNIL R8 + 0x201C0E08, // 004B NE R7 R7 R8 + 0x781E000C, // 004C JMPF R7 #005A + 0x8C1C010F, // 004D GETMET R7 R0 K15 + 0x7C1C0200, // 004E CALL R7 1 + 0x881C0F10, // 004F GETMBR R7 R7 K16 + 0xB8222200, // 0050 GETNGBL R8 K17 + 0x88201112, // 0051 GETMBR R8 R8 K18 + 0x88201115, // 0052 GETMBR R8 R8 K21 + 0x1C1C0E08, // 0053 EQ R7 R7 R8 + 0x781E0004, // 0054 JMPF R7 #005A + 0x8C1C0114, // 0055 GETMET R7 R0 K20 + 0x7C1C0200, // 0056 CALL R7 1 + 0x8C1C0107, // 0057 GETMET R7 R0 K7 + 0x7C1C0200, // 0058 CALL R7 1 + 0x70020018, // 0059 JMP #0073 + 0x8C1C010F, // 005A GETMET R7 R0 K15 + 0x7C1C0200, // 005B CALL R7 1 + 0x4C200000, // 005C LDNIL R8 + 0x201C0E08, // 005D NE R7 R7 R8 + 0x781E000C, // 005E JMPF R7 #006C + 0x8C1C010F, // 005F GETMET R7 R0 K15 + 0x7C1C0200, // 0060 CALL R7 1 + 0x881C0F10, // 0061 GETMBR R7 R7 K16 + 0xB8222200, // 0062 GETNGBL R8 K17 + 0x88201112, // 0063 GETMBR R8 R8 K18 + 0x88201116, // 0064 GETMBR R8 R8 K22 + 0x1C1C0E08, // 0065 EQ R7 R7 R8 + 0x781E0004, // 0066 JMPF R7 #006C + 0x8C1C0114, // 0067 GETMET R7 R0 K20 + 0x7C1C0200, // 0068 CALL R7 1 + 0x8C1C0107, // 0069 GETMET R7 R0 K7 + 0x7C1C0200, // 006A CALL R7 1 + 0x70020006, // 006B JMP #0073 + 0x8C1C0106, // 006C GETMET R7 R0 K6 + 0x7C1C0200, // 006D CALL R7 1 + 0x741E0003, // 006E JMPT R7 #0073 + 0x8C1C0117, // 006F GETMET R7 R0 K23 + 0x58240018, // 0070 LDCONST R9 K24 + 0x7C1C0400, // 0071 CALL R7 2 + 0x70020000, // 0072 JMP #0074 + 0x7001FF9B, // 0073 JMP #0010 + 0x8C100119, // 0074 GETMET R4 R0 K25 + 0x7C100200, // 0075 CALL R4 1 + 0x8C100500, // 0076 GETMET R4 R2 K0 + 0x5818001A, // 0077 LDCONST R6 K26 + 0x7C100400, // 0078 CALL R4 2 + 0x8C100500, // 0079 GETMET R4 R2 K0 + 0x5818001B, // 007A LDCONST R6 K27 + 0x7C100400, // 007B CALL R4 2 + 0x5810001C, // 007C LDCONST R4 K28 + 0x60140010, // 007D GETGBL R5 G16 + 0x6018000C, // 007E GETGBL R6 G12 + 0x5C1C0400, // 007F MOVE R7 R2 + 0x7C180200, // 0080 CALL R6 1 + 0x04180D1E, // 0081 SUB R6 R6 K30 + 0x401A3A06, // 0082 CONNECT R6 K29 R6 + 0x7C140200, // 0083 CALL R5 1 + 0xA8020007, // 0084 EXBLK 0 #008D + 0x5C180A00, // 0085 MOVE R6 R5 + 0x7C180000, // 0086 CALL R6 0 + 0x241C0D1D, // 0087 GT R7 R6 K29 + 0x781E0000, // 0088 JMPF R7 #008A + 0x0010091F, // 0089 ADD R4 R4 K31 + 0x941C0406, // 008A GETIDX R7 R2 R6 + 0x00100807, // 008B ADD R4 R4 R7 + 0x7001FFF7, // 008C JMP #0085 + 0x58140020, // 008D LDCONST R5 K32 + 0xAC140200, // 008E CATCH R5 1 0 + 0xB0080000, // 008F RAISE 2 R0 R0 + 0x80040800, // 0090 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_sequence_statement_for_manager +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_statement_for_manager, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[36]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(EOF), + /* K5 */ be_nested_str_weak(COMMENT), + /* K6 */ be_nested_str_weak(add), + /* K7 */ be_nested_str_weak(_X20_X20), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(NEWLINE), + /* K11 */ be_nested_str_weak(KEYWORD), + /* K12 */ be_nested_str_weak(play), + /* K13 */ be_nested_str_weak(process_play_statement_for_manager), + /* K14 */ be_nested_str_weak(wait), + /* K15 */ be_nested_str_weak(process_wait_statement_for_manager), + /* K16 */ be_nested_str_weak(repeat), + /* K17 */ be_nested_str_weak(1), + /* K18 */ be_nested_str_weak(forever), + /* K19 */ be_nested_str_weak(_X2D1), + /* K20 */ be_nested_str_weak(expect_number), + /* K21 */ be_nested_str_weak(expect_keyword), + /* K22 */ be_nested_str_weak(times), + /* K23 */ be_nested_str_weak(expect_left_brace), + /* K24 */ be_nested_str_weak(_X20_X20var_X20repeat_seq_X20_X3D_X20animation_X2ESequenceManager_X28engine_X2C_X20_X25s_X29), + /* K25 */ be_nested_str_weak(at_end), + /* K26 */ be_nested_str_weak(check_right_brace), + /* K27 */ be_nested_str_weak(process_sequence_statement_for_manager), + /* K28 */ be_nested_str_weak(repeat_seq), + /* K29 */ be_nested_str_weak(expect_right_brace), + /* K30 */ be_nested_str_weak(_X20_X20_X25s_X2Epush_repeat_subsequence_X28repeat_seq_X2Esteps_X2C_X20_X25s_X29), + /* K31 */ be_nested_str_weak(IDENTIFIER), + /* K32 */ be_nested_str_weak(peek), + /* K33 */ be_nested_str_weak(DOT), + /* K34 */ be_nested_str_weak(process_sequence_assignment_for_manager), + /* K35 */ be_nested_str_weak(skip_statement), + }), + be_str_weak(process_sequence_statement_for_manager), + &be_const_str_solidified, + ( &(const binstruction[157]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0403, // 0003 EQ R3 R2 R3 + 0x740E0005, // 0004 JMPT R3 #000B + 0x880C0501, // 0005 GETMBR R3 R2 K1 + 0xB8120400, // 0006 GETNGBL R4 K2 + 0x88100903, // 0007 GETMBR R4 R4 K3 + 0x88100904, // 0008 GETMBR R4 R4 K4 + 0x1C0C0604, // 0009 EQ R3 R3 R4 + 0x780E0000, // 000A JMPF R3 #000C + 0x80000600, // 000B RET 0 + 0x880C0501, // 000C GETMBR R3 R2 K1 + 0xB8120400, // 000D GETNGBL R4 K2 + 0x88100903, // 000E GETMBR R4 R4 K3 + 0x88100905, // 000F GETMBR R4 R4 K5 + 0x1C0C0604, // 0010 EQ R3 R3 R4 + 0x780E0006, // 0011 JMPF R3 #0019 + 0x8C0C0106, // 0012 GETMET R3 R0 K6 + 0x88140508, // 0013 GETMBR R5 R2 K8 + 0x00160E05, // 0014 ADD R5 K7 R5 + 0x7C0C0400, // 0015 CALL R3 2 + 0x8C0C0109, // 0016 GETMET R3 R0 K9 + 0x7C0C0200, // 0017 CALL R3 1 + 0x80000600, // 0018 RET 0 + 0x880C0501, // 0019 GETMBR R3 R2 K1 + 0xB8120400, // 001A GETNGBL R4 K2 + 0x88100903, // 001B GETMBR R4 R4 K3 + 0x8810090A, // 001C GETMBR R4 R4 K10 + 0x1C0C0604, // 001D EQ R3 R3 R4 + 0x780E0002, // 001E JMPF R3 #0022 + 0x8C0C0109, // 001F GETMET R3 R0 K9 + 0x7C0C0200, // 0020 CALL R3 1 + 0x80000600, // 0021 RET 0 + 0x880C0501, // 0022 GETMBR R3 R2 K1 + 0xB8120400, // 0023 GETNGBL R4 K2 + 0x88100903, // 0024 GETMBR R4 R4 K3 + 0x8810090B, // 0025 GETMBR R4 R4 K11 + 0x1C0C0604, // 0026 EQ R3 R3 R4 + 0x780E0006, // 0027 JMPF R3 #002F + 0x880C0508, // 0028 GETMBR R3 R2 K8 + 0x1C0C070C, // 0029 EQ R3 R3 K12 + 0x780E0003, // 002A JMPF R3 #002F + 0x8C0C010D, // 002B GETMET R3 R0 K13 + 0x5C140200, // 002C MOVE R5 R1 + 0x7C0C0400, // 002D CALL R3 2 + 0x7002006C, // 002E JMP #009C + 0x880C0501, // 002F GETMBR R3 R2 K1 + 0xB8120400, // 0030 GETNGBL R4 K2 + 0x88100903, // 0031 GETMBR R4 R4 K3 + 0x8810090B, // 0032 GETMBR R4 R4 K11 + 0x1C0C0604, // 0033 EQ R3 R3 R4 + 0x780E0006, // 0034 JMPF R3 #003C + 0x880C0508, // 0035 GETMBR R3 R2 K8 + 0x1C0C070E, // 0036 EQ R3 R3 K14 + 0x780E0003, // 0037 JMPF R3 #003C + 0x8C0C010F, // 0038 GETMET R3 R0 K15 + 0x5C140200, // 0039 MOVE R5 R1 + 0x7C0C0400, // 003A CALL R3 2 + 0x7002005F, // 003B JMP #009C + 0x880C0501, // 003C GETMBR R3 R2 K1 + 0xB8120400, // 003D GETNGBL R4 K2 + 0x88100903, // 003E GETMBR R4 R4 K3 + 0x8810090B, // 003F GETMBR R4 R4 K11 + 0x1C0C0604, // 0040 EQ R3 R3 R4 + 0x780E003C, // 0041 JMPF R3 #007F + 0x880C0508, // 0042 GETMBR R3 R2 K8 + 0x1C0C0710, // 0043 EQ R3 R3 K16 + 0x780E0039, // 0044 JMPF R3 #007F + 0x8C0C0109, // 0045 GETMET R3 R0 K9 + 0x7C0C0200, // 0046 CALL R3 1 + 0x580C0011, // 0047 LDCONST R3 K17 + 0x8C100100, // 0048 GETMET R4 R0 K0 + 0x7C100200, // 0049 CALL R4 1 + 0x4C140000, // 004A LDNIL R5 + 0x20140805, // 004B NE R5 R4 R5 + 0x7816000C, // 004C JMPF R5 #005A + 0x88140901, // 004D GETMBR R5 R4 K1 + 0xB81A0400, // 004E GETNGBL R6 K2 + 0x88180D03, // 004F GETMBR R6 R6 K3 + 0x88180D0B, // 0050 GETMBR R6 R6 K11 + 0x1C140A06, // 0051 EQ R5 R5 R6 + 0x78160006, // 0052 JMPF R5 #005A + 0x88140908, // 0053 GETMBR R5 R4 K8 + 0x1C140B12, // 0054 EQ R5 R5 K18 + 0x78160003, // 0055 JMPF R5 #005A + 0x8C140109, // 0056 GETMET R5 R0 K9 + 0x7C140200, // 0057 CALL R5 1 + 0x580C0013, // 0058 LDCONST R3 K19 + 0x70020008, // 0059 JMP #0063 + 0x8C140114, // 005A GETMET R5 R0 K20 + 0x7C140200, // 005B CALL R5 1 + 0x8C180115, // 005C GETMET R6 R0 K21 + 0x58200016, // 005D LDCONST R8 K22 + 0x7C180400, // 005E CALL R6 2 + 0x60180008, // 005F GETGBL R6 G8 + 0x5C1C0A00, // 0060 MOVE R7 R5 + 0x7C180200, // 0061 CALL R6 1 + 0x5C0C0C00, // 0062 MOVE R3 R6 + 0x8C140117, // 0063 GETMET R5 R0 K23 + 0x7C140200, // 0064 CALL R5 1 + 0x8C140106, // 0065 GETMET R5 R0 K6 + 0x601C0018, // 0066 GETGBL R7 G24 + 0x58200018, // 0067 LDCONST R8 K24 + 0x5C240600, // 0068 MOVE R9 R3 + 0x7C1C0400, // 0069 CALL R7 2 + 0x7C140400, // 006A CALL R5 2 + 0x8C140119, // 006B GETMET R5 R0 K25 + 0x7C140200, // 006C CALL R5 1 + 0x74160006, // 006D JMPT R5 #0075 + 0x8C14011A, // 006E GETMET R5 R0 K26 + 0x7C140200, // 006F CALL R5 1 + 0x74160003, // 0070 JMPT R5 #0075 + 0x8C14011B, // 0071 GETMET R5 R0 K27 + 0x581C001C, // 0072 LDCONST R7 K28 + 0x7C140400, // 0073 CALL R5 2 + 0x7001FFF5, // 0074 JMP #006B + 0x8C14011D, // 0075 GETMET R5 R0 K29 + 0x7C140200, // 0076 CALL R5 1 + 0x8C140106, // 0077 GETMET R5 R0 K6 + 0x601C0018, // 0078 GETGBL R7 G24 + 0x5820001E, // 0079 LDCONST R8 K30 + 0x5C240200, // 007A MOVE R9 R1 + 0x5C280600, // 007B MOVE R10 R3 + 0x7C1C0600, // 007C CALL R7 3 + 0x7C140400, // 007D CALL R5 2 + 0x7002001C, // 007E JMP #009C + 0x880C0501, // 007F GETMBR R3 R2 K1 + 0xB8120400, // 0080 GETNGBL R4 K2 + 0x88100903, // 0081 GETMBR R4 R4 K3 + 0x8810091F, // 0082 GETMBR R4 R4 K31 + 0x1C0C0604, // 0083 EQ R3 R3 R4 + 0x780E0014, // 0084 JMPF R3 #009A + 0x8C0C0120, // 0085 GETMET R3 R0 K32 + 0x7C0C0200, // 0086 CALL R3 1 + 0x4C100000, // 0087 LDNIL R4 + 0x200C0604, // 0088 NE R3 R3 R4 + 0x780E000C, // 0089 JMPF R3 #0097 + 0x8C0C0120, // 008A GETMET R3 R0 K32 + 0x7C0C0200, // 008B CALL R3 1 + 0x880C0701, // 008C GETMBR R3 R3 K1 + 0xB8120400, // 008D GETNGBL R4 K2 + 0x88100903, // 008E GETMBR R4 R4 K3 + 0x88100921, // 008F GETMBR R4 R4 K33 + 0x1C0C0604, // 0090 EQ R3 R3 R4 + 0x780E0004, // 0091 JMPF R3 #0097 + 0x8C0C0122, // 0092 GETMET R3 R0 K34 + 0x58140007, // 0093 LDCONST R5 K7 + 0x5C180200, // 0094 MOVE R6 R1 + 0x7C0C0600, // 0095 CALL R3 3 + 0x70020001, // 0096 JMP #0099 + 0x8C0C0123, // 0097 GETMET R3 R0 K35 + 0x7C0C0200, // 0098 CALL R3 1 + 0x70020001, // 0099 JMP #009C + 0x8C0C0123, // 009A GETMET R3 R0 K35 + 0x7C0C0200, // 009B CALL R3 1 + 0x80000000, // 009C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_left_paren +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_left_paren, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(LEFT_PAREN), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X28_X27), + }), + be_str_weak(expect_left_paren), &be_const_str_solidified, ( &(const binstruction[18]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 @@ -5014,50 +4374,149 @@ be_local_closure(class_SimpleDSLTranspiler_process_function_arguments, /* name /******************************************************************** -** Solidified function: process_run +** Solidified function: convert_color ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_run, /* name */ +be_local_closure(class_SimpleDSLTranspiler_convert_color, /* name */ be_nested_proto( - 6, /* nstack */ - 1, /* argc */ + 17, /* nstack */ + 2, /* 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(next), - /* K1 */ be_nested_str_weak(expect_identifier), - /* K2 */ be_nested_str_weak(_validate_object_reference), - /* K3 */ be_nested_str_weak(run), - /* K4 */ be_nested_str_weak(collect_inline_comment), - /* K5 */ be_nested_str_weak(run_statements), - /* K6 */ be_nested_str_weak(push), - /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(comment), + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(startswith), + /* K2 */ be_nested_str_weak(0x), + /* K3 */ be_nested_str_weak(0xFF_X25s), + /* K4 */ be_const_int(2), + /* K5 */ be_const_int(2147483647), + /* K6 */ be_nested_str_weak(_X23), + /* K7 */ be_nested_str_weak(0x_X25s), + /* K8 */ be_const_int(1), + /* K9 */ be_const_int(3), + /* K10 */ be_nested_str_weak(0x_X25s_X25s_X25s_X25s_X25s_X25s_X25s_X25s), + /* K11 */ be_nested_str_weak(0xFF_X25s_X25s_X25s_X25s_X25s_X25s), + /* K12 */ be_nested_str_weak(animation_dsl), + /* K13 */ be_nested_str_weak(is_color_name), + /* K14 */ be_nested_str_weak(get_named_color_value), + /* K15 */ be_nested_str_weak(0xFFFFFFFF), }), - be_str_weak(process_run), + be_str_weak(convert_color), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C040101, // 0002 GETMET R1 R0 K1 - 0x7C040200, // 0003 CALL R1 1 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x5C100200, // 0005 MOVE R4 R1 - 0x58140003, // 0006 LDCONST R5 K3 - 0x7C080600, // 0007 CALL R2 3 - 0x8C080104, // 0008 GETMET R2 R0 K4 - 0x7C080200, // 0009 CALL R2 1 - 0x880C0105, // 000A GETMBR R3 R0 K5 - 0x8C0C0706, // 000B GETMET R3 R3 K6 - 0x60140013, // 000C GETGBL R5 G19 - 0x7C140000, // 000D CALL R5 0 - 0x98160E01, // 000E SETIDX R5 K7 R1 - 0x98161002, // 000F SETIDX R5 K8 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x80000000, // 0011 RET 0 + ( &(const binstruction[110]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x7C0C0600, // 0004 CALL R3 3 + 0x780E0013, // 0005 JMPF R3 #001A + 0x600C000C, // 0006 GETGBL R3 G12 + 0x5C100200, // 0007 MOVE R4 R1 + 0x7C0C0200, // 0008 CALL R3 1 + 0x54120009, // 0009 LDINT R4 10 + 0x1C0C0604, // 000A EQ R3 R3 R4 + 0x780E0001, // 000B JMPF R3 #000E + 0x80040200, // 000C RET 1 R1 + 0x7002000B, // 000D JMP #001A + 0x600C000C, // 000E GETGBL R3 G12 + 0x5C100200, // 000F MOVE R4 R1 + 0x7C0C0200, // 0010 CALL R3 1 + 0x54120007, // 0011 LDINT R4 8 + 0x1C0C0604, // 0012 EQ R3 R3 R4 + 0x780E0005, // 0013 JMPF R3 #001A + 0x600C0018, // 0014 GETGBL R3 G24 + 0x58100003, // 0015 LDCONST R4 K3 + 0x40160905, // 0016 CONNECT R5 K4 K5 + 0x94140205, // 0017 GETIDX R5 R1 R5 + 0x7C0C0400, // 0018 CALL R3 2 + 0x80040600, // 0019 RET 1 R3 + 0x8C0C0501, // 001A GETMET R3 R2 K1 + 0x5C140200, // 001B MOVE R5 R1 + 0x58180006, // 001C LDCONST R6 K6 + 0x7C0C0600, // 001D CALL R3 3 + 0x780E0044, // 001E JMPF R3 #0064 + 0x600C000C, // 001F GETGBL R3 G12 + 0x5C100200, // 0020 MOVE R4 R1 + 0x7C0C0200, // 0021 CALL R3 1 + 0x54120008, // 0022 LDINT R4 9 + 0x1C0C0604, // 0023 EQ R3 R3 R4 + 0x780E0006, // 0024 JMPF R3 #002C + 0x600C0018, // 0025 GETGBL R3 G24 + 0x58100007, // 0026 LDCONST R4 K7 + 0x40161105, // 0027 CONNECT R5 K8 K5 + 0x94140205, // 0028 GETIDX R5 R1 R5 + 0x7C0C0400, // 0029 CALL R3 2 + 0x80040600, // 002A RET 1 R3 + 0x70020037, // 002B JMP #0064 + 0x600C000C, // 002C GETGBL R3 G12 + 0x5C100200, // 002D MOVE R4 R1 + 0x7C0C0200, // 002E CALL R3 1 + 0x54120006, // 002F LDINT R4 7 + 0x1C0C0604, // 0030 EQ R3 R3 R4 + 0x780E0006, // 0031 JMPF R3 #0039 + 0x600C0018, // 0032 GETGBL R3 G24 + 0x58100003, // 0033 LDCONST R4 K3 + 0x40161105, // 0034 CONNECT R5 K8 K5 + 0x94140205, // 0035 GETIDX R5 R1 R5 + 0x7C0C0400, // 0036 CALL R3 2 + 0x80040600, // 0037 RET 1 R3 + 0x7002002A, // 0038 JMP #0064 + 0x600C000C, // 0039 GETGBL R3 G12 + 0x5C100200, // 003A MOVE R4 R1 + 0x7C0C0200, // 003B CALL R3 1 + 0x54120004, // 003C LDINT R4 5 + 0x1C0C0604, // 003D EQ R3 R3 R4 + 0x780E0011, // 003E JMPF R3 #0051 + 0x940C0308, // 003F GETIDX R3 R1 K8 + 0x94100304, // 0040 GETIDX R4 R1 K4 + 0x94140309, // 0041 GETIDX R5 R1 K9 + 0x541A0003, // 0042 LDINT R6 4 + 0x94180206, // 0043 GETIDX R6 R1 R6 + 0x601C0018, // 0044 GETGBL R7 G24 + 0x5820000A, // 0045 LDCONST R8 K10 + 0x5C240600, // 0046 MOVE R9 R3 + 0x5C280600, // 0047 MOVE R10 R3 + 0x5C2C0800, // 0048 MOVE R11 R4 + 0x5C300800, // 0049 MOVE R12 R4 + 0x5C340A00, // 004A MOVE R13 R5 + 0x5C380A00, // 004B MOVE R14 R5 + 0x5C3C0C00, // 004C MOVE R15 R6 + 0x5C400C00, // 004D MOVE R16 R6 + 0x7C1C1200, // 004E CALL R7 9 + 0x80040E00, // 004F RET 1 R7 + 0x70020012, // 0050 JMP #0064 + 0x600C000C, // 0051 GETGBL R3 G12 + 0x5C100200, // 0052 MOVE R4 R1 + 0x7C0C0200, // 0053 CALL R3 1 + 0x54120003, // 0054 LDINT R4 4 + 0x1C0C0604, // 0055 EQ R3 R3 R4 + 0x780E000C, // 0056 JMPF R3 #0064 + 0x940C0308, // 0057 GETIDX R3 R1 K8 + 0x94100304, // 0058 GETIDX R4 R1 K4 + 0x94140309, // 0059 GETIDX R5 R1 K9 + 0x60180018, // 005A GETGBL R6 G24 + 0x581C000B, // 005B LDCONST R7 K11 + 0x5C200600, // 005C MOVE R8 R3 + 0x5C240600, // 005D MOVE R9 R3 + 0x5C280800, // 005E MOVE R10 R4 + 0x5C2C0800, // 005F MOVE R11 R4 + 0x5C300A00, // 0060 MOVE R12 R5 + 0x5C340A00, // 0061 MOVE R13 R5 + 0x7C180E00, // 0062 CALL R6 7 + 0x80040C00, // 0063 RET 1 R6 + 0xB80E1800, // 0064 GETNGBL R3 K12 + 0x8C0C070D, // 0065 GETMET R3 R3 K13 + 0x5C140200, // 0066 MOVE R5 R1 + 0x7C0C0400, // 0067 CALL R3 2 + 0x780E0003, // 0068 JMPF R3 #006D + 0x8C0C010E, // 0069 GETMET R3 R0 K14 + 0x5C140200, // 006A MOVE R5 R1 + 0x7C0C0400, // 006B CALL R3 2 + 0x80040600, // 006C RET 1 R3 + 0x80061E00, // 006D RET 1 K15 }) ) ); @@ -5065,212 +4524,11 @@ be_local_closure(class_SimpleDSLTranspiler_process_run, /* name */ /******************************************************************** -** Solidified function: process_additive_expression_raw +** Solidified function: process_palette ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_additive_expression_raw, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(process_multiplicative_expression_raw), - /* K1 */ be_nested_str_weak(at_end), - /* K2 */ be_nested_str_weak(current), - /* K3 */ be_nested_str_weak(type), - /* K4 */ be_nested_str_weak(animation_dsl), - /* K5 */ be_nested_str_weak(Token), - /* K6 */ be_nested_str_weak(PLUS), - /* K7 */ be_nested_str_weak(MINUS), - /* K8 */ be_nested_str_weak(value), - /* K9 */ be_nested_str_weak(next), - /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), - }), - be_str_weak(process_additive_expression_raw), - &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C080101, // 0002 GETMET R2 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x740A001F, // 0004 JMPT R2 #0025 - 0x8C080102, // 0005 GETMET R2 R0 K2 - 0x7C080200, // 0006 CALL R2 1 - 0x4C0C0000, // 0007 LDNIL R3 - 0x200C0403, // 0008 NE R3 R2 R3 - 0x780E0018, // 0009 JMPF R3 #0023 - 0x880C0503, // 000A GETMBR R3 R2 K3 - 0xB8120800, // 000B GETNGBL R4 K4 - 0x88100905, // 000C GETMBR R4 R4 K5 - 0x88100906, // 000D GETMBR R4 R4 K6 - 0x1C0C0604, // 000E EQ R3 R3 R4 - 0x740E0005, // 000F JMPT R3 #0016 - 0x880C0503, // 0010 GETMBR R3 R2 K3 - 0xB8120800, // 0011 GETNGBL R4 K4 - 0x88100905, // 0012 GETMBR R4 R4 K5 - 0x88100907, // 0013 GETMBR R4 R4 K7 - 0x1C0C0604, // 0014 EQ R3 R3 R4 - 0x780E000C, // 0015 JMPF R3 #0023 - 0x880C0508, // 0016 GETMBR R3 R2 K8 - 0x8C100109, // 0017 GETMET R4 R0 K9 - 0x7C100200, // 0018 CALL R4 1 - 0x8C100100, // 0019 GETMET R4 R0 K0 - 0x7C100200, // 001A CALL R4 1 - 0x60140018, // 001B GETGBL R5 G24 - 0x5818000A, // 001C LDCONST R6 K10 - 0x5C1C0200, // 001D MOVE R7 R1 - 0x5C200600, // 001E MOVE R8 R3 - 0x5C240800, // 001F MOVE R9 R4 - 0x7C140800, // 0020 CALL R5 4 - 0x5C040A00, // 0021 MOVE R1 R5 - 0x70020000, // 0022 JMP #0024 - 0x70020000, // 0023 JMP #0025 - 0x7001FFDC, // 0024 JMP #0002 - 0x80040200, // 0025 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: check_right_brace -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_check_right_brace, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_BRACE), - }), - be_str_weak(check_right_brace), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0005, // 0004 JMPF R2 #000B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x740A0000, // 000A JMPT R2 #000C - 0x50080001, // 000B LDBOOL R2 0 1 - 0x50080200, // 000C LDBOOL R2 1 0 - 0x80040400, // 000D RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: validate_user_name -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_validate_user_name, /* name */ +be_local_closure(class_SimpleDSLTranspiler_process_palette, /* name */ be_nested_proto( 13, /* nstack */ - 3, /* 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(animation_dsl), - /* K1 */ be_nested_str_weak(Token), - /* K2 */ be_nested_str_weak(color_names), - /* K3 */ be_nested_str_weak(error), - /* K4 */ be_nested_str_weak(Cannot_X20redefine_X20predefined_X20color_X20_X27_X25s_X27_X2E_X20Use_X20a_X20different_X20name_X20like_X20_X27_X25s_custom_X27_X20or_X20_X27my__X25s_X27), - /* K5 */ be_nested_str_weak(stop_iteration), - /* K6 */ be_nested_str_weak(statement_keywords), - /* K7 */ be_nested_str_weak(Cannot_X20use_X20DSL_X20keyword_X20_X27_X25s_X27_X20as_X20_X25s_X20name_X2E_X20Use_X20a_X20different_X20name_X20like_X20_X27_X25s_custom_X27_X20or_X20_X27my__X25s_X27), - }), - be_str_weak(validate_user_name), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x600C0010, // 0000 GETGBL R3 G16 - 0xB8120000, // 0001 GETNGBL R4 K0 - 0x88100901, // 0002 GETMBR R4 R4 K1 - 0x88100902, // 0003 GETMBR R4 R4 K2 - 0x7C0C0200, // 0004 CALL R3 1 - 0xA802000F, // 0005 EXBLK 0 #0016 - 0x5C100600, // 0006 MOVE R4 R3 - 0x7C100000, // 0007 CALL R4 0 - 0x1C140204, // 0008 EQ R5 R1 R4 - 0x7816000A, // 0009 JMPF R5 #0015 - 0x8C140103, // 000A GETMET R5 R0 K3 - 0x601C0018, // 000B GETGBL R7 G24 - 0x58200004, // 000C LDCONST R8 K4 - 0x5C240200, // 000D MOVE R9 R1 - 0x5C280200, // 000E MOVE R10 R1 - 0x5C2C0200, // 000F MOVE R11 R1 - 0x7C1C0800, // 0010 CALL R7 4 - 0x7C140400, // 0011 CALL R5 2 - 0x50140000, // 0012 LDBOOL R5 0 0 - 0xA8040001, // 0013 EXBLK 1 1 - 0x80040A00, // 0014 RET 1 R5 - 0x7001FFEF, // 0015 JMP #0006 - 0x580C0005, // 0016 LDCONST R3 K5 - 0xAC0C0200, // 0017 CATCH R3 1 0 - 0xB0080000, // 0018 RAISE 2 R0 R0 - 0x600C0010, // 0019 GETGBL R3 G16 - 0xB8120000, // 001A GETNGBL R4 K0 - 0x88100901, // 001B GETMBR R4 R4 K1 - 0x88100906, // 001C GETMBR R4 R4 K6 - 0x7C0C0200, // 001D CALL R3 1 - 0xA8020010, // 001E EXBLK 0 #0030 - 0x5C100600, // 001F MOVE R4 R3 - 0x7C100000, // 0020 CALL R4 0 - 0x1C140204, // 0021 EQ R5 R1 R4 - 0x7816000B, // 0022 JMPF R5 #002F - 0x8C140103, // 0023 GETMET R5 R0 K3 - 0x601C0018, // 0024 GETGBL R7 G24 - 0x58200007, // 0025 LDCONST R8 K7 - 0x5C240200, // 0026 MOVE R9 R1 - 0x5C280400, // 0027 MOVE R10 R2 - 0x5C2C0200, // 0028 MOVE R11 R1 - 0x5C300200, // 0029 MOVE R12 R1 - 0x7C1C0A00, // 002A CALL R7 5 - 0x7C140400, // 002B CALL R5 2 - 0x50140000, // 002C LDBOOL R5 0 0 - 0xA8040001, // 002D EXBLK 1 1 - 0x80040A00, // 002E RET 1 R5 - 0x7001FFEE, // 002F JMP #001F - 0x580C0005, // 0030 LDCONST R3 K5 - 0xAC0C0200, // 0031 CATCH R3 1 0 - 0xB0080000, // 0032 RAISE 2 R0 R0 - 0x500C0200, // 0033 LDBOOL R3 1 0 - 0x80040600, // 0034 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: generate_engine_start -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_generate_engine_start, /* name */ - be_nested_proto( - 11, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -5278,646 +4536,54 @@ be_local_closure(class_SimpleDSLTranspiler_generate_engine_start, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(run_statements), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(name), - /* K3 */ be_nested_str_weak(comment), - /* K4 */ be_nested_str_weak(sequence_names), - /* K5 */ be_nested_str_weak(contains), - /* K6 */ be_nested_str_weak(add), - /* K7 */ be_nested_str_weak(engine_X2Eadd_sequence_manager_X28_X25s__X29_X25s), - /* K8 */ be_nested_str_weak(engine_X2Eadd_animation_X28_X25s__X29_X25s), - /* K9 */ be_nested_str_weak(stop_iteration), - /* K10 */ be_nested_str_weak(engine_X2Estart_X28_X29), - }), - be_str_weak(generate_engine_start), - &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0x6004000C, // 0000 GETGBL R1 G12 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x7C040200, // 0002 CALL R1 1 - 0x1C040301, // 0003 EQ R1 R1 K1 - 0x78060000, // 0004 JMPF R1 #0006 - 0x80000200, // 0005 RET 0 - 0x60040010, // 0006 GETGBL R1 G16 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x7C040200, // 0008 CALL R1 1 - 0xA8020018, // 0009 EXBLK 0 #0023 - 0x5C080200, // 000A MOVE R2 R1 - 0x7C080000, // 000B CALL R2 0 - 0x940C0502, // 000C GETIDX R3 R2 K2 - 0x94100503, // 000D GETIDX R4 R2 K3 - 0x88140104, // 000E GETMBR R5 R0 K4 - 0x8C140B05, // 000F GETMET R5 R5 K5 - 0x5C1C0600, // 0010 MOVE R7 R3 - 0x7C140400, // 0011 CALL R5 2 - 0x78160007, // 0012 JMPF R5 #001B - 0x8C140106, // 0013 GETMET R5 R0 K6 - 0x601C0018, // 0014 GETGBL R7 G24 - 0x58200007, // 0015 LDCONST R8 K7 - 0x5C240600, // 0016 MOVE R9 R3 - 0x5C280800, // 0017 MOVE R10 R4 - 0x7C1C0600, // 0018 CALL R7 3 - 0x7C140400, // 0019 CALL R5 2 - 0x70020006, // 001A JMP #0022 - 0x8C140106, // 001B GETMET R5 R0 K6 - 0x601C0018, // 001C GETGBL R7 G24 - 0x58200008, // 001D LDCONST R8 K8 - 0x5C240600, // 001E MOVE R9 R3 - 0x5C280800, // 001F MOVE R10 R4 - 0x7C1C0600, // 0020 CALL R7 3 - 0x7C140400, // 0021 CALL R5 2 - 0x7001FFE6, // 0022 JMP #000A - 0x58040009, // 0023 LDCONST R1 K9 - 0xAC040200, // 0024 CATCH R1 1 0 - 0xB0080000, // 0025 RAISE 2 R0 R0 - 0x8C040106, // 0026 GETMET R1 R0 K6 - 0x580C000A, // 0027 LDCONST R3 K10 - 0x7C040400, // 0028 CALL R1 2 - 0x80000000, // 0029 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: skip_whitespace_including_newlines -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_skip_whitespace_including_newlines, /* 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(at_end), - /* K1 */ be_nested_str_weak(current), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(COMMENT), - /* K6 */ be_nested_str_weak(NEWLINE), - /* K7 */ be_nested_str_weak(next), - }), - be_str_weak(skip_whitespace_including_newlines), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x74060015, // 0002 JMPT R1 #0019 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x7C040200, // 0004 CALL R1 1 - 0x4C080000, // 0005 LDNIL R2 - 0x20080202, // 0006 NE R2 R1 R2 - 0x780A000E, // 0007 JMPF R2 #0017 - 0x88080302, // 0008 GETMBR R2 R1 K2 - 0xB80E0600, // 0009 GETNGBL R3 K3 - 0x880C0704, // 000A GETMBR R3 R3 K4 - 0x880C0705, // 000B GETMBR R3 R3 K5 - 0x1C080403, // 000C EQ R2 R2 R3 - 0x740A0005, // 000D JMPT R2 #0014 - 0x88080302, // 000E GETMBR R2 R1 K2 - 0xB80E0600, // 000F GETNGBL R3 K3 - 0x880C0704, // 0010 GETMBR R3 R3 K4 - 0x880C0706, // 0011 GETMBR R3 R3 K6 - 0x1C080403, // 0012 EQ R2 R2 R3 - 0x780A0002, // 0013 JMPF R2 #0017 - 0x8C080107, // 0014 GETMET R2 R0 K7 - 0x7C080200, // 0015 CALL R2 1 - 0x70020000, // 0016 JMP #0018 - 0x70020000, // 0017 JMP #0019 - 0x7001FFE6, // 0018 JMP #0000 - 0x80000000, // 0019 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_unary_expression -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_unary_expression, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(error), - /* K2 */ be_nested_str_weak(Expected_X20value), - /* K3 */ be_nested_str_weak(nil), - /* K4 */ be_nested_str_weak(type), - /* K5 */ be_nested_str_weak(animation_dsl), - /* K6 */ be_nested_str_weak(Token), - /* K7 */ be_nested_str_weak(MINUS), - /* K8 */ be_nested_str_weak(next), - /* K9 */ be_nested_str_weak(process_unary_expression), - /* K10 */ be_nested_str_weak(_X28_X2D_X25s_X29), - /* K11 */ be_nested_str_weak(PLUS), - /* K12 */ be_nested_str_weak(process_primary_expression), - }), - be_str_weak(process_unary_expression), - &be_const_str_solidified, - ( &(const binstruction[44]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x7C0C0200, // 0001 CALL R3 1 - 0x4C100000, // 0002 LDNIL R4 - 0x1C100604, // 0003 EQ R4 R3 R4 - 0x78120003, // 0004 JMPF R4 #0009 - 0x8C100101, // 0005 GETMET R4 R0 K1 - 0x58180002, // 0006 LDCONST R6 K2 - 0x7C100400, // 0007 CALL R4 2 - 0x80060600, // 0008 RET 1 K3 - 0x88100704, // 0009 GETMBR R4 R3 K4 - 0xB8160A00, // 000A GETNGBL R5 K5 - 0x88140B06, // 000B GETMBR R5 R5 K6 - 0x88140B07, // 000C GETMBR R5 R5 K7 - 0x1C100805, // 000D EQ R4 R4 R5 - 0x7812000A, // 000E JMPF R4 #001A - 0x8C100108, // 000F GETMET R4 R0 K8 - 0x7C100200, // 0010 CALL R4 1 - 0x8C100109, // 0011 GETMET R4 R0 K9 - 0x5C180200, // 0012 MOVE R6 R1 - 0x501C0000, // 0013 LDBOOL R7 0 0 - 0x7C100600, // 0014 CALL R4 3 - 0x60140018, // 0015 GETGBL R5 G24 - 0x5818000A, // 0016 LDCONST R6 K10 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x7C140400, // 0018 CALL R5 2 - 0x80040A00, // 0019 RET 1 R5 - 0x88100704, // 001A GETMBR R4 R3 K4 - 0xB8160A00, // 001B GETNGBL R5 K5 - 0x88140B06, // 001C GETMBR R5 R5 K6 - 0x88140B0B, // 001D GETMBR R5 R5 K11 - 0x1C100805, // 001E EQ R4 R4 R5 - 0x78120006, // 001F JMPF R4 #0027 - 0x8C100108, // 0020 GETMET R4 R0 K8 - 0x7C100200, // 0021 CALL R4 1 - 0x8C100109, // 0022 GETMET R4 R0 K9 - 0x5C180200, // 0023 MOVE R6 R1 - 0x501C0000, // 0024 LDBOOL R7 0 0 - 0x7C100600, // 0025 CALL R4 3 - 0x80040800, // 0026 RET 1 R4 - 0x8C10010C, // 0027 GETMET R4 R0 K12 - 0x5C180200, // 0028 MOVE R6 R1 - 0x5C1C0400, // 0029 MOVE R7 R2 - 0x7C100600, // 002A CALL R4 3 - 0x80040800, // 002B RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_sequence_statement -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_sequence_statement, /* name */ - be_nested_proto( - 15, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[42]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(EOF), - /* K5 */ be_nested_str_weak(COMMENT), - /* K6 */ be_nested_str_weak(add), - /* K7 */ be_nested_str_weak(_X20_X20), - /* K8 */ be_nested_str_weak(value), - /* K9 */ be_nested_str_weak(next), - /* K10 */ be_nested_str_weak(NEWLINE), - /* K11 */ be_nested_str_weak(KEYWORD), - /* K12 */ be_nested_str_weak(play), - /* K13 */ be_nested_str_weak(), - /* K14 */ be_nested_str_weak(IDENTIFIER), - /* K15 */ be_nested_str_weak(peek), - /* K16 */ be_nested_str_weak(LEFT_PAREN), - /* K17 */ be_nested_str_weak(process_nested_function_call), - /* K18 */ be_nested_str_weak(expect_identifier), - /* K19 */ be_nested_str_weak(_validate_object_reference), - /* K20 */ be_nested_str_weak(sequence_X20play), - /* K21 */ be_nested_str_weak(animation_X2Eglobal_X28_X27_X25s__X27_X29), - /* K22 */ be_nested_str_weak(0), - /* K23 */ be_nested_str_weak(for), - /* K24 */ be_nested_str_weak(process_time_value), - /* K25 */ be_nested_str_weak(collect_inline_comment), - /* K26 */ be_nested_str_weak(_X20_X20steps_X2Epush_X28animation_X2Ecreate_play_step_X28_X25s_X2C_X20_X25s_X29_X29_X25s), - /* K27 */ be_nested_str_weak(wait), - /* K28 */ be_nested_str_weak(_X20_X20steps_X2Epush_X28animation_X2Ecreate_wait_step_X28_X25s_X29_X29_X25s), - /* K29 */ be_nested_str_weak(repeat), - /* K30 */ be_nested_str_weak(expect_number), - /* K31 */ be_nested_str_weak(expect_keyword), - /* K32 */ be_nested_str_weak(times), - /* K33 */ be_nested_str_weak(expect_colon), - /* K34 */ be_nested_str_weak(_X20_X20for_X20repeat_i_X20_X3A_X200_X2E_X2E_X25s_X2D1), - /* K35 */ be_nested_str_weak(at_end), - /* K36 */ be_nested_str_weak(check_right_brace), - /* K37 */ be_nested_str_weak(_X20_X20_X20_X20), - /* K38 */ be_nested_str_weak(_X20_X20_X20_X20steps_X2Epush_X28animation_X2Ecreate_play_step_X28_X25s_X2C_X20_X25s_X29_X29_X25s), - /* K39 */ be_nested_str_weak(_X20_X20_X20_X20steps_X2Epush_X28animation_X2Ecreate_wait_step_X28_X25s_X29_X29_X25s), - /* K40 */ be_nested_str_weak(_X20_X20end), - /* K41 */ be_nested_str_weak(skip_statement), - }), - be_str_weak(process_sequence_statement), - &be_const_str_solidified, - ( &(const binstruction[343]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x1C080202, // 0003 EQ R2 R1 R2 - 0x740A0005, // 0004 JMPT R2 #000B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0000, // 000A JMPF R2 #000C - 0x80000400, // 000B RET 0 - 0x88080301, // 000C GETMBR R2 R1 K1 - 0xB80E0400, // 000D GETNGBL R3 K2 - 0x880C0703, // 000E GETMBR R3 R3 K3 - 0x880C0705, // 000F GETMBR R3 R3 K5 - 0x1C080403, // 0010 EQ R2 R2 R3 - 0x780A0006, // 0011 JMPF R2 #0019 - 0x8C080106, // 0012 GETMET R2 R0 K6 - 0x88100308, // 0013 GETMBR R4 R1 K8 - 0x00120E04, // 0014 ADD R4 K7 R4 - 0x7C080400, // 0015 CALL R2 2 - 0x8C080109, // 0016 GETMET R2 R0 K9 - 0x7C080200, // 0017 CALL R2 1 - 0x80000400, // 0018 RET 0 - 0x88080301, // 0019 GETMBR R2 R1 K1 - 0xB80E0400, // 001A GETNGBL R3 K2 - 0x880C0703, // 001B GETMBR R3 R3 K3 - 0x880C070A, // 001C GETMBR R3 R3 K10 - 0x1C080403, // 001D EQ R2 R2 R3 - 0x780A0002, // 001E JMPF R2 #0022 - 0x8C080109, // 001F GETMET R2 R0 K9 - 0x7C080200, // 0020 CALL R2 1 - 0x80000400, // 0021 RET 0 - 0x88080301, // 0022 GETMBR R2 R1 K1 - 0xB80E0400, // 0023 GETNGBL R3 K2 - 0x880C0703, // 0024 GETMBR R3 R3 K3 - 0x880C070B, // 0025 GETMBR R3 R3 K11 - 0x1C080403, // 0026 EQ R2 R2 R3 - 0x780A0057, // 0027 JMPF R2 #0080 - 0x88080308, // 0028 GETMBR R2 R1 K8 - 0x1C08050C, // 0029 EQ R2 R2 K12 - 0x780A0054, // 002A JMPF R2 #0080 - 0x8C080109, // 002B GETMET R2 R0 K9 - 0x7C080200, // 002C CALL R2 1 - 0x5808000D, // 002D LDCONST R2 K13 - 0x8C0C0100, // 002E GETMET R3 R0 K0 - 0x7C0C0200, // 002F CALL R3 1 - 0x4C100000, // 0030 LDNIL R4 - 0x20100604, // 0031 NE R4 R3 R4 - 0x7812001C, // 0032 JMPF R4 #0050 - 0x88100701, // 0033 GETMBR R4 R3 K1 - 0xB8160400, // 0034 GETNGBL R5 K2 - 0x88140B03, // 0035 GETMBR R5 R5 K3 - 0x88140B0E, // 0036 GETMBR R5 R5 K14 - 0x1C100805, // 0037 EQ R4 R4 R5 - 0x74120005, // 0038 JMPT R4 #003F - 0x88100701, // 0039 GETMBR R4 R3 K1 - 0xB8160400, // 003A GETNGBL R5 K2 - 0x88140B03, // 003B GETMBR R5 R5 K3 - 0x88140B0B, // 003C GETMBR R5 R5 K11 - 0x1C100805, // 003D EQ R4 R4 R5 - 0x78120010, // 003E JMPF R4 #0050 - 0x8C10010F, // 003F GETMET R4 R0 K15 - 0x7C100200, // 0040 CALL R4 1 - 0x4C140000, // 0041 LDNIL R5 - 0x20100805, // 0042 NE R4 R4 R5 - 0x7812000B, // 0043 JMPF R4 #0050 - 0x8C10010F, // 0044 GETMET R4 R0 K15 - 0x7C100200, // 0045 CALL R4 1 - 0x88100901, // 0046 GETMBR R4 R4 K1 - 0xB8160400, // 0047 GETNGBL R5 K2 - 0x88140B03, // 0048 GETMBR R5 R5 K3 - 0x88140B10, // 0049 GETMBR R5 R5 K16 - 0x1C100805, // 004A EQ R4 R4 R5 - 0x78120003, // 004B JMPF R4 #0050 - 0x8C100111, // 004C GETMET R4 R0 K17 - 0x7C100200, // 004D CALL R4 1 - 0x5C080800, // 004E MOVE R2 R4 - 0x7002000A, // 004F JMP #005B - 0x8C100112, // 0050 GETMET R4 R0 K18 - 0x7C100200, // 0051 CALL R4 1 - 0x8C140113, // 0052 GETMET R5 R0 K19 - 0x5C1C0800, // 0053 MOVE R7 R4 - 0x58200014, // 0054 LDCONST R8 K20 - 0x7C140600, // 0055 CALL R5 3 - 0x60140018, // 0056 GETGBL R5 G24 - 0x58180015, // 0057 LDCONST R6 K21 - 0x5C1C0800, // 0058 MOVE R7 R4 - 0x7C140400, // 0059 CALL R5 2 - 0x5C080A00, // 005A MOVE R2 R5 - 0x58100016, // 005B LDCONST R4 K22 - 0x8C140100, // 005C GETMET R5 R0 K0 - 0x7C140200, // 005D CALL R5 1 - 0x4C180000, // 005E LDNIL R6 - 0x20140A06, // 005F NE R5 R5 R6 - 0x78160013, // 0060 JMPF R5 #0075 - 0x8C140100, // 0061 GETMET R5 R0 K0 - 0x7C140200, // 0062 CALL R5 1 - 0x88140B01, // 0063 GETMBR R5 R5 K1 - 0xB81A0400, // 0064 GETNGBL R6 K2 - 0x88180D03, // 0065 GETMBR R6 R6 K3 - 0x88180D0B, // 0066 GETMBR R6 R6 K11 - 0x1C140A06, // 0067 EQ R5 R5 R6 - 0x7816000B, // 0068 JMPF R5 #0075 - 0x8C140100, // 0069 GETMET R5 R0 K0 - 0x7C140200, // 006A CALL R5 1 - 0x88140B08, // 006B GETMBR R5 R5 K8 - 0x1C140B17, // 006C EQ R5 R5 K23 - 0x78160006, // 006D JMPF R5 #0075 - 0x8C140109, // 006E GETMET R5 R0 K9 - 0x7C140200, // 006F CALL R5 1 - 0x60140008, // 0070 GETGBL R5 G8 - 0x8C180118, // 0071 GETMET R6 R0 K24 - 0x7C180200, // 0072 CALL R6 1 - 0x7C140200, // 0073 CALL R5 1 - 0x5C100A00, // 0074 MOVE R4 R5 - 0x8C140119, // 0075 GETMET R5 R0 K25 - 0x7C140200, // 0076 CALL R5 1 - 0x8C180106, // 0077 GETMET R6 R0 K6 - 0x60200018, // 0078 GETGBL R8 G24 - 0x5824001A, // 0079 LDCONST R9 K26 - 0x5C280400, // 007A MOVE R10 R2 - 0x5C2C0800, // 007B MOVE R11 R4 - 0x5C300A00, // 007C MOVE R12 R5 - 0x7C200800, // 007D CALL R8 4 - 0x7C180400, // 007E CALL R6 2 - 0x700200D5, // 007F JMP #0156 - 0x88080301, // 0080 GETMBR R2 R1 K1 - 0xB80E0400, // 0081 GETNGBL R3 K2 - 0x880C0703, // 0082 GETMBR R3 R3 K3 - 0x880C070B, // 0083 GETMBR R3 R3 K11 - 0x1C080403, // 0084 EQ R2 R2 R3 - 0x780A0010, // 0085 JMPF R2 #0097 - 0x88080308, // 0086 GETMBR R2 R1 K8 - 0x1C08051B, // 0087 EQ R2 R2 K27 - 0x780A000D, // 0088 JMPF R2 #0097 - 0x8C080109, // 0089 GETMET R2 R0 K9 - 0x7C080200, // 008A CALL R2 1 - 0x8C080118, // 008B GETMET R2 R0 K24 - 0x7C080200, // 008C CALL R2 1 - 0x8C0C0119, // 008D GETMET R3 R0 K25 - 0x7C0C0200, // 008E CALL R3 1 - 0x8C100106, // 008F GETMET R4 R0 K6 - 0x60180018, // 0090 GETGBL R6 G24 - 0x581C001C, // 0091 LDCONST R7 K28 - 0x5C200400, // 0092 MOVE R8 R2 - 0x5C240600, // 0093 MOVE R9 R3 - 0x7C180600, // 0094 CALL R6 3 - 0x7C100400, // 0095 CALL R4 2 - 0x700200BE, // 0096 JMP #0156 - 0x88080301, // 0097 GETMBR R2 R1 K1 - 0xB80E0400, // 0098 GETNGBL R3 K2 - 0x880C0703, // 0099 GETMBR R3 R3 K3 - 0x880C070B, // 009A GETMBR R3 R3 K11 - 0x1C080403, // 009B EQ R2 R2 R3 - 0x780A00B6, // 009C JMPF R2 #0154 - 0x88080308, // 009D GETMBR R2 R1 K8 - 0x1C08051D, // 009E EQ R2 R2 K29 - 0x780A00B3, // 009F JMPF R2 #0154 - 0x8C080109, // 00A0 GETMET R2 R0 K9 - 0x7C080200, // 00A1 CALL R2 1 - 0x8C08011E, // 00A2 GETMET R2 R0 K30 - 0x7C080200, // 00A3 CALL R2 1 - 0x8C0C011F, // 00A4 GETMET R3 R0 K31 - 0x58140020, // 00A5 LDCONST R5 K32 - 0x7C0C0400, // 00A6 CALL R3 2 - 0x8C0C0121, // 00A7 GETMET R3 R0 K33 - 0x7C0C0200, // 00A8 CALL R3 1 - 0x8C0C0106, // 00A9 GETMET R3 R0 K6 - 0x60140018, // 00AA GETGBL R5 G24 - 0x58180022, // 00AB LDCONST R6 K34 - 0x5C1C0400, // 00AC MOVE R7 R2 - 0x7C140400, // 00AD CALL R5 2 - 0x7C0C0400, // 00AE CALL R3 2 - 0x8C0C0123, // 00AF GETMET R3 R0 K35 - 0x7C0C0200, // 00B0 CALL R3 1 - 0x740E009B, // 00B1 JMPT R3 #014E - 0x8C0C0124, // 00B2 GETMET R3 R0 K36 - 0x7C0C0200, // 00B3 CALL R3 1 - 0x740E0098, // 00B4 JMPT R3 #014E - 0x8C0C0100, // 00B5 GETMET R3 R0 K0 - 0x7C0C0200, // 00B6 CALL R3 1 - 0x4C100000, // 00B7 LDNIL R4 - 0x1C100604, // 00B8 EQ R4 R3 R4 - 0x74120005, // 00B9 JMPT R4 #00C0 - 0x88100701, // 00BA GETMBR R4 R3 K1 - 0xB8160400, // 00BB GETNGBL R5 K2 - 0x88140B03, // 00BC GETMBR R5 R5 K3 - 0x88140B04, // 00BD GETMBR R5 R5 K4 - 0x1C100805, // 00BE EQ R4 R4 R5 - 0x78120000, // 00BF JMPF R4 #00C1 - 0x7002008C, // 00C0 JMP #014E - 0x88100701, // 00C1 GETMBR R4 R3 K1 - 0xB8160400, // 00C2 GETNGBL R5 K2 - 0x88140B03, // 00C3 GETMBR R5 R5 K3 - 0x88140B05, // 00C4 GETMBR R5 R5 K5 - 0x1C100805, // 00C5 EQ R4 R4 R5 - 0x78120006, // 00C6 JMPF R4 #00CE - 0x8C100106, // 00C7 GETMET R4 R0 K6 - 0x88180708, // 00C8 GETMBR R6 R3 K8 - 0x001A4A06, // 00C9 ADD R6 K37 R6 - 0x7C100400, // 00CA CALL R4 2 - 0x8C100109, // 00CB GETMET R4 R0 K9 - 0x7C100200, // 00CC CALL R4 1 - 0x7001FFE0, // 00CD JMP #00AF - 0x88100701, // 00CE GETMBR R4 R3 K1 - 0xB8160400, // 00CF GETNGBL R5 K2 - 0x88140B03, // 00D0 GETMBR R5 R5 K3 - 0x88140B0A, // 00D1 GETMBR R5 R5 K10 - 0x1C100805, // 00D2 EQ R4 R4 R5 - 0x78120002, // 00D3 JMPF R4 #00D7 - 0x8C100109, // 00D4 GETMET R4 R0 K9 - 0x7C100200, // 00D5 CALL R4 1 - 0x7001FFD7, // 00D6 JMP #00AF - 0x88100701, // 00D7 GETMBR R4 R3 K1 - 0xB8160400, // 00D8 GETNGBL R5 K2 - 0x88140B03, // 00D9 GETMBR R5 R5 K3 - 0x88140B0B, // 00DA GETMBR R5 R5 K11 - 0x1C100805, // 00DB EQ R4 R4 R5 - 0x78120057, // 00DC JMPF R4 #0135 - 0x88100708, // 00DD GETMBR R4 R3 K8 - 0x1C10090C, // 00DE EQ R4 R4 K12 - 0x78120054, // 00DF JMPF R4 #0135 - 0x8C100109, // 00E0 GETMET R4 R0 K9 - 0x7C100200, // 00E1 CALL R4 1 - 0x5810000D, // 00E2 LDCONST R4 K13 - 0x8C140100, // 00E3 GETMET R5 R0 K0 - 0x7C140200, // 00E4 CALL R5 1 - 0x4C180000, // 00E5 LDNIL R6 - 0x20180A06, // 00E6 NE R6 R5 R6 - 0x781A001C, // 00E7 JMPF R6 #0105 - 0x88180B01, // 00E8 GETMBR R6 R5 K1 - 0xB81E0400, // 00E9 GETNGBL R7 K2 - 0x881C0F03, // 00EA GETMBR R7 R7 K3 - 0x881C0F0E, // 00EB GETMBR R7 R7 K14 - 0x1C180C07, // 00EC EQ R6 R6 R7 - 0x741A0005, // 00ED JMPT R6 #00F4 - 0x88180B01, // 00EE GETMBR R6 R5 K1 - 0xB81E0400, // 00EF GETNGBL R7 K2 - 0x881C0F03, // 00F0 GETMBR R7 R7 K3 - 0x881C0F0B, // 00F1 GETMBR R7 R7 K11 - 0x1C180C07, // 00F2 EQ R6 R6 R7 - 0x781A0010, // 00F3 JMPF R6 #0105 - 0x8C18010F, // 00F4 GETMET R6 R0 K15 - 0x7C180200, // 00F5 CALL R6 1 - 0x4C1C0000, // 00F6 LDNIL R7 - 0x20180C07, // 00F7 NE R6 R6 R7 - 0x781A000B, // 00F8 JMPF R6 #0105 - 0x8C18010F, // 00F9 GETMET R6 R0 K15 - 0x7C180200, // 00FA CALL R6 1 - 0x88180D01, // 00FB GETMBR R6 R6 K1 - 0xB81E0400, // 00FC GETNGBL R7 K2 - 0x881C0F03, // 00FD GETMBR R7 R7 K3 - 0x881C0F10, // 00FE GETMBR R7 R7 K16 - 0x1C180C07, // 00FF EQ R6 R6 R7 - 0x781A0003, // 0100 JMPF R6 #0105 - 0x8C180111, // 0101 GETMET R6 R0 K17 - 0x7C180200, // 0102 CALL R6 1 - 0x5C100C00, // 0103 MOVE R4 R6 - 0x7002000A, // 0104 JMP #0110 - 0x8C180112, // 0105 GETMET R6 R0 K18 - 0x7C180200, // 0106 CALL R6 1 - 0x8C1C0113, // 0107 GETMET R7 R0 K19 - 0x5C240C00, // 0108 MOVE R9 R6 - 0x58280014, // 0109 LDCONST R10 K20 - 0x7C1C0600, // 010A CALL R7 3 - 0x601C0018, // 010B GETGBL R7 G24 - 0x58200015, // 010C LDCONST R8 K21 - 0x5C240C00, // 010D MOVE R9 R6 - 0x7C1C0400, // 010E CALL R7 2 - 0x5C100E00, // 010F MOVE R4 R7 - 0x58180016, // 0110 LDCONST R6 K22 - 0x8C1C0100, // 0111 GETMET R7 R0 K0 - 0x7C1C0200, // 0112 CALL R7 1 - 0x4C200000, // 0113 LDNIL R8 - 0x201C0E08, // 0114 NE R7 R7 R8 - 0x781E0013, // 0115 JMPF R7 #012A - 0x8C1C0100, // 0116 GETMET R7 R0 K0 - 0x7C1C0200, // 0117 CALL R7 1 - 0x881C0F01, // 0118 GETMBR R7 R7 K1 - 0xB8220400, // 0119 GETNGBL R8 K2 - 0x88201103, // 011A GETMBR R8 R8 K3 - 0x8820110B, // 011B GETMBR R8 R8 K11 - 0x1C1C0E08, // 011C EQ R7 R7 R8 - 0x781E000B, // 011D JMPF R7 #012A - 0x8C1C0100, // 011E GETMET R7 R0 K0 - 0x7C1C0200, // 011F CALL R7 1 - 0x881C0F08, // 0120 GETMBR R7 R7 K8 - 0x1C1C0F17, // 0121 EQ R7 R7 K23 - 0x781E0006, // 0122 JMPF R7 #012A - 0x8C1C0109, // 0123 GETMET R7 R0 K9 - 0x7C1C0200, // 0124 CALL R7 1 - 0x601C0008, // 0125 GETGBL R7 G8 - 0x8C200118, // 0126 GETMET R8 R0 K24 - 0x7C200200, // 0127 CALL R8 1 - 0x7C1C0200, // 0128 CALL R7 1 - 0x5C180E00, // 0129 MOVE R6 R7 - 0x8C1C0119, // 012A GETMET R7 R0 K25 - 0x7C1C0200, // 012B CALL R7 1 - 0x8C200106, // 012C GETMET R8 R0 K6 - 0x60280018, // 012D GETGBL R10 G24 - 0x582C0026, // 012E LDCONST R11 K38 - 0x5C300800, // 012F MOVE R12 R4 - 0x5C340C00, // 0130 MOVE R13 R6 - 0x5C380E00, // 0131 MOVE R14 R7 - 0x7C280800, // 0132 CALL R10 4 - 0x7C200400, // 0133 CALL R8 2 - 0x70020017, // 0134 JMP #014D - 0x88100701, // 0135 GETMBR R4 R3 K1 - 0xB8160400, // 0136 GETNGBL R5 K2 - 0x88140B03, // 0137 GETMBR R5 R5 K3 - 0x88140B0B, // 0138 GETMBR R5 R5 K11 - 0x1C100805, // 0139 EQ R4 R4 R5 - 0x78120010, // 013A JMPF R4 #014C - 0x88100708, // 013B GETMBR R4 R3 K8 - 0x1C10091B, // 013C EQ R4 R4 K27 - 0x7812000D, // 013D JMPF R4 #014C - 0x8C100109, // 013E GETMET R4 R0 K9 - 0x7C100200, // 013F CALL R4 1 - 0x8C100118, // 0140 GETMET R4 R0 K24 - 0x7C100200, // 0141 CALL R4 1 - 0x8C140119, // 0142 GETMET R5 R0 K25 - 0x7C140200, // 0143 CALL R5 1 - 0x8C180106, // 0144 GETMET R6 R0 K6 - 0x60200018, // 0145 GETGBL R8 G24 - 0x58240027, // 0146 LDCONST R9 K39 - 0x5C280800, // 0147 MOVE R10 R4 - 0x5C2C0A00, // 0148 MOVE R11 R5 - 0x7C200600, // 0149 CALL R8 3 - 0x7C180400, // 014A CALL R6 2 - 0x70020000, // 014B JMP #014D - 0x70020000, // 014C JMP #014E - 0x7001FF60, // 014D JMP #00AF - 0x8C0C0106, // 014E GETMET R3 R0 K6 - 0x60140018, // 014F GETGBL R5 G24 - 0x58180028, // 0150 LDCONST R6 K40 - 0x7C140200, // 0151 CALL R5 1 - 0x7C0C0400, // 0152 CALL R3 2 - 0x70020001, // 0153 JMP #0156 - 0x8C080129, // 0154 GETMET R2 R0 K41 - 0x7C080200, // 0155 CALL R2 1 - 0x80000000, // 0156 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_set -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_set, /* name */ - be_nested_proto( - 11, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ + ( &(const bvalue[43]) { /* constants */ /* K0 */ be_nested_str_weak(next), /* K1 */ be_nested_str_weak(expect_identifier), /* K2 */ be_nested_str_weak(validate_user_name), - /* K3 */ be_nested_str_weak(variable), + /* K3 */ be_nested_str_weak(palette), /* K4 */ be_nested_str_weak(skip_statement), /* K5 */ be_nested_str_weak(expect_assign), - /* K6 */ be_nested_str_weak(process_value), - /* K7 */ be_nested_str_weak(collect_inline_comment), - /* K8 */ be_nested_str_weak(add), - /* K9 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20_X25s_X25s), + /* K6 */ be_nested_str_weak(expect_left_bracket), + /* K7 */ be_nested_str_weak(skip_whitespace_including_newlines), + /* K8 */ be_nested_str_weak(check_right_bracket), + /* K9 */ be_nested_str_weak(error), + /* K10 */ be_nested_str_weak(Empty_X20palettes_X20are_X20not_X20allowed_X2E_X20A_X20palette_X20must_X20contain_X20at_X20least_X20one_X20color_X20entry_X2E), + /* K11 */ be_nested_str_weak(current), + /* K12 */ be_nested_str_weak(type), + /* K13 */ be_nested_str_weak(animation_dsl), + /* K14 */ be_nested_str_weak(Token), + /* K15 */ be_nested_str_weak(LEFT_PAREN), + /* K16 */ be_nested_str_weak(at_end), + /* K17 */ be_nested_str_weak(Cannot_X20mix_X20alternative_X20syntax_X20_X5Bcolor1_X2C_X20color2_X2C_X20_X2E_X2E_X2E_X5D_X20with_X20tuple_X20syntax_X20_X28value_X2C_X20color_X29_X2E_X20Use_X20only_X20one_X20syntax_X20per_X20palette_X2E), + /* K18 */ be_nested_str_weak(expect_left_paren), + /* K19 */ be_nested_str_weak(expect_number), + /* K20 */ be_nested_str_weak(expect_comma), + /* K21 */ be_nested_str_weak(process_value), + /* K22 */ be_nested_str_weak(color), + /* K23 */ be_nested_str_weak(expect_right_paren), + /* K24 */ be_nested_str_weak(convert_to_vrgb), + /* K25 */ be_nested_str_weak(0x_X25s), + /* K26 */ be_nested_str_weak(push), + /* K27 */ be_nested_str_weak(Cannot_X20mix_X20tuple_X20syntax_X20_X28value_X2C_X20color_X29_X20with_X20alternative_X20syntax_X20_X5Bcolor1_X2C_X20color2_X2C_X20_X2E_X2E_X2E_X5D_X2E_X20Use_X20only_X20one_X20syntax_X20per_X20palette_X2E), + /* K28 */ be_nested_str_weak(COMMENT), + /* K29 */ be_nested_str_weak(COMMA), + /* K30 */ be_nested_str_weak(NEWLINE), + /* K31 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X5D_X27_X20in_X20palette_X20definition), + /* K32 */ be_nested_str_weak(expect_right_bracket), + /* K33 */ be_nested_str_weak(collect_inline_comment), + /* K34 */ be_nested_str_weak(), + /* K35 */ be_const_int(0), + /* K36 */ be_const_int(1), + /* K37 */ be_nested_str_weak(_X20), + /* K38 */ be_nested_str_weak(_X2508X), + /* K39 */ be_nested_str_weak(_X22_X25s_X22), + /* K40 */ be_nested_str_weak(stop_iteration), + /* K41 */ be_nested_str_weak(add), + /* K42 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20bytes_X28_X25s_X29_X25s), }), - be_str_weak(process_set), + be_str_weak(process_palette), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ + ( &(const binstruction[239]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 0x8C040101, // 0002 GETMET R1 R0 K1 @@ -5933,206 +4599,230 @@ be_local_closure(class_SimpleDSLTranspiler_process_set, /* name */ 0x8C080105, // 000C GETMET R2 R0 K5 0x7C080200, // 000D CALL R2 1 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100003, // 000F LDCONST R4 K3 - 0x7C080400, // 0010 CALL R2 2 - 0x8C0C0107, // 0011 GETMET R3 R0 K7 - 0x7C0C0200, // 0012 CALL R3 1 - 0x8C100108, // 0013 GETMET R4 R0 K8 - 0x60180018, // 0014 GETGBL R6 G24 - 0x581C0009, // 0015 LDCONST R7 K9 - 0x5C200200, // 0016 MOVE R8 R1 - 0x5C240400, // 0017 MOVE R9 R2 - 0x5C280600, // 0018 MOVE R10 R3 - 0x7C180800, // 0019 CALL R6 4 - 0x7C100400, // 001A CALL R4 2 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_statement -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_statement, /* 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[34]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(EOF), - /* K5 */ be_nested_str_weak(COMMENT), - /* K6 */ be_nested_str_weak(add), - /* K7 */ be_nested_str_weak(value), - /* K8 */ be_nested_str_weak(next), - /* K9 */ be_nested_str_weak(NEWLINE), - /* K10 */ be_nested_str_weak(first_statement), - /* K11 */ be_nested_str_weak(KEYWORD), - /* K12 */ be_nested_str_weak(IDENTIFIER), - /* K13 */ be_nested_str_weak(strip), - /* K14 */ be_nested_str_weak(error), - /* K15 */ be_nested_str_weak(_X27strip_X27_X20directive_X20is_X20temporarily_X20disabled_X2E_X20Strip_X20configuration_X20is_X20handled_X20automatically_X2E), - /* K16 */ be_nested_str_weak(skip_statement), - /* K17 */ be_nested_str_weak(strip_initialized), - /* K18 */ be_nested_str_weak(generate_default_strip_initialization), - /* K19 */ be_nested_str_weak(color), - /* K20 */ be_nested_str_weak(process_color), - /* K21 */ be_nested_str_weak(palette), - /* K22 */ be_nested_str_weak(process_palette), - /* K23 */ be_nested_str_weak(animation), - /* K24 */ be_nested_str_weak(process_animation), - /* K25 */ be_nested_str_weak(set), - /* K26 */ be_nested_str_weak(process_set), - /* K27 */ be_nested_str_weak(sequence), - /* K28 */ be_nested_str_weak(process_sequence), - /* K29 */ be_nested_str_weak(run), - /* K30 */ be_nested_str_weak(process_run), - /* K31 */ be_nested_str_weak(on), - /* K32 */ be_nested_str_weak(process_event_handler), - /* K33 */ be_nested_str_weak(process_property_assignment), - }), - be_str_weak(process_statement), - &be_const_str_solidified, - ( &(const binstruction[129]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x1C080202, // 0003 EQ R2 R1 R2 - 0x740A0005, // 0004 JMPT R2 #000B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0000, // 000A JMPF R2 #000C - 0x80000400, // 000B RET 0 - 0x88080301, // 000C GETMBR R2 R1 K1 - 0xB80E0400, // 000D GETNGBL R3 K2 - 0x880C0703, // 000E GETMBR R3 R3 K3 - 0x880C0705, // 000F GETMBR R3 R3 K5 - 0x1C080403, // 0010 EQ R2 R2 R3 - 0x780A0005, // 0011 JMPF R2 #0018 - 0x8C080106, // 0012 GETMET R2 R0 K6 - 0x88100307, // 0013 GETMBR R4 R1 K7 - 0x7C080400, // 0014 CALL R2 2 - 0x8C080108, // 0015 GETMET R2 R0 K8 - 0x7C080200, // 0016 CALL R2 1 - 0x80000400, // 0017 RET 0 - 0x88080301, // 0018 GETMBR R2 R1 K1 - 0xB80E0400, // 0019 GETNGBL R3 K2 - 0x880C0703, // 001A GETMBR R3 R3 K3 - 0x880C0709, // 001B GETMBR R3 R3 K9 - 0x1C080403, // 001C EQ R2 R2 R3 - 0x780A0002, // 001D JMPF R2 #0021 - 0x8C080108, // 001E GETMET R2 R0 K8 - 0x7C080200, // 001F CALL R2 1 - 0x80000400, // 0020 RET 0 - 0x8808010A, // 0021 GETMBR R2 R0 K10 - 0x880C0301, // 0022 GETMBR R3 R1 K1 - 0xB8120400, // 0023 GETNGBL R4 K2 - 0x88100903, // 0024 GETMBR R4 R4 K3 - 0x8810090B, // 0025 GETMBR R4 R4 K11 - 0x1C0C0604, // 0026 EQ R3 R3 R4 - 0x740E0005, // 0027 JMPT R3 #002E - 0x880C0301, // 0028 GETMBR R3 R1 K1 - 0xB8120400, // 0029 GETNGBL R4 K2 - 0x88100903, // 002A GETMBR R4 R4 K3 - 0x8810090C, // 002B GETMBR R4 R4 K12 - 0x1C0C0604, // 002C EQ R3 R3 R4 - 0x780E0001, // 002D JMPF R3 #0030 - 0x500C0000, // 002E LDBOOL R3 0 0 - 0x90021403, // 002F SETMBR R0 K10 R3 - 0x880C0301, // 0030 GETMBR R3 R1 K1 - 0xB8120400, // 0031 GETNGBL R4 K2 - 0x88100903, // 0032 GETMBR R4 R4 K3 - 0x8810090B, // 0033 GETMBR R4 R4 K11 - 0x1C0C0604, // 0034 EQ R3 R3 R4 - 0x780E003A, // 0035 JMPF R3 #0071 - 0x880C0307, // 0036 GETMBR R3 R1 K7 - 0x1C0C070D, // 0037 EQ R3 R3 K13 - 0x780E0006, // 0038 JMPF R3 #0040 - 0x8C0C010E, // 0039 GETMET R3 R0 K14 - 0x5814000F, // 003A LDCONST R5 K15 - 0x7C0C0400, // 003B CALL R3 2 - 0x8C0C0110, // 003C GETMET R3 R0 K16 - 0x7C0C0200, // 003D CALL R3 1 - 0x80000600, // 003E RET 0 - 0x7002002F, // 003F JMP #0070 - 0x880C0111, // 0040 GETMBR R3 R0 K17 - 0x740E0001, // 0041 JMPT R3 #0044 - 0x8C0C0112, // 0042 GETMET R3 R0 K18 - 0x7C0C0200, // 0043 CALL R3 1 - 0x880C0307, // 0044 GETMBR R3 R1 K7 - 0x1C0C0713, // 0045 EQ R3 R3 K19 - 0x780E0002, // 0046 JMPF R3 #004A - 0x8C0C0114, // 0047 GETMET R3 R0 K20 - 0x7C0C0200, // 0048 CALL R3 1 - 0x70020025, // 0049 JMP #0070 - 0x880C0307, // 004A GETMBR R3 R1 K7 - 0x1C0C0715, // 004B EQ R3 R3 K21 - 0x780E0002, // 004C JMPF R3 #0050 - 0x8C0C0116, // 004D GETMET R3 R0 K22 - 0x7C0C0200, // 004E CALL R3 1 - 0x7002001F, // 004F JMP #0070 - 0x880C0307, // 0050 GETMBR R3 R1 K7 - 0x1C0C0717, // 0051 EQ R3 R3 K23 - 0x780E0002, // 0052 JMPF R3 #0056 - 0x8C0C0118, // 0053 GETMET R3 R0 K24 - 0x7C0C0200, // 0054 CALL R3 1 - 0x70020019, // 0055 JMP #0070 - 0x880C0307, // 0056 GETMBR R3 R1 K7 - 0x1C0C0719, // 0057 EQ R3 R3 K25 - 0x780E0002, // 0058 JMPF R3 #005C - 0x8C0C011A, // 0059 GETMET R3 R0 K26 - 0x7C0C0200, // 005A CALL R3 1 - 0x70020013, // 005B JMP #0070 - 0x880C0307, // 005C GETMBR R3 R1 K7 - 0x1C0C071B, // 005D EQ R3 R3 K27 - 0x780E0002, // 005E JMPF R3 #0062 - 0x8C0C011C, // 005F GETMET R3 R0 K28 - 0x7C0C0200, // 0060 CALL R3 1 - 0x7002000D, // 0061 JMP #0070 - 0x880C0307, // 0062 GETMBR R3 R1 K7 - 0x1C0C071D, // 0063 EQ R3 R3 K29 - 0x780E0002, // 0064 JMPF R3 #0068 - 0x8C0C011E, // 0065 GETMET R3 R0 K30 - 0x7C0C0200, // 0066 CALL R3 1 - 0x70020007, // 0067 JMP #0070 - 0x880C0307, // 0068 GETMBR R3 R1 K7 - 0x1C0C071F, // 0069 EQ R3 R3 K31 - 0x780E0002, // 006A JMPF R3 #006E - 0x8C0C0120, // 006B GETMET R3 R0 K32 - 0x7C0C0200, // 006C CALL R3 1 - 0x70020001, // 006D JMP #0070 - 0x8C0C0110, // 006E GETMET R3 R0 K16 - 0x7C0C0200, // 006F CALL R3 1 - 0x7002000E, // 0070 JMP #0080 - 0x880C0301, // 0071 GETMBR R3 R1 K1 - 0xB8120400, // 0072 GETNGBL R4 K2 - 0x88100903, // 0073 GETMBR R4 R4 K3 - 0x8810090C, // 0074 GETMBR R4 R4 K12 - 0x1C0C0604, // 0075 EQ R3 R3 R4 - 0x780E0006, // 0076 JMPF R3 #007E - 0x880C0111, // 0077 GETMBR R3 R0 K17 - 0x740E0001, // 0078 JMPT R3 #007B - 0x8C0C0112, // 0079 GETMET R3 R0 K18 - 0x7C0C0200, // 007A CALL R3 1 - 0x8C0C0121, // 007B GETMET R3 R0 K33 - 0x7C0C0200, // 007C CALL R3 1 - 0x70020001, // 007D JMP #0080 - 0x8C0C0110, // 007E GETMET R3 R0 K16 - 0x7C0C0200, // 007F CALL R3 1 - 0x80000000, // 0080 RET 0 + 0x7C080200, // 000F CALL R2 1 + 0x60080012, // 0010 GETGBL R2 G18 + 0x7C080000, // 0011 CALL R2 0 + 0x8C0C0107, // 0012 GETMET R3 R0 K7 + 0x7C0C0200, // 0013 CALL R3 1 + 0x8C0C0108, // 0014 GETMET R3 R0 K8 + 0x7C0C0200, // 0015 CALL R3 1 + 0x780E0005, // 0016 JMPF R3 #001D + 0x8C0C0109, // 0017 GETMET R3 R0 K9 + 0x5814000A, // 0018 LDCONST R5 K10 + 0x7C0C0400, // 0019 CALL R3 2 + 0x8C0C0104, // 001A GETMET R3 R0 K4 + 0x7C0C0200, // 001B CALL R3 1 + 0x80000600, // 001C RET 0 + 0x8C0C010B, // 001D GETMET R3 R0 K11 + 0x7C0C0200, // 001E CALL R3 1 + 0x4C100000, // 001F LDNIL R4 + 0x200C0604, // 0020 NE R3 R3 R4 + 0x780E0007, // 0021 JMPF R3 #002A + 0x8C0C010B, // 0022 GETMET R3 R0 K11 + 0x7C0C0200, // 0023 CALL R3 1 + 0x880C070C, // 0024 GETMBR R3 R3 K12 + 0xB8121A00, // 0025 GETNGBL R4 K13 + 0x8810090E, // 0026 GETMBR R4 R4 K14 + 0x8810090F, // 0027 GETMBR R4 R4 K15 + 0x1C0C0604, // 0028 EQ R3 R3 R4 + 0x740E0000, // 0029 JMPT R3 #002B + 0x500C0001, // 002A LDBOOL R3 0 1 + 0x500C0200, // 002B LDBOOL R3 1 0 + 0x8C100110, // 002C GETMET R4 R0 K16 + 0x7C100200, // 002D CALL R4 1 + 0x74120097, // 002E JMPT R4 #00C7 + 0x8C100108, // 002F GETMET R4 R0 K8 + 0x7C100200, // 0030 CALL R4 1 + 0x74120094, // 0031 JMPT R4 #00C7 + 0x8C100107, // 0032 GETMET R4 R0 K7 + 0x7C100200, // 0033 CALL R4 1 + 0x8C100108, // 0034 GETMET R4 R0 K8 + 0x7C100200, // 0035 CALL R4 1 + 0x78120000, // 0036 JMPF R4 #0038 + 0x7002008E, // 0037 JMP #00C7 + 0x780E002B, // 0038 JMPF R3 #0065 + 0x8C10010B, // 0039 GETMET R4 R0 K11 + 0x7C100200, // 003A CALL R4 1 + 0x4C140000, // 003B LDNIL R5 + 0x20100805, // 003C NE R4 R4 R5 + 0x7812000D, // 003D JMPF R4 #004C + 0x8C10010B, // 003E GETMET R4 R0 K11 + 0x7C100200, // 003F CALL R4 1 + 0x8810090C, // 0040 GETMBR R4 R4 K12 + 0xB8161A00, // 0041 GETNGBL R5 K13 + 0x88140B0E, // 0042 GETMBR R5 R5 K14 + 0x88140B0F, // 0043 GETMBR R5 R5 K15 + 0x20100805, // 0044 NE R4 R4 R5 + 0x78120005, // 0045 JMPF R4 #004C + 0x8C100109, // 0046 GETMET R4 R0 K9 + 0x58180011, // 0047 LDCONST R6 K17 + 0x7C100400, // 0048 CALL R4 2 + 0x8C100104, // 0049 GETMET R4 R0 K4 + 0x7C100200, // 004A CALL R4 1 + 0x80000800, // 004B RET 0 + 0x8C100112, // 004C GETMET R4 R0 K18 + 0x7C100200, // 004D CALL R4 1 + 0x8C100113, // 004E GETMET R4 R0 K19 + 0x7C100200, // 004F CALL R4 1 + 0x8C140114, // 0050 GETMET R5 R0 K20 + 0x7C140200, // 0051 CALL R5 1 + 0x8C140115, // 0052 GETMET R5 R0 K21 + 0x581C0016, // 0053 LDCONST R7 K22 + 0x7C140400, // 0054 CALL R5 2 + 0x8C180117, // 0055 GETMET R6 R0 K23 + 0x7C180200, // 0056 CALL R6 1 + 0x8C180118, // 0057 GETMET R6 R0 K24 + 0x5C200800, // 0058 MOVE R8 R4 + 0x5C240A00, // 0059 MOVE R9 R5 + 0x7C180600, // 005A CALL R6 3 + 0x601C0009, // 005B GETGBL R7 G9 + 0x60200018, // 005C GETGBL R8 G24 + 0x58240019, // 005D LDCONST R9 K25 + 0x5C280C00, // 005E MOVE R10 R6 + 0x7C200400, // 005F CALL R8 2 + 0x7C1C0200, // 0060 CALL R7 1 + 0x8C20051A, // 0061 GETMET R8 R2 K26 + 0x5C280E00, // 0062 MOVE R10 R7 + 0x7C200400, // 0063 CALL R8 2 + 0x70020022, // 0064 JMP #0088 + 0x8C10010B, // 0065 GETMET R4 R0 K11 + 0x7C100200, // 0066 CALL R4 1 + 0x4C140000, // 0067 LDNIL R5 + 0x20100805, // 0068 NE R4 R4 R5 + 0x7812000D, // 0069 JMPF R4 #0078 + 0x8C10010B, // 006A GETMET R4 R0 K11 + 0x7C100200, // 006B CALL R4 1 + 0x8810090C, // 006C GETMBR R4 R4 K12 + 0xB8161A00, // 006D GETNGBL R5 K13 + 0x88140B0E, // 006E GETMBR R5 R5 K14 + 0x88140B0F, // 006F GETMBR R5 R5 K15 + 0x1C100805, // 0070 EQ R4 R4 R5 + 0x78120005, // 0071 JMPF R4 #0078 + 0x8C100109, // 0072 GETMET R4 R0 K9 + 0x5818001B, // 0073 LDCONST R6 K27 + 0x7C100400, // 0074 CALL R4 2 + 0x8C100104, // 0075 GETMET R4 R0 K4 + 0x7C100200, // 0076 CALL R4 1 + 0x80000800, // 0077 RET 0 + 0x8C100115, // 0078 GETMET R4 R0 K21 + 0x58180016, // 0079 LDCONST R6 K22 + 0x7C100400, // 007A CALL R4 2 + 0x8C140118, // 007B GETMET R5 R0 K24 + 0x541E00FE, // 007C LDINT R7 255 + 0x5C200800, // 007D MOVE R8 R4 + 0x7C140600, // 007E CALL R5 3 + 0x60180009, // 007F GETGBL R6 G9 + 0x601C0018, // 0080 GETGBL R7 G24 + 0x58200019, // 0081 LDCONST R8 K25 + 0x5C240A00, // 0082 MOVE R9 R5 + 0x7C1C0400, // 0083 CALL R7 2 + 0x7C180200, // 0084 CALL R6 1 + 0x8C1C051A, // 0085 GETMET R7 R2 K26 + 0x5C240C00, // 0086 MOVE R9 R6 + 0x7C1C0400, // 0087 CALL R7 2 + 0x8C100110, // 0088 GETMET R4 R0 K16 + 0x7C100200, // 0089 CALL R4 1 + 0x7412000F, // 008A JMPT R4 #009B + 0x8C10010B, // 008B GETMET R4 R0 K11 + 0x7C100200, // 008C CALL R4 1 + 0x4C140000, // 008D LDNIL R5 + 0x20140805, // 008E NE R5 R4 R5 + 0x78160008, // 008F JMPF R5 #0099 + 0x8814090C, // 0090 GETMBR R5 R4 K12 + 0xB81A1A00, // 0091 GETNGBL R6 K13 + 0x88180D0E, // 0092 GETMBR R6 R6 K14 + 0x88180D1C, // 0093 GETMBR R6 R6 K28 + 0x1C140A06, // 0094 EQ R5 R5 R6 + 0x78160002, // 0095 JMPF R5 #0099 + 0x8C140100, // 0096 GETMET R5 R0 K0 + 0x7C140200, // 0097 CALL R5 1 + 0x70020000, // 0098 JMP #009A + 0x70020000, // 0099 JMP #009B + 0x7001FFEC, // 009A JMP #0088 + 0x8C10010B, // 009B GETMET R4 R0 K11 + 0x7C100200, // 009C CALL R4 1 + 0x4C140000, // 009D LDNIL R5 + 0x20100805, // 009E NE R4 R4 R5 + 0x7812000C, // 009F JMPF R4 #00AD + 0x8C10010B, // 00A0 GETMET R4 R0 K11 + 0x7C100200, // 00A1 CALL R4 1 + 0x8810090C, // 00A2 GETMBR R4 R4 K12 + 0xB8161A00, // 00A3 GETNGBL R5 K13 + 0x88140B0E, // 00A4 GETMBR R5 R5 K14 + 0x88140B1D, // 00A5 GETMBR R5 R5 K29 + 0x1C100805, // 00A6 EQ R4 R4 R5 + 0x78120004, // 00A7 JMPF R4 #00AD + 0x8C100100, // 00A8 GETMET R4 R0 K0 + 0x7C100200, // 00A9 CALL R4 1 + 0x8C100107, // 00AA GETMET R4 R0 K7 + 0x7C100200, // 00AB CALL R4 1 + 0x70020018, // 00AC JMP #00C6 + 0x8C10010B, // 00AD GETMET R4 R0 K11 + 0x7C100200, // 00AE CALL R4 1 + 0x4C140000, // 00AF LDNIL R5 + 0x20100805, // 00B0 NE R4 R4 R5 + 0x7812000C, // 00B1 JMPF R4 #00BF + 0x8C10010B, // 00B2 GETMET R4 R0 K11 + 0x7C100200, // 00B3 CALL R4 1 + 0x8810090C, // 00B4 GETMBR R4 R4 K12 + 0xB8161A00, // 00B5 GETNGBL R5 K13 + 0x88140B0E, // 00B6 GETMBR R5 R5 K14 + 0x88140B1E, // 00B7 GETMBR R5 R5 K30 + 0x1C100805, // 00B8 EQ R4 R4 R5 + 0x78120004, // 00B9 JMPF R4 #00BF + 0x8C100100, // 00BA GETMET R4 R0 K0 + 0x7C100200, // 00BB CALL R4 1 + 0x8C100107, // 00BC GETMET R4 R0 K7 + 0x7C100200, // 00BD CALL R4 1 + 0x70020006, // 00BE JMP #00C6 + 0x8C100108, // 00BF GETMET R4 R0 K8 + 0x7C100200, // 00C0 CALL R4 1 + 0x74120003, // 00C1 JMPT R4 #00C6 + 0x8C100109, // 00C2 GETMET R4 R0 K9 + 0x5818001F, // 00C3 LDCONST R6 K31 + 0x7C100400, // 00C4 CALL R4 2 + 0x70020000, // 00C5 JMP #00C7 + 0x7001FF64, // 00C6 JMP #002C + 0x8C100120, // 00C7 GETMET R4 R0 K32 + 0x7C100200, // 00C8 CALL R4 1 + 0x8C100121, // 00C9 GETMET R4 R0 K33 + 0x7C100200, // 00CA CALL R4 1 + 0x58140022, // 00CB LDCONST R5 K34 + 0x60180010, // 00CC GETGBL R6 G16 + 0x601C000C, // 00CD GETGBL R7 G12 + 0x5C200400, // 00CE MOVE R8 R2 + 0x7C1C0200, // 00CF CALL R7 1 + 0x041C0F24, // 00D0 SUB R7 R7 K36 + 0x401E4607, // 00D1 CONNECT R7 K35 R7 + 0x7C180200, // 00D2 CALL R6 1 + 0xA802000E, // 00D3 EXBLK 0 #00E3 + 0x5C1C0C00, // 00D4 MOVE R7 R6 + 0x7C1C0000, // 00D5 CALL R7 0 + 0x24200F23, // 00D6 GT R8 R7 K35 + 0x78220000, // 00D7 JMPF R8 #00D9 + 0x00140B25, // 00D8 ADD R5 R5 K37 + 0x60200018, // 00D9 GETGBL R8 G24 + 0x58240026, // 00DA LDCONST R9 K38 + 0x94280407, // 00DB GETIDX R10 R2 R7 + 0x7C200400, // 00DC CALL R8 2 + 0x60240018, // 00DD GETGBL R9 G24 + 0x58280027, // 00DE LDCONST R10 K39 + 0x5C2C1000, // 00DF MOVE R11 R8 + 0x7C240400, // 00E0 CALL R9 2 + 0x00140A09, // 00E1 ADD R5 R5 R9 + 0x7001FFF0, // 00E2 JMP #00D4 + 0x58180028, // 00E3 LDCONST R6 K40 + 0xAC180200, // 00E4 CATCH R6 1 0 + 0xB0080000, // 00E5 RAISE 2 R0 R0 + 0x8C180129, // 00E6 GETMET R6 R0 K41 + 0x60200018, // 00E7 GETGBL R8 G24 + 0x5824002A, // 00E8 LDCONST R9 K42 + 0x5C280200, // 00E9 MOVE R10 R1 + 0x5C2C0A00, // 00EA MOVE R11 R5 + 0x5C300800, // 00EB MOVE R12 R4 + 0x7C200800, // 00EC CALL R8 4 + 0x7C180400, // 00ED CALL R6 2 + 0x80000000, // 00EE RET 0 }) ) ); @@ -6390,9 +5080,719 @@ be_local_closure(class_SimpleDSLTranspiler_process_animation, /* name */ /******************************************************************** -** Solidified function: _validate_animation_factory_exists +** Solidified function: process_sequence_statement ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_animation_factory_exists, /* name */ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_statement, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[37]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(EOF), + /* K5 */ be_nested_str_weak(COMMENT), + /* K6 */ be_nested_str_weak(add), + /* K7 */ be_nested_str_weak(get_indent), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(NEWLINE), + /* K11 */ be_nested_str_weak(KEYWORD), + /* K12 */ be_nested_str_weak(play), + /* K13 */ be_nested_str_weak(process_play_statement_fluent), + /* K14 */ be_nested_str_weak(wait), + /* K15 */ be_nested_str_weak(process_wait_statement_fluent), + /* K16 */ be_nested_str_weak(repeat), + /* K17 */ be_nested_str_weak(1), + /* K18 */ be_nested_str_weak(forever), + /* K19 */ be_nested_str_weak(_X2D1), + /* K20 */ be_nested_str_weak(expect_number), + /* K21 */ be_nested_str_weak(expect_keyword), + /* K22 */ be_nested_str_weak(times), + /* K23 */ be_nested_str_weak(expect_left_brace), + /* K24 */ be_nested_str_weak(_X25s_X2Epush_repeat_subsequence_X28animation_X2ESequenceManager_X28engine_X2C_X20_X25s_X29), + /* K25 */ be_nested_str_weak(indent_level), + /* K26 */ be_const_int(1), + /* K27 */ be_nested_str_weak(at_end), + /* K28 */ be_nested_str_weak(check_right_brace), + /* K29 */ be_nested_str_weak(process_sequence_statement), + /* K30 */ be_nested_str_weak(expect_right_brace), + /* K31 */ be_nested_str_weak(_X25s_X29), + /* K32 */ be_nested_str_weak(IDENTIFIER), + /* K33 */ be_nested_str_weak(peek), + /* K34 */ be_nested_str_weak(DOT), + /* K35 */ be_nested_str_weak(process_sequence_assignment_fluent), + /* K36 */ be_nested_str_weak(skip_statement), + }), + be_str_weak(process_sequence_statement), + &be_const_str_solidified, + ( &(const binstruction[162]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x1C080202, // 0003 EQ R2 R1 R2 + 0x740A0005, // 0004 JMPT R2 #000B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0000, // 000A JMPF R2 #000C + 0x80000400, // 000B RET 0 + 0x88080301, // 000C GETMBR R2 R1 K1 + 0xB80E0400, // 000D GETNGBL R3 K2 + 0x880C0703, // 000E GETMBR R3 R3 K3 + 0x880C0705, // 000F GETMBR R3 R3 K5 + 0x1C080403, // 0010 EQ R2 R2 R3 + 0x780A0008, // 0011 JMPF R2 #001B + 0x8C080106, // 0012 GETMET R2 R0 K6 + 0x8C100107, // 0013 GETMET R4 R0 K7 + 0x7C100200, // 0014 CALL R4 1 + 0x88140308, // 0015 GETMBR R5 R1 K8 + 0x00100805, // 0016 ADD R4 R4 R5 + 0x7C080400, // 0017 CALL R2 2 + 0x8C080109, // 0018 GETMET R2 R0 K9 + 0x7C080200, // 0019 CALL R2 1 + 0x80000400, // 001A RET 0 + 0x88080301, // 001B GETMBR R2 R1 K1 + 0xB80E0400, // 001C GETNGBL R3 K2 + 0x880C0703, // 001D GETMBR R3 R3 K3 + 0x880C070A, // 001E GETMBR R3 R3 K10 + 0x1C080403, // 001F EQ R2 R2 R3 + 0x780A0002, // 0020 JMPF R2 #0024 + 0x8C080109, // 0021 GETMET R2 R0 K9 + 0x7C080200, // 0022 CALL R2 1 + 0x80000400, // 0023 RET 0 + 0x88080301, // 0024 GETMBR R2 R1 K1 + 0xB80E0400, // 0025 GETNGBL R3 K2 + 0x880C0703, // 0026 GETMBR R3 R3 K3 + 0x880C070B, // 0027 GETMBR R3 R3 K11 + 0x1C080403, // 0028 EQ R2 R2 R3 + 0x780A0005, // 0029 JMPF R2 #0030 + 0x88080308, // 002A GETMBR R2 R1 K8 + 0x1C08050C, // 002B EQ R2 R2 K12 + 0x780A0002, // 002C JMPF R2 #0030 + 0x8C08010D, // 002D GETMET R2 R0 K13 + 0x7C080200, // 002E CALL R2 1 + 0x70020070, // 002F JMP #00A1 + 0x88080301, // 0030 GETMBR R2 R1 K1 + 0xB80E0400, // 0031 GETNGBL R3 K2 + 0x880C0703, // 0032 GETMBR R3 R3 K3 + 0x880C070B, // 0033 GETMBR R3 R3 K11 + 0x1C080403, // 0034 EQ R2 R2 R3 + 0x780A0005, // 0035 JMPF R2 #003C + 0x88080308, // 0036 GETMBR R2 R1 K8 + 0x1C08050E, // 0037 EQ R2 R2 K14 + 0x780A0002, // 0038 JMPF R2 #003C + 0x8C08010F, // 0039 GETMET R2 R0 K15 + 0x7C080200, // 003A CALL R2 1 + 0x70020064, // 003B JMP #00A1 + 0x88080301, // 003C GETMBR R2 R1 K1 + 0xB80E0400, // 003D GETNGBL R3 K2 + 0x880C0703, // 003E GETMBR R3 R3 K3 + 0x880C070B, // 003F GETMBR R3 R3 K11 + 0x1C080403, // 0040 EQ R2 R2 R3 + 0x780A0043, // 0041 JMPF R2 #0086 + 0x88080308, // 0042 GETMBR R2 R1 K8 + 0x1C080510, // 0043 EQ R2 R2 K16 + 0x780A0040, // 0044 JMPF R2 #0086 + 0x8C080109, // 0045 GETMET R2 R0 K9 + 0x7C080200, // 0046 CALL R2 1 + 0x58080011, // 0047 LDCONST R2 K17 + 0x8C0C0100, // 0048 GETMET R3 R0 K0 + 0x7C0C0200, // 0049 CALL R3 1 + 0x4C100000, // 004A LDNIL R4 + 0x20100604, // 004B NE R4 R3 R4 + 0x7812000C, // 004C JMPF R4 #005A + 0x88100701, // 004D GETMBR R4 R3 K1 + 0xB8160400, // 004E GETNGBL R5 K2 + 0x88140B03, // 004F GETMBR R5 R5 K3 + 0x88140B0B, // 0050 GETMBR R5 R5 K11 + 0x1C100805, // 0051 EQ R4 R4 R5 + 0x78120006, // 0052 JMPF R4 #005A + 0x88100708, // 0053 GETMBR R4 R3 K8 + 0x1C100912, // 0054 EQ R4 R4 K18 + 0x78120003, // 0055 JMPF R4 #005A + 0x8C100109, // 0056 GETMET R4 R0 K9 + 0x7C100200, // 0057 CALL R4 1 + 0x58080013, // 0058 LDCONST R2 K19 + 0x70020008, // 0059 JMP #0063 + 0x8C100114, // 005A GETMET R4 R0 K20 + 0x7C100200, // 005B CALL R4 1 + 0x8C140115, // 005C GETMET R5 R0 K21 + 0x581C0016, // 005D LDCONST R7 K22 + 0x7C140400, // 005E CALL R5 2 + 0x60140008, // 005F GETGBL R5 G8 + 0x5C180800, // 0060 MOVE R6 R4 + 0x7C140200, // 0061 CALL R5 1 + 0x5C080A00, // 0062 MOVE R2 R5 + 0x8C100117, // 0063 GETMET R4 R0 K23 + 0x7C100200, // 0064 CALL R4 1 + 0x8C100106, // 0065 GETMET R4 R0 K6 + 0x60180018, // 0066 GETGBL R6 G24 + 0x581C0018, // 0067 LDCONST R7 K24 + 0x8C200107, // 0068 GETMET R8 R0 K7 + 0x7C200200, // 0069 CALL R8 1 + 0x5C240400, // 006A MOVE R9 R2 + 0x7C180600, // 006B CALL R6 3 + 0x7C100400, // 006C CALL R4 2 + 0x88100119, // 006D GETMBR R4 R0 K25 + 0x0010091A, // 006E ADD R4 R4 K26 + 0x90023204, // 006F SETMBR R0 K25 R4 + 0x8C10011B, // 0070 GETMET R4 R0 K27 + 0x7C100200, // 0071 CALL R4 1 + 0x74120005, // 0072 JMPT R4 #0079 + 0x8C10011C, // 0073 GETMET R4 R0 K28 + 0x7C100200, // 0074 CALL R4 1 + 0x74120002, // 0075 JMPT R4 #0079 + 0x8C10011D, // 0076 GETMET R4 R0 K29 + 0x7C100200, // 0077 CALL R4 1 + 0x7001FFF6, // 0078 JMP #0070 + 0x8C10011E, // 0079 GETMET R4 R0 K30 + 0x7C100200, // 007A CALL R4 1 + 0x8C100106, // 007B GETMET R4 R0 K6 + 0x60180018, // 007C GETGBL R6 G24 + 0x581C001F, // 007D LDCONST R7 K31 + 0x8C200107, // 007E GETMET R8 R0 K7 + 0x7C200200, // 007F CALL R8 1 + 0x7C180400, // 0080 CALL R6 2 + 0x7C100400, // 0081 CALL R4 2 + 0x88100119, // 0082 GETMBR R4 R0 K25 + 0x0410091A, // 0083 SUB R4 R4 K26 + 0x90023204, // 0084 SETMBR R0 K25 R4 + 0x7002001A, // 0085 JMP #00A1 + 0x88080301, // 0086 GETMBR R2 R1 K1 + 0xB80E0400, // 0087 GETNGBL R3 K2 + 0x880C0703, // 0088 GETMBR R3 R3 K3 + 0x880C0720, // 0089 GETMBR R3 R3 K32 + 0x1C080403, // 008A EQ R2 R2 R3 + 0x780A0012, // 008B JMPF R2 #009F + 0x8C080121, // 008C GETMET R2 R0 K33 + 0x7C080200, // 008D CALL R2 1 + 0x4C0C0000, // 008E LDNIL R3 + 0x20080403, // 008F NE R2 R2 R3 + 0x780A000A, // 0090 JMPF R2 #009C + 0x8C080121, // 0091 GETMET R2 R0 K33 + 0x7C080200, // 0092 CALL R2 1 + 0x88080501, // 0093 GETMBR R2 R2 K1 + 0xB80E0400, // 0094 GETNGBL R3 K2 + 0x880C0703, // 0095 GETMBR R3 R3 K3 + 0x880C0722, // 0096 GETMBR R3 R3 K34 + 0x1C080403, // 0097 EQ R2 R2 R3 + 0x780A0002, // 0098 JMPF R2 #009C + 0x8C080123, // 0099 GETMET R2 R0 K35 + 0x7C080200, // 009A CALL R2 1 + 0x70020001, // 009B JMP #009E + 0x8C080124, // 009C GETMET R2 R0 K36 + 0x7C080200, // 009D CALL R2 1 + 0x70020001, // 009E JMP #00A1 + 0x8C080124, // 009F GETMET R2 R0 K36 + 0x7C080200, // 00A0 CALL R2 1 + 0x80000000, // 00A1 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_add, /* 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(output), + /* K1 */ be_nested_str_weak(push), + }), + be_str_weak(add), + &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 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_init, /* name */ + be_nested_proto( + 3, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(tokens), + /* K1 */ be_nested_str_weak(pos), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(output), + /* K4 */ be_nested_str_weak(errors), + /* K5 */ be_nested_str_weak(run_statements), + /* K6 */ be_nested_str_weak(first_statement), + /* K7 */ be_nested_str_weak(strip_initialized), + /* K8 */ be_nested_str_weak(sequence_names), + /* K9 */ be_nested_str_weak(symbol_table), + /* K10 */ be_nested_str_weak(indent_level), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0001, // 0002 JMPF R2 #0005 + 0x5C080200, // 0003 MOVE R2 R1 + 0x70020001, // 0004 JMP #0007 + 0x60080012, // 0005 GETGBL R2 G18 + 0x7C080000, // 0006 CALL R2 0 + 0x90020002, // 0007 SETMBR R0 K0 R2 + 0x90020302, // 0008 SETMBR R0 K1 K2 + 0x60080012, // 0009 GETGBL R2 G18 + 0x7C080000, // 000A CALL R2 0 + 0x90020602, // 000B SETMBR R0 K3 R2 + 0x60080012, // 000C GETGBL R2 G18 + 0x7C080000, // 000D CALL R2 0 + 0x90020802, // 000E SETMBR R0 K4 R2 + 0x60080012, // 000F GETGBL R2 G18 + 0x7C080000, // 0010 CALL R2 0 + 0x90020A02, // 0011 SETMBR R0 K5 R2 + 0x50080200, // 0012 LDBOOL R2 1 0 + 0x90020C02, // 0013 SETMBR R0 K6 R2 + 0x50080000, // 0014 LDBOOL R2 0 0 + 0x90020E02, // 0015 SETMBR R0 K7 R2 + 0x60080013, // 0016 GETGBL R2 G19 + 0x7C080000, // 0017 CALL R2 0 + 0x90021002, // 0018 SETMBR R0 K8 R2 + 0x60080013, // 0019 GETGBL R2 G19 + 0x7C080000, // 001A CALL R2 0 + 0x90021202, // 001B SETMBR R0 K9 R2 + 0x90021502, // 001C SETMBR R0 K10 K2 + 0x80000000, // 001D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_left_bracket +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_left_bracket, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(LEFT_BRACKET), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X5B_X27), + }), + be_str_weak(expect_left_bracket), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_error_report +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_get_error_report, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(has_errors), + /* K1 */ be_nested_str_weak(No_X20compilation_X20errors), + /* K2 */ be_nested_str_weak(Compilation_X20errors_X3A_X0A), + /* K3 */ be_nested_str_weak(errors), + /* K4 */ be_nested_str_weak(_X20_X20), + /* K5 */ be_nested_str_weak(_X0A), + /* K6 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(get_error_report), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x74060000, // 0002 JMPT R1 #0004 + 0x80060200, // 0003 RET 1 K1 + 0x58040002, // 0004 LDCONST R1 K2 + 0x60080010, // 0005 GETGBL R2 G16 + 0x880C0103, // 0006 GETMBR R3 R0 K3 + 0x7C080200, // 0007 CALL R2 1 + 0xA8020005, // 0008 EXBLK 0 #000F + 0x5C0C0400, // 0009 MOVE R3 R2 + 0x7C0C0000, // 000A CALL R3 0 + 0x00120803, // 000B ADD R4 K4 R3 + 0x00100905, // 000C ADD R4 R4 K5 + 0x00040204, // 000D ADD R1 R1 R4 + 0x7001FFF9, // 000E JMP #0009 + 0x58080006, // 000F LDCONST R2 K6 + 0xAC080200, // 0010 CATCH R2 1 0 + 0xB0080000, // 0011 RAISE 2 R0 R0 + 0x80040200, // 0012 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _create_instance_for_validation +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__create_instance_for_validation, /* name */ + be_nested_proto( + 8, /* 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(animation_dsl), + /* K1 */ be_nested_str_weak(MockEngine), + /* K2 */ be_nested_str_weak(introspect), + /* K3 */ be_nested_str_weak(contains), + /* K4 */ be_nested_str_weak(animation), + /* K5 */ be_nested_str_weak(class), + /* K6 */ be_nested_str_weak(function), + }), + be_str_weak(_create_instance_for_validation), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0xA802001E, // 0000 EXBLK 0 #0020 + 0xB80A0000, // 0001 GETNGBL R2 K0 + 0x8C080501, // 0002 GETMET R2 R2 K1 + 0x7C080200, // 0003 CALL R2 1 + 0xA40E0400, // 0004 IMPORT R3 K2 + 0x8C100703, // 0005 GETMET R4 R3 K3 + 0xB81A0800, // 0006 GETNGBL R6 K4 + 0x5C1C0200, // 0007 MOVE R7 R1 + 0x7C100600, // 0008 CALL R4 3 + 0x78120010, // 0009 JMPF R4 #001B + 0xB8120800, // 000A GETNGBL R4 K4 + 0x88100801, // 000B GETMBR R4 R4 R1 + 0x60140004, // 000C GETGBL R5 G4 + 0x5C180800, // 000D MOVE R6 R4 + 0x7C140200, // 000E CALL R5 1 + 0x1C140B05, // 000F EQ R5 R5 K5 + 0x74160004, // 0010 JMPT R5 #0016 + 0x60140004, // 0011 GETGBL R5 G4 + 0x5C180800, // 0012 MOVE R6 R4 + 0x7C140200, // 0013 CALL R5 1 + 0x1C140B06, // 0014 EQ R5 R5 K6 + 0x78160004, // 0015 JMPF R5 #001B + 0x5C140800, // 0016 MOVE R5 R4 + 0x5C180400, // 0017 MOVE R6 R2 + 0x7C140200, // 0018 CALL R5 1 + 0xA8040001, // 0019 EXBLK 1 1 + 0x80040A00, // 001A RET 1 R5 + 0x4C100000, // 001B LDNIL R4 + 0xA8040001, // 001C EXBLK 1 1 + 0x80040800, // 001D RET 1 R4 + 0xA8040001, // 001E EXBLK 1 1 + 0x70020005, // 001F JMP #0026 + 0xAC080002, // 0020 CATCH R2 0 2 + 0x70020002, // 0021 JMP #0025 + 0x4C100000, // 0022 LDNIL R4 + 0x80040800, // 0023 RET 1 R4 + 0x70020000, // 0024 JMP #0026 + 0xB0080000, // 0025 RAISE 2 R0 R0 + 0x80000000, // 0026 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_wait_statement +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_wait_statement, /* name */ + be_nested_proto( + 11, /* 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(next), + /* K1 */ be_nested_str_weak(process_time_value), + /* K2 */ be_nested_str_weak(collect_inline_comment), + /* K3 */ be_nested_str_weak(add), + /* K4 */ be_nested_str_weak(_X20_X20_X25s_X2Epush_X28animation_X2Ecreate_wait_step_X28_X25s_X29_X29_X25s), + }), + be_str_weak(process_wait_statement), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x8C0C0102, // 0004 GETMET R3 R0 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C100103, // 0006 GETMET R4 R0 K3 + 0x60180018, // 0007 GETGBL R6 G24 + 0x581C0004, // 0008 LDCONST R7 K4 + 0x5C200200, // 0009 MOVE R8 R1 + 0x5C240400, // 000A MOVE R9 R2 + 0x5C280600, // 000B MOVE R10 R3 + 0x7C180800, // 000C CALL R6 4 + 0x7C100400, // 000D CALL R4 2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: check_right_bracket +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_check_right_bracket, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(RIGHT_BRACKET), + }), + be_str_weak(check_right_bracket), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0005, // 0004 JMPF R2 #000B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x740A0000, // 000A JMPT R2 #000C + 0x50080001, // 000B LDBOOL R2 0 1 + 0x50080200, // 000C LDBOOL R2 1 0 + 0x80040400, // 000D RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_play_statement_fluent +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_play_statement_fluent, /* name */ + be_nested_proto( + 13, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[23]) { /* constants */ + /* K0 */ be_nested_str_weak(next), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(IDENTIFIER), + /* K7 */ be_nested_str_weak(KEYWORD), + /* K8 */ be_nested_str_weak(peek), + /* K9 */ be_nested_str_weak(LEFT_PAREN), + /* K10 */ be_nested_str_weak(process_nested_function_call), + /* K11 */ be_nested_str_weak(expect_identifier), + /* K12 */ be_nested_str_weak(_validate_object_reference), + /* K13 */ be_nested_str_weak(sequence_X20play), + /* K14 */ be_nested_str_weak(_X25s_), + /* K15 */ be_nested_str_weak(nil), + /* K16 */ be_nested_str_weak(value), + /* K17 */ be_nested_str_weak(for), + /* K18 */ be_nested_str_weak(process_time_value), + /* K19 */ be_nested_str_weak(collect_inline_comment), + /* K20 */ be_nested_str_weak(add), + /* K21 */ be_nested_str_weak(_X25s_X2Epush_play_step_X28_X25s_X2C_X20_X25s_X29_X25s), + /* K22 */ be_nested_str_weak(get_indent), + }), + be_str_weak(process_play_statement_fluent), + &be_const_str_solidified, + ( &(const binstruction[87]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x58040001, // 0002 LDCONST R1 K1 + 0x8C080102, // 0003 GETMET R2 R0 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x4C0C0000, // 0005 LDNIL R3 + 0x200C0403, // 0006 NE R3 R2 R3 + 0x780E001C, // 0007 JMPF R3 #0025 + 0x880C0503, // 0008 GETMBR R3 R2 K3 + 0xB8120800, // 0009 GETNGBL R4 K4 + 0x88100905, // 000A GETMBR R4 R4 K5 + 0x88100906, // 000B GETMBR R4 R4 K6 + 0x1C0C0604, // 000C EQ R3 R3 R4 + 0x740E0005, // 000D JMPT R3 #0014 + 0x880C0503, // 000E GETMBR R3 R2 K3 + 0xB8120800, // 000F GETNGBL R4 K4 + 0x88100905, // 0010 GETMBR R4 R4 K5 + 0x88100907, // 0011 GETMBR R4 R4 K7 + 0x1C0C0604, // 0012 EQ R3 R3 R4 + 0x780E0010, // 0013 JMPF R3 #0025 + 0x8C0C0108, // 0014 GETMET R3 R0 K8 + 0x7C0C0200, // 0015 CALL R3 1 + 0x4C100000, // 0016 LDNIL R4 + 0x200C0604, // 0017 NE R3 R3 R4 + 0x780E000B, // 0018 JMPF R3 #0025 + 0x8C0C0108, // 0019 GETMET R3 R0 K8 + 0x7C0C0200, // 001A CALL R3 1 + 0x880C0703, // 001B GETMBR R3 R3 K3 + 0xB8120800, // 001C GETNGBL R4 K4 + 0x88100905, // 001D GETMBR R4 R4 K5 + 0x88100909, // 001E GETMBR R4 R4 K9 + 0x1C0C0604, // 001F EQ R3 R3 R4 + 0x780E0003, // 0020 JMPF R3 #0025 + 0x8C0C010A, // 0021 GETMET R3 R0 K10 + 0x7C0C0200, // 0022 CALL R3 1 + 0x5C040600, // 0023 MOVE R1 R3 + 0x7002000A, // 0024 JMP #0030 + 0x8C0C010B, // 0025 GETMET R3 R0 K11 + 0x7C0C0200, // 0026 CALL R3 1 + 0x8C10010C, // 0027 GETMET R4 R0 K12 + 0x5C180600, // 0028 MOVE R6 R3 + 0x581C000D, // 0029 LDCONST R7 K13 + 0x7C100600, // 002A CALL R4 3 + 0x60100018, // 002B GETGBL R4 G24 + 0x5814000E, // 002C LDCONST R5 K14 + 0x5C180600, // 002D MOVE R6 R3 + 0x7C100400, // 002E CALL R4 2 + 0x5C040800, // 002F MOVE R1 R4 + 0x580C000F, // 0030 LDCONST R3 K15 + 0x8C100102, // 0031 GETMET R4 R0 K2 + 0x7C100200, // 0032 CALL R4 1 + 0x4C140000, // 0033 LDNIL R5 + 0x20100805, // 0034 NE R4 R4 R5 + 0x78120013, // 0035 JMPF R4 #004A + 0x8C100102, // 0036 GETMET R4 R0 K2 + 0x7C100200, // 0037 CALL R4 1 + 0x88100903, // 0038 GETMBR R4 R4 K3 + 0xB8160800, // 0039 GETNGBL R5 K4 + 0x88140B05, // 003A GETMBR R5 R5 K5 + 0x88140B07, // 003B GETMBR R5 R5 K7 + 0x1C100805, // 003C EQ R4 R4 R5 + 0x7812000B, // 003D JMPF R4 #004A + 0x8C100102, // 003E GETMET R4 R0 K2 + 0x7C100200, // 003F CALL R4 1 + 0x88100910, // 0040 GETMBR R4 R4 K16 + 0x1C100911, // 0041 EQ R4 R4 K17 + 0x78120006, // 0042 JMPF R4 #004A + 0x8C100100, // 0043 GETMET R4 R0 K0 + 0x7C100200, // 0044 CALL R4 1 + 0x60100008, // 0045 GETGBL R4 G8 + 0x8C140112, // 0046 GETMET R5 R0 K18 + 0x7C140200, // 0047 CALL R5 1 + 0x7C100200, // 0048 CALL R4 1 + 0x5C0C0800, // 0049 MOVE R3 R4 + 0x8C100113, // 004A GETMET R4 R0 K19 + 0x7C100200, // 004B CALL R4 1 + 0x8C140114, // 004C GETMET R5 R0 K20 + 0x601C0018, // 004D GETGBL R7 G24 + 0x58200015, // 004E LDCONST R8 K21 + 0x8C240116, // 004F GETMET R9 R0 K22 + 0x7C240200, // 0050 CALL R9 1 + 0x5C280200, // 0051 MOVE R10 R1 + 0x5C2C0600, // 0052 MOVE R11 R3 + 0x5C300800, // 0053 MOVE R12 R4 + 0x7C1C0A00, // 0054 CALL R7 5 + 0x7C140400, // 0055 CALL R5 2 + 0x80000000, // 0056 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_sequence_assignment +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_assignment, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -6403,23 +5803,1440 @@ be_local_closure(class_SimpleDSLTranspiler__validate_animation_factory_exists, NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(is_math_method), - /* K1 */ be_nested_str_weak(_validate_factory_function), + /* K0 */ be_nested_str_weak(process_sequence_assignment_generic), + /* K1 */ be_nested_str_weak(steps), }), - be_str_weak(_validate_animation_factory_exists), + be_str_weak(process_sequence_assignment), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ + ( &(const binstruction[ 5]) { /* code */ 0x8C080100, // 0000 GETMET R2 R0 K0 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0x780A0001, // 0003 JMPF R2 #0006 - 0x50080200, // 0004 LDBOOL R2 1 0 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C080600, // 0003 CALL R2 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_unary_expression +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_unary_expression, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(error), + /* K2 */ be_nested_str_weak(Expected_X20value), + /* K3 */ be_nested_str_weak(nil), + /* K4 */ be_nested_str_weak(type), + /* K5 */ be_nested_str_weak(animation_dsl), + /* K6 */ be_nested_str_weak(Token), + /* K7 */ be_nested_str_weak(MINUS), + /* K8 */ be_nested_str_weak(next), + /* K9 */ be_nested_str_weak(process_unary_expression), + /* K10 */ be_nested_str_weak(_X28_X2D_X25s_X29), + /* K11 */ be_nested_str_weak(PLUS), + /* K12 */ be_nested_str_weak(process_primary_expression), + }), + be_str_weak(process_unary_expression), + &be_const_str_solidified, + ( &(const binstruction[44]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x7C0C0200, // 0001 CALL R3 1 + 0x4C100000, // 0002 LDNIL R4 + 0x1C100604, // 0003 EQ R4 R3 R4 + 0x78120003, // 0004 JMPF R4 #0009 + 0x8C100101, // 0005 GETMET R4 R0 K1 + 0x58180002, // 0006 LDCONST R6 K2 + 0x7C100400, // 0007 CALL R4 2 + 0x80060600, // 0008 RET 1 K3 + 0x88100704, // 0009 GETMBR R4 R3 K4 + 0xB8160A00, // 000A GETNGBL R5 K5 + 0x88140B06, // 000B GETMBR R5 R5 K6 + 0x88140B07, // 000C GETMBR R5 R5 K7 + 0x1C100805, // 000D EQ R4 R4 R5 + 0x7812000A, // 000E JMPF R4 #001A + 0x8C100108, // 000F GETMET R4 R0 K8 + 0x7C100200, // 0010 CALL R4 1 + 0x8C100109, // 0011 GETMET R4 R0 K9 + 0x5C180200, // 0012 MOVE R6 R1 + 0x501C0000, // 0013 LDBOOL R7 0 0 + 0x7C100600, // 0014 CALL R4 3 + 0x60140018, // 0015 GETGBL R5 G24 + 0x5818000A, // 0016 LDCONST R6 K10 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x7C140400, // 0018 CALL R5 2 + 0x80040A00, // 0019 RET 1 R5 + 0x88100704, // 001A GETMBR R4 R3 K4 + 0xB8160A00, // 001B GETNGBL R5 K5 + 0x88140B06, // 001C GETMBR R5 R5 K6 + 0x88140B0B, // 001D GETMBR R5 R5 K11 + 0x1C100805, // 001E EQ R4 R4 R5 + 0x78120006, // 001F JMPF R4 #0027 + 0x8C100108, // 0020 GETMET R4 R0 K8 + 0x7C100200, // 0021 CALL R4 1 + 0x8C100109, // 0022 GETMET R4 R0 K9 + 0x5C180200, // 0023 MOVE R6 R1 + 0x501C0000, // 0024 LDBOOL R7 0 0 + 0x7C100600, // 0025 CALL R4 3 + 0x80040800, // 0026 RET 1 R4 + 0x8C10010C, // 0027 GETMET R4 R0 K12 + 0x5C180200, // 0028 MOVE R6 R1 + 0x5C1C0400, // 0029 MOVE R7 R2 + 0x7C100600, // 002A CALL R4 3 + 0x80040800, // 002B RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_additive_expression +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_additive_expression, /* name */ + be_nested_proto( + 12, /* nstack */ + 3, /* 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_nested_str_weak(process_multiplicative_expression), + /* K1 */ be_nested_str_weak(at_end), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(PLUS), + /* K7 */ be_nested_str_weak(MINUS), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), + /* K11 */ be_nested_str_weak(is_computed_expression_string), + /* K12 */ be_nested_str_weak(is_anonymous_function), + /* K13 */ be_nested_str_weak(create_computation_closure_from_string), + }), + be_str_weak(process_additive_expression), + &be_const_str_solidified, + ( &(const binstruction[57]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140200, // 0001 MOVE R5 R1 + 0x5C180400, // 0002 MOVE R6 R2 + 0x7C0C0600, // 0003 CALL R3 3 + 0x8C100101, // 0004 GETMET R4 R0 K1 + 0x7C100200, // 0005 CALL R4 1 + 0x74120021, // 0006 JMPT R4 #0029 + 0x8C100102, // 0007 GETMET R4 R0 K2 + 0x7C100200, // 0008 CALL R4 1 + 0x4C140000, // 0009 LDNIL R5 + 0x20140805, // 000A NE R5 R4 R5 + 0x7816001A, // 000B JMPF R5 #0027 + 0x88140903, // 000C GETMBR R5 R4 K3 + 0xB81A0800, // 000D GETNGBL R6 K4 + 0x88180D05, // 000E GETMBR R6 R6 K5 + 0x88180D06, // 000F GETMBR R6 R6 K6 + 0x1C140A06, // 0010 EQ R5 R5 R6 + 0x74160005, // 0011 JMPT R5 #0018 + 0x88140903, // 0012 GETMBR R5 R4 K3 + 0xB81A0800, // 0013 GETNGBL R6 K4 + 0x88180D05, // 0014 GETMBR R6 R6 K5 + 0x88180D07, // 0015 GETMBR R6 R6 K7 + 0x1C140A06, // 0016 EQ R5 R5 R6 + 0x7816000E, // 0017 JMPF R5 #0027 + 0x88140908, // 0018 GETMBR R5 R4 K8 + 0x8C180109, // 0019 GETMET R6 R0 K9 + 0x7C180200, // 001A CALL R6 1 + 0x8C180100, // 001B GETMET R6 R0 K0 + 0x5C200200, // 001C MOVE R8 R1 + 0x50240000, // 001D LDBOOL R9 0 0 + 0x7C180600, // 001E CALL R6 3 + 0x601C0018, // 001F GETGBL R7 G24 + 0x5820000A, // 0020 LDCONST R8 K10 + 0x5C240600, // 0021 MOVE R9 R3 + 0x5C280A00, // 0022 MOVE R10 R5 + 0x5C2C0C00, // 0023 MOVE R11 R6 + 0x7C1C0800, // 0024 CALL R7 4 + 0x5C0C0E00, // 0025 MOVE R3 R7 + 0x70020000, // 0026 JMP #0028 + 0x70020000, // 0027 JMP #0029 + 0x7001FFDA, // 0028 JMP #0004 + 0x780A000C, // 0029 JMPF R2 #0037 + 0x8C10010B, // 002A GETMET R4 R0 K11 + 0x5C180600, // 002B MOVE R6 R3 + 0x7C100400, // 002C CALL R4 2 + 0x78120008, // 002D JMPF R4 #0037 + 0x8C10010C, // 002E GETMET R4 R0 K12 + 0x5C180600, // 002F MOVE R6 R3 + 0x7C100400, // 0030 CALL R4 2 + 0x74120004, // 0031 JMPT R4 #0037 + 0x8C10010D, // 0032 GETMET R4 R0 K13 + 0x5C180600, // 0033 MOVE R6 R3 + 0x7C100400, // 0034 CALL R4 2 + 0x80040800, // 0035 RET 1 R4 + 0x70020000, // 0036 JMP #0038 + 0x80040600, // 0037 RET 1 R3 + 0x80000000, // 0038 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_right_bracket +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_right_bracket, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(RIGHT_BRACKET), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X5D_X27), + }), + be_str_weak(expect_right_bracket), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_run +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_run, /* 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[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(next), + /* K1 */ be_nested_str_weak(expect_identifier), + /* K2 */ be_nested_str_weak(_validate_object_reference), + /* K3 */ be_nested_str_weak(run), + /* K4 */ be_nested_str_weak(collect_inline_comment), + /* K5 */ be_nested_str_weak(run_statements), + /* K6 */ be_nested_str_weak(push), + /* K7 */ be_nested_str_weak(name), + /* K8 */ be_nested_str_weak(comment), + }), + be_str_weak(process_run), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x7C040200, // 0003 CALL R1 1 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x5C100200, // 0005 MOVE R4 R1 + 0x58140003, // 0006 LDCONST R5 K3 + 0x7C080600, // 0007 CALL R2 3 + 0x8C080104, // 0008 GETMET R2 R0 K4 + 0x7C080200, // 0009 CALL R2 1 + 0x880C0105, // 000A GETMBR R3 R0 K5 + 0x8C0C0706, // 000B GETMET R3 R3 K6 + 0x60140013, // 000C GETGBL R5 G19 + 0x7C140000, // 000D CALL R5 0 + 0x98160E01, // 000E SETIDX R5 K7 R1 + 0x98161002, // 000F SETIDX R5 K8 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: collect_inline_comment +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_collect_inline_comment, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(COMMENT), + /* K5 */ be_nested_str_weak(_X20_X20), + /* K6 */ be_nested_str_weak(value), + /* K7 */ be_nested_str_weak(next), + /* K8 */ be_nested_str_weak(), + }), + be_str_weak(collect_inline_comment), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A000A, // 0004 JMPF R2 #0010 + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0004, // 000A JMPF R2 #0010 + 0x88080306, // 000B GETMBR R2 R1 K6 + 0x000A0A02, // 000C ADD R2 K5 R2 + 0x8C0C0107, // 000D GETMET R3 R0 K7 + 0x7C0C0200, // 000E CALL R3 1 + 0x80040400, // 000F RET 1 R2 + 0x80061000, // 0010 RET 1 K8 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: check_right_brace +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_check_right_brace, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(RIGHT_BRACE), + }), + be_str_weak(check_right_brace), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0005, // 0004 JMPF R2 #000B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x740A0000, // 000A JMPT R2 #000C + 0x50080001, // 000B LDBOOL R2 0 1 + 0x50080200, // 000C LDBOOL R2 1 0 + 0x80040400, // 000D RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: skip_statement +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_skip_statement, /* 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(at_end), + /* K1 */ be_nested_str_weak(current), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(NEWLINE), + /* K6 */ be_nested_str_weak(EOF), + /* K7 */ be_nested_str_weak(next), + }), + be_str_weak(skip_statement), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x74060011, // 0002 JMPT R1 #0015 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x7C040200, // 0004 CALL R1 1 + 0x88080302, // 0005 GETMBR R2 R1 K2 + 0xB80E0600, // 0006 GETNGBL R3 K3 + 0x880C0704, // 0007 GETMBR R3 R3 K4 + 0x880C0705, // 0008 GETMBR R3 R3 K5 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x740A0005, // 000A JMPT R2 #0011 + 0x88080302, // 000B GETMBR R2 R1 K2 + 0xB80E0600, // 000C GETNGBL R3 K3 + 0x880C0704, // 000D GETMBR R3 R3 K4 + 0x880C0706, // 000E GETMBR R3 R3 K6 + 0x1C080403, // 000F EQ R2 R2 R3 + 0x780A0000, // 0010 JMPF R2 #0012 + 0x70020002, // 0011 JMP #0015 + 0x8C080107, // 0012 GETMET R2 R0 K7 + 0x7C080200, // 0013 CALL R2 1 + 0x7001FFEA, // 0014 JMP #0000 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_array_literal +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_array_literal, /* 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[21]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_left_bracket), + /* K1 */ be_nested_str_weak(at_end), + /* K2 */ be_nested_str_weak(check_right_bracket), + /* K3 */ be_nested_str_weak(process_value), + /* K4 */ be_nested_str_weak(array_element), + /* K5 */ be_nested_str_weak(push), + /* K6 */ be_nested_str_weak(current), + /* K7 */ be_nested_str_weak(type), + /* K8 */ be_nested_str_weak(animation_dsl), + /* K9 */ be_nested_str_weak(Token), + /* K10 */ be_nested_str_weak(COMMA), + /* K11 */ be_nested_str_weak(next), + /* K12 */ be_nested_str_weak(error), + /* K13 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X5D_X27_X20in_X20array_X20literal), + /* K14 */ be_nested_str_weak(expect_right_bracket), + /* K15 */ be_nested_str_weak(_X5B), + /* K16 */ be_const_int(0), + /* K17 */ be_const_int(1), + /* K18 */ be_nested_str_weak(_X2C_X20), + /* K19 */ be_nested_str_weak(stop_iteration), + /* K20 */ be_nested_str_weak(_X5D), + }), + be_str_weak(process_array_literal), + &be_const_str_solidified, + ( &(const binstruction[64]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x60040012, // 0002 GETGBL R1 G18 + 0x7C040000, // 0003 CALL R1 0 + 0x8C080101, // 0004 GETMET R2 R0 K1 + 0x7C080200, // 0005 CALL R2 1 + 0x740A0020, // 0006 JMPT R2 #0028 + 0x8C080102, // 0007 GETMET R2 R0 K2 + 0x7C080200, // 0008 CALL R2 1 + 0x740A001D, // 0009 JMPT R2 #0028 + 0x8C080103, // 000A GETMET R2 R0 K3 + 0x58100004, // 000B LDCONST R4 K4 + 0x7C080400, // 000C CALL R2 2 + 0x8C0C0305, // 000D GETMET R3 R1 K5 + 0x5C140400, // 000E MOVE R5 R2 + 0x7C0C0400, // 000F CALL R3 2 + 0x8C0C0106, // 0010 GETMET R3 R0 K6 + 0x7C0C0200, // 0011 CALL R3 1 + 0x4C100000, // 0012 LDNIL R4 + 0x200C0604, // 0013 NE R3 R3 R4 + 0x780E000A, // 0014 JMPF R3 #0020 + 0x8C0C0106, // 0015 GETMET R3 R0 K6 + 0x7C0C0200, // 0016 CALL R3 1 + 0x880C0707, // 0017 GETMBR R3 R3 K7 + 0xB8121000, // 0018 GETNGBL R4 K8 + 0x88100909, // 0019 GETMBR R4 R4 K9 + 0x8810090A, // 001A GETMBR R4 R4 K10 + 0x1C0C0604, // 001B EQ R3 R3 R4 + 0x780E0002, // 001C JMPF R3 #0020 + 0x8C0C010B, // 001D GETMET R3 R0 K11 + 0x7C0C0200, // 001E CALL R3 1 + 0x70020006, // 001F JMP #0027 + 0x8C0C0102, // 0020 GETMET R3 R0 K2 + 0x7C0C0200, // 0021 CALL R3 1 + 0x740E0003, // 0022 JMPT R3 #0027 + 0x8C0C010C, // 0023 GETMET R3 R0 K12 + 0x5814000D, // 0024 LDCONST R5 K13 + 0x7C0C0400, // 0025 CALL R3 2 + 0x70020000, // 0026 JMP #0028 + 0x7001FFDB, // 0027 JMP #0004 + 0x8C08010E, // 0028 GETMET R2 R0 K14 + 0x7C080200, // 0029 CALL R2 1 + 0x5808000F, // 002A LDCONST R2 K15 + 0x600C0010, // 002B GETGBL R3 G16 + 0x6010000C, // 002C GETGBL R4 G12 + 0x5C140200, // 002D MOVE R5 R1 + 0x7C100200, // 002E CALL R4 1 + 0x04100911, // 002F SUB R4 R4 K17 + 0x40122004, // 0030 CONNECT R4 K16 R4 + 0x7C0C0200, // 0031 CALL R3 1 + 0xA8020007, // 0032 EXBLK 0 #003B + 0x5C100600, // 0033 MOVE R4 R3 + 0x7C100000, // 0034 CALL R4 0 + 0x24140910, // 0035 GT R5 R4 K16 + 0x78160000, // 0036 JMPF R5 #0038 + 0x00080512, // 0037 ADD R2 R2 K18 + 0x94140204, // 0038 GETIDX R5 R1 R4 + 0x00080405, // 0039 ADD R2 R2 R5 + 0x7001FFF7, // 003A JMP #0033 + 0x580C0013, // 003B LDCONST R3 K19 + 0xAC0C0200, // 003C CATCH R3 1 0 + 0xB0080000, // 003D RAISE 2 R0 R0 + 0x00080514, // 003E ADD R2 R2 K20 + 0x80040400, // 003F RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_indent +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_get_indent, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(indent_level), + /* K2 */ be_const_int(1), + /* K3 */ be_const_int(2), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(_X20), + /* K6 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(get_indent), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x00080502, // 0002 ADD R2 R2 K2 + 0x08080503, // 0003 MUL R2 R2 K3 + 0x600C0010, // 0004 GETGBL R3 G16 + 0x04100502, // 0005 SUB R4 R2 K2 + 0x40120804, // 0006 CONNECT R4 K4 R4 + 0x7C0C0200, // 0007 CALL R3 1 + 0xA8020003, // 0008 EXBLK 0 #000D + 0x5C100600, // 0009 MOVE R4 R3 + 0x7C100000, // 000A CALL R4 0 + 0x00040305, // 000B ADD R1 R1 K5 + 0x7001FFFB, // 000C JMP #0009 + 0x580C0006, // 000D LDCONST R3 K6 + 0xAC0C0200, // 000E CATCH R3 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x80040200, // 0010 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _validate_animation_factory_creates_animation +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__validate_animation_factory_creates_animation, /* 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[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_validate_factory_function), + /* K1 */ be_nested_str_weak(animation), + }), + be_str_weak(_validate_animation_factory_creates_animation), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0xB8160200, // 0002 GETNGBL R5 K1 + 0x88140B01, // 0003 GETMBR R5 R5 K1 + 0x7C080600, // 0004 CALL R2 3 0x80040400, // 0005 RET 1 R2 - 0x8C080101, // 0006 GETMET R2 R0 K1 - 0x5C100200, // 0007 MOVE R4 R1 - 0x4C140000, // 0008 LDNIL R5 - 0x7C080600, // 0009 CALL R2 3 - 0x80040400, // 000A RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_dot +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_dot, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(DOT), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X2E_X27), + }), + be_str_weak(expect_dot), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_time_value +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_time_value, /* 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[16]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(TIME), + /* K5 */ be_nested_str_weak(value), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_nested_str_weak(convert_time_to_ms), + /* K8 */ be_nested_str_weak(NUMBER), + /* K9 */ be_nested_str_weak(IDENTIFIER), + /* K10 */ be_nested_str_weak(_validate_object_reference), + /* K11 */ be_nested_str_weak(duration), + /* K12 */ be_nested_str_weak(process_primary_expression), + /* K13 */ be_nested_str_weak(time), + /* K14 */ be_nested_str_weak(error), + /* K15 */ be_nested_str_weak(Expected_X20time_X20value), + }), + be_str_weak(process_time_value), + &be_const_str_solidified, + ( &(const binstruction[66]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A000D, // 0004 JMPF R2 #0013 + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0007, // 000A JMPF R2 #0013 + 0x88080305, // 000B GETMBR R2 R1 K5 + 0x8C0C0106, // 000C GETMET R3 R0 K6 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0107, // 000E GETMET R3 R0 K7 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80040600, // 0011 RET 1 R3 + 0x7002002D, // 0012 JMP #0041 + 0x4C080000, // 0013 LDNIL R2 + 0x20080202, // 0014 NE R2 R1 R2 + 0x780A0011, // 0015 JMPF R2 #0028 + 0x88080301, // 0016 GETMBR R2 R1 K1 + 0xB80E0400, // 0017 GETNGBL R3 K2 + 0x880C0703, // 0018 GETMBR R3 R3 K3 + 0x880C0708, // 0019 GETMBR R3 R3 K8 + 0x1C080403, // 001A EQ R2 R2 R3 + 0x780A000B, // 001B JMPF R2 #0028 + 0x88080305, // 001C GETMBR R2 R1 K5 + 0x8C0C0106, // 001D GETMET R3 R0 K6 + 0x7C0C0200, // 001E CALL R3 1 + 0x600C0009, // 001F GETGBL R3 G9 + 0x6010000A, // 0020 GETGBL R4 G10 + 0x5C140400, // 0021 MOVE R5 R2 + 0x7C100200, // 0022 CALL R4 1 + 0x7C0C0200, // 0023 CALL R3 1 + 0x541203E7, // 0024 LDINT R4 1000 + 0x080C0604, // 0025 MUL R3 R3 R4 + 0x80040600, // 0026 RET 1 R3 + 0x70020018, // 0027 JMP #0041 + 0x4C080000, // 0028 LDNIL R2 + 0x20080202, // 0029 NE R2 R1 R2 + 0x780A0010, // 002A JMPF R2 #003C + 0x88080301, // 002B GETMBR R2 R1 K1 + 0xB80E0400, // 002C GETNGBL R3 K2 + 0x880C0703, // 002D GETMBR R3 R3 K3 + 0x880C0709, // 002E GETMBR R3 R3 K9 + 0x1C080403, // 002F EQ R2 R2 R3 + 0x780A000A, // 0030 JMPF R2 #003C + 0x88080305, // 0031 GETMBR R2 R1 K5 + 0x8C0C010A, // 0032 GETMET R3 R0 K10 + 0x5C140400, // 0033 MOVE R5 R2 + 0x5818000B, // 0034 LDCONST R6 K11 + 0x7C0C0600, // 0035 CALL R3 3 + 0x8C0C010C, // 0036 GETMET R3 R0 K12 + 0x5814000D, // 0037 LDCONST R5 K13 + 0x50180200, // 0038 LDBOOL R6 1 0 + 0x7C0C0600, // 0039 CALL R3 3 + 0x80040600, // 003A RET 1 R3 + 0x70020004, // 003B JMP #0041 + 0x8C08010E, // 003C GETMET R2 R0 K14 + 0x5810000F, // 003D LDCONST R4 K15 + 0x7C080400, // 003E CALL R2 2 + 0x540A03E7, // 003F LDINT R2 1000 + 0x80040400, // 0040 RET 1 R2 + 0x80000000, // 0041 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: next +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_next, /* 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[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(pos), + /* K1 */ be_nested_str_weak(tokens), + /* K2 */ be_const_int(1), + }), + be_str_weak(next), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x14040202, // 0004 LT R1 R1 R2 + 0x78060002, // 0005 JMPF R1 #0009 + 0x88040100, // 0006 GETMBR R1 R0 K0 + 0x00040302, // 0007 ADD R1 R1 K2 + 0x90020001, // 0008 SETMBR R0 K0 R1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_wait_statement_fluent +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_wait_statement_fluent, /* name */ + be_nested_proto( + 10, /* 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(next), + /* K1 */ be_nested_str_weak(process_time_value), + /* K2 */ be_nested_str_weak(collect_inline_comment), + /* K3 */ be_nested_str_weak(add), + /* K4 */ be_nested_str_weak(_X25s_X2Epush_wait_step_X28_X25s_X29_X25s), + /* K5 */ be_nested_str_weak(get_indent), + }), + be_str_weak(process_wait_statement_fluent), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x7C040200, // 0003 CALL R1 1 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x7C080200, // 0005 CALL R2 1 + 0x8C0C0103, // 0006 GETMET R3 R0 K3 + 0x60140018, // 0007 GETGBL R5 G24 + 0x58180004, // 0008 LDCONST R6 K4 + 0x8C1C0105, // 0009 GETMET R7 R0 K5 + 0x7C1C0200, // 000A CALL R7 1 + 0x5C200200, // 000B MOVE R8 R1 + 0x5C240400, // 000C MOVE R9 R2 + 0x7C140800, // 000D CALL R5 4 + 0x7C0C0400, // 000E CALL R3 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_math_method +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_is_math_method, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* 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(introspect), + /* K1 */ be_nested_str_weak(animation), + /* K2 */ be_nested_str_weak(closure_value), + /* K3 */ be_nested_str_weak(members), + /* K4 */ be_nested_str_weak(get), + /* K5 */ be_nested_str_weak(ismethod), + /* K6 */ be_nested_str_weak(function), + /* K7 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(is_math_method), + &be_const_str_solidified, + ( &(const binstruction[54]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA802002C, // 0001 EXBLK 0 #002F + 0xB80E0200, // 0002 GETNGBL R3 K1 + 0x880C0702, // 0003 GETMBR R3 R3 K2 + 0x4C100000, // 0004 LDNIL R4 + 0x1C100604, // 0005 EQ R4 R3 R4 + 0x78120002, // 0006 JMPF R4 #000A + 0x50100000, // 0007 LDBOOL R4 0 0 + 0xA8040001, // 0008 EXBLK 1 1 + 0x80040800, // 0009 RET 1 R4 + 0x8C100503, // 000A GETMET R4 R2 K3 + 0x5C180600, // 000B MOVE R6 R3 + 0x7C100400, // 000C CALL R4 2 + 0x60140010, // 000D GETGBL R5 G16 + 0x5C180800, // 000E MOVE R6 R4 + 0x7C140200, // 000F CALL R5 1 + 0xA8020015, // 0010 EXBLK 0 #0027 + 0x5C180A00, // 0011 MOVE R6 R5 + 0x7C180000, // 0012 CALL R6 0 + 0x1C1C0C01, // 0013 EQ R7 R6 R1 + 0x781E0010, // 0014 JMPF R7 #0026 + 0x8C1C0504, // 0015 GETMET R7 R2 K4 + 0x5C240600, // 0016 MOVE R9 R3 + 0x5C280200, // 0017 MOVE R10 R1 + 0x7C1C0600, // 0018 CALL R7 3 + 0x8C200505, // 0019 GETMET R8 R2 K5 + 0x5C280E00, // 001A MOVE R10 R7 + 0x7C200400, // 001B CALL R8 2 + 0x74220005, // 001C JMPT R8 #0023 + 0x60200004, // 001D GETGBL R8 G4 + 0x5C240E00, // 001E MOVE R9 R7 + 0x7C200200, // 001F CALL R8 1 + 0x1C201106, // 0020 EQ R8 R8 K6 + 0x74220000, // 0021 JMPT R8 #0023 + 0x50200001, // 0022 LDBOOL R8 0 1 + 0x50200200, // 0023 LDBOOL R8 1 0 + 0xA8040002, // 0024 EXBLK 1 2 + 0x80041000, // 0025 RET 1 R8 + 0x7001FFE9, // 0026 JMP #0011 + 0x58140007, // 0027 LDCONST R5 K7 + 0xAC140200, // 0028 CATCH R5 1 0 + 0xB0080000, // 0029 RAISE 2 R0 R0 + 0x50140000, // 002A LDBOOL R5 0 0 + 0xA8040001, // 002B EXBLK 1 1 + 0x80040A00, // 002C RET 1 R5 + 0xA8040001, // 002D EXBLK 1 1 + 0x70020005, // 002E JMP #0035 + 0xAC0C0002, // 002F CATCH R3 0 2 + 0x70020002, // 0030 JMP #0034 + 0x50140000, // 0031 LDBOOL R5 0 0 + 0x80040A00, // 0032 RET 1 R5 + 0x70020000, // 0033 JMP #0035 + 0xB0080000, // 0034 RAISE 2 R0 R0 + 0x80000000, // 0035 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_set +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_set, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(next), + /* K1 */ be_nested_str_weak(expect_identifier), + /* K2 */ be_nested_str_weak(validate_user_name), + /* K3 */ be_nested_str_weak(variable), + /* K4 */ be_nested_str_weak(skip_statement), + /* K5 */ be_nested_str_weak(expect_assign), + /* K6 */ be_nested_str_weak(process_value), + /* K7 */ be_nested_str_weak(collect_inline_comment), + /* K8 */ be_nested_str_weak(add), + /* K9 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20_X25s_X25s), + /* K10 */ be_nested_str_weak(symbol_table), + }), + be_str_weak(process_set), + &be_const_str_solidified, + ( &(const binstruction[30]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x7C040200, // 0003 CALL R1 1 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x5C100200, // 0005 MOVE R4 R1 + 0x58140003, // 0006 LDCONST R5 K3 + 0x7C080600, // 0007 CALL R2 3 + 0x740A0002, // 0008 JMPT R2 #000C + 0x8C080104, // 0009 GETMET R2 R0 K4 + 0x7C080200, // 000A CALL R2 1 + 0x80000400, // 000B RET 0 + 0x8C080105, // 000C GETMET R2 R0 K5 + 0x7C080200, // 000D CALL R2 1 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100003, // 000F LDCONST R4 K3 + 0x7C080400, // 0010 CALL R2 2 + 0x8C0C0107, // 0011 GETMET R3 R0 K7 + 0x7C0C0200, // 0012 CALL R3 1 + 0x8C100108, // 0013 GETMET R4 R0 K8 + 0x60180018, // 0014 GETGBL R6 G24 + 0x581C0009, // 0015 LDCONST R7 K9 + 0x5C200200, // 0016 MOVE R8 R1 + 0x5C240400, // 0017 MOVE R9 R2 + 0x5C280600, // 0018 MOVE R10 R3 + 0x7C180800, // 0019 CALL R6 4 + 0x7C100400, // 001A CALL R4 2 + 0x8810010A, // 001B GETMBR R4 R0 K10 + 0x98100303, // 001C SETIDX R4 R1 K3 + 0x80000000, // 001D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_assign +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_assign, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(ASSIGN), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X3D_X27), + }), + be_str_weak(expect_assign), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_statement +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_statement, /* 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[34]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(EOF), + /* K5 */ be_nested_str_weak(COMMENT), + /* K6 */ be_nested_str_weak(add), + /* K7 */ be_nested_str_weak(value), + /* K8 */ be_nested_str_weak(next), + /* K9 */ be_nested_str_weak(NEWLINE), + /* K10 */ be_nested_str_weak(first_statement), + /* K11 */ be_nested_str_weak(KEYWORD), + /* K12 */ be_nested_str_weak(IDENTIFIER), + /* K13 */ be_nested_str_weak(strip), + /* K14 */ be_nested_str_weak(error), + /* K15 */ be_nested_str_weak(_X27strip_X27_X20directive_X20is_X20temporarily_X20disabled_X2E_X20Strip_X20configuration_X20is_X20handled_X20automatically_X2E), + /* K16 */ be_nested_str_weak(skip_statement), + /* K17 */ be_nested_str_weak(strip_initialized), + /* K18 */ be_nested_str_weak(generate_default_strip_initialization), + /* K19 */ be_nested_str_weak(color), + /* K20 */ be_nested_str_weak(process_color), + /* K21 */ be_nested_str_weak(palette), + /* K22 */ be_nested_str_weak(process_palette), + /* K23 */ be_nested_str_weak(animation), + /* K24 */ be_nested_str_weak(process_animation), + /* K25 */ be_nested_str_weak(set), + /* K26 */ be_nested_str_weak(process_set), + /* K27 */ be_nested_str_weak(sequence), + /* K28 */ be_nested_str_weak(process_sequence), + /* K29 */ be_nested_str_weak(run), + /* K30 */ be_nested_str_weak(process_run), + /* K31 */ be_nested_str_weak(on), + /* K32 */ be_nested_str_weak(process_event_handler), + /* K33 */ be_nested_str_weak(process_property_assignment), + }), + be_str_weak(process_statement), + &be_const_str_solidified, + ( &(const binstruction[129]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x1C080202, // 0003 EQ R2 R1 R2 + 0x740A0005, // 0004 JMPT R2 #000B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0000, // 000A JMPF R2 #000C + 0x80000400, // 000B RET 0 + 0x88080301, // 000C GETMBR R2 R1 K1 + 0xB80E0400, // 000D GETNGBL R3 K2 + 0x880C0703, // 000E GETMBR R3 R3 K3 + 0x880C0705, // 000F GETMBR R3 R3 K5 + 0x1C080403, // 0010 EQ R2 R2 R3 + 0x780A0005, // 0011 JMPF R2 #0018 + 0x8C080106, // 0012 GETMET R2 R0 K6 + 0x88100307, // 0013 GETMBR R4 R1 K7 + 0x7C080400, // 0014 CALL R2 2 + 0x8C080108, // 0015 GETMET R2 R0 K8 + 0x7C080200, // 0016 CALL R2 1 + 0x80000400, // 0017 RET 0 + 0x88080301, // 0018 GETMBR R2 R1 K1 + 0xB80E0400, // 0019 GETNGBL R3 K2 + 0x880C0703, // 001A GETMBR R3 R3 K3 + 0x880C0709, // 001B GETMBR R3 R3 K9 + 0x1C080403, // 001C EQ R2 R2 R3 + 0x780A0002, // 001D JMPF R2 #0021 + 0x8C080108, // 001E GETMET R2 R0 K8 + 0x7C080200, // 001F CALL R2 1 + 0x80000400, // 0020 RET 0 + 0x8808010A, // 0021 GETMBR R2 R0 K10 + 0x880C0301, // 0022 GETMBR R3 R1 K1 + 0xB8120400, // 0023 GETNGBL R4 K2 + 0x88100903, // 0024 GETMBR R4 R4 K3 + 0x8810090B, // 0025 GETMBR R4 R4 K11 + 0x1C0C0604, // 0026 EQ R3 R3 R4 + 0x740E0005, // 0027 JMPT R3 #002E + 0x880C0301, // 0028 GETMBR R3 R1 K1 + 0xB8120400, // 0029 GETNGBL R4 K2 + 0x88100903, // 002A GETMBR R4 R4 K3 + 0x8810090C, // 002B GETMBR R4 R4 K12 + 0x1C0C0604, // 002C EQ R3 R3 R4 + 0x780E0001, // 002D JMPF R3 #0030 + 0x500C0000, // 002E LDBOOL R3 0 0 + 0x90021403, // 002F SETMBR R0 K10 R3 + 0x880C0301, // 0030 GETMBR R3 R1 K1 + 0xB8120400, // 0031 GETNGBL R4 K2 + 0x88100903, // 0032 GETMBR R4 R4 K3 + 0x8810090B, // 0033 GETMBR R4 R4 K11 + 0x1C0C0604, // 0034 EQ R3 R3 R4 + 0x780E003A, // 0035 JMPF R3 #0071 + 0x880C0307, // 0036 GETMBR R3 R1 K7 + 0x1C0C070D, // 0037 EQ R3 R3 K13 + 0x780E0006, // 0038 JMPF R3 #0040 + 0x8C0C010E, // 0039 GETMET R3 R0 K14 + 0x5814000F, // 003A LDCONST R5 K15 + 0x7C0C0400, // 003B CALL R3 2 + 0x8C0C0110, // 003C GETMET R3 R0 K16 + 0x7C0C0200, // 003D CALL R3 1 + 0x80000600, // 003E RET 0 + 0x7002002F, // 003F JMP #0070 + 0x880C0111, // 0040 GETMBR R3 R0 K17 + 0x740E0001, // 0041 JMPT R3 #0044 + 0x8C0C0112, // 0042 GETMET R3 R0 K18 + 0x7C0C0200, // 0043 CALL R3 1 + 0x880C0307, // 0044 GETMBR R3 R1 K7 + 0x1C0C0713, // 0045 EQ R3 R3 K19 + 0x780E0002, // 0046 JMPF R3 #004A + 0x8C0C0114, // 0047 GETMET R3 R0 K20 + 0x7C0C0200, // 0048 CALL R3 1 + 0x70020025, // 0049 JMP #0070 + 0x880C0307, // 004A GETMBR R3 R1 K7 + 0x1C0C0715, // 004B EQ R3 R3 K21 + 0x780E0002, // 004C JMPF R3 #0050 + 0x8C0C0116, // 004D GETMET R3 R0 K22 + 0x7C0C0200, // 004E CALL R3 1 + 0x7002001F, // 004F JMP #0070 + 0x880C0307, // 0050 GETMBR R3 R1 K7 + 0x1C0C0717, // 0051 EQ R3 R3 K23 + 0x780E0002, // 0052 JMPF R3 #0056 + 0x8C0C0118, // 0053 GETMET R3 R0 K24 + 0x7C0C0200, // 0054 CALL R3 1 + 0x70020019, // 0055 JMP #0070 + 0x880C0307, // 0056 GETMBR R3 R1 K7 + 0x1C0C0719, // 0057 EQ R3 R3 K25 + 0x780E0002, // 0058 JMPF R3 #005C + 0x8C0C011A, // 0059 GETMET R3 R0 K26 + 0x7C0C0200, // 005A CALL R3 1 + 0x70020013, // 005B JMP #0070 + 0x880C0307, // 005C GETMBR R3 R1 K7 + 0x1C0C071B, // 005D EQ R3 R3 K27 + 0x780E0002, // 005E JMPF R3 #0062 + 0x8C0C011C, // 005F GETMET R3 R0 K28 + 0x7C0C0200, // 0060 CALL R3 1 + 0x7002000D, // 0061 JMP #0070 + 0x880C0307, // 0062 GETMBR R3 R1 K7 + 0x1C0C071D, // 0063 EQ R3 R3 K29 + 0x780E0002, // 0064 JMPF R3 #0068 + 0x8C0C011E, // 0065 GETMET R3 R0 K30 + 0x7C0C0200, // 0066 CALL R3 1 + 0x70020007, // 0067 JMP #0070 + 0x880C0307, // 0068 GETMBR R3 R1 K7 + 0x1C0C071F, // 0069 EQ R3 R3 K31 + 0x780E0002, // 006A JMPF R3 #006E + 0x8C0C0120, // 006B GETMET R3 R0 K32 + 0x7C0C0200, // 006C CALL R3 1 + 0x70020001, // 006D JMP #0070 + 0x8C0C0110, // 006E GETMET R3 R0 K16 + 0x7C0C0200, // 006F CALL R3 1 + 0x7002000E, // 0070 JMP #0080 + 0x880C0301, // 0071 GETMBR R3 R1 K1 + 0xB8120400, // 0072 GETNGBL R4 K2 + 0x88100903, // 0073 GETMBR R4 R4 K3 + 0x8810090C, // 0074 GETMBR R4 R4 K12 + 0x1C0C0604, // 0075 EQ R3 R3 R4 + 0x780E0006, // 0076 JMPF R3 #007E + 0x880C0111, // 0077 GETMBR R3 R0 K17 + 0x740E0001, // 0078 JMPT R3 #007B + 0x8C0C0112, // 0079 GETMET R3 R0 K18 + 0x7C0C0200, // 007A CALL R3 1 + 0x8C0C0121, // 007B GETMET R3 R0 K33 + 0x7C0C0200, // 007C CALL R3 1 + 0x70020001, // 007D JMP #0080 + 0x8C0C0110, // 007E GETMET R3 R0 K16 + 0x7C0C0200, // 007F CALL R3 1 + 0x80000000, // 0080 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: transpile +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_transpile, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(add), + /* K1 */ be_nested_str_weak(import_X20animation), + /* K2 */ be_nested_str_weak(), + /* K3 */ be_nested_str_weak(at_end), + /* K4 */ be_nested_str_weak(process_statement), + /* K5 */ be_nested_str_weak(generate_engine_start), + /* K6 */ be_nested_str_weak(errors), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(join_output), + /* K9 */ be_nested_str_weak(error), + /* K10 */ be_nested_str_weak(Transpilation_X20failed_X3A_X20_X25s), + }), + be_str_weak(transpile), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0xA802001A, // 0000 EXBLK 0 #001C + 0x8C040100, // 0001 GETMET R1 R0 K0 + 0x580C0001, // 0002 LDCONST R3 K1 + 0x7C040400, // 0003 CALL R1 2 + 0x8C040100, // 0004 GETMET R1 R0 K0 + 0x580C0002, // 0005 LDCONST R3 K2 + 0x7C040400, // 0006 CALL R1 2 + 0x8C040103, // 0007 GETMET R1 R0 K3 + 0x7C040200, // 0008 CALL R1 1 + 0x74060002, // 0009 JMPT R1 #000D + 0x8C040104, // 000A GETMET R1 R0 K4 + 0x7C040200, // 000B CALL R1 1 + 0x7001FFF9, // 000C JMP #0007 + 0x8C040105, // 000D GETMET R1 R0 K5 + 0x7C040200, // 000E CALL R1 1 + 0x6004000C, // 000F GETGBL R1 G12 + 0x88080106, // 0010 GETMBR R2 R0 K6 + 0x7C040200, // 0011 CALL R1 1 + 0x1C040307, // 0012 EQ R1 R1 K7 + 0x78060002, // 0013 JMPF R1 #0017 + 0x8C040108, // 0014 GETMET R1 R0 K8 + 0x7C040200, // 0015 CALL R1 1 + 0x70020000, // 0016 JMP #0018 + 0x4C040000, // 0017 LDNIL R1 + 0xA8040001, // 0018 EXBLK 1 1 + 0x80040200, // 0019 RET 1 R1 + 0xA8040001, // 001A EXBLK 1 1 + 0x7002000B, // 001B JMP #0028 + 0xAC040002, // 001C CATCH R1 0 2 + 0x70020008, // 001D JMP #0027 + 0x8C0C0109, // 001E GETMET R3 R0 K9 + 0x60140018, // 001F GETGBL R5 G24 + 0x5818000A, // 0020 LDCONST R6 K10 + 0x5C1C0400, // 0021 MOVE R7 R2 + 0x7C140400, // 0022 CALL R5 2 + 0x7C0C0400, // 0023 CALL R3 2 + 0x4C0C0000, // 0024 LDNIL R3 + 0x80040600, // 0025 RET 1 R3 + 0x70020000, // 0026 JMP #0028 + 0xB0080000, // 0027 RAISE 2 R0 R0 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _process_named_arguments_for_color_provider +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_for_color_provider, /* 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[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_process_named_arguments_generic), + }), + be_str_weak(_process_named_arguments_for_color_provider), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140200, // 0001 MOVE R5 R1 + 0x5C180400, // 0002 MOVE R6 R2 + 0x7C0C0600, // 0003 CALL R3 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: create_computation_closure +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_create_computation_closure, /* name */ + be_nested_proto( + 12, /* 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(string), + /* K1 */ be_nested_str_weak(transform_operand_for_closure), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(_X20_X20), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(replace), + /* K6 */ be_nested_str_weak(_X20), + /* K7 */ be_nested_str_weak(def_X20_X28self_X29_X20return_X20_X25s_X20_X25s_X20_X25s_X20end), + /* K8 */ be_nested_str_weak(animation_X2Ecreate_closure_value_X28engine_X2C_X20_X25s_X29), + }), + be_str_weak(create_computation_closure), + &be_const_str_solidified, + ( &(const binstruction[44]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x8C140101, // 0001 GETMET R5 R0 K1 + 0x5C1C0200, // 0002 MOVE R7 R1 + 0x7C140400, // 0003 CALL R5 2 + 0x8C180101, // 0004 GETMET R6 R0 K1 + 0x5C200600, // 0005 MOVE R8 R3 + 0x7C180400, // 0006 CALL R6 2 + 0x8C1C0902, // 0007 GETMET R7 R4 K2 + 0x5C240A00, // 0008 MOVE R9 R5 + 0x58280003, // 0009 LDCONST R10 K3 + 0x7C1C0600, // 000A CALL R7 3 + 0x281C0F04, // 000B GE R7 R7 K4 + 0x781E0006, // 000C JMPF R7 #0014 + 0x8C1C0905, // 000D GETMET R7 R4 K5 + 0x5C240A00, // 000E MOVE R9 R5 + 0x58280003, // 000F LDCONST R10 K3 + 0x582C0006, // 0010 LDCONST R11 K6 + 0x7C1C0800, // 0011 CALL R7 4 + 0x5C140E00, // 0012 MOVE R5 R7 + 0x7001FFF2, // 0013 JMP #0007 + 0x8C1C0902, // 0014 GETMET R7 R4 K2 + 0x5C240C00, // 0015 MOVE R9 R6 + 0x58280003, // 0016 LDCONST R10 K3 + 0x7C1C0600, // 0017 CALL R7 3 + 0x281C0F04, // 0018 GE R7 R7 K4 + 0x781E0006, // 0019 JMPF R7 #0021 + 0x8C1C0905, // 001A GETMET R7 R4 K5 + 0x5C240C00, // 001B MOVE R9 R6 + 0x58280003, // 001C LDCONST R10 K3 + 0x582C0006, // 001D LDCONST R11 K6 + 0x7C1C0800, // 001E CALL R7 4 + 0x5C180E00, // 001F MOVE R6 R7 + 0x7001FFF2, // 0020 JMP #0014 + 0x601C0018, // 0021 GETGBL R7 G24 + 0x58200007, // 0022 LDCONST R8 K7 + 0x5C240A00, // 0023 MOVE R9 R5 + 0x5C280400, // 0024 MOVE R10 R2 + 0x5C2C0C00, // 0025 MOVE R11 R6 + 0x7C1C0800, // 0026 CALL R7 4 + 0x60200018, // 0027 GETGBL R8 G24 + 0x58240008, // 0028 LDCONST R9 K8 + 0x5C280E00, // 0029 MOVE R10 R7 + 0x7C200400, // 002A CALL R8 2 + 0x80041000, // 002B RET 1 R8 }) ) ); @@ -6801,6 +7618,1726 @@ be_local_closure(class_SimpleDSLTranspiler_process_primary_expression, /* name /*******************************************************************/ +/******************************************************************** +** Solidified function: peek +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_peek, /* 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[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(pos), + /* K1 */ be_const_int(1), + /* K2 */ be_nested_str_weak(tokens), + }), + be_str_weak(peek), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x00040301, // 0001 ADD R1 R1 K1 + 0x6008000C, // 0002 GETGBL R2 G12 + 0x880C0102, // 0003 GETMBR R3 R0 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x14040202, // 0005 LT R1 R1 R2 + 0x78060004, // 0006 JMPF R1 #000C + 0x88040100, // 0007 GETMBR R1 R0 K0 + 0x00040301, // 0008 ADD R1 R1 K1 + 0x88080102, // 0009 GETMBR R2 R0 K2 + 0x94040401, // 000A GETIDX R1 R2 R1 + 0x70020000, // 000B JMP #000D + 0x4C040000, // 000C LDNIL R1 + 0x80040200, // 000D RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_anonymous_function +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_is_anonymous_function, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(_X28def_X20), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(_X29_X28engine_X29), + }), + be_str_weak(is_anonymous_function), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x7C0C0600, // 0004 CALL R3 3 + 0x1C0C0703, // 0005 EQ R3 R3 K3 + 0x780E0005, // 0006 JMPF R3 #000D + 0x8C0C0501, // 0007 GETMET R3 R2 K1 + 0x5C140200, // 0008 MOVE R5 R1 + 0x58180004, // 0009 LDCONST R6 K4 + 0x7C0C0600, // 000A CALL R3 3 + 0x280C0703, // 000B GE R3 R3 K3 + 0x740E0000, // 000C JMPT R3 #000E + 0x500C0001, // 000D LDBOOL R3 0 1 + 0x500C0200, // 000E LDBOOL R3 1 0 + 0x80040600, // 000F RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_left_brace +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_left_brace, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(LEFT_BRACE), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X7B_X27), + }), + be_str_weak(expect_left_brace), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: skip_function_arguments +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_skip_function_arguments, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(LEFT_PAREN), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(at_end), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(RIGHT_PAREN), + }), + be_str_weak(skip_function_arguments), + &be_const_str_solidified, + ( &(const binstruction[42]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060023, // 0004 JMPF R1 #0029 + 0x8C040100, // 0005 GETMET R1 R0 K0 + 0x7C040200, // 0006 CALL R1 1 + 0x88040301, // 0007 GETMBR R1 R1 K1 + 0xB80A0400, // 0008 GETNGBL R2 K2 + 0x88080503, // 0009 GETMBR R2 R2 K3 + 0x88080504, // 000A GETMBR R2 R2 K4 + 0x1C040202, // 000B EQ R1 R1 R2 + 0x7806001B, // 000C JMPF R1 #0029 + 0x8C040105, // 000D GETMET R1 R0 K5 + 0x7C040200, // 000E CALL R1 1 + 0x58040006, // 000F LDCONST R1 K6 + 0x8C080107, // 0010 GETMET R2 R0 K7 + 0x7C080200, // 0011 CALL R2 1 + 0x740A0015, // 0012 JMPT R2 #0029 + 0x24080308, // 0013 GT R2 R1 K8 + 0x780A0013, // 0014 JMPF R2 #0029 + 0x8C080100, // 0015 GETMET R2 R0 K0 + 0x7C080200, // 0016 CALL R2 1 + 0x880C0501, // 0017 GETMBR R3 R2 K1 + 0xB8120400, // 0018 GETNGBL R4 K2 + 0x88100903, // 0019 GETMBR R4 R4 K3 + 0x88100904, // 001A GETMBR R4 R4 K4 + 0x1C0C0604, // 001B EQ R3 R3 R4 + 0x780E0001, // 001C JMPF R3 #001F + 0x00040306, // 001D ADD R1 R1 K6 + 0x70020006, // 001E JMP #0026 + 0x880C0501, // 001F GETMBR R3 R2 K1 + 0xB8120400, // 0020 GETNGBL R4 K2 + 0x88100903, // 0021 GETMBR R4 R4 K3 + 0x88100909, // 0022 GETMBR R4 R4 K9 + 0x1C0C0604, // 0023 EQ R3 R3 R4 + 0x780E0000, // 0024 JMPF R3 #0026 + 0x04040306, // 0025 SUB R1 R1 K6 + 0x8C0C0105, // 0026 GETMET R3 R0 K5 + 0x7C0C0200, // 0027 CALL R3 1 + 0x7001FFE6, // 0028 JMP #0010 + 0x80000000, // 0029 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _validate_factory_function +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__validate_factory_function, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* 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(introspect), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(animation), + /* K3 */ be_nested_str_weak(function), + /* K4 */ be_nested_str_weak(class), + /* K5 */ be_nested_str_weak(animation_dsl), + /* K6 */ be_nested_str_weak(MockEngine), + }), + be_str_weak(_validate_factory_function), + &be_const_str_solidified, + ( &(const binstruction[59]) { /* code */ + 0xA8020032, // 0000 EXBLK 0 #0034 + 0xA40E0000, // 0001 IMPORT R3 K0 + 0x8C100701, // 0002 GETMET R4 R3 K1 + 0xB81A0400, // 0003 GETNGBL R6 K2 + 0x5C1C0200, // 0004 MOVE R7 R1 + 0x7C100600, // 0005 CALL R4 3 + 0x74120002, // 0006 JMPT R4 #000A + 0x50100000, // 0007 LDBOOL R4 0 0 + 0xA8040001, // 0008 EXBLK 1 1 + 0x80040800, // 0009 RET 1 R4 + 0xB8120400, // 000A GETNGBL R4 K2 + 0x88100801, // 000B GETMBR R4 R4 R1 + 0x60140004, // 000C GETGBL R5 G4 + 0x5C180800, // 000D MOVE R6 R4 + 0x7C140200, // 000E CALL R5 1 + 0x20180B03, // 000F NE R6 R5 K3 + 0x781A0004, // 0010 JMPF R6 #0016 + 0x20180B04, // 0011 NE R6 R5 K4 + 0x781A0002, // 0012 JMPF R6 #0016 + 0x50180000, // 0013 LDBOOL R6 0 0 + 0xA8040001, // 0014 EXBLK 1 1 + 0x80040C00, // 0015 RET 1 R6 + 0x4C180000, // 0016 LDNIL R6 + 0x1C180406, // 0017 EQ R6 R2 R6 + 0x781A0002, // 0018 JMPF R6 #001C + 0x50180200, // 0019 LDBOOL R6 1 0 + 0xA8040001, // 001A EXBLK 1 1 + 0x80040C00, // 001B RET 1 R6 + 0xB81A0A00, // 001C GETNGBL R6 K5 + 0x8C180D06, // 001D GETMET R6 R6 K6 + 0x7C180200, // 001E CALL R6 1 + 0xA802000A, // 001F EXBLK 0 #002B + 0x5C1C0800, // 0020 MOVE R7 R4 + 0x5C200C00, // 0021 MOVE R8 R6 + 0x7C1C0200, // 0022 CALL R7 1 + 0x6020000F, // 0023 GETGBL R8 G15 + 0x5C240E00, // 0024 MOVE R9 R7 + 0x5C280400, // 0025 MOVE R10 R2 + 0x7C200400, // 0026 CALL R8 2 + 0xA8040002, // 0027 EXBLK 1 2 + 0x80041000, // 0028 RET 1 R8 + 0xA8040001, // 0029 EXBLK 1 1 + 0x70020006, // 002A JMP #0032 + 0xAC1C0002, // 002B CATCH R7 0 2 + 0x70020003, // 002C JMP #0031 + 0x50240000, // 002D LDBOOL R9 0 0 + 0xA8040001, // 002E EXBLK 1 1 + 0x80041200, // 002F RET 1 R9 + 0x70020000, // 0030 JMP #0032 + 0xB0080000, // 0031 RAISE 2 R0 R0 + 0xA8040001, // 0032 EXBLK 1 1 + 0x70020005, // 0033 JMP #003A + 0xAC0C0002, // 0034 CATCH R3 0 2 + 0x70020002, // 0035 JMP #0039 + 0x50140000, // 0036 LDBOOL R5 0 0 + 0x80040A00, // 0037 RET 1 R5 + 0x70020000, // 0038 JMP #003A + 0xB0080000, // 0039 RAISE 2 R0 R0 + 0x80000000, // 003A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: validate_user_name +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_validate_user_name, /* name */ + be_nested_proto( + 13, /* nstack */ + 3, /* 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(animation_dsl), + /* K1 */ be_nested_str_weak(Token), + /* K2 */ be_nested_str_weak(color_names), + /* K3 */ be_nested_str_weak(error), + /* K4 */ be_nested_str_weak(Cannot_X20redefine_X20predefined_X20color_X20_X27_X25s_X27_X2E_X20Use_X20a_X20different_X20name_X20like_X20_X27_X25s_custom_X27_X20or_X20_X27my__X25s_X27), + /* K5 */ be_nested_str_weak(stop_iteration), + /* K6 */ be_nested_str_weak(statement_keywords), + /* K7 */ be_nested_str_weak(Cannot_X20use_X20DSL_X20keyword_X20_X27_X25s_X27_X20as_X20_X25s_X20name_X2E_X20Use_X20a_X20different_X20name_X20like_X20_X27_X25s_custom_X27_X20or_X20_X27my__X25s_X27), + }), + be_str_weak(validate_user_name), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x600C0010, // 0000 GETGBL R3 G16 + 0xB8120000, // 0001 GETNGBL R4 K0 + 0x88100901, // 0002 GETMBR R4 R4 K1 + 0x88100902, // 0003 GETMBR R4 R4 K2 + 0x7C0C0200, // 0004 CALL R3 1 + 0xA802000F, // 0005 EXBLK 0 #0016 + 0x5C100600, // 0006 MOVE R4 R3 + 0x7C100000, // 0007 CALL R4 0 + 0x1C140204, // 0008 EQ R5 R1 R4 + 0x7816000A, // 0009 JMPF R5 #0015 + 0x8C140103, // 000A GETMET R5 R0 K3 + 0x601C0018, // 000B GETGBL R7 G24 + 0x58200004, // 000C LDCONST R8 K4 + 0x5C240200, // 000D MOVE R9 R1 + 0x5C280200, // 000E MOVE R10 R1 + 0x5C2C0200, // 000F MOVE R11 R1 + 0x7C1C0800, // 0010 CALL R7 4 + 0x7C140400, // 0011 CALL R5 2 + 0x50140000, // 0012 LDBOOL R5 0 0 + 0xA8040001, // 0013 EXBLK 1 1 + 0x80040A00, // 0014 RET 1 R5 + 0x7001FFEF, // 0015 JMP #0006 + 0x580C0005, // 0016 LDCONST R3 K5 + 0xAC0C0200, // 0017 CATCH R3 1 0 + 0xB0080000, // 0018 RAISE 2 R0 R0 + 0x600C0010, // 0019 GETGBL R3 G16 + 0xB8120000, // 001A GETNGBL R4 K0 + 0x88100901, // 001B GETMBR R4 R4 K1 + 0x88100906, // 001C GETMBR R4 R4 K6 + 0x7C0C0200, // 001D CALL R3 1 + 0xA8020010, // 001E EXBLK 0 #0030 + 0x5C100600, // 001F MOVE R4 R3 + 0x7C100000, // 0020 CALL R4 0 + 0x1C140204, // 0021 EQ R5 R1 R4 + 0x7816000B, // 0022 JMPF R5 #002F + 0x8C140103, // 0023 GETMET R5 R0 K3 + 0x601C0018, // 0024 GETGBL R7 G24 + 0x58200007, // 0025 LDCONST R8 K7 + 0x5C240200, // 0026 MOVE R9 R1 + 0x5C280400, // 0027 MOVE R10 R2 + 0x5C2C0200, // 0028 MOVE R11 R1 + 0x5C300200, // 0029 MOVE R12 R1 + 0x7C1C0A00, // 002A CALL R7 5 + 0x7C140400, // 002B CALL R5 2 + 0x50140000, // 002C LDBOOL R5 0 0 + 0xA8040001, // 002D EXBLK 1 1 + 0x80040A00, // 002E RET 1 R5 + 0x7001FFEE, // 002F JMP #001F + 0x580C0005, // 0030 LDCONST R3 K5 + 0xAC0C0200, // 0031 CATCH R3 1 0 + 0xB0080000, // 0032 RAISE 2 R0 R0 + 0x500C0200, // 0033 LDBOOL R3 1 0 + 0x80040600, // 0034 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_expression_argument +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_expression_argument, /* 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(process_additive_expression_raw), + }), + be_str_weak(process_expression_argument), + &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 function: process_nested_function_call +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_nested_function_call, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[28]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(IDENTIFIER), + /* K6 */ be_nested_str_weak(KEYWORD), + /* K7 */ be_nested_str_weak(value), + /* K8 */ be_nested_str_weak(next), + /* K9 */ be_nested_str_weak(error), + /* K10 */ be_nested_str_weak(Expected_X20function_X20name), + /* K11 */ be_nested_str_weak(nil), + /* K12 */ be_nested_str_weak(is_math_method), + /* K13 */ be_nested_str_weak(process_function_arguments_for_expression), + /* K14 */ be_nested_str_weak(self_X2E_X25s_X28_X25s_X29), + /* K15 */ be_nested_str_weak(animation), + /* K16 */ be_nested_str_weak(is_user_function), + /* K17 */ be_nested_str_weak(self_X2Eengine_X2C_X20_X25s), + /* K18 */ be_nested_str_weak(self_X2Eengine), + /* K19 */ be_nested_str_weak(animation_X2Eget_user_function_X28_X27_X25s_X27_X29_X28_X25s_X29), + /* K20 */ be_nested_str_weak(_is_simple_function_call), + /* K21 */ be_nested_str_weak(process_function_arguments), + /* K22 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X2C_X20_X25s_X29), + /* K23 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X29), + /* K24 */ be_nested_str_weak(_validate_animation_factory_exists), + /* K25 */ be_nested_str_weak(Animation_X20factory_X20function_X20_X27_X25s_X27_X20does_X20not_X20exist_X2E_X20Check_X20the_X20function_X20name_X20and_X20ensure_X20it_X27s_X20available_X20in_X20the_X20animation_X20module_X2E), + /* K26 */ be_nested_str_weak(skip_function_arguments), + /* K27 */ be_nested_str_weak(_generate_anonymous_function_call), + }), + be_str_weak(process_nested_function_call), + &be_const_str_solidified, + ( &(const binstruction[99]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x58080001, // 0002 LDCONST R2 K1 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0203, // 0004 NE R3 R1 R3 + 0x780E000F, // 0005 JMPF R3 #0016 + 0x880C0302, // 0006 GETMBR R3 R1 K2 + 0xB8120600, // 0007 GETNGBL R4 K3 + 0x88100904, // 0008 GETMBR R4 R4 K4 + 0x88100905, // 0009 GETMBR R4 R4 K5 + 0x1C0C0604, // 000A EQ R3 R3 R4 + 0x740E0005, // 000B JMPT R3 #0012 + 0x880C0302, // 000C GETMBR R3 R1 K2 + 0xB8120600, // 000D GETNGBL R4 K3 + 0x88100904, // 000E GETMBR R4 R4 K4 + 0x88100906, // 000F GETMBR R4 R4 K6 + 0x1C0C0604, // 0010 EQ R3 R3 R4 + 0x780E0003, // 0011 JMPF R3 #0016 + 0x88080307, // 0012 GETMBR R2 R1 K7 + 0x8C0C0108, // 0013 GETMET R3 R0 K8 + 0x7C0C0200, // 0014 CALL R3 1 + 0x70020003, // 0015 JMP #001A + 0x8C0C0109, // 0016 GETMET R3 R0 K9 + 0x5814000A, // 0017 LDCONST R5 K10 + 0x7C0C0400, // 0018 CALL R3 2 + 0x80061600, // 0019 RET 1 K11 + 0x8C0C010C, // 001A GETMET R3 R0 K12 + 0x5C140400, // 001B MOVE R5 R2 + 0x7C0C0400, // 001C CALL R3 2 + 0x780E0007, // 001D JMPF R3 #0026 + 0x8C0C010D, // 001E GETMET R3 R0 K13 + 0x7C0C0200, // 001F CALL R3 1 + 0x60100018, // 0020 GETGBL R4 G24 + 0x5814000E, // 0021 LDCONST R5 K14 + 0x5C180400, // 0022 MOVE R6 R2 + 0x5C1C0600, // 0023 MOVE R7 R3 + 0x7C100600, // 0024 CALL R4 3 + 0x80040800, // 0025 RET 1 R4 + 0xB80E1E00, // 0026 GETNGBL R3 K15 + 0x8C0C0710, // 0027 GETMET R3 R3 K16 + 0x5C140400, // 0028 MOVE R5 R2 + 0x7C0C0400, // 0029 CALL R3 2 + 0x780E0010, // 002A JMPF R3 #003C + 0x8C0C010D, // 002B GETMET R3 R0 K13 + 0x7C0C0200, // 002C CALL R3 1 + 0x20100701, // 002D NE R4 R3 K1 + 0x78120004, // 002E JMPF R4 #0034 + 0x60100018, // 002F GETGBL R4 G24 + 0x58140011, // 0030 LDCONST R5 K17 + 0x5C180600, // 0031 MOVE R6 R3 + 0x7C100400, // 0032 CALL R4 2 + 0x70020000, // 0033 JMP #0035 + 0x58100012, // 0034 LDCONST R4 K18 + 0x60140018, // 0035 GETGBL R5 G24 + 0x58180013, // 0036 LDCONST R6 K19 + 0x5C1C0400, // 0037 MOVE R7 R2 + 0x5C200800, // 0038 MOVE R8 R4 + 0x7C140600, // 0039 CALL R5 3 + 0x80040A00, // 003A RET 1 R5 + 0x70020025, // 003B JMP #0062 + 0x8C0C0114, // 003C GETMET R3 R0 K20 + 0x5C140400, // 003D MOVE R5 R2 + 0x7C0C0400, // 003E CALL R3 2 + 0x780E0010, // 003F JMPF R3 #0051 + 0x8C0C0115, // 0040 GETMET R3 R0 K21 + 0x7C0C0200, // 0041 CALL R3 1 + 0x20100701, // 0042 NE R4 R3 K1 + 0x78120006, // 0043 JMPF R4 #004B + 0x60100018, // 0044 GETGBL R4 G24 + 0x58140016, // 0045 LDCONST R5 K22 + 0x5C180400, // 0046 MOVE R6 R2 + 0x5C1C0600, // 0047 MOVE R7 R3 + 0x7C100600, // 0048 CALL R4 3 + 0x80040800, // 0049 RET 1 R4 + 0x70020004, // 004A JMP #0050 + 0x60100018, // 004B GETGBL R4 G24 + 0x58140017, // 004C LDCONST R5 K23 + 0x5C180400, // 004D MOVE R6 R2 + 0x7C100400, // 004E CALL R4 2 + 0x80040800, // 004F RET 1 R4 + 0x70020010, // 0050 JMP #0062 + 0x8C0C0118, // 0051 GETMET R3 R0 K24 + 0x5C140400, // 0052 MOVE R5 R2 + 0x7C0C0400, // 0053 CALL R3 2 + 0x740E0008, // 0054 JMPT R3 #005E + 0x8C0C0109, // 0055 GETMET R3 R0 K9 + 0x60140018, // 0056 GETGBL R5 G24 + 0x58180019, // 0057 LDCONST R6 K25 + 0x5C1C0400, // 0058 MOVE R7 R2 + 0x7C140400, // 0059 CALL R5 2 + 0x7C0C0400, // 005A CALL R3 2 + 0x8C0C011A, // 005B GETMET R3 R0 K26 + 0x7C0C0200, // 005C CALL R3 1 + 0x80061600, // 005D RET 1 K11 + 0x8C0C011B, // 005E GETMET R3 R0 K27 + 0x5C140400, // 005F MOVE R5 R2 + 0x7C0C0400, // 0060 CALL R3 2 + 0x80040600, // 0061 RET 1 R3 + 0x80000000, // 0062 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: current +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_current, /* 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[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(pos), + /* K1 */ be_nested_str_weak(tokens), + }), + be_str_weak(current), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x14040202, // 0004 LT R1 R1 R2 + 0x78060003, // 0005 JMPF R1 #000A + 0x88040101, // 0006 GETMBR R1 R0 K1 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x94040202, // 0008 GETIDX R1 R1 R2 + 0x70020000, // 0009 JMP #000B + 0x4C040000, // 000A LDNIL R1 + 0x80040200, // 000B RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: can_use_as_identifier +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_can_use_as_identifier, /* 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[14]) { /* constants */ + /* K0 */ be_nested_str_weak(color), + /* K1 */ be_nested_str_weak(animation), + /* K2 */ be_nested_str_weak(palette), + /* K3 */ be_nested_str_weak(startup), + /* K4 */ be_nested_str_weak(shutdown), + /* K5 */ be_nested_str_weak(button_press), + /* K6 */ be_nested_str_weak(button_hold), + /* K7 */ be_nested_str_weak(motion_detected), + /* K8 */ be_nested_str_weak(brightness_change), + /* K9 */ be_nested_str_weak(timer), + /* K10 */ be_nested_str_weak(time), + /* K11 */ be_nested_str_weak(sound_peak), + /* K12 */ be_nested_str_weak(network_message), + /* K13 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(can_use_as_identifier), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x400C0500, // 0002 CONNECT R3 R2 K0 + 0x400C0501, // 0003 CONNECT R3 R2 K1 + 0x400C0502, // 0004 CONNECT R3 R2 K2 + 0x400C0503, // 0005 CONNECT R3 R2 K3 + 0x400C0504, // 0006 CONNECT R3 R2 K4 + 0x400C0505, // 0007 CONNECT R3 R2 K5 + 0x400C0506, // 0008 CONNECT R3 R2 K6 + 0x400C0507, // 0009 CONNECT R3 R2 K7 + 0x400C0508, // 000A CONNECT R3 R2 K8 + 0x400C0509, // 000B CONNECT R3 R2 K9 + 0x400C050A, // 000C CONNECT R3 R2 K10 + 0x400C050B, // 000D CONNECT R3 R2 K11 + 0x400C050C, // 000E CONNECT R3 R2 K12 + 0x600C0010, // 000F GETGBL R3 G16 + 0x5C100400, // 0010 MOVE R4 R2 + 0x7C0C0200, // 0011 CALL R3 1 + 0xA8020007, // 0012 EXBLK 0 #001B + 0x5C100600, // 0013 MOVE R4 R3 + 0x7C100000, // 0014 CALL R4 0 + 0x1C140204, // 0015 EQ R5 R1 R4 + 0x78160002, // 0016 JMPF R5 #001A + 0x50140200, // 0017 LDBOOL R5 1 0 + 0xA8040001, // 0018 EXBLK 1 1 + 0x80040A00, // 0019 RET 1 R5 + 0x7001FFF7, // 001A JMP #0013 + 0x580C000D, // 001B LDCONST R3 K13 + 0xAC0C0200, // 001C CATCH R3 1 0 + 0xB0080000, // 001D RAISE 2 R0 R0 + 0x500C0000, // 001E LDBOOL R3 0 0 + 0x80040600, // 001F RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_function_arguments_for_expression +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_function_arguments_for_expression, /* 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[20]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_left_paren), + /* K1 */ be_nested_str_weak(at_end), + /* K2 */ be_nested_str_weak(check_right_paren), + /* K3 */ be_nested_str_weak(skip_whitespace), + /* K4 */ be_nested_str_weak(process_expression_argument), + /* K5 */ be_nested_str_weak(push), + /* K6 */ be_nested_str_weak(current), + /* K7 */ be_nested_str_weak(type), + /* K8 */ be_nested_str_weak(animation_dsl), + /* K9 */ be_nested_str_weak(Token), + /* K10 */ be_nested_str_weak(COMMA), + /* K11 */ be_nested_str_weak(next), + /* K12 */ be_nested_str_weak(error), + /* K13 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), + /* K14 */ be_nested_str_weak(expect_right_paren), + /* K15 */ be_nested_str_weak(), + /* K16 */ be_const_int(0), + /* K17 */ be_const_int(1), + /* K18 */ be_nested_str_weak(_X2C_X20), + /* K19 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(process_function_arguments_for_expression), + &be_const_str_solidified, + ( &(const binstruction[72]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x60040012, // 0002 GETGBL R1 G18 + 0x7C040000, // 0003 CALL R1 0 + 0x8C080101, // 0004 GETMET R2 R0 K1 + 0x7C080200, // 0005 CALL R2 1 + 0x740A0029, // 0006 JMPT R2 #0031 + 0x8C080102, // 0007 GETMET R2 R0 K2 + 0x7C080200, // 0008 CALL R2 1 + 0x740A0026, // 0009 JMPT R2 #0031 + 0x8C080103, // 000A GETMET R2 R0 K3 + 0x7C080200, // 000B CALL R2 1 + 0x8C080102, // 000C GETMET R2 R0 K2 + 0x7C080200, // 000D CALL R2 1 + 0x780A0000, // 000E JMPF R2 #0010 + 0x70020020, // 000F JMP #0031 + 0x8C080104, // 0010 GETMET R2 R0 K4 + 0x7C080200, // 0011 CALL R2 1 + 0x8C0C0305, // 0012 GETMET R3 R1 K5 + 0x5C140400, // 0013 MOVE R5 R2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x8C0C0103, // 0015 GETMET R3 R0 K3 + 0x7C0C0200, // 0016 CALL R3 1 + 0x8C0C0106, // 0017 GETMET R3 R0 K6 + 0x7C0C0200, // 0018 CALL R3 1 + 0x4C100000, // 0019 LDNIL R4 + 0x200C0604, // 001A NE R3 R3 R4 + 0x780E000C, // 001B JMPF R3 #0029 + 0x8C0C0106, // 001C GETMET R3 R0 K6 + 0x7C0C0200, // 001D CALL R3 1 + 0x880C0707, // 001E GETMBR R3 R3 K7 + 0xB8121000, // 001F GETNGBL R4 K8 + 0x88100909, // 0020 GETMBR R4 R4 K9 + 0x8810090A, // 0021 GETMBR R4 R4 K10 + 0x1C0C0604, // 0022 EQ R3 R3 R4 + 0x780E0004, // 0023 JMPF R3 #0029 + 0x8C0C010B, // 0024 GETMET R3 R0 K11 + 0x7C0C0200, // 0025 CALL R3 1 + 0x8C0C0103, // 0026 GETMET R3 R0 K3 + 0x7C0C0200, // 0027 CALL R3 1 + 0x70020006, // 0028 JMP #0030 + 0x8C0C0102, // 0029 GETMET R3 R0 K2 + 0x7C0C0200, // 002A CALL R3 1 + 0x740E0003, // 002B JMPT R3 #0030 + 0x8C0C010C, // 002C GETMET R3 R0 K12 + 0x5814000D, // 002D LDCONST R5 K13 + 0x7C0C0400, // 002E CALL R3 2 + 0x70020000, // 002F JMP #0031 + 0x7001FFD2, // 0030 JMP #0004 + 0x8C08010E, // 0031 GETMET R2 R0 K14 + 0x7C080200, // 0032 CALL R2 1 + 0x5808000F, // 0033 LDCONST R2 K15 + 0x600C0010, // 0034 GETGBL R3 G16 + 0x6010000C, // 0035 GETGBL R4 G12 + 0x5C140200, // 0036 MOVE R5 R1 + 0x7C100200, // 0037 CALL R4 1 + 0x04100911, // 0038 SUB R4 R4 K17 + 0x40122004, // 0039 CONNECT R4 K16 R4 + 0x7C0C0200, // 003A CALL R3 1 + 0xA8020007, // 003B EXBLK 0 #0044 + 0x5C100600, // 003C MOVE R4 R3 + 0x7C100000, // 003D CALL R4 0 + 0x24140910, // 003E GT R5 R4 K16 + 0x78160000, // 003F JMPF R5 #0041 + 0x00080512, // 0040 ADD R2 R2 K18 + 0x94140204, // 0041 GETIDX R5 R1 R4 + 0x00080405, // 0042 ADD R2 R2 R5 + 0x7001FFF7, // 0043 JMP #003C + 0x580C0013, // 0044 LDCONST R3 K19 + 0xAC0C0200, // 0045 CATCH R3 1 0 + 0xB0080000, // 0046 RAISE 2 R0 R0 + 0x80040400, // 0047 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: generate_engine_start +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_generate_engine_start, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(run_statements), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(name), + /* K3 */ be_nested_str_weak(comment), + /* K4 */ be_nested_str_weak(sequence_names), + /* K5 */ be_nested_str_weak(contains), + /* K6 */ be_nested_str_weak(add), + /* K7 */ be_nested_str_weak(engine_X2Eadd_sequence_manager_X28_X25s__X29_X25s), + /* K8 */ be_nested_str_weak(engine_X2Eadd_animation_X28_X25s__X29_X25s), + /* K9 */ be_nested_str_weak(stop_iteration), + /* K10 */ be_nested_str_weak(engine_X2Estart_X28_X29), + }), + be_str_weak(generate_engine_start), + &be_const_str_solidified, + ( &(const binstruction[42]) { /* code */ + 0x6004000C, // 0000 GETGBL R1 G12 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x7C040200, // 0002 CALL R1 1 + 0x1C040301, // 0003 EQ R1 R1 K1 + 0x78060000, // 0004 JMPF R1 #0006 + 0x80000200, // 0005 RET 0 + 0x60040010, // 0006 GETGBL R1 G16 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x7C040200, // 0008 CALL R1 1 + 0xA8020018, // 0009 EXBLK 0 #0023 + 0x5C080200, // 000A MOVE R2 R1 + 0x7C080000, // 000B CALL R2 0 + 0x940C0502, // 000C GETIDX R3 R2 K2 + 0x94100503, // 000D GETIDX R4 R2 K3 + 0x88140104, // 000E GETMBR R5 R0 K4 + 0x8C140B05, // 000F GETMET R5 R5 K5 + 0x5C1C0600, // 0010 MOVE R7 R3 + 0x7C140400, // 0011 CALL R5 2 + 0x78160007, // 0012 JMPF R5 #001B + 0x8C140106, // 0013 GETMET R5 R0 K6 + 0x601C0018, // 0014 GETGBL R7 G24 + 0x58200007, // 0015 LDCONST R8 K7 + 0x5C240600, // 0016 MOVE R9 R3 + 0x5C280800, // 0017 MOVE R10 R4 + 0x7C1C0600, // 0018 CALL R7 3 + 0x7C140400, // 0019 CALL R5 2 + 0x70020006, // 001A JMP #0022 + 0x8C140106, // 001B GETMET R5 R0 K6 + 0x601C0018, // 001C GETGBL R7 G24 + 0x58200008, // 001D LDCONST R8 K8 + 0x5C240600, // 001E MOVE R9 R3 + 0x5C280800, // 001F MOVE R10 R4 + 0x7C1C0600, // 0020 CALL R7 3 + 0x7C140400, // 0021 CALL R5 2 + 0x7001FFE6, // 0022 JMP #000A + 0x58040009, // 0023 LDCONST R1 K9 + 0xAC040200, // 0024 CATCH R1 1 0 + 0xB0080000, // 0025 RAISE 2 R0 R0 + 0x8C040106, // 0026 GETMET R1 R0 K6 + 0x580C000A, // 0027 LDCONST R3 K10 + 0x7C040400, // 0028 CALL R1 2 + 0x80000000, // 0029 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _validate_object_reference +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__validate_object_reference, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(symbol_table), + /* K2 */ be_nested_str_weak(contains), + /* K3 */ be_nested_str_weak(animation), + /* K4 */ be_nested_str_weak(sequence_names), + /* K5 */ be_nested_str_weak(error), + /* K6 */ be_nested_str_weak(Undefined_X20reference_X20_X27_X25s_X27_X20in_X20_X25s_X2E_X20Make_X20sure_X20the_X20object_X20is_X20defined_X20before_X20use_X2E), + }), + be_str_weak(_validate_object_reference), + &be_const_str_solidified, + ( &(const binstruction[37]) { /* code */ + 0xA802001E, // 0000 EXBLK 0 #0020 + 0xA40E0000, // 0001 IMPORT R3 K0 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x8C100902, // 0003 GETMET R4 R4 K2 + 0x5C180200, // 0004 MOVE R6 R1 + 0x7C100400, // 0005 CALL R4 2 + 0x78120001, // 0006 JMPF R4 #0009 + 0xA8040001, // 0007 EXBLK 1 1 + 0x80000800, // 0008 RET 0 + 0x8C100702, // 0009 GETMET R4 R3 K2 + 0xB81A0600, // 000A GETNGBL R6 K3 + 0x5C1C0200, // 000B MOVE R7 R1 + 0x7C100600, // 000C CALL R4 3 + 0x78120001, // 000D JMPF R4 #0010 + 0xA8040001, // 000E EXBLK 1 1 + 0x80000800, // 000F RET 0 + 0x88100104, // 0010 GETMBR R4 R0 K4 + 0x8C100902, // 0011 GETMET R4 R4 K2 + 0x5C180200, // 0012 MOVE R6 R1 + 0x7C100400, // 0013 CALL R4 2 + 0x78120001, // 0014 JMPF R4 #0017 + 0xA8040001, // 0015 EXBLK 1 1 + 0x80000800, // 0016 RET 0 + 0x8C100105, // 0017 GETMET R4 R0 K5 + 0x60180018, // 0018 GETGBL R6 G24 + 0x581C0006, // 0019 LDCONST R7 K6 + 0x5C200200, // 001A MOVE R8 R1 + 0x5C240400, // 001B MOVE R9 R2 + 0x7C180600, // 001C CALL R6 3 + 0x7C100400, // 001D CALL R4 2 + 0xA8040001, // 001E EXBLK 1 1 + 0x70020003, // 001F JMP #0024 + 0xAC0C0002, // 0020 CATCH R3 0 2 + 0x70020000, // 0021 JMP #0023 + 0x70020000, // 0022 JMP #0024 + 0xB0080000, // 0023 RAISE 2 R0 R0 + 0x80000000, // 0024 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_computed_expression +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_is_computed_expression, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* 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(string), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(_X28), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(animation_X2Eglobal), + /* K5 */ be_nested_str_weak(animation_X2E), + /* K6 */ be_nested_str_weak(_), + }), + be_str_weak(is_computed_expression), + &be_const_str_solidified, + ( &(const binstruction[52]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x8C140901, // 0001 GETMET R5 R4 K1 + 0x5C1C0200, // 0002 MOVE R7 R1 + 0x58200002, // 0003 LDCONST R8 K2 + 0x7C140600, // 0004 CALL R5 3 + 0x28140B03, // 0005 GE R5 R5 K3 + 0x7416002A, // 0006 JMPT R5 #0032 + 0x8C140901, // 0007 GETMET R5 R4 K1 + 0x5C1C0600, // 0008 MOVE R7 R3 + 0x58200002, // 0009 LDCONST R8 K2 + 0x7C140600, // 000A CALL R5 3 + 0x28140B03, // 000B GE R5 R5 K3 + 0x74160024, // 000C JMPT R5 #0032 + 0x8C140901, // 000D GETMET R5 R4 K1 + 0x5C1C0200, // 000E MOVE R7 R1 + 0x58200004, // 000F LDCONST R8 K4 + 0x7C140600, // 0010 CALL R5 3 + 0x28140B03, // 0011 GE R5 R5 K3 + 0x7416001E, // 0012 JMPT R5 #0032 + 0x8C140901, // 0013 GETMET R5 R4 K1 + 0x5C1C0600, // 0014 MOVE R7 R3 + 0x58200004, // 0015 LDCONST R8 K4 + 0x7C140600, // 0016 CALL R5 3 + 0x28140B03, // 0017 GE R5 R5 K3 + 0x74160018, // 0018 JMPT R5 #0032 + 0x8C140901, // 0019 GETMET R5 R4 K1 + 0x5C1C0200, // 001A MOVE R7 R1 + 0x58200005, // 001B LDCONST R8 K5 + 0x7C140600, // 001C CALL R5 3 + 0x28140B03, // 001D GE R5 R5 K3 + 0x74160012, // 001E JMPT R5 #0032 + 0x8C140901, // 001F GETMET R5 R4 K1 + 0x5C1C0600, // 0020 MOVE R7 R3 + 0x58200005, // 0021 LDCONST R8 K5 + 0x7C140600, // 0022 CALL R5 3 + 0x28140B03, // 0023 GE R5 R5 K3 + 0x7416000C, // 0024 JMPT R5 #0032 + 0x8C140901, // 0025 GETMET R5 R4 K1 + 0x5C1C0200, // 0026 MOVE R7 R1 + 0x58200006, // 0027 LDCONST R8 K6 + 0x7C140600, // 0028 CALL R5 3 + 0x28140B03, // 0029 GE R5 R5 K3 + 0x74160006, // 002A JMPT R5 #0032 + 0x8C140901, // 002B GETMET R5 R4 K1 + 0x5C1C0600, // 002C MOVE R7 R3 + 0x58200006, // 002D LDCONST R8 K6 + 0x7C140600, // 002E CALL R5 3 + 0x28140B03, // 002F GE R5 R5 K3 + 0x74160000, // 0030 JMPT R5 #0032 + 0x50140001, // 0031 LDBOOL R5 0 1 + 0x50140200, // 0032 LDBOOL R5 1 0 + 0x80040A00, // 0033 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_multiplicative_expression_raw +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_raw, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(process_unary_expression_raw), + /* K1 */ be_nested_str_weak(at_end), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(MULTIPLY), + /* K7 */ be_nested_str_weak(DIVIDE), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), + }), + be_str_weak(process_multiplicative_expression_raw), + &be_const_str_solidified, + ( &(const binstruction[38]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x740A001F, // 0004 JMPT R2 #0025 + 0x8C080102, // 0005 GETMET R2 R0 K2 + 0x7C080200, // 0006 CALL R2 1 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0018, // 0009 JMPF R3 #0023 + 0x880C0503, // 000A GETMBR R3 R2 K3 + 0xB8120800, // 000B GETNGBL R4 K4 + 0x88100905, // 000C GETMBR R4 R4 K5 + 0x88100906, // 000D GETMBR R4 R4 K6 + 0x1C0C0604, // 000E EQ R3 R3 R4 + 0x740E0005, // 000F JMPT R3 #0016 + 0x880C0503, // 0010 GETMBR R3 R2 K3 + 0xB8120800, // 0011 GETNGBL R4 K4 + 0x88100905, // 0012 GETMBR R4 R4 K5 + 0x88100907, // 0013 GETMBR R4 R4 K7 + 0x1C0C0604, // 0014 EQ R3 R3 R4 + 0x780E000C, // 0015 JMPF R3 #0023 + 0x880C0508, // 0016 GETMBR R3 R2 K8 + 0x8C100109, // 0017 GETMET R4 R0 K9 + 0x7C100200, // 0018 CALL R4 1 + 0x8C100100, // 0019 GETMET R4 R0 K0 + 0x7C100200, // 001A CALL R4 1 + 0x60140018, // 001B GETGBL R5 G24 + 0x5818000A, // 001C LDCONST R6 K10 + 0x5C1C0200, // 001D MOVE R7 R1 + 0x5C200600, // 001E MOVE R8 R3 + 0x5C240800, // 001F MOVE R9 R4 + 0x7C140800, // 0020 CALL R5 4 + 0x5C040A00, // 0021 MOVE R1 R5 + 0x70020000, // 0022 JMP #0024 + 0x70020000, // 0023 JMP #0025 + 0x7001FFDC, // 0024 JMP #0002 + 0x80040200, // 0025 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_right_paren +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_right_paren, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(RIGHT_PAREN), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X29_X27), + }), + be_str_weak(expect_right_paren), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _process_named_arguments_for_animation +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_for_animation, /* name */ + be_nested_proto( + 15, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[24]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_left_paren), + /* K1 */ be_nested_str_weak(_create_instance_for_validation), + /* K2 */ be_nested_str_weak(at_end), + /* K3 */ be_nested_str_weak(check_right_paren), + /* K4 */ be_nested_str_weak(skip_whitespace_including_newlines), + /* K5 */ be_nested_str_weak(expect_identifier), + /* K6 */ be_nested_str_weak(_validate_single_parameter), + /* K7 */ be_nested_str_weak(expect_assign), + /* K8 */ be_nested_str_weak(process_value), + /* K9 */ be_nested_str_weak(argument), + /* K10 */ be_nested_str_weak(collect_inline_comment), + /* K11 */ be_nested_str_weak(add), + /* K12 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), + /* K13 */ be_nested_str_weak(current), + /* K14 */ be_nested_str_weak(type), + /* K15 */ be_nested_str_weak(animation_dsl), + /* K16 */ be_nested_str_weak(Token), + /* K17 */ be_nested_str_weak(COMMENT), + /* K18 */ be_nested_str_weak(next), + /* K19 */ be_nested_str_weak(COMMA), + /* K20 */ be_nested_str_weak(NEWLINE), + /* K21 */ be_nested_str_weak(error), + /* K22 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), + /* K23 */ be_nested_str_weak(expect_right_paren), + }), + be_str_weak(_process_named_arguments_for_animation), + &be_const_str_solidified, + ( &(const binstruction[109]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x7C0C0200, // 0001 CALL R3 1 + 0x8C0C0101, // 0002 GETMET R3 R0 K1 + 0x5C140400, // 0003 MOVE R5 R2 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C100102, // 0005 GETMET R4 R0 K2 + 0x7C100200, // 0006 CALL R4 1 + 0x74120061, // 0007 JMPT R4 #006A + 0x8C100103, // 0008 GETMET R4 R0 K3 + 0x7C100200, // 0009 CALL R4 1 + 0x7412005E, // 000A JMPT R4 #006A + 0x8C100104, // 000B GETMET R4 R0 K4 + 0x7C100200, // 000C CALL R4 1 + 0x8C100103, // 000D GETMET R4 R0 K3 + 0x7C100200, // 000E CALL R4 1 + 0x78120000, // 000F JMPF R4 #0011 + 0x70020058, // 0010 JMP #006A + 0x8C100105, // 0011 GETMET R4 R0 K5 + 0x7C100200, // 0012 CALL R4 1 + 0x4C140000, // 0013 LDNIL R5 + 0x20140605, // 0014 NE R5 R3 R5 + 0x78160004, // 0015 JMPF R5 #001B + 0x8C140106, // 0016 GETMET R5 R0 K6 + 0x5C1C0400, // 0017 MOVE R7 R2 + 0x5C200800, // 0018 MOVE R8 R4 + 0x5C240600, // 0019 MOVE R9 R3 + 0x7C140800, // 001A CALL R5 4 + 0x8C140107, // 001B GETMET R5 R0 K7 + 0x7C140200, // 001C CALL R5 1 + 0x8C140108, // 001D GETMET R5 R0 K8 + 0x581C0009, // 001E LDCONST R7 K9 + 0x7C140400, // 001F CALL R5 2 + 0x8C18010A, // 0020 GETMET R6 R0 K10 + 0x7C180200, // 0021 CALL R6 1 + 0x8C1C010B, // 0022 GETMET R7 R0 K11 + 0x60240018, // 0023 GETGBL R9 G24 + 0x5828000C, // 0024 LDCONST R10 K12 + 0x5C2C0200, // 0025 MOVE R11 R1 + 0x5C300800, // 0026 MOVE R12 R4 + 0x5C340A00, // 0027 MOVE R13 R5 + 0x5C380C00, // 0028 MOVE R14 R6 + 0x7C240A00, // 0029 CALL R9 5 + 0x7C1C0400, // 002A CALL R7 2 + 0x8C1C0102, // 002B GETMET R7 R0 K2 + 0x7C1C0200, // 002C CALL R7 1 + 0x741E000F, // 002D JMPT R7 #003E + 0x8C1C010D, // 002E GETMET R7 R0 K13 + 0x7C1C0200, // 002F CALL R7 1 + 0x4C200000, // 0030 LDNIL R8 + 0x20200E08, // 0031 NE R8 R7 R8 + 0x78220008, // 0032 JMPF R8 #003C + 0x88200F0E, // 0033 GETMBR R8 R7 K14 + 0xB8261E00, // 0034 GETNGBL R9 K15 + 0x88241310, // 0035 GETMBR R9 R9 K16 + 0x88241311, // 0036 GETMBR R9 R9 K17 + 0x1C201009, // 0037 EQ R8 R8 R9 + 0x78220002, // 0038 JMPF R8 #003C + 0x8C200112, // 0039 GETMET R8 R0 K18 + 0x7C200200, // 003A CALL R8 1 + 0x70020000, // 003B JMP #003D + 0x70020000, // 003C JMP #003E + 0x7001FFEC, // 003D JMP #002B + 0x8C1C010D, // 003E GETMET R7 R0 K13 + 0x7C1C0200, // 003F CALL R7 1 + 0x4C200000, // 0040 LDNIL R8 + 0x201C0E08, // 0041 NE R7 R7 R8 + 0x781E000C, // 0042 JMPF R7 #0050 + 0x8C1C010D, // 0043 GETMET R7 R0 K13 + 0x7C1C0200, // 0044 CALL R7 1 + 0x881C0F0E, // 0045 GETMBR R7 R7 K14 + 0xB8221E00, // 0046 GETNGBL R8 K15 + 0x88201110, // 0047 GETMBR R8 R8 K16 + 0x88201113, // 0048 GETMBR R8 R8 K19 + 0x1C1C0E08, // 0049 EQ R7 R7 R8 + 0x781E0004, // 004A JMPF R7 #0050 + 0x8C1C0112, // 004B GETMET R7 R0 K18 + 0x7C1C0200, // 004C CALL R7 1 + 0x8C1C0104, // 004D GETMET R7 R0 K4 + 0x7C1C0200, // 004E CALL R7 1 + 0x70020018, // 004F JMP #0069 + 0x8C1C010D, // 0050 GETMET R7 R0 K13 + 0x7C1C0200, // 0051 CALL R7 1 + 0x4C200000, // 0052 LDNIL R8 + 0x201C0E08, // 0053 NE R7 R7 R8 + 0x781E000C, // 0054 JMPF R7 #0062 + 0x8C1C010D, // 0055 GETMET R7 R0 K13 + 0x7C1C0200, // 0056 CALL R7 1 + 0x881C0F0E, // 0057 GETMBR R7 R7 K14 + 0xB8221E00, // 0058 GETNGBL R8 K15 + 0x88201110, // 0059 GETMBR R8 R8 K16 + 0x88201114, // 005A GETMBR R8 R8 K20 + 0x1C1C0E08, // 005B EQ R7 R7 R8 + 0x781E0004, // 005C JMPF R7 #0062 + 0x8C1C0112, // 005D GETMET R7 R0 K18 + 0x7C1C0200, // 005E CALL R7 1 + 0x8C1C0104, // 005F GETMET R7 R0 K4 + 0x7C1C0200, // 0060 CALL R7 1 + 0x70020006, // 0061 JMP #0069 + 0x8C1C0103, // 0062 GETMET R7 R0 K3 + 0x7C1C0200, // 0063 CALL R7 1 + 0x741E0003, // 0064 JMPT R7 #0069 + 0x8C1C0115, // 0065 GETMET R7 R0 K21 + 0x58240016, // 0066 LDCONST R9 K22 + 0x7C1C0400, // 0067 CALL R7 2 + 0x70020000, // 0068 JMP #006A + 0x7001FF9A, // 0069 JMP #0005 + 0x8C100117, // 006A GETMET R4 R0 K23 + 0x7C100200, // 006B CALL R4 1 + 0x80000000, // 006C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: expect_number +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_expect_number, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(NUMBER), + /* K5 */ be_nested_str_weak(value), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_nested_str_weak(error), + /* K8 */ be_nested_str_weak(Expected_X20number), + /* K9 */ be_nested_str_weak(0), + }), + be_str_weak(expect_number), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A000A, // 0004 JMPF R2 #0010 + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0004, // 000A JMPF R2 #0010 + 0x88080305, // 000B GETMBR R2 R1 K5 + 0x8C0C0106, // 000C GETMET R3 R0 K6 + 0x7C0C0200, // 000D CALL R3 1 + 0x80040400, // 000E RET 1 R2 + 0x70020003, // 000F JMP #0014 + 0x8C080107, // 0010 GETMET R2 R0 K7 + 0x58100008, // 0011 LDCONST R4 K8 + 0x7C080400, // 0012 CALL R2 2 + 0x80061200, // 0013 RET 1 K9 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: check_right_paren +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_check_right_paren, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(RIGHT_PAREN), + }), + be_str_weak(check_right_paren), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0005, // 0004 JMPF R2 #000B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x740A0000, // 000A JMPT R2 #000C + 0x50080001, // 000B LDBOOL R2 0 1 + 0x50080200, // 000C LDBOOL R2 1 0 + 0x80040400, // 000D RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: at_end +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_at_end, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(pos), + /* K1 */ be_nested_str_weak(tokens), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(EOF), + }), + be_str_weak(at_end), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x28040202, // 0004 GE R1 R1 R2 + 0x7406000D, // 0005 JMPT R1 #0014 + 0x8C040102, // 0006 GETMET R1 R0 K2 + 0x7C040200, // 0007 CALL R1 1 + 0x4C080000, // 0008 LDNIL R2 + 0x20040202, // 0009 NE R1 R1 R2 + 0x78060007, // 000A JMPF R1 #0013 + 0x8C040102, // 000B GETMET R1 R0 K2 + 0x7C040200, // 000C CALL R1 1 + 0x88040303, // 000D GETMBR R1 R1 K3 + 0xB80A0800, // 000E GETNGBL R2 K4 + 0x88080505, // 000F GETMBR R2 R2 K5 + 0x88080506, // 0010 GETMBR R2 R2 K6 + 0x1C040202, // 0011 EQ R1 R1 R2 + 0x74060000, // 0012 JMPT R1 #0014 + 0x50040001, // 0013 LDBOOL R1 0 1 + 0x50040200, // 0014 LDBOOL R1 1 0 + 0x80040200, // 0015 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_value +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_value, /* 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[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(process_additive_expression), + }), + be_str_weak(process_value), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x50140200, // 0002 LDBOOL R5 1 0 + 0x7C080600, // 0003 CALL R2 3 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: create_computation_closure_from_string +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_create_computation_closure_from_string, /* 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[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(transform_expression_for_closure), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(_X20_X20), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(replace), + /* K6 */ be_nested_str_weak(_X20), + /* K7 */ be_nested_str_weak(def_X20_X28self_X29_X20return_X20_X25s_X20end), + /* K8 */ be_nested_str_weak(animation_X2Ecreate_closure_value_X28engine_X2C_X20_X25s_X29), + }), + be_str_weak(create_computation_closure_from_string), + &be_const_str_solidified, + ( &(const binstruction[26]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0101, // 0001 GETMET R3 R0 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x8C100502, // 0004 GETMET R4 R2 K2 + 0x5C180600, // 0005 MOVE R6 R3 + 0x581C0003, // 0006 LDCONST R7 K3 + 0x7C100600, // 0007 CALL R4 3 + 0x28100904, // 0008 GE R4 R4 K4 + 0x78120006, // 0009 JMPF R4 #0011 + 0x8C100505, // 000A GETMET R4 R2 K5 + 0x5C180600, // 000B MOVE R6 R3 + 0x581C0003, // 000C LDCONST R7 K3 + 0x58200006, // 000D LDCONST R8 K6 + 0x7C100800, // 000E CALL R4 4 + 0x5C0C0800, // 000F MOVE R3 R4 + 0x7001FFF2, // 0010 JMP #0004 + 0x60100018, // 0011 GETGBL R4 G24 + 0x58140007, // 0012 LDCONST R5 K7 + 0x5C180600, // 0013 MOVE R6 R3 + 0x7C100400, // 0014 CALL R4 2 + 0x60140018, // 0015 GETGBL R5 G24 + 0x58180008, // 0016 LDCONST R6 K8 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x7C140400, // 0018 CALL R5 2 + 0x80040A00, // 0019 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_sequence +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_sequence, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[29]) { /* constants */ + /* K0 */ be_nested_str_weak(next), + /* K1 */ be_nested_str_weak(expect_identifier), + /* K2 */ be_nested_str_weak(validate_user_name), + /* K3 */ be_nested_str_weak(sequence), + /* K4 */ be_nested_str_weak(skip_statement), + /* K5 */ be_nested_str_weak(sequence_names), + /* K6 */ be_nested_str_weak(symbol_table), + /* K7 */ be_nested_str_weak(1), + /* K8 */ be_nested_str_weak(current), + /* K9 */ be_nested_str_weak(type), + /* K10 */ be_nested_str_weak(animation_dsl), + /* K11 */ be_nested_str_weak(Token), + /* K12 */ be_nested_str_weak(KEYWORD), + /* K13 */ be_nested_str_weak(value), + /* K14 */ be_nested_str_weak(repeat), + /* K15 */ be_nested_str_weak(forever), + /* K16 */ be_nested_str_weak(_X2D1), + /* K17 */ be_nested_str_weak(expect_number), + /* K18 */ be_nested_str_weak(expect_keyword), + /* K19 */ be_nested_str_weak(times), + /* K20 */ be_nested_str_weak(NUMBER), + /* K21 */ be_nested_str_weak(expect_left_brace), + /* K22 */ be_nested_str_weak(add), + /* K23 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20animation_X2ESequenceManager_X28engine_X2C_X20_X25s_X29), + /* K24 */ be_nested_str_weak(at_end), + /* K25 */ be_nested_str_weak(check_right_brace), + /* K26 */ be_nested_str_weak(process_sequence_statement), + /* K27 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20animation_X2ESequenceManager_X28engine_X29), + /* K28 */ be_nested_str_weak(expect_right_brace), + }), + be_str_weak(process_sequence), + &be_const_str_solidified, + ( &(const binstruction[129]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x7C040200, // 0003 CALL R1 1 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x5C100200, // 0005 MOVE R4 R1 + 0x58140003, // 0006 LDCONST R5 K3 + 0x7C080600, // 0007 CALL R2 3 + 0x740A0002, // 0008 JMPT R2 #000C + 0x8C080104, // 0009 GETMET R2 R0 K4 + 0x7C080200, // 000A CALL R2 1 + 0x80000400, // 000B RET 0 + 0x88080105, // 000C GETMBR R2 R0 K5 + 0x500C0200, // 000D LDBOOL R3 1 0 + 0x98080203, // 000E SETIDX R2 R1 R3 + 0x88080106, // 000F GETMBR R2 R0 K6 + 0x98080303, // 0010 SETIDX R2 R1 K3 + 0x50080000, // 0011 LDBOOL R2 0 0 + 0x580C0007, // 0012 LDCONST R3 K7 + 0x8C100108, // 0013 GETMET R4 R0 K8 + 0x7C100200, // 0014 CALL R4 1 + 0x4C140000, // 0015 LDNIL R5 + 0x20140805, // 0016 NE R5 R4 R5 + 0x7816002F, // 0017 JMPF R5 #0048 + 0x88140909, // 0018 GETMBR R5 R4 K9 + 0xB81A1400, // 0019 GETNGBL R6 K10 + 0x88180D0B, // 001A GETMBR R6 R6 K11 + 0x88180D0C, // 001B GETMBR R6 R6 K12 + 0x1C140A06, // 001C EQ R5 R5 R6 + 0x78160029, // 001D JMPF R5 #0048 + 0x8814090D, // 001E GETMBR R5 R4 K13 + 0x1C140B0E, // 001F EQ R5 R5 K14 + 0x7816001E, // 0020 JMPF R5 #0040 + 0x50080200, // 0021 LDBOOL R2 1 0 + 0x8C140100, // 0022 GETMET R5 R0 K0 + 0x7C140200, // 0023 CALL R5 1 + 0x8C140108, // 0024 GETMET R5 R0 K8 + 0x7C140200, // 0025 CALL R5 1 + 0x4C180000, // 0026 LDNIL R6 + 0x20180A06, // 0027 NE R6 R5 R6 + 0x781A000C, // 0028 JMPF R6 #0036 + 0x88180B09, // 0029 GETMBR R6 R5 K9 + 0xB81E1400, // 002A GETNGBL R7 K10 + 0x881C0F0B, // 002B GETMBR R7 R7 K11 + 0x881C0F0C, // 002C GETMBR R7 R7 K12 + 0x1C180C07, // 002D EQ R6 R6 R7 + 0x781A0006, // 002E JMPF R6 #0036 + 0x88180B0D, // 002F GETMBR R6 R5 K13 + 0x1C180D0F, // 0030 EQ R6 R6 K15 + 0x781A0003, // 0031 JMPF R6 #0036 + 0x8C180100, // 0032 GETMET R6 R0 K0 + 0x7C180200, // 0033 CALL R6 1 + 0x580C0010, // 0034 LDCONST R3 K16 + 0x70020008, // 0035 JMP #003F + 0x8C180111, // 0036 GETMET R6 R0 K17 + 0x7C180200, // 0037 CALL R6 1 + 0x8C1C0112, // 0038 GETMET R7 R0 K18 + 0x58240013, // 0039 LDCONST R9 K19 + 0x7C1C0400, // 003A CALL R7 2 + 0x601C0008, // 003B GETGBL R7 G8 + 0x5C200C00, // 003C MOVE R8 R6 + 0x7C1C0200, // 003D CALL R7 1 + 0x5C0C0E00, // 003E MOVE R3 R7 + 0x70020006, // 003F JMP #0047 + 0x8814090D, // 0040 GETMBR R5 R4 K13 + 0x1C140B0F, // 0041 EQ R5 R5 K15 + 0x78160003, // 0042 JMPF R5 #0047 + 0x50080200, // 0043 LDBOOL R2 1 0 + 0x8C140100, // 0044 GETMET R5 R0 K0 + 0x7C140200, // 0045 CALL R5 1 + 0x580C0010, // 0046 LDCONST R3 K16 + 0x70020012, // 0047 JMP #005B + 0x4C140000, // 0048 LDNIL R5 + 0x20140805, // 0049 NE R5 R4 R5 + 0x7816000F, // 004A JMPF R5 #005B + 0x88140909, // 004B GETMBR R5 R4 K9 + 0xB81A1400, // 004C GETNGBL R6 K10 + 0x88180D0B, // 004D GETMBR R6 R6 K11 + 0x88180D14, // 004E GETMBR R6 R6 K20 + 0x1C140A06, // 004F EQ R5 R5 R6 + 0x78160009, // 0050 JMPF R5 #005B + 0x50080200, // 0051 LDBOOL R2 1 0 + 0x8C140111, // 0052 GETMET R5 R0 K17 + 0x7C140200, // 0053 CALL R5 1 + 0x8C180112, // 0054 GETMET R6 R0 K18 + 0x58200013, // 0055 LDCONST R8 K19 + 0x7C180400, // 0056 CALL R6 2 + 0x60180008, // 0057 GETGBL R6 G8 + 0x5C1C0A00, // 0058 MOVE R7 R5 + 0x7C180200, // 0059 CALL R6 1 + 0x5C0C0C00, // 005A MOVE R3 R6 + 0x8C140115, // 005B GETMET R5 R0 K21 + 0x7C140200, // 005C CALL R5 1 + 0x780A0010, // 005D JMPF R2 #006F + 0x8C140116, // 005E GETMET R5 R0 K22 + 0x601C0018, // 005F GETGBL R7 G24 + 0x58200017, // 0060 LDCONST R8 K23 + 0x5C240200, // 0061 MOVE R9 R1 + 0x5C280600, // 0062 MOVE R10 R3 + 0x7C1C0600, // 0063 CALL R7 3 + 0x7C140400, // 0064 CALL R5 2 + 0x8C140118, // 0065 GETMET R5 R0 K24 + 0x7C140200, // 0066 CALL R5 1 + 0x74160005, // 0067 JMPT R5 #006E + 0x8C140119, // 0068 GETMET R5 R0 K25 + 0x7C140200, // 0069 CALL R5 1 + 0x74160002, // 006A JMPT R5 #006E + 0x8C14011A, // 006B GETMET R5 R0 K26 + 0x7C140200, // 006C CALL R5 1 + 0x7001FFF6, // 006D JMP #0065 + 0x7002000E, // 006E JMP #007E + 0x8C140116, // 006F GETMET R5 R0 K22 + 0x601C0018, // 0070 GETGBL R7 G24 + 0x5820001B, // 0071 LDCONST R8 K27 + 0x5C240200, // 0072 MOVE R9 R1 + 0x7C1C0400, // 0073 CALL R7 2 + 0x7C140400, // 0074 CALL R5 2 + 0x8C140118, // 0075 GETMET R5 R0 K24 + 0x7C140200, // 0076 CALL R5 1 + 0x74160005, // 0077 JMPT R5 #007E + 0x8C140119, // 0078 GETMET R5 R0 K25 + 0x7C140200, // 0079 CALL R5 1 + 0x74160002, // 007A JMPT R5 #007E + 0x8C14011A, // 007B GETMET R5 R0 K26 + 0x7C140200, // 007C CALL R5 1 + 0x7001FFF6, // 007D JMP #0075 + 0x8C14011C, // 007E GETMET R5 R0 K28 + 0x7C140200, // 007F CALL R5 1 + 0x80000000, // 0080 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: process_color ********************************************************************/ @@ -7053,9 +9590,146 @@ be_local_closure(class_SimpleDSLTranspiler_process_color, /* name */ /******************************************************************** -** Solidified function: process_expression +** Solidified function: expect_comma ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_expression, /* name */ +be_local_closure(class_SimpleDSLTranspiler_expect_comma, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(COMMA), + /* K5 */ be_nested_str_weak(next), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Expected_X20_X27_X2C_X27), + }), + be_str_weak(expect_comma), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0008, // 0004 JMPF R2 #000E + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0002, // 000A JMPF R2 #000E + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x7C080200, // 000C CALL R2 1 + 0x70020002, // 000D JMP #0011 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x58100007, // 000F LDCONST R4 K7 + 0x7C080400, // 0010 CALL R2 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_percentage_value +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_percentage_value, /* 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[11]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(PERCENTAGE), + /* K5 */ be_nested_str_weak(value), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(NUMBER), + /* K9 */ be_nested_str_weak(error), + /* K10 */ be_nested_str_weak(Expected_X20percentage_X20value), + }), + be_str_weak(process_percentage_value), + &be_const_str_solidified, + ( &(const binstruction[52]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x4C080000, // 0002 LDNIL R2 + 0x20080202, // 0003 NE R2 R1 R2 + 0x780A0015, // 0004 JMPF R2 #001B + 0x88080301, // 0005 GETMBR R2 R1 K1 + 0xB80E0400, // 0006 GETNGBL R3 K2 + 0x880C0703, // 0007 GETMBR R3 R3 K3 + 0x880C0704, // 0008 GETMBR R3 R3 K4 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A000F, // 000A JMPF R2 #001B + 0x88080305, // 000B GETMBR R2 R1 K5 + 0x8C0C0106, // 000C GETMET R3 R0 K6 + 0x7C0C0200, // 000D CALL R3 1 + 0x600C000A, // 000E GETGBL R3 G10 + 0x5411FFFD, // 000F LDINT R4 -2 + 0x40120E04, // 0010 CONNECT R4 K7 R4 + 0x94100404, // 0011 GETIDX R4 R2 R4 + 0x7C0C0200, // 0012 CALL R3 1 + 0x60100009, // 0013 GETGBL R4 G9 + 0x541600FE, // 0014 LDINT R5 255 + 0x08140605, // 0015 MUL R5 R3 R5 + 0x541A0063, // 0016 LDINT R6 100 + 0x0C140A06, // 0017 DIV R5 R5 R6 + 0x7C100200, // 0018 CALL R4 1 + 0x80040800, // 0019 RET 1 R4 + 0x70020017, // 001A JMP #0033 + 0x4C080000, // 001B LDNIL R2 + 0x20080202, // 001C NE R2 R1 R2 + 0x780A000F, // 001D JMPF R2 #002E + 0x88080301, // 001E GETMBR R2 R1 K1 + 0xB80E0400, // 001F GETNGBL R3 K2 + 0x880C0703, // 0020 GETMBR R3 R3 K3 + 0x880C0708, // 0021 GETMBR R3 R3 K8 + 0x1C080403, // 0022 EQ R2 R2 R3 + 0x780A0009, // 0023 JMPF R2 #002E + 0x88080305, // 0024 GETMBR R2 R1 K5 + 0x8C0C0106, // 0025 GETMET R3 R0 K6 + 0x7C0C0200, // 0026 CALL R3 1 + 0x600C0009, // 0027 GETGBL R3 G9 + 0x6010000A, // 0028 GETGBL R4 G10 + 0x5C140400, // 0029 MOVE R5 R2 + 0x7C100200, // 002A CALL R4 1 + 0x7C0C0200, // 002B CALL R3 1 + 0x80040600, // 002C RET 1 R3 + 0x70020004, // 002D JMP #0033 + 0x8C080109, // 002E GETMET R2 R0 K9 + 0x5810000A, // 002F LDCONST R4 K10 + 0x7C080400, // 0030 CALL R2 2 + 0x540A00FE, // 0031 LDINT R2 255 + 0x80040400, // 0032 RET 1 R2 + 0x80000000, // 0033 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _validate_color_provider_factory_exists +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler__validate_color_provider_factory_exists, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -7065,17 +9739,20 @@ be_local_closure(class_SimpleDSLTranspiler_process_expression, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(process_additive_expression), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_validate_factory_function), + /* K1 */ be_nested_str_weak(animation), + /* K2 */ be_nested_str_weak(color_provider), }), - be_str_weak(process_expression), + be_str_weak(_validate_color_provider_factory_exists), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ + ( &(const binstruction[ 6]) { /* code */ 0x8C080100, // 0000 GETMET R2 R0 K0 0x5C100200, // 0001 MOVE R4 R1 - 0x50140200, // 0002 LDBOOL R5 1 0 - 0x7C080600, // 0003 CALL R2 3 - 0x80040400, // 0004 RET 1 R2 + 0xB8160200, // 0002 GETNGBL R5 K1 + 0x88140B02, // 0003 GETMBR R5 R5 K2 + 0x7C080600, // 0004 CALL R2 3 + 0x80040400, // 0005 RET 1 R2 }) ) ); @@ -7083,11 +9760,116 @@ be_local_closure(class_SimpleDSLTranspiler_process_expression, /* name */ /******************************************************************** -** Solidified function: _validate_factory_function +** Solidified function: transform_operand_for_closure ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_factory_function, /* name */ +be_local_closure(class_SimpleDSLTranspiler_transform_operand_for_closure, /* name */ be_nested_proto( 11, /* 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(string), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(animation_X2Ecreate_closure_value), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(return_X20_X28), + /* K5 */ be_nested_str_weak(_X20_X20), + /* K6 */ be_nested_str_weak(replace), + /* K7 */ be_nested_str_weak(_X20), + /* K8 */ be_nested_str_weak(_), + /* K9 */ be_nested_str_weak(_X28), + /* K10 */ be_nested_str_weak(animation_X2E), + /* K11 */ be_nested_str_weak(self_X2Eresolve_X28_X25s_X29), + }), + be_str_weak(transform_operand_for_closure), + &be_const_str_solidified, + ( &(const binstruction[69]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x7C0C0600, // 0004 CALL R3 3 + 0x280C0703, // 0005 GE R3 R3 K3 + 0x780E001A, // 0006 JMPF R3 #0022 + 0x8C0C0501, // 0007 GETMET R3 R2 K1 + 0x5C140200, // 0008 MOVE R5 R1 + 0x58180004, // 0009 LDCONST R6 K4 + 0x7C0C0600, // 000A CALL R3 3 + 0x54120007, // 000B LDINT R4 8 + 0x000C0604, // 000C ADD R3 R3 R4 + 0x6010000C, // 000D GETGBL R4 G12 + 0x5C140200, // 000E MOVE R5 R1 + 0x7C100200, // 000F CALL R4 1 + 0x54160004, // 0010 LDINT R5 5 + 0x04100805, // 0011 SUB R4 R4 R5 + 0x40140604, // 0012 CONNECT R5 R3 R4 + 0x94140205, // 0013 GETIDX R5 R1 R5 + 0x8C180501, // 0014 GETMET R6 R2 K1 + 0x5C200A00, // 0015 MOVE R8 R5 + 0x58240005, // 0016 LDCONST R9 K5 + 0x7C180600, // 0017 CALL R6 3 + 0x28180D03, // 0018 GE R6 R6 K3 + 0x781A0006, // 0019 JMPF R6 #0021 + 0x8C180506, // 001A GETMET R6 R2 K6 + 0x5C200A00, // 001B MOVE R8 R5 + 0x58240005, // 001C LDCONST R9 K5 + 0x58280007, // 001D LDCONST R10 K7 + 0x7C180800, // 001E CALL R6 4 + 0x5C140C00, // 001F MOVE R5 R6 + 0x7001FFF2, // 0020 JMP #0014 + 0x80040A00, // 0021 RET 1 R5 + 0x8C0C0501, // 0022 GETMET R3 R2 K1 + 0x5C140200, // 0023 MOVE R5 R1 + 0x58180008, // 0024 LDCONST R6 K8 + 0x7C0C0600, // 0025 CALL R3 3 + 0x280C0703, // 0026 GE R3 R3 K3 + 0x8C100501, // 0027 GETMET R4 R2 K1 + 0x5C180200, // 0028 MOVE R6 R1 + 0x581C0007, // 0029 LDCONST R7 K7 + 0x7C100600, // 002A CALL R4 3 + 0x28100903, // 002B GE R4 R4 K3 + 0x8C140501, // 002C GETMET R5 R2 K1 + 0x5C1C0200, // 002D MOVE R7 R1 + 0x58200009, // 002E LDCONST R8 K9 + 0x7C140600, // 002F CALL R5 3 + 0x28140B03, // 0030 GE R5 R5 K3 + 0x8C180501, // 0031 GETMET R6 R2 K1 + 0x5C200200, // 0032 MOVE R8 R1 + 0x5824000A, // 0033 LDCONST R9 K10 + 0x7C180600, // 0034 CALL R6 3 + 0x28180D03, // 0035 GE R6 R6 K3 + 0x780E000B, // 0036 JMPF R3 #0043 + 0x5C1C0800, // 0037 MOVE R7 R4 + 0x741E0009, // 0038 JMPT R7 #0043 + 0x5C1C0A00, // 0039 MOVE R7 R5 + 0x741E0007, // 003A JMPT R7 #0043 + 0x5C1C0C00, // 003B MOVE R7 R6 + 0x741E0005, // 003C JMPT R7 #0043 + 0x601C0018, // 003D GETGBL R7 G24 + 0x5820000B, // 003E LDCONST R8 K11 + 0x5C240200, // 003F MOVE R9 R1 + 0x7C1C0400, // 0040 CALL R7 2 + 0x80040E00, // 0041 RET 1 R7 + 0x70020000, // 0042 JMP #0044 + 0x80040200, // 0043 RET 1 R1 + 0x80000000, // 0044 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: convert_to_vrgb +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_convert_to_vrgb, /* name */ + be_nested_proto( + 12, /* nstack */ 3, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -7095,77 +9877,171 @@ be_local_closure(class_SimpleDSLTranspiler__validate_factory_function, /* name 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(animation), - /* K3 */ be_nested_str_weak(function), - /* K4 */ be_nested_str_weak(class), - /* K5 */ be_nested_str_weak(animation_dsl), - /* K6 */ be_nested_str_weak(MockEngine), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(format), + /* K3 */ be_nested_str_weak(_X2502X), + /* K4 */ be_nested_str_weak(FFFFFF), + /* K5 */ be_nested_str_weak(startswith), + /* K6 */ be_nested_str_weak(0x), + /* K7 */ be_const_int(2), }), - be_str_weak(_validate_factory_function), + be_str_weak(convert_to_vrgb), &be_const_str_solidified, - ( &(const binstruction[59]) { /* code */ - 0xA8020032, // 0000 EXBLK 0 #0034 - 0xA40E0000, // 0001 IMPORT R3 K0 - 0x8C100701, // 0002 GETMET R4 R3 K1 - 0xB81A0400, // 0003 GETNGBL R6 K2 - 0x5C1C0200, // 0004 MOVE R7 R1 - 0x7C100600, // 0005 CALL R4 3 - 0x74120002, // 0006 JMPT R4 #000A - 0x50100000, // 0007 LDBOOL R4 0 0 - 0xA8040001, // 0008 EXBLK 1 1 - 0x80040800, // 0009 RET 1 R4 - 0xB8120400, // 000A GETNGBL R4 K2 - 0x88100801, // 000B GETMBR R4 R4 R1 - 0x60140004, // 000C GETGBL R5 G4 - 0x5C180800, // 000D MOVE R6 R4 - 0x7C140200, // 000E CALL R5 1 - 0x20180B03, // 000F NE R6 R5 K3 - 0x781A0004, // 0010 JMPF R6 #0016 - 0x20180B04, // 0011 NE R6 R5 K4 - 0x781A0002, // 0012 JMPF R6 #0016 - 0x50180000, // 0013 LDBOOL R6 0 0 - 0xA8040001, // 0014 EXBLK 1 1 - 0x80040C00, // 0015 RET 1 R6 - 0x4C180000, // 0016 LDNIL R6 - 0x1C180406, // 0017 EQ R6 R2 R6 - 0x781A0002, // 0018 JMPF R6 #001C - 0x50180200, // 0019 LDBOOL R6 1 0 - 0xA8040001, // 001A EXBLK 1 1 - 0x80040C00, // 001B RET 1 R6 - 0xB81A0A00, // 001C GETNGBL R6 K5 - 0x8C180D06, // 001D GETMET R6 R6 K6 - 0x7C180200, // 001E CALL R6 1 - 0xA802000A, // 001F EXBLK 0 #002B - 0x5C1C0800, // 0020 MOVE R7 R4 - 0x5C200C00, // 0021 MOVE R8 R6 - 0x7C1C0200, // 0022 CALL R7 1 - 0x6020000F, // 0023 GETGBL R8 G15 - 0x5C240E00, // 0024 MOVE R9 R7 - 0x5C280400, // 0025 MOVE R10 R2 - 0x7C200400, // 0026 CALL R8 2 - 0xA8040002, // 0027 EXBLK 1 2 - 0x80041000, // 0028 RET 1 R8 - 0xA8040001, // 0029 EXBLK 1 1 - 0x70020006, // 002A JMP #0032 - 0xAC1C0002, // 002B CATCH R7 0 2 - 0x70020003, // 002C JMP #0031 - 0x50240000, // 002D LDBOOL R9 0 0 - 0xA8040001, // 002E EXBLK 1 1 - 0x80041200, // 002F RET 1 R9 - 0x70020000, // 0030 JMP #0032 - 0xB0080000, // 0031 RAISE 2 R0 R0 - 0xA8040001, // 0032 EXBLK 1 1 - 0x70020005, // 0033 JMP #003A - 0xAC0C0002, // 0034 CATCH R3 0 2 - 0x70020002, // 0035 JMP #0039 - 0x50140000, // 0036 LDBOOL R5 0 0 - 0x80040A00, // 0037 RET 1 R5 - 0x70020000, // 0038 JMP #003A - 0xB0080000, // 0039 RAISE 2 R0 R0 - 0x80000000, // 003A RET 0 + ( &(const binstruction[54]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0x60100009, // 0001 GETGBL R4 G9 + 0x6014000A, // 0002 GETGBL R5 G10 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C140200, // 0004 CALL R5 1 + 0x7C100200, // 0005 CALL R4 1 + 0x14140901, // 0006 LT R5 R4 K1 + 0x78160001, // 0007 JMPF R5 #000A + 0x58100001, // 0008 LDCONST R4 K1 + 0x70020003, // 0009 JMP #000E + 0x541600FE, // 000A LDINT R5 255 + 0x24140805, // 000B GT R5 R4 R5 + 0x78160000, // 000C JMPF R5 #000E + 0x541200FE, // 000D LDINT R4 255 + 0x8C140702, // 000E GETMET R5 R3 K2 + 0x581C0003, // 000F LDCONST R7 K3 + 0x5C200800, // 0010 MOVE R8 R4 + 0x7C140600, // 0011 CALL R5 3 + 0x60180008, // 0012 GETGBL R6 G8 + 0x5C1C0400, // 0013 MOVE R7 R2 + 0x7C180200, // 0014 CALL R6 1 + 0x581C0004, // 0015 LDCONST R7 K4 + 0x8C200705, // 0016 GETMET R8 R3 K5 + 0x5C280C00, // 0017 MOVE R10 R6 + 0x582C0006, // 0018 LDCONST R11 K6 + 0x7C200600, // 0019 CALL R8 3 + 0x7822000A, // 001A JMPF R8 #0026 + 0x6020000C, // 001B GETGBL R8 G12 + 0x5C240C00, // 001C MOVE R9 R6 + 0x7C200200, // 001D CALL R8 1 + 0x54260009, // 001E LDINT R9 10 + 0x28201009, // 001F GE R8 R8 R9 + 0x78220004, // 0020 JMPF R8 #0026 + 0x54220003, // 0021 LDINT R8 4 + 0x54260008, // 0022 LDINT R9 9 + 0x40201009, // 0023 CONNECT R8 R8 R9 + 0x941C0C08, // 0024 GETIDX R7 R6 R8 + 0x7002000D, // 0025 JMP #0034 + 0x8C200705, // 0026 GETMET R8 R3 K5 + 0x5C280C00, // 0027 MOVE R10 R6 + 0x582C0006, // 0028 LDCONST R11 K6 + 0x7C200600, // 0029 CALL R8 3 + 0x78220008, // 002A JMPF R8 #0034 + 0x6020000C, // 002B GETGBL R8 G12 + 0x5C240C00, // 002C MOVE R9 R6 + 0x7C200200, // 002D CALL R8 1 + 0x54260007, // 002E LDINT R9 8 + 0x1C201009, // 002F EQ R8 R8 R9 + 0x78220002, // 0030 JMPF R8 #0034 + 0x54220006, // 0031 LDINT R8 7 + 0x40220E08, // 0032 CONNECT R8 K7 R8 + 0x941C0C08, // 0033 GETIDX R7 R6 R8 + 0x00200A07, // 0034 ADD R8 R5 R7 + 0x80041000, // 0035 RET 1 R8 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_computed_expression_string +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_is_computed_expression_string, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(_X20_X2B_X20), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(_X20_X2D_X20), + /* K5 */ be_nested_str_weak(_X20_X2A_X20), + /* K6 */ be_nested_str_weak(_X20_X2F_X20), + /* K7 */ be_nested_str_weak(_X28), + /* K8 */ be_const_int(1), + /* K9 */ be_nested_str_weak(is_identifier_char), + /* K10 */ be_nested_str_weak(_is_simple_function_call), + }), + be_str_weak(is_computed_expression_string), + &be_const_str_solidified, + ( &(const binstruction[63]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x7C0C0600, // 0004 CALL R3 3 + 0x280C0703, // 0005 GE R3 R3 K3 + 0x740E0012, // 0006 JMPT R3 #001A + 0x8C0C0501, // 0007 GETMET R3 R2 K1 + 0x5C140200, // 0008 MOVE R5 R1 + 0x58180004, // 0009 LDCONST R6 K4 + 0x7C0C0600, // 000A CALL R3 3 + 0x280C0703, // 000B GE R3 R3 K3 + 0x740E000C, // 000C JMPT R3 #001A + 0x8C0C0501, // 000D GETMET R3 R2 K1 + 0x5C140200, // 000E MOVE R5 R1 + 0x58180005, // 000F LDCONST R6 K5 + 0x7C0C0600, // 0010 CALL R3 3 + 0x280C0703, // 0011 GE R3 R3 K3 + 0x740E0006, // 0012 JMPT R3 #001A + 0x8C0C0501, // 0013 GETMET R3 R2 K1 + 0x5C140200, // 0014 MOVE R5 R1 + 0x58180006, // 0015 LDCONST R6 K6 + 0x7C0C0600, // 0016 CALL R3 3 + 0x280C0703, // 0017 GE R3 R3 K3 + 0x740E0000, // 0018 JMPT R3 #001A + 0x500C0001, // 0019 LDBOOL R3 0 1 + 0x500C0200, // 001A LDBOOL R3 1 0 + 0x50100000, // 001B LDBOOL R4 0 0 + 0x8C140501, // 001C GETMET R5 R2 K1 + 0x5C1C0200, // 001D MOVE R7 R1 + 0x58200007, // 001E LDCONST R8 K7 + 0x7C140600, // 001F CALL R5 3 + 0x24180B03, // 0020 GT R6 R5 K3 + 0x781A0017, // 0021 JMPF R6 #003A + 0x04180B08, // 0022 SUB R6 R5 K8 + 0x94180206, // 0023 GETIDX R6 R1 R6 + 0x8C1C0109, // 0024 GETMET R7 R0 K9 + 0x5C240C00, // 0025 MOVE R9 R6 + 0x7C1C0400, // 0026 CALL R7 2 + 0x781E0011, // 0027 JMPF R7 #003A + 0x041C0B08, // 0028 SUB R7 R5 K8 + 0x28200F03, // 0029 GE R8 R7 K3 + 0x78220005, // 002A JMPF R8 #0031 + 0x8C200109, // 002B GETMET R8 R0 K9 + 0x94280207, // 002C GETIDX R10 R1 R7 + 0x7C200400, // 002D CALL R8 2 + 0x78220001, // 002E JMPF R8 #0031 + 0x041C0F08, // 002F SUB R7 R7 K8 + 0x7001FFF7, // 0030 JMP #0029 + 0x001C0F08, // 0031 ADD R7 R7 K8 + 0x04200B08, // 0032 SUB R8 R5 K8 + 0x40200E08, // 0033 CONNECT R8 R7 R8 + 0x94200208, // 0034 GETIDX R8 R1 R8 + 0x8C24010A, // 0035 GETMET R9 R0 K10 + 0x5C2C1000, // 0036 MOVE R11 R8 + 0x7C240400, // 0037 CALL R9 2 + 0x74260000, // 0038 JMPT R9 #003A + 0x50100200, // 0039 LDBOOL R4 1 0 + 0x740E0001, // 003A JMPT R3 #003D + 0x74120000, // 003B JMPT R4 #003D + 0x50180001, // 003C LDBOOL R6 0 1 + 0x50180200, // 003D LDBOOL R6 1 0 + 0x80040C00, // 003E RET 1 R6 }) ) ); @@ -7248,11 +10124,11 @@ be_local_closure(class_SimpleDSLTranspiler_process_unary_expression_raw, /* na /******************************************************************** -** Solidified function: process_nested_function_call +** Solidified function: generate_default_strip_initialization ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_nested_function_call, /* name */ +be_local_closure(class_SimpleDSLTranspiler_generate_default_strip_initialization, /* name */ be_nested_proto( - 9, /* nstack */ + 4, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -7260,138 +10136,31 @@ be_local_closure(class_SimpleDSLTranspiler_process_nested_function_call, /* na 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[28]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(IDENTIFIER), - /* K6 */ be_nested_str_weak(KEYWORD), - /* K7 */ be_nested_str_weak(value), - /* K8 */ be_nested_str_weak(next), - /* K9 */ be_nested_str_weak(error), - /* K10 */ be_nested_str_weak(Expected_X20function_X20name), - /* K11 */ be_nested_str_weak(nil), - /* K12 */ be_nested_str_weak(is_math_method), - /* K13 */ be_nested_str_weak(process_function_arguments_for_expression), - /* K14 */ be_nested_str_weak(self_X2E_X25s_X28_X25s_X29), - /* K15 */ be_nested_str_weak(animation), - /* K16 */ be_nested_str_weak(is_user_function), - /* K17 */ be_nested_str_weak(self_X2Eengine_X2C_X20_X25s), - /* K18 */ be_nested_str_weak(self_X2Eengine), - /* K19 */ be_nested_str_weak(animation_X2Eget_user_function_X28_X27_X25s_X27_X29_X28_X25s_X29), - /* K20 */ be_nested_str_weak(_is_simple_function_call), - /* K21 */ be_nested_str_weak(process_function_arguments), - /* K22 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X2C_X20_X25s_X29), - /* K23 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X29), - /* K24 */ be_nested_str_weak(_validate_animation_factory_exists), - /* K25 */ be_nested_str_weak(Animation_X20factory_X20function_X20_X27_X25s_X27_X20does_X20not_X20exist_X2E_X20Check_X20the_X20function_X20name_X20and_X20ensure_X20it_X27s_X20available_X20in_X20the_X20animation_X20module_X2E), - /* K26 */ be_nested_str_weak(skip_function_arguments), - /* K27 */ be_nested_str_weak(_generate_anonymous_function_call), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(strip_initialized), + /* K1 */ be_nested_str_weak(add), + /* K2 */ be_nested_str_weak(_X23_X20Auto_X2Dgenerated_X20strip_X20initialization_X20_X28using_X20Tasmota_X20configuration_X29), + /* K3 */ be_nested_str_weak(var_X20engine_X20_X3D_X20animation_X2Einit_strip_X28_X29), + /* K4 */ be_nested_str_weak(), }), - be_str_weak(process_nested_function_call), + be_str_weak(generate_default_strip_initialization), &be_const_str_solidified, - ( &(const binstruction[99]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x58080001, // 0002 LDCONST R2 K1 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0203, // 0004 NE R3 R1 R3 - 0x780E000F, // 0005 JMPF R3 #0016 - 0x880C0302, // 0006 GETMBR R3 R1 K2 - 0xB8120600, // 0007 GETNGBL R4 K3 - 0x88100904, // 0008 GETMBR R4 R4 K4 - 0x88100905, // 0009 GETMBR R4 R4 K5 - 0x1C0C0604, // 000A EQ R3 R3 R4 - 0x740E0005, // 000B JMPT R3 #0012 - 0x880C0302, // 000C GETMBR R3 R1 K2 - 0xB8120600, // 000D GETNGBL R4 K3 - 0x88100904, // 000E GETMBR R4 R4 K4 - 0x88100906, // 000F GETMBR R4 R4 K6 - 0x1C0C0604, // 0010 EQ R3 R3 R4 - 0x780E0003, // 0011 JMPF R3 #0016 - 0x88080307, // 0012 GETMBR R2 R1 K7 - 0x8C0C0108, // 0013 GETMET R3 R0 K8 - 0x7C0C0200, // 0014 CALL R3 1 - 0x70020003, // 0015 JMP #001A - 0x8C0C0109, // 0016 GETMET R3 R0 K9 - 0x5814000A, // 0017 LDCONST R5 K10 - 0x7C0C0400, // 0018 CALL R3 2 - 0x80061600, // 0019 RET 1 K11 - 0x8C0C010C, // 001A GETMET R3 R0 K12 - 0x5C140400, // 001B MOVE R5 R2 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E0007, // 001D JMPF R3 #0026 - 0x8C0C010D, // 001E GETMET R3 R0 K13 - 0x7C0C0200, // 001F CALL R3 1 - 0x60100018, // 0020 GETGBL R4 G24 - 0x5814000E, // 0021 LDCONST R5 K14 - 0x5C180400, // 0022 MOVE R6 R2 - 0x5C1C0600, // 0023 MOVE R7 R3 - 0x7C100600, // 0024 CALL R4 3 - 0x80040800, // 0025 RET 1 R4 - 0xB80E1E00, // 0026 GETNGBL R3 K15 - 0x8C0C0710, // 0027 GETMET R3 R3 K16 - 0x5C140400, // 0028 MOVE R5 R2 - 0x7C0C0400, // 0029 CALL R3 2 - 0x780E0010, // 002A JMPF R3 #003C - 0x8C0C010D, // 002B GETMET R3 R0 K13 - 0x7C0C0200, // 002C CALL R3 1 - 0x20100701, // 002D NE R4 R3 K1 - 0x78120004, // 002E JMPF R4 #0034 - 0x60100018, // 002F GETGBL R4 G24 - 0x58140011, // 0030 LDCONST R5 K17 - 0x5C180600, // 0031 MOVE R6 R3 - 0x7C100400, // 0032 CALL R4 2 - 0x70020000, // 0033 JMP #0035 - 0x58100012, // 0034 LDCONST R4 K18 - 0x60140018, // 0035 GETGBL R5 G24 - 0x58180013, // 0036 LDCONST R6 K19 - 0x5C1C0400, // 0037 MOVE R7 R2 - 0x5C200800, // 0038 MOVE R8 R4 - 0x7C140600, // 0039 CALL R5 3 - 0x80040A00, // 003A RET 1 R5 - 0x70020025, // 003B JMP #0062 - 0x8C0C0114, // 003C GETMET R3 R0 K20 - 0x5C140400, // 003D MOVE R5 R2 - 0x7C0C0400, // 003E CALL R3 2 - 0x780E0010, // 003F JMPF R3 #0051 - 0x8C0C0115, // 0040 GETMET R3 R0 K21 - 0x7C0C0200, // 0041 CALL R3 1 - 0x20100701, // 0042 NE R4 R3 K1 - 0x78120006, // 0043 JMPF R4 #004B - 0x60100018, // 0044 GETGBL R4 G24 - 0x58140016, // 0045 LDCONST R5 K22 - 0x5C180400, // 0046 MOVE R6 R2 - 0x5C1C0600, // 0047 MOVE R7 R3 - 0x7C100600, // 0048 CALL R4 3 - 0x80040800, // 0049 RET 1 R4 - 0x70020004, // 004A JMP #0050 - 0x60100018, // 004B GETGBL R4 G24 - 0x58140017, // 004C LDCONST R5 K23 - 0x5C180400, // 004D MOVE R6 R2 - 0x7C100400, // 004E CALL R4 2 - 0x80040800, // 004F RET 1 R4 - 0x70020010, // 0050 JMP #0062 - 0x8C0C0118, // 0051 GETMET R3 R0 K24 - 0x5C140400, // 0052 MOVE R5 R2 - 0x7C0C0400, // 0053 CALL R3 2 - 0x740E0008, // 0054 JMPT R3 #005E - 0x8C0C0109, // 0055 GETMET R3 R0 K9 - 0x60140018, // 0056 GETGBL R5 G24 - 0x58180019, // 0057 LDCONST R6 K25 - 0x5C1C0400, // 0058 MOVE R7 R2 - 0x7C140400, // 0059 CALL R5 2 - 0x7C0C0400, // 005A CALL R3 2 - 0x8C0C011A, // 005B GETMET R3 R0 K26 - 0x7C0C0200, // 005C CALL R3 1 - 0x80061600, // 005D RET 1 K11 - 0x8C0C011B, // 005E GETMET R3 R0 K27 - 0x5C140400, // 005F MOVE R5 R2 - 0x7C0C0400, // 0060 CALL R3 2 - 0x80040600, // 0061 RET 1 R3 - 0x80000000, // 0062 RET 0 + ( &(const binstruction[15]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060000, // 0001 JMPF R1 #0003 + 0x80000200, // 0002 RET 0 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x580C0002, // 0004 LDCONST R3 K2 + 0x7C040400, // 0005 CALL R1 2 + 0x8C040101, // 0006 GETMET R1 R0 K1 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x7C040400, // 0008 CALL R1 2 + 0x8C040101, // 0009 GETMET R1 R0 K1 + 0x580C0004, // 000A LDCONST R3 K4 + 0x7C040400, // 000B CALL R1 2 + 0x50040200, // 000C LDBOOL R1 1 0 + 0x90020001, // 000D SETMBR R0 K0 R1 + 0x80000000, // 000E RET 0 }) ) ); @@ -7399,11 +10168,252 @@ be_local_closure(class_SimpleDSLTranspiler_process_nested_function_call, /* na /******************************************************************** -** Solidified function: expect_left_paren +** Solidified function: expect_keyword ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_left_paren, /* name */ +be_local_closure(class_SimpleDSLTranspiler_expect_keyword, /* name */ be_nested_proto( - 5, /* nstack */ + 8, /* nstack */ + 2, /* 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(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(KEYWORD), + /* K5 */ be_nested_str_weak(value), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_nested_str_weak(error), + /* K8 */ be_nested_str_weak(Expected_X20_X27_X25s_X27), + }), + be_str_weak(expect_keyword), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x200C0403, // 0003 NE R3 R2 R3 + 0x780E000B, // 0004 JMPF R3 #0011 + 0x880C0501, // 0005 GETMBR R3 R2 K1 + 0xB8120400, // 0006 GETNGBL R4 K2 + 0x88100903, // 0007 GETMBR R4 R4 K3 + 0x88100904, // 0008 GETMBR R4 R4 K4 + 0x1C0C0604, // 0009 EQ R3 R3 R4 + 0x780E0005, // 000A JMPF R3 #0011 + 0x880C0505, // 000B GETMBR R3 R2 K5 + 0x1C0C0601, // 000C EQ R3 R3 R1 + 0x780E0002, // 000D JMPF R3 #0011 + 0x8C0C0106, // 000E GETMET R3 R0 K6 + 0x7C0C0200, // 000F CALL R3 1 + 0x70020005, // 0010 JMP #0017 + 0x8C0C0107, // 0011 GETMET R3 R0 K7 + 0x60140018, // 0012 GETGBL R5 G24 + 0x58180008, // 0013 LDCONST R6 K8 + 0x5C1C0200, // 0014 MOVE R7 R1 + 0x7C140400, // 0015 CALL R5 2 + 0x7C0C0400, // 0016 CALL R3 2 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: error +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_error, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(line), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(errors), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(Line_X20_X25s_X3A_X20_X25s), + }), + be_str_weak(error), + &be_const_str_solidified, + ( &(const binstruction[19]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x20080403, // 0003 NE R2 R2 R3 + 0x780A0003, // 0004 JMPF R2 #0009 + 0x8C080100, // 0005 GETMET R2 R0 K0 + 0x7C080200, // 0006 CALL R2 1 + 0x88080501, // 0007 GETMBR R2 R2 K1 + 0x70020000, // 0008 JMP #000A + 0x58080002, // 0009 LDCONST R2 K2 + 0x880C0103, // 000A GETMBR R3 R0 K3 + 0x8C0C0704, // 000B GETMET R3 R3 K4 + 0x60140018, // 000C GETGBL R5 G24 + 0x58180005, // 000D LDCONST R6 K5 + 0x5C1C0400, // 000E MOVE R7 R2 + 0x5C200200, // 000F MOVE R8 R1 + 0x7C140600, // 0010 CALL R5 3 + 0x7C0C0400, // 0011 CALL R3 2 + 0x80000000, // 0012 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_sequence_statement_generic +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_statement_generic, /* 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[21]) { /* constants */ + /* K0 */ be_nested_str_weak(current), + /* K1 */ be_nested_str_weak(type), + /* K2 */ be_nested_str_weak(animation_dsl), + /* K3 */ be_nested_str_weak(Token), + /* K4 */ be_nested_str_weak(EOF), + /* K5 */ be_nested_str_weak(COMMENT), + /* K6 */ be_nested_str_weak(add), + /* K7 */ be_nested_str_weak(_X20_X20), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(NEWLINE), + /* K11 */ be_nested_str_weak(KEYWORD), + /* K12 */ be_nested_str_weak(play), + /* K13 */ be_nested_str_weak(process_play_statement), + /* K14 */ be_nested_str_weak(wait), + /* K15 */ be_nested_str_weak(process_wait_statement), + /* K16 */ be_nested_str_weak(IDENTIFIER), + /* K17 */ be_nested_str_weak(peek), + /* K18 */ be_nested_str_weak(DOT), + /* K19 */ be_nested_str_weak(process_sequence_assignment_generic), + /* K20 */ be_nested_str_weak(skip_statement), + }), + be_str_weak(process_sequence_statement_generic), + &be_const_str_solidified, + ( &(const binstruction[90]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0403, // 0003 EQ R3 R2 R3 + 0x740E0005, // 0004 JMPT R3 #000B + 0x880C0501, // 0005 GETMBR R3 R2 K1 + 0xB8120400, // 0006 GETNGBL R4 K2 + 0x88100903, // 0007 GETMBR R4 R4 K3 + 0x88100904, // 0008 GETMBR R4 R4 K4 + 0x1C0C0604, // 0009 EQ R3 R3 R4 + 0x780E0000, // 000A JMPF R3 #000C + 0x80000600, // 000B RET 0 + 0x880C0501, // 000C GETMBR R3 R2 K1 + 0xB8120400, // 000D GETNGBL R4 K2 + 0x88100903, // 000E GETMBR R4 R4 K3 + 0x88100905, // 000F GETMBR R4 R4 K5 + 0x1C0C0604, // 0010 EQ R3 R3 R4 + 0x780E0006, // 0011 JMPF R3 #0019 + 0x8C0C0106, // 0012 GETMET R3 R0 K6 + 0x88140508, // 0013 GETMBR R5 R2 K8 + 0x00160E05, // 0014 ADD R5 K7 R5 + 0x7C0C0400, // 0015 CALL R3 2 + 0x8C0C0109, // 0016 GETMET R3 R0 K9 + 0x7C0C0200, // 0017 CALL R3 1 + 0x80000600, // 0018 RET 0 + 0x880C0501, // 0019 GETMBR R3 R2 K1 + 0xB8120400, // 001A GETNGBL R4 K2 + 0x88100903, // 001B GETMBR R4 R4 K3 + 0x8810090A, // 001C GETMBR R4 R4 K10 + 0x1C0C0604, // 001D EQ R3 R3 R4 + 0x780E0002, // 001E JMPF R3 #0022 + 0x8C0C0109, // 001F GETMET R3 R0 K9 + 0x7C0C0200, // 0020 CALL R3 1 + 0x80000600, // 0021 RET 0 + 0x880C0501, // 0022 GETMBR R3 R2 K1 + 0xB8120400, // 0023 GETNGBL R4 K2 + 0x88100903, // 0024 GETMBR R4 R4 K3 + 0x8810090B, // 0025 GETMBR R4 R4 K11 + 0x1C0C0604, // 0026 EQ R3 R3 R4 + 0x780E0006, // 0027 JMPF R3 #002F + 0x880C0508, // 0028 GETMBR R3 R2 K8 + 0x1C0C070C, // 0029 EQ R3 R3 K12 + 0x780E0003, // 002A JMPF R3 #002F + 0x8C0C010D, // 002B GETMET R3 R0 K13 + 0x5C140200, // 002C MOVE R5 R1 + 0x7C0C0400, // 002D CALL R3 2 + 0x70020029, // 002E JMP #0059 + 0x880C0501, // 002F GETMBR R3 R2 K1 + 0xB8120400, // 0030 GETNGBL R4 K2 + 0x88100903, // 0031 GETMBR R4 R4 K3 + 0x8810090B, // 0032 GETMBR R4 R4 K11 + 0x1C0C0604, // 0033 EQ R3 R3 R4 + 0x780E0006, // 0034 JMPF R3 #003C + 0x880C0508, // 0035 GETMBR R3 R2 K8 + 0x1C0C070E, // 0036 EQ R3 R3 K14 + 0x780E0003, // 0037 JMPF R3 #003C + 0x8C0C010F, // 0038 GETMET R3 R0 K15 + 0x5C140200, // 0039 MOVE R5 R1 + 0x7C0C0400, // 003A CALL R3 2 + 0x7002001C, // 003B JMP #0059 + 0x880C0501, // 003C GETMBR R3 R2 K1 + 0xB8120400, // 003D GETNGBL R4 K2 + 0x88100903, // 003E GETMBR R4 R4 K3 + 0x88100910, // 003F GETMBR R4 R4 K16 + 0x1C0C0604, // 0040 EQ R3 R3 R4 + 0x780E0014, // 0041 JMPF R3 #0057 + 0x8C0C0111, // 0042 GETMET R3 R0 K17 + 0x7C0C0200, // 0043 CALL R3 1 + 0x4C100000, // 0044 LDNIL R4 + 0x200C0604, // 0045 NE R3 R3 R4 + 0x780E000C, // 0046 JMPF R3 #0054 + 0x8C0C0111, // 0047 GETMET R3 R0 K17 + 0x7C0C0200, // 0048 CALL R3 1 + 0x880C0701, // 0049 GETMBR R3 R3 K1 + 0xB8120400, // 004A GETNGBL R4 K2 + 0x88100903, // 004B GETMBR R4 R4 K3 + 0x88100912, // 004C GETMBR R4 R4 K18 + 0x1C0C0604, // 004D EQ R3 R3 R4 + 0x780E0004, // 004E JMPF R3 #0054 + 0x8C0C0113, // 004F GETMET R3 R0 K19 + 0x58140007, // 0050 LDCONST R5 K7 + 0x5C180200, // 0051 MOVE R6 R1 + 0x7C0C0600, // 0052 CALL R3 3 + 0x70020001, // 0053 JMP #0056 + 0x8C0C0114, // 0054 GETMET R3 R0 K20 + 0x7C0C0200, // 0055 CALL R3 1 + 0x70020001, // 0056 JMP #0059 + 0x8C0C0114, // 0057 GETMET R3 R0 K20 + 0x7C0C0200, // 0058 CALL R3 1 + 0x80000000, // 0059 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: has_errors +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_has_errors, /* name */ + be_nested_proto( + 3, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -7411,37 +10421,158 @@ be_local_closure(class_SimpleDSLTranspiler_expect_left_paren, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(LEFT_PAREN), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X28_X27), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(errors), + /* K1 */ be_const_int(0), }), - be_str_weak(expect_left_paren), + be_str_weak(has_errors), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ + ( &(const binstruction[ 5]) { /* code */ + 0x6004000C, // 0000 GETGBL R1 G12 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x7C040200, // 0002 CALL R1 1 + 0x24040301, // 0003 GT R1 R1 K1 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_property_assignment +********************************************************************/ +be_local_closure(class_SimpleDSLTranspiler_process_property_assignment, /* name */ + be_nested_proto( + 15, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[26]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_identifier), + /* K1 */ be_nested_str_weak(current), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(DOT), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_nested_str_weak(symbol_table), + /* K8 */ be_nested_str_weak(contains), + /* K9 */ be_nested_str_weak(string), + /* K10 */ be_nested_str_weak(_validate_single_parameter), + /* K11 */ be_nested_str_weak(error), + /* K12 */ be_nested_str_weak(Sequences_X20like_X20_X27_X25s_X27_X20do_X20not_X20have_X20properties_X2E_X20Property_X20assignments_X20are_X20only_X20valid_X20for_X20animations_X20and_X20color_X20providers_X2E), + /* K13 */ be_nested_str_weak(expect_assign), + /* K14 */ be_nested_str_weak(process_value), + /* K15 */ be_nested_str_weak(property), + /* K16 */ be_nested_str_weak(collect_inline_comment), + /* K17 */ be_nested_str_weak(introspect), + /* K18 */ be_nested_str_weak(), + /* K19 */ be_nested_str_weak(animation), + /* K20 */ be_nested_str_weak(animation_X2E_X25s), + /* K21 */ be_nested_str_weak(_X25s_), + /* K22 */ be_nested_str_weak(add), + /* K23 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), + /* K24 */ be_nested_str_weak(Expected_X20property_X20assignment_X20for_X20_X27_X25s_X27_X20but_X20found_X20no_X20dot), + /* K25 */ be_nested_str_weak(skip_statement), + }), + be_str_weak(process_property_assignment), + &be_const_str_solidified, + ( &(const binstruction[90]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x4C0C0000, // 0004 LDNIL R3 + 0x20080403, // 0005 NE R2 R2 R3 + 0x780A0049, // 0006 JMPF R2 #0051 + 0x8C080101, // 0007 GETMET R2 R0 K1 + 0x7C080200, // 0008 CALL R2 1 + 0x88080502, // 0009 GETMBR R2 R2 K2 + 0xB80E0600, // 000A GETNGBL R3 K3 + 0x880C0704, // 000B GETMBR R3 R3 K4 + 0x880C0705, // 000C GETMBR R3 R3 K5 + 0x1C080403, // 000D EQ R2 R2 R3 + 0x780A0041, // 000E JMPF R2 #0051 + 0x8C080106, // 000F GETMET R2 R0 K6 + 0x7C080200, // 0010 CALL R2 1 + 0x8C080100, // 0011 GETMET R2 R0 K0 + 0x7C080200, // 0012 CALL R2 1 + 0x880C0107, // 0013 GETMBR R3 R0 K7 + 0x8C0C0708, // 0014 GETMET R3 R3 K8 + 0x5C140200, // 0015 MOVE R5 R1 + 0x7C0C0400, // 0016 CALL R3 2 + 0x780E0015, // 0017 JMPF R3 #002E + 0x880C0107, // 0018 GETMBR R3 R0 K7 + 0x940C0601, // 0019 GETIDX R3 R3 R1 + 0x60100004, // 001A GETGBL R4 G4 + 0x5C140600, // 001B MOVE R5 R3 + 0x7C100200, // 001C CALL R4 1 + 0x20100909, // 001D NE R4 R4 K9 + 0x78120008, // 001E JMPF R4 #0028 + 0x60100005, // 001F GETGBL R4 G5 + 0x5C140600, // 0020 MOVE R5 R3 + 0x7C100200, // 0021 CALL R4 1 + 0x8C14010A, // 0022 GETMET R5 R0 K10 + 0x5C1C0800, // 0023 MOVE R7 R4 + 0x5C200400, // 0024 MOVE R8 R2 + 0x5C240600, // 0025 MOVE R9 R3 + 0x7C140800, // 0026 CALL R5 4 + 0x70020005, // 0027 JMP #002E + 0x8C10010B, // 0028 GETMET R4 R0 K11 + 0x60180018, // 0029 GETGBL R6 G24 + 0x581C000C, // 002A LDCONST R7 K12 + 0x5C200200, // 002B MOVE R8 R1 + 0x7C180400, // 002C CALL R6 2 + 0x7C100400, // 002D CALL R4 2 + 0x8C0C010D, // 002E GETMET R3 R0 K13 + 0x7C0C0200, // 002F CALL R3 1 + 0x8C0C010E, // 0030 GETMET R3 R0 K14 + 0x5814000F, // 0031 LDCONST R5 K15 + 0x7C0C0400, // 0032 CALL R3 2 + 0x8C100110, // 0033 GETMET R4 R0 K16 + 0x7C100200, // 0034 CALL R4 1 + 0xA4162200, // 0035 IMPORT R5 K17 + 0x58180012, // 0036 LDCONST R6 K18 + 0x8C1C0B08, // 0037 GETMET R7 R5 K8 + 0xB8262600, // 0038 GETNGBL R9 K19 + 0x5C280200, // 0039 MOVE R10 R1 + 0x7C1C0600, // 003A CALL R7 3 + 0x781E0005, // 003B JMPF R7 #0042 + 0x601C0018, // 003C GETGBL R7 G24 + 0x58200014, // 003D LDCONST R8 K20 + 0x5C240200, // 003E MOVE R9 R1 + 0x7C1C0400, // 003F CALL R7 2 + 0x5C180E00, // 0040 MOVE R6 R7 + 0x70020004, // 0041 JMP #0047 + 0x601C0018, // 0042 GETGBL R7 G24 + 0x58200015, // 0043 LDCONST R8 K21 + 0x5C240200, // 0044 MOVE R9 R1 + 0x7C1C0400, // 0045 CALL R7 2 + 0x5C180E00, // 0046 MOVE R6 R7 + 0x8C1C0116, // 0047 GETMET R7 R0 K22 + 0x60240018, // 0048 GETGBL R9 G24 + 0x58280017, // 0049 LDCONST R10 K23 + 0x5C2C0C00, // 004A MOVE R11 R6 + 0x5C300400, // 004B MOVE R12 R2 + 0x5C340600, // 004C MOVE R13 R3 + 0x5C380800, // 004D MOVE R14 R4 + 0x7C240A00, // 004E CALL R9 5 + 0x7C1C0400, // 004F CALL R7 2 + 0x70020007, // 0050 JMP #0059 + 0x8C08010B, // 0051 GETMET R2 R0 K11 + 0x60100018, // 0052 GETGBL R4 G24 + 0x58140018, // 0053 LDCONST R5 K24 + 0x5C180200, // 0054 MOVE R6 R1 + 0x7C100400, // 0055 CALL R4 2 + 0x7C080400, // 0056 CALL R2 2 + 0x8C080119, // 0057 GETMET R2 R0 K25 + 0x7C080200, // 0058 CALL R2 1 + 0x80000000, // 0059 RET 0 }) ) ); @@ -7528,249 +10659,6 @@ be_local_closure(class_SimpleDSLTranspiler_process_event_parameters, /* name * /*******************************************************************/ -/******************************************************************** -** Solidified function: _process_named_arguments_for_animation -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__process_named_arguments_for_animation, /* name */ - be_nested_proto( - 15, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ - /* K0 */ be_nested_str_weak(expect_left_paren), - /* K1 */ be_nested_str_weak(_create_instance_for_validation), - /* K2 */ be_nested_str_weak(at_end), - /* K3 */ be_nested_str_weak(check_right_paren), - /* K4 */ be_nested_str_weak(skip_whitespace_including_newlines), - /* K5 */ be_nested_str_weak(expect_identifier), - /* K6 */ be_nested_str_weak(_validate_single_parameter), - /* K7 */ be_nested_str_weak(expect_assign), - /* K8 */ be_nested_str_weak(process_value), - /* K9 */ be_nested_str_weak(argument), - /* K10 */ be_nested_str_weak(collect_inline_comment), - /* K11 */ be_nested_str_weak(add), - /* K12 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), - /* K13 */ be_nested_str_weak(current), - /* K14 */ be_nested_str_weak(type), - /* K15 */ be_nested_str_weak(animation_dsl), - /* K16 */ be_nested_str_weak(Token), - /* K17 */ be_nested_str_weak(COMMENT), - /* K18 */ be_nested_str_weak(next), - /* K19 */ be_nested_str_weak(COMMA), - /* K20 */ be_nested_str_weak(NEWLINE), - /* K21 */ be_nested_str_weak(error), - /* K22 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), - /* K23 */ be_nested_str_weak(expect_right_paren), - }), - be_str_weak(_process_named_arguments_for_animation), - &be_const_str_solidified, - ( &(const binstruction[109]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x7C0C0200, // 0001 CALL R3 1 - 0x8C0C0101, // 0002 GETMET R3 R0 K1 - 0x5C140400, // 0003 MOVE R5 R2 - 0x7C0C0400, // 0004 CALL R3 2 - 0x8C100102, // 0005 GETMET R4 R0 K2 - 0x7C100200, // 0006 CALL R4 1 - 0x74120061, // 0007 JMPT R4 #006A - 0x8C100103, // 0008 GETMET R4 R0 K3 - 0x7C100200, // 0009 CALL R4 1 - 0x7412005E, // 000A JMPT R4 #006A - 0x8C100104, // 000B GETMET R4 R0 K4 - 0x7C100200, // 000C CALL R4 1 - 0x8C100103, // 000D GETMET R4 R0 K3 - 0x7C100200, // 000E CALL R4 1 - 0x78120000, // 000F JMPF R4 #0011 - 0x70020058, // 0010 JMP #006A - 0x8C100105, // 0011 GETMET R4 R0 K5 - 0x7C100200, // 0012 CALL R4 1 - 0x4C140000, // 0013 LDNIL R5 - 0x20140605, // 0014 NE R5 R3 R5 - 0x78160004, // 0015 JMPF R5 #001B - 0x8C140106, // 0016 GETMET R5 R0 K6 - 0x5C1C0400, // 0017 MOVE R7 R2 - 0x5C200800, // 0018 MOVE R8 R4 - 0x5C240600, // 0019 MOVE R9 R3 - 0x7C140800, // 001A CALL R5 4 - 0x8C140107, // 001B GETMET R5 R0 K7 - 0x7C140200, // 001C CALL R5 1 - 0x8C140108, // 001D GETMET R5 R0 K8 - 0x581C0009, // 001E LDCONST R7 K9 - 0x7C140400, // 001F CALL R5 2 - 0x8C18010A, // 0020 GETMET R6 R0 K10 - 0x7C180200, // 0021 CALL R6 1 - 0x8C1C010B, // 0022 GETMET R7 R0 K11 - 0x60240018, // 0023 GETGBL R9 G24 - 0x5828000C, // 0024 LDCONST R10 K12 - 0x5C2C0200, // 0025 MOVE R11 R1 - 0x5C300800, // 0026 MOVE R12 R4 - 0x5C340A00, // 0027 MOVE R13 R5 - 0x5C380C00, // 0028 MOVE R14 R6 - 0x7C240A00, // 0029 CALL R9 5 - 0x7C1C0400, // 002A CALL R7 2 - 0x8C1C0102, // 002B GETMET R7 R0 K2 - 0x7C1C0200, // 002C CALL R7 1 - 0x741E000F, // 002D JMPT R7 #003E - 0x8C1C010D, // 002E GETMET R7 R0 K13 - 0x7C1C0200, // 002F CALL R7 1 - 0x4C200000, // 0030 LDNIL R8 - 0x20200E08, // 0031 NE R8 R7 R8 - 0x78220008, // 0032 JMPF R8 #003C - 0x88200F0E, // 0033 GETMBR R8 R7 K14 - 0xB8261E00, // 0034 GETNGBL R9 K15 - 0x88241310, // 0035 GETMBR R9 R9 K16 - 0x88241311, // 0036 GETMBR R9 R9 K17 - 0x1C201009, // 0037 EQ R8 R8 R9 - 0x78220002, // 0038 JMPF R8 #003C - 0x8C200112, // 0039 GETMET R8 R0 K18 - 0x7C200200, // 003A CALL R8 1 - 0x70020000, // 003B JMP #003D - 0x70020000, // 003C JMP #003E - 0x7001FFEC, // 003D JMP #002B - 0x8C1C010D, // 003E GETMET R7 R0 K13 - 0x7C1C0200, // 003F CALL R7 1 - 0x4C200000, // 0040 LDNIL R8 - 0x201C0E08, // 0041 NE R7 R7 R8 - 0x781E000C, // 0042 JMPF R7 #0050 - 0x8C1C010D, // 0043 GETMET R7 R0 K13 - 0x7C1C0200, // 0044 CALL R7 1 - 0x881C0F0E, // 0045 GETMBR R7 R7 K14 - 0xB8221E00, // 0046 GETNGBL R8 K15 - 0x88201110, // 0047 GETMBR R8 R8 K16 - 0x88201113, // 0048 GETMBR R8 R8 K19 - 0x1C1C0E08, // 0049 EQ R7 R7 R8 - 0x781E0004, // 004A JMPF R7 #0050 - 0x8C1C0112, // 004B GETMET R7 R0 K18 - 0x7C1C0200, // 004C CALL R7 1 - 0x8C1C0104, // 004D GETMET R7 R0 K4 - 0x7C1C0200, // 004E CALL R7 1 - 0x70020018, // 004F JMP #0069 - 0x8C1C010D, // 0050 GETMET R7 R0 K13 - 0x7C1C0200, // 0051 CALL R7 1 - 0x4C200000, // 0052 LDNIL R8 - 0x201C0E08, // 0053 NE R7 R7 R8 - 0x781E000C, // 0054 JMPF R7 #0062 - 0x8C1C010D, // 0055 GETMET R7 R0 K13 - 0x7C1C0200, // 0056 CALL R7 1 - 0x881C0F0E, // 0057 GETMBR R7 R7 K14 - 0xB8221E00, // 0058 GETNGBL R8 K15 - 0x88201110, // 0059 GETMBR R8 R8 K16 - 0x88201114, // 005A GETMBR R8 R8 K20 - 0x1C1C0E08, // 005B EQ R7 R7 R8 - 0x781E0004, // 005C JMPF R7 #0062 - 0x8C1C0112, // 005D GETMET R7 R0 K18 - 0x7C1C0200, // 005E CALL R7 1 - 0x8C1C0104, // 005F GETMET R7 R0 K4 - 0x7C1C0200, // 0060 CALL R7 1 - 0x70020006, // 0061 JMP #0069 - 0x8C1C0103, // 0062 GETMET R7 R0 K3 - 0x7C1C0200, // 0063 CALL R7 1 - 0x741E0003, // 0064 JMPT R7 #0069 - 0x8C1C0115, // 0065 GETMET R7 R0 K21 - 0x58240016, // 0066 LDCONST R9 K22 - 0x7C1C0400, // 0067 CALL R7 2 - 0x70020000, // 0068 JMP #006A - 0x7001FF9A, // 0069 JMP #0005 - 0x8C100117, // 006A GETMET R4 R0 K23 - 0x7C100200, // 006B CALL R4 1 - 0x80000000, // 006C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_math_method -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_is_math_method, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* 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(introspect), - /* K1 */ be_nested_str_weak(animation), - /* K2 */ be_nested_str_weak(closure_value), - /* K3 */ be_nested_str_weak(members), - /* K4 */ be_nested_str_weak(get), - /* K5 */ be_nested_str_weak(ismethod), - /* K6 */ be_nested_str_weak(function), - /* K7 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(is_math_method), - &be_const_str_solidified, - ( &(const binstruction[54]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA802002C, // 0001 EXBLK 0 #002F - 0xB80E0200, // 0002 GETNGBL R3 K1 - 0x880C0702, // 0003 GETMBR R3 R3 K2 - 0x4C100000, // 0004 LDNIL R4 - 0x1C100604, // 0005 EQ R4 R3 R4 - 0x78120002, // 0006 JMPF R4 #000A - 0x50100000, // 0007 LDBOOL R4 0 0 - 0xA8040001, // 0008 EXBLK 1 1 - 0x80040800, // 0009 RET 1 R4 - 0x8C100503, // 000A GETMET R4 R2 K3 - 0x5C180600, // 000B MOVE R6 R3 - 0x7C100400, // 000C CALL R4 2 - 0x60140010, // 000D GETGBL R5 G16 - 0x5C180800, // 000E MOVE R6 R4 - 0x7C140200, // 000F CALL R5 1 - 0xA8020015, // 0010 EXBLK 0 #0027 - 0x5C180A00, // 0011 MOVE R6 R5 - 0x7C180000, // 0012 CALL R6 0 - 0x1C1C0C01, // 0013 EQ R7 R6 R1 - 0x781E0010, // 0014 JMPF R7 #0026 - 0x8C1C0504, // 0015 GETMET R7 R2 K4 - 0x5C240600, // 0016 MOVE R9 R3 - 0x5C280200, // 0017 MOVE R10 R1 - 0x7C1C0600, // 0018 CALL R7 3 - 0x8C200505, // 0019 GETMET R8 R2 K5 - 0x5C280E00, // 001A MOVE R10 R7 - 0x7C200400, // 001B CALL R8 2 - 0x74220005, // 001C JMPT R8 #0023 - 0x60200004, // 001D GETGBL R8 G4 - 0x5C240E00, // 001E MOVE R9 R7 - 0x7C200200, // 001F CALL R8 1 - 0x1C201106, // 0020 EQ R8 R8 K6 - 0x74220000, // 0021 JMPT R8 #0023 - 0x50200001, // 0022 LDBOOL R8 0 1 - 0x50200200, // 0023 LDBOOL R8 1 0 - 0xA8040002, // 0024 EXBLK 1 2 - 0x80041000, // 0025 RET 1 R8 - 0x7001FFE9, // 0026 JMP #0011 - 0x58140007, // 0027 LDCONST R5 K7 - 0xAC140200, // 0028 CATCH R5 1 0 - 0xB0080000, // 0029 RAISE 2 R0 R0 - 0x50140000, // 002A LDBOOL R5 0 0 - 0xA8040001, // 002B EXBLK 1 1 - 0x80040A00, // 002C RET 1 R5 - 0xA8040001, // 002D EXBLK 1 1 - 0x70020005, // 002E JMP #0035 - 0xAC0C0002, // 002F CATCH R3 0 2 - 0x70020002, // 0030 JMP #0034 - 0x50140000, // 0031 LDBOOL R5 0 0 - 0x80040A00, // 0032 RET 1 R5 - 0x70020000, // 0033 JMP #0035 - 0xB0080000, // 0034 RAISE 2 R0 R0 - 0x80000000, // 0035 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: process_primary_expression_raw ********************************************************************/ @@ -8086,404 +10974,11 @@ be_local_closure(class_SimpleDSLTranspiler_process_primary_expression_raw, /* /******************************************************************** -** Solidified function: _is_simple_function_call +** Solidified function: process_sequence_assignment_generic ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__is_simple_function_call, /* name */ +be_local_closure(class_SimpleDSLTranspiler_process_sequence_assignment_generic, /* 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[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(strip_length), - /* K1 */ be_nested_str_weak(static_value), - /* K2 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(_is_simple_function_call), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x400C0500, // 0002 CONNECT R3 R2 K0 - 0x400C0501, // 0003 CONNECT R3 R2 K1 - 0x600C0010, // 0004 GETGBL R3 G16 - 0x5C100400, // 0005 MOVE R4 R2 - 0x7C0C0200, // 0006 CALL R3 1 - 0xA8020007, // 0007 EXBLK 0 #0010 - 0x5C100600, // 0008 MOVE R4 R3 - 0x7C100000, // 0009 CALL R4 0 - 0x1C140204, // 000A EQ R5 R1 R4 - 0x78160002, // 000B JMPF R5 #000F - 0x50140200, // 000C LDBOOL R5 1 0 - 0xA8040001, // 000D EXBLK 1 1 - 0x80040A00, // 000E RET 1 R5 - 0x7001FFF7, // 000F JMP #0008 - 0x580C0002, // 0010 LDCONST R3 K2 - 0xAC0C0200, // 0011 CATCH R3 1 0 - 0xB0080000, // 0012 RAISE 2 R0 R0 - 0x500C0000, // 0013 LDBOOL R3 0 0 - 0x80040600, // 0014 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: current -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_current, /* 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[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(pos), - /* K1 */ be_nested_str_weak(tokens), - }), - be_str_weak(current), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x6008000C, // 0001 GETGBL R2 G12 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x14040202, // 0004 LT R1 R1 R2 - 0x78060003, // 0005 JMPF R1 #000A - 0x88040101, // 0006 GETMBR R1 R0 K1 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x94040202, // 0008 GETIDX R1 R1 R2 - 0x70020000, // 0009 JMP #000B - 0x4C040000, // 000A LDNIL R1 - 0x80040200, // 000B RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_sequence -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_sequence, /* 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[19]) { /* constants */ - /* K0 */ be_nested_str_weak(next), - /* K1 */ be_nested_str_weak(expect_identifier), - /* K2 */ be_nested_str_weak(validate_user_name), - /* K3 */ be_nested_str_weak(sequence), - /* K4 */ be_nested_str_weak(skip_statement), - /* K5 */ be_nested_str_weak(sequence_names), - /* K6 */ be_nested_str_weak(symbol_table), - /* K7 */ be_nested_str_weak(expect_left_brace), - /* K8 */ be_nested_str_weak(add), - /* K9 */ be_nested_str_weak(var_X20_X25s__X20_X3D_X20_X28def_X20_X28engine_X29), - /* K10 */ be_nested_str_weak(_X20_X20var_X20steps_X20_X3D_X20_X5B_X5D), - /* K11 */ be_nested_str_weak(at_end), - /* K12 */ be_nested_str_weak(check_right_brace), - /* K13 */ be_nested_str_weak(process_sequence_statement), - /* K14 */ be_nested_str_weak(_X20_X20var_X20seq_manager_X20_X3D_X20animation_X2ESequenceManager_X28engine_X29), - /* K15 */ be_nested_str_weak(_X20_X20seq_manager_X2Estart_sequence_X28steps_X29), - /* K16 */ be_nested_str_weak(_X20_X20return_X20seq_manager), - /* K17 */ be_nested_str_weak(end_X29_X28engine_X29), - /* K18 */ be_nested_str_weak(expect_right_brace), - }), - be_str_weak(process_sequence), - &be_const_str_solidified, - ( &(const binstruction[62]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C040101, // 0002 GETMET R1 R0 K1 - 0x7C040200, // 0003 CALL R1 1 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x5C100200, // 0005 MOVE R4 R1 - 0x58140003, // 0006 LDCONST R5 K3 - 0x7C080600, // 0007 CALL R2 3 - 0x740A0002, // 0008 JMPT R2 #000C - 0x8C080104, // 0009 GETMET R2 R0 K4 - 0x7C080200, // 000A CALL R2 1 - 0x80000400, // 000B RET 0 - 0x88080105, // 000C GETMBR R2 R0 K5 - 0x500C0200, // 000D LDBOOL R3 1 0 - 0x98080203, // 000E SETIDX R2 R1 R3 - 0x88080106, // 000F GETMBR R2 R0 K6 - 0x98080303, // 0010 SETIDX R2 R1 K3 - 0x8C080107, // 0011 GETMET R2 R0 K7 - 0x7C080200, // 0012 CALL R2 1 - 0x8C080108, // 0013 GETMET R2 R0 K8 - 0x60100018, // 0014 GETGBL R4 G24 - 0x58140009, // 0015 LDCONST R5 K9 - 0x5C180200, // 0016 MOVE R6 R1 - 0x7C100400, // 0017 CALL R4 2 - 0x7C080400, // 0018 CALL R2 2 - 0x8C080108, // 0019 GETMET R2 R0 K8 - 0x60100018, // 001A GETGBL R4 G24 - 0x5814000A, // 001B LDCONST R5 K10 - 0x7C100200, // 001C CALL R4 1 - 0x7C080400, // 001D CALL R2 2 - 0x8C08010B, // 001E GETMET R2 R0 K11 - 0x7C080200, // 001F CALL R2 1 - 0x740A0005, // 0020 JMPT R2 #0027 - 0x8C08010C, // 0021 GETMET R2 R0 K12 - 0x7C080200, // 0022 CALL R2 1 - 0x740A0002, // 0023 JMPT R2 #0027 - 0x8C08010D, // 0024 GETMET R2 R0 K13 - 0x7C080200, // 0025 CALL R2 1 - 0x7001FFF6, // 0026 JMP #001E - 0x8C080108, // 0027 GETMET R2 R0 K8 - 0x60100018, // 0028 GETGBL R4 G24 - 0x5814000E, // 0029 LDCONST R5 K14 - 0x7C100200, // 002A CALL R4 1 - 0x7C080400, // 002B CALL R2 2 - 0x8C080108, // 002C GETMET R2 R0 K8 - 0x60100018, // 002D GETGBL R4 G24 - 0x5814000F, // 002E LDCONST R5 K15 - 0x7C100200, // 002F CALL R4 1 - 0x7C080400, // 0030 CALL R2 2 - 0x8C080108, // 0031 GETMET R2 R0 K8 - 0x60100018, // 0032 GETGBL R4 G24 - 0x58140010, // 0033 LDCONST R5 K16 - 0x7C100200, // 0034 CALL R4 1 - 0x7C080400, // 0035 CALL R2 2 - 0x8C080108, // 0036 GETMET R2 R0 K8 - 0x60100018, // 0037 GETGBL R4 G24 - 0x58140011, // 0038 LDCONST R5 K17 - 0x7C100200, // 0039 CALL R4 1 - 0x7C080400, // 003A CALL R2 2 - 0x8C080112, // 003B GETMET R2 R0 K18 - 0x7C080200, // 003C CALL R2 1 - 0x80000000, // 003D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _generate_anonymous_function_call -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__generate_anonymous_function_call, /* name */ - be_nested_proto( - 14, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[33]) { /* constants */ - /* K0 */ be_nested_str_weak(push), - /* K1 */ be_nested_str_weak(_X28def_X20_X28engine_X29), - /* K2 */ be_nested_str_weak(_X20_X20var_X20provider_X20_X3D_X20animation_X2E_X25s_X28engine_X29), - /* K3 */ be_nested_str_weak(expect_left_paren), - /* K4 */ be_nested_str_weak(_create_instance_for_validation), - /* K5 */ be_nested_str_weak(at_end), - /* K6 */ be_nested_str_weak(check_right_paren), - /* K7 */ be_nested_str_weak(skip_whitespace_including_newlines), - /* K8 */ be_nested_str_weak(expect_identifier), - /* K9 */ be_nested_str_weak(_validate_single_parameter), - /* K10 */ be_nested_str_weak(expect_assign), - /* K11 */ be_nested_str_weak(process_value), - /* K12 */ be_nested_str_weak(argument), - /* K13 */ be_nested_str_weak(collect_inline_comment), - /* K14 */ be_nested_str_weak(_X20_X20provider_X2E_X25s_X20_X3D_X20_X25s_X25s), - /* K15 */ be_nested_str_weak(current), - /* K16 */ be_nested_str_weak(type), - /* K17 */ be_nested_str_weak(animation_dsl), - /* K18 */ be_nested_str_weak(Token), - /* K19 */ be_nested_str_weak(COMMENT), - /* K20 */ be_nested_str_weak(next), - /* K21 */ be_nested_str_weak(COMMA), - /* K22 */ be_nested_str_weak(NEWLINE), - /* K23 */ be_nested_str_weak(error), - /* K24 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), - /* K25 */ be_nested_str_weak(expect_right_paren), - /* K26 */ be_nested_str_weak(_X20_X20return_X20provider), - /* K27 */ be_nested_str_weak(end_X29_X28engine_X29), - /* K28 */ be_nested_str_weak(), - /* K29 */ be_const_int(0), - /* K30 */ be_const_int(1), - /* K31 */ be_nested_str_weak(_X0A), - /* K32 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(_generate_anonymous_function_call), - &be_const_str_solidified, - ( &(const binstruction[145]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x8C0C0500, // 0002 GETMET R3 R2 K0 - 0x58140001, // 0003 LDCONST R5 K1 - 0x7C0C0400, // 0004 CALL R3 2 - 0x8C0C0500, // 0005 GETMET R3 R2 K0 - 0x60140018, // 0006 GETGBL R5 G24 - 0x58180002, // 0007 LDCONST R6 K2 - 0x5C1C0200, // 0008 MOVE R7 R1 - 0x7C140400, // 0009 CALL R5 2 - 0x7C0C0400, // 000A CALL R3 2 - 0x8C0C0103, // 000B GETMET R3 R0 K3 - 0x7C0C0200, // 000C CALL R3 1 - 0x8C0C0104, // 000D GETMET R3 R0 K4 - 0x5C140200, // 000E MOVE R5 R1 - 0x7C0C0400, // 000F CALL R3 2 - 0x8C100105, // 0010 GETMET R4 R0 K5 - 0x7C100200, // 0011 CALL R4 1 - 0x74120060, // 0012 JMPT R4 #0074 - 0x8C100106, // 0013 GETMET R4 R0 K6 - 0x7C100200, // 0014 CALL R4 1 - 0x7412005D, // 0015 JMPT R4 #0074 - 0x8C100107, // 0016 GETMET R4 R0 K7 - 0x7C100200, // 0017 CALL R4 1 - 0x8C100106, // 0018 GETMET R4 R0 K6 - 0x7C100200, // 0019 CALL R4 1 - 0x78120000, // 001A JMPF R4 #001C - 0x70020057, // 001B JMP #0074 - 0x8C100108, // 001C GETMET R4 R0 K8 - 0x7C100200, // 001D CALL R4 1 - 0x4C140000, // 001E LDNIL R5 - 0x20140605, // 001F NE R5 R3 R5 - 0x78160004, // 0020 JMPF R5 #0026 - 0x8C140109, // 0021 GETMET R5 R0 K9 - 0x5C1C0200, // 0022 MOVE R7 R1 - 0x5C200800, // 0023 MOVE R8 R4 - 0x5C240600, // 0024 MOVE R9 R3 - 0x7C140800, // 0025 CALL R5 4 - 0x8C14010A, // 0026 GETMET R5 R0 K10 - 0x7C140200, // 0027 CALL R5 1 - 0x8C14010B, // 0028 GETMET R5 R0 K11 - 0x581C000C, // 0029 LDCONST R7 K12 - 0x7C140400, // 002A CALL R5 2 - 0x8C18010D, // 002B GETMET R6 R0 K13 - 0x7C180200, // 002C CALL R6 1 - 0x8C1C0500, // 002D GETMET R7 R2 K0 - 0x60240018, // 002E GETGBL R9 G24 - 0x5828000E, // 002F LDCONST R10 K14 - 0x5C2C0800, // 0030 MOVE R11 R4 - 0x5C300A00, // 0031 MOVE R12 R5 - 0x5C340C00, // 0032 MOVE R13 R6 - 0x7C240800, // 0033 CALL R9 4 - 0x7C1C0400, // 0034 CALL R7 2 - 0x8C1C0105, // 0035 GETMET R7 R0 K5 - 0x7C1C0200, // 0036 CALL R7 1 - 0x741E000F, // 0037 JMPT R7 #0048 - 0x8C1C010F, // 0038 GETMET R7 R0 K15 - 0x7C1C0200, // 0039 CALL R7 1 - 0x4C200000, // 003A LDNIL R8 - 0x20200E08, // 003B NE R8 R7 R8 - 0x78220008, // 003C JMPF R8 #0046 - 0x88200F10, // 003D GETMBR R8 R7 K16 - 0xB8262200, // 003E GETNGBL R9 K17 - 0x88241312, // 003F GETMBR R9 R9 K18 - 0x88241313, // 0040 GETMBR R9 R9 K19 - 0x1C201009, // 0041 EQ R8 R8 R9 - 0x78220002, // 0042 JMPF R8 #0046 - 0x8C200114, // 0043 GETMET R8 R0 K20 - 0x7C200200, // 0044 CALL R8 1 - 0x70020000, // 0045 JMP #0047 - 0x70020000, // 0046 JMP #0048 - 0x7001FFEC, // 0047 JMP #0035 - 0x8C1C010F, // 0048 GETMET R7 R0 K15 - 0x7C1C0200, // 0049 CALL R7 1 - 0x4C200000, // 004A LDNIL R8 - 0x201C0E08, // 004B NE R7 R7 R8 - 0x781E000C, // 004C JMPF R7 #005A - 0x8C1C010F, // 004D GETMET R7 R0 K15 - 0x7C1C0200, // 004E CALL R7 1 - 0x881C0F10, // 004F GETMBR R7 R7 K16 - 0xB8222200, // 0050 GETNGBL R8 K17 - 0x88201112, // 0051 GETMBR R8 R8 K18 - 0x88201115, // 0052 GETMBR R8 R8 K21 - 0x1C1C0E08, // 0053 EQ R7 R7 R8 - 0x781E0004, // 0054 JMPF R7 #005A - 0x8C1C0114, // 0055 GETMET R7 R0 K20 - 0x7C1C0200, // 0056 CALL R7 1 - 0x8C1C0107, // 0057 GETMET R7 R0 K7 - 0x7C1C0200, // 0058 CALL R7 1 - 0x70020018, // 0059 JMP #0073 - 0x8C1C010F, // 005A GETMET R7 R0 K15 - 0x7C1C0200, // 005B CALL R7 1 - 0x4C200000, // 005C LDNIL R8 - 0x201C0E08, // 005D NE R7 R7 R8 - 0x781E000C, // 005E JMPF R7 #006C - 0x8C1C010F, // 005F GETMET R7 R0 K15 - 0x7C1C0200, // 0060 CALL R7 1 - 0x881C0F10, // 0061 GETMBR R7 R7 K16 - 0xB8222200, // 0062 GETNGBL R8 K17 - 0x88201112, // 0063 GETMBR R8 R8 K18 - 0x88201116, // 0064 GETMBR R8 R8 K22 - 0x1C1C0E08, // 0065 EQ R7 R7 R8 - 0x781E0004, // 0066 JMPF R7 #006C - 0x8C1C0114, // 0067 GETMET R7 R0 K20 - 0x7C1C0200, // 0068 CALL R7 1 - 0x8C1C0107, // 0069 GETMET R7 R0 K7 - 0x7C1C0200, // 006A CALL R7 1 - 0x70020006, // 006B JMP #0073 - 0x8C1C0106, // 006C GETMET R7 R0 K6 - 0x7C1C0200, // 006D CALL R7 1 - 0x741E0003, // 006E JMPT R7 #0073 - 0x8C1C0117, // 006F GETMET R7 R0 K23 - 0x58240018, // 0070 LDCONST R9 K24 - 0x7C1C0400, // 0071 CALL R7 2 - 0x70020000, // 0072 JMP #0074 - 0x7001FF9B, // 0073 JMP #0010 - 0x8C100119, // 0074 GETMET R4 R0 K25 - 0x7C100200, // 0075 CALL R4 1 - 0x8C100500, // 0076 GETMET R4 R2 K0 - 0x5818001A, // 0077 LDCONST R6 K26 - 0x7C100400, // 0078 CALL R4 2 - 0x8C100500, // 0079 GETMET R4 R2 K0 - 0x5818001B, // 007A LDCONST R6 K27 - 0x7C100400, // 007B CALL R4 2 - 0x5810001C, // 007C LDCONST R4 K28 - 0x60140010, // 007D GETGBL R5 G16 - 0x6018000C, // 007E GETGBL R6 G12 - 0x5C1C0400, // 007F MOVE R7 R2 - 0x7C180200, // 0080 CALL R6 1 - 0x04180D1E, // 0081 SUB R6 R6 K30 - 0x401A3A06, // 0082 CONNECT R6 K29 R6 - 0x7C140200, // 0083 CALL R5 1 - 0xA8020007, // 0084 EXBLK 0 #008D - 0x5C180A00, // 0085 MOVE R6 R5 - 0x7C180000, // 0086 CALL R6 0 - 0x241C0D1D, // 0087 GT R7 R6 K29 - 0x781E0000, // 0088 JMPF R7 #008A - 0x0010091F, // 0089 ADD R4 R4 K31 - 0x941C0406, // 008A GETIDX R7 R2 R6 - 0x00100807, // 008B ADD R4 R4 R7 - 0x7001FFF7, // 008C JMP #0085 - 0x58140020, // 008D LDCONST R5 K32 - 0xAC140200, // 008E CATCH R5 1 0 - 0xB0080000, // 008F RAISE 2 R0 R0 - 0x80040800, // 0090 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_additive_expression -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_additive_expression, /* name */ - be_nested_proto( - 12, /* nstack */ + 18, /* nstack */ 3, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -8491,150 +10986,135 @@ be_local_closure(class_SimpleDSLTranspiler_process_additive_expression, /* nam 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(process_multiplicative_expression), - /* K1 */ be_nested_str_weak(at_end), - /* K2 */ be_nested_str_weak(current), - /* K3 */ be_nested_str_weak(type), - /* K4 */ be_nested_str_weak(animation_dsl), - /* K5 */ be_nested_str_weak(Token), - /* K6 */ be_nested_str_weak(PLUS), - /* K7 */ be_nested_str_weak(MINUS), - /* K8 */ be_nested_str_weak(value), - /* K9 */ be_nested_str_weak(next), - /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), - /* K11 */ be_nested_str_weak(is_computed_expression_string), - /* K12 */ be_nested_str_weak(is_anonymous_function), - /* K13 */ be_nested_str_weak(create_computation_closure_from_string), + ( &(const bvalue[27]) { /* constants */ + /* K0 */ be_nested_str_weak(expect_identifier), + /* K1 */ be_nested_str_weak(current), + /* K2 */ be_nested_str_weak(type), + /* K3 */ be_nested_str_weak(animation_dsl), + /* K4 */ be_nested_str_weak(Token), + /* K5 */ be_nested_str_weak(DOT), + /* K6 */ be_nested_str_weak(next), + /* K7 */ be_nested_str_weak(symbol_table), + /* K8 */ be_nested_str_weak(contains), + /* K9 */ be_nested_str_weak(string), + /* K10 */ be_nested_str_weak(_validate_single_parameter), + /* K11 */ be_nested_str_weak(error), + /* K12 */ be_nested_str_weak(Sequences_X20like_X20_X27_X25s_X27_X20do_X20not_X20have_X20properties_X2E_X20Property_X20assignments_X20are_X20only_X20valid_X20for_X20animations_X20and_X20color_X20providers_X2E), + /* K13 */ be_nested_str_weak(expect_assign), + /* K14 */ be_nested_str_weak(process_value), + /* K15 */ be_nested_str_weak(property), + /* K16 */ be_nested_str_weak(collect_inline_comment), + /* K17 */ be_nested_str_weak(introspect), + /* K18 */ be_nested_str_weak(), + /* K19 */ be_nested_str_weak(animation), + /* K20 */ be_nested_str_weak(animation_X2E_X25s), + /* K21 */ be_nested_str_weak(_X25s_), + /* K22 */ be_nested_str_weak(def_X20_X28engine_X29_X20_X25s_X2E_X25s_X20_X3D_X20_X25s_X20end), + /* K23 */ be_nested_str_weak(add), + /* K24 */ be_nested_str_weak(_X25s_X25s_X2Epush_X28animation_X2Ecreate_assign_step_X28_X25s_X29_X29_X25s), + /* K25 */ be_nested_str_weak(Expected_X20property_X20assignment_X20for_X20_X27_X25s_X27_X20but_X20found_X20no_X20dot), + /* K26 */ be_nested_str_weak(skip_statement), }), - be_str_weak(process_additive_expression), + be_str_weak(process_sequence_assignment_generic), &be_const_str_solidified, - ( &(const binstruction[57]) { /* code */ + ( &(const binstruction[97]) { /* code */ 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140200, // 0001 MOVE R5 R1 - 0x5C180400, // 0002 MOVE R6 R2 - 0x7C0C0600, // 0003 CALL R3 3 - 0x8C100101, // 0004 GETMET R4 R0 K1 - 0x7C100200, // 0005 CALL R4 1 - 0x74120021, // 0006 JMPT R4 #0029 - 0x8C100102, // 0007 GETMET R4 R0 K2 + 0x7C0C0200, // 0001 CALL R3 1 + 0x8C100101, // 0002 GETMET R4 R0 K1 + 0x7C100200, // 0003 CALL R4 1 + 0x4C140000, // 0004 LDNIL R5 + 0x20100805, // 0005 NE R4 R4 R5 + 0x78120050, // 0006 JMPF R4 #0058 + 0x8C100101, // 0007 GETMET R4 R0 K1 0x7C100200, // 0008 CALL R4 1 - 0x4C140000, // 0009 LDNIL R5 - 0x20140805, // 000A NE R5 R4 R5 - 0x7816001A, // 000B JMPF R5 #0027 - 0x88140903, // 000C GETMBR R5 R4 K3 - 0xB81A0800, // 000D GETNGBL R6 K4 - 0x88180D05, // 000E GETMBR R6 R6 K5 - 0x88180D06, // 000F GETMBR R6 R6 K6 - 0x1C140A06, // 0010 EQ R5 R5 R6 - 0x74160005, // 0011 JMPT R5 #0018 - 0x88140903, // 0012 GETMBR R5 R4 K3 - 0xB81A0800, // 0013 GETNGBL R6 K4 - 0x88180D05, // 0014 GETMBR R6 R6 K5 - 0x88180D07, // 0015 GETMBR R6 R6 K7 - 0x1C140A06, // 0016 EQ R5 R5 R6 - 0x7816000E, // 0017 JMPF R5 #0027 - 0x88140908, // 0018 GETMBR R5 R4 K8 - 0x8C180109, // 0019 GETMET R6 R0 K9 - 0x7C180200, // 001A CALL R6 1 - 0x8C180100, // 001B GETMET R6 R0 K0 - 0x5C200200, // 001C MOVE R8 R1 - 0x50240000, // 001D LDBOOL R9 0 0 - 0x7C180600, // 001E CALL R6 3 - 0x601C0018, // 001F GETGBL R7 G24 - 0x5820000A, // 0020 LDCONST R8 K10 - 0x5C240600, // 0021 MOVE R9 R3 - 0x5C280A00, // 0022 MOVE R10 R5 - 0x5C2C0C00, // 0023 MOVE R11 R6 - 0x7C1C0800, // 0024 CALL R7 4 - 0x5C0C0E00, // 0025 MOVE R3 R7 - 0x70020000, // 0026 JMP #0028 - 0x70020000, // 0027 JMP #0029 - 0x7001FFDA, // 0028 JMP #0004 - 0x780A000C, // 0029 JMPF R2 #0037 - 0x8C10010B, // 002A GETMET R4 R0 K11 - 0x5C180600, // 002B MOVE R6 R3 - 0x7C100400, // 002C CALL R4 2 - 0x78120008, // 002D JMPF R4 #0037 - 0x8C10010C, // 002E GETMET R4 R0 K12 - 0x5C180600, // 002F MOVE R6 R3 - 0x7C100400, // 0030 CALL R4 2 - 0x74120004, // 0031 JMPT R4 #0037 - 0x8C10010D, // 0032 GETMET R4 R0 K13 - 0x5C180600, // 0033 MOVE R6 R3 - 0x7C100400, // 0034 CALL R4 2 - 0x80040800, // 0035 RET 1 R4 - 0x70020000, // 0036 JMP #0038 - 0x80040600, // 0037 RET 1 R3 - 0x80000000, // 0038 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _validate_object_reference -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__validate_object_reference, /* 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[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(symbol_table), - /* K2 */ be_nested_str_weak(contains), - /* K3 */ be_nested_str_weak(animation), - /* K4 */ be_nested_str_weak(sequence_names), - /* K5 */ be_nested_str_weak(error), - /* K6 */ be_nested_str_weak(Undefined_X20reference_X20_X27_X25s_X27_X20in_X20_X25s_X2E_X20Make_X20sure_X20the_X20object_X20is_X20defined_X20before_X20use_X2E), - }), - be_str_weak(_validate_object_reference), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0xA802001E, // 0000 EXBLK 0 #0020 - 0xA40E0000, // 0001 IMPORT R3 K0 - 0x88100101, // 0002 GETMBR R4 R0 K1 - 0x8C100902, // 0003 GETMET R4 R4 K2 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C100400, // 0005 CALL R4 2 - 0x78120001, // 0006 JMPF R4 #0009 - 0xA8040001, // 0007 EXBLK 1 1 - 0x80000800, // 0008 RET 0 - 0x8C100702, // 0009 GETMET R4 R3 K2 - 0xB81A0600, // 000A GETNGBL R6 K3 - 0x5C1C0200, // 000B MOVE R7 R1 - 0x7C100600, // 000C CALL R4 3 - 0x78120001, // 000D JMPF R4 #0010 - 0xA8040001, // 000E EXBLK 1 1 - 0x80000800, // 000F RET 0 - 0x88100104, // 0010 GETMBR R4 R0 K4 - 0x8C100902, // 0011 GETMET R4 R4 K2 - 0x5C180200, // 0012 MOVE R6 R1 - 0x7C100400, // 0013 CALL R4 2 - 0x78120001, // 0014 JMPF R4 #0017 - 0xA8040001, // 0015 EXBLK 1 1 - 0x80000800, // 0016 RET 0 - 0x8C100105, // 0017 GETMET R4 R0 K5 - 0x60180018, // 0018 GETGBL R6 G24 - 0x581C0006, // 0019 LDCONST R7 K6 - 0x5C200200, // 001A MOVE R8 R1 - 0x5C240400, // 001B MOVE R9 R2 - 0x7C180600, // 001C CALL R6 3 - 0x7C100400, // 001D CALL R4 2 - 0xA8040001, // 001E EXBLK 1 1 - 0x70020003, // 001F JMP #0024 - 0xAC0C0002, // 0020 CATCH R3 0 2 - 0x70020000, // 0021 JMP #0023 - 0x70020000, // 0022 JMP #0024 - 0xB0080000, // 0023 RAISE 2 R0 R0 - 0x80000000, // 0024 RET 0 + 0x88100902, // 0009 GETMBR R4 R4 K2 + 0xB8160600, // 000A GETNGBL R5 K3 + 0x88140B04, // 000B GETMBR R5 R5 K4 + 0x88140B05, // 000C GETMBR R5 R5 K5 + 0x1C100805, // 000D EQ R4 R4 R5 + 0x78120048, // 000E JMPF R4 #0058 + 0x8C100106, // 000F GETMET R4 R0 K6 + 0x7C100200, // 0010 CALL R4 1 + 0x8C100100, // 0011 GETMET R4 R0 K0 + 0x7C100200, // 0012 CALL R4 1 + 0x88140107, // 0013 GETMBR R5 R0 K7 + 0x8C140B08, // 0014 GETMET R5 R5 K8 + 0x5C1C0600, // 0015 MOVE R7 R3 + 0x7C140400, // 0016 CALL R5 2 + 0x78160016, // 0017 JMPF R5 #002F + 0x88140107, // 0018 GETMBR R5 R0 K7 + 0x94140A03, // 0019 GETIDX R5 R5 R3 + 0x60180004, // 001A GETGBL R6 G4 + 0x5C1C0A00, // 001B MOVE R7 R5 + 0x7C180200, // 001C CALL R6 1 + 0x20180D09, // 001D NE R6 R6 K9 + 0x781A0008, // 001E JMPF R6 #0028 + 0x60180005, // 001F GETGBL R6 G5 + 0x5C1C0A00, // 0020 MOVE R7 R5 + 0x7C180200, // 0021 CALL R6 1 + 0x8C1C010A, // 0022 GETMET R7 R0 K10 + 0x5C240C00, // 0023 MOVE R9 R6 + 0x5C280800, // 0024 MOVE R10 R4 + 0x5C2C0A00, // 0025 MOVE R11 R5 + 0x7C1C0800, // 0026 CALL R7 4 + 0x70020006, // 0027 JMP #002F + 0x8C18010B, // 0028 GETMET R6 R0 K11 + 0x60200018, // 0029 GETGBL R8 G24 + 0x5824000C, // 002A LDCONST R9 K12 + 0x5C280600, // 002B MOVE R10 R3 + 0x7C200400, // 002C CALL R8 2 + 0x7C180400, // 002D CALL R6 2 + 0x80000C00, // 002E RET 0 + 0x8C14010D, // 002F GETMET R5 R0 K13 + 0x7C140200, // 0030 CALL R5 1 + 0x8C14010E, // 0031 GETMET R5 R0 K14 + 0x581C000F, // 0032 LDCONST R7 K15 + 0x7C140400, // 0033 CALL R5 2 + 0x8C180110, // 0034 GETMET R6 R0 K16 + 0x7C180200, // 0035 CALL R6 1 + 0xA41E2200, // 0036 IMPORT R7 K17 + 0x58200012, // 0037 LDCONST R8 K18 + 0x8C240F08, // 0038 GETMET R9 R7 K8 + 0xB82E2600, // 0039 GETNGBL R11 K19 + 0x5C300600, // 003A MOVE R12 R3 + 0x7C240600, // 003B CALL R9 3 + 0x78260005, // 003C JMPF R9 #0043 + 0x60240018, // 003D GETGBL R9 G24 + 0x58280014, // 003E LDCONST R10 K20 + 0x5C2C0600, // 003F MOVE R11 R3 + 0x7C240400, // 0040 CALL R9 2 + 0x5C201200, // 0041 MOVE R8 R9 + 0x70020004, // 0042 JMP #0048 + 0x60240018, // 0043 GETGBL R9 G24 + 0x58280015, // 0044 LDCONST R10 K21 + 0x5C2C0600, // 0045 MOVE R11 R3 + 0x7C240400, // 0046 CALL R9 2 + 0x5C201200, // 0047 MOVE R8 R9 + 0x60240018, // 0048 GETGBL R9 G24 + 0x58280016, // 0049 LDCONST R10 K22 + 0x5C2C1000, // 004A MOVE R11 R8 + 0x5C300800, // 004B MOVE R12 R4 + 0x5C340A00, // 004C MOVE R13 R5 + 0x7C240800, // 004D CALL R9 4 + 0x8C280117, // 004E GETMET R10 R0 K23 + 0x60300018, // 004F GETGBL R12 G24 + 0x58340018, // 0050 LDCONST R13 K24 + 0x5C380200, // 0051 MOVE R14 R1 + 0x5C3C0400, // 0052 MOVE R15 R2 + 0x5C401200, // 0053 MOVE R16 R9 + 0x5C440C00, // 0054 MOVE R17 R6 + 0x7C300A00, // 0055 CALL R12 5 + 0x7C280400, // 0056 CALL R10 2 + 0x70020007, // 0057 JMP #0060 + 0x8C10010B, // 0058 GETMET R4 R0 K11 + 0x60180018, // 0059 GETGBL R6 G24 + 0x581C0019, // 005A LDCONST R7 K25 + 0x5C200600, // 005B MOVE R8 R3 + 0x7C180400, // 005C CALL R6 2 + 0x7C100400, // 005D CALL R4 2 + 0x8C10011A, // 005E GETMET R4 R0 K26 + 0x7C100200, // 005F CALL R4 1 + 0x80000000, // 0060 RET 0 }) ) ); @@ -8792,632 +11272,6 @@ be_local_closure(class_SimpleDSLTranspiler_process_event_handler, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: join_output -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_join_output, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(), - /* K1 */ be_nested_str_weak(output), - /* K2 */ be_nested_str_weak(_X0A), - /* K3 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(join_output), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x60080010, // 0001 GETGBL R2 G16 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0xA8020004, // 0004 EXBLK 0 #000A - 0x5C0C0400, // 0005 MOVE R3 R2 - 0x7C0C0000, // 0006 CALL R3 0 - 0x00100702, // 0007 ADD R4 R3 K2 - 0x00040204, // 0008 ADD R1 R1 R4 - 0x7001FFFA, // 0009 JMP #0005 - 0x58080003, // 000A LDCONST R2 K3 - 0xAC080200, // 000B CATCH R2 1 0 - 0xB0080000, // 000C RAISE 2 R0 R0 - 0x80040200, // 000D RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: transform_operand_for_closure -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_transform_operand_for_closure, /* name */ - be_nested_proto( - 11, /* 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(string), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(animation_X2Ecreate_closure_value), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(return_X20_X28), - /* K5 */ be_nested_str_weak(_X20_X20), - /* K6 */ be_nested_str_weak(replace), - /* K7 */ be_nested_str_weak(_X20), - /* K8 */ be_nested_str_weak(_), - /* K9 */ be_nested_str_weak(_X28), - /* K10 */ be_nested_str_weak(animation_X2E), - /* K11 */ be_nested_str_weak(self_X2Eresolve_X28_X25s_X29), - }), - be_str_weak(transform_operand_for_closure), - &be_const_str_solidified, - ( &(const binstruction[69]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x7C0C0600, // 0004 CALL R3 3 - 0x280C0703, // 0005 GE R3 R3 K3 - 0x780E001A, // 0006 JMPF R3 #0022 - 0x8C0C0501, // 0007 GETMET R3 R2 K1 - 0x5C140200, // 0008 MOVE R5 R1 - 0x58180004, // 0009 LDCONST R6 K4 - 0x7C0C0600, // 000A CALL R3 3 - 0x54120007, // 000B LDINT R4 8 - 0x000C0604, // 000C ADD R3 R3 R4 - 0x6010000C, // 000D GETGBL R4 G12 - 0x5C140200, // 000E MOVE R5 R1 - 0x7C100200, // 000F CALL R4 1 - 0x54160004, // 0010 LDINT R5 5 - 0x04100805, // 0011 SUB R4 R4 R5 - 0x40140604, // 0012 CONNECT R5 R3 R4 - 0x94140205, // 0013 GETIDX R5 R1 R5 - 0x8C180501, // 0014 GETMET R6 R2 K1 - 0x5C200A00, // 0015 MOVE R8 R5 - 0x58240005, // 0016 LDCONST R9 K5 - 0x7C180600, // 0017 CALL R6 3 - 0x28180D03, // 0018 GE R6 R6 K3 - 0x781A0006, // 0019 JMPF R6 #0021 - 0x8C180506, // 001A GETMET R6 R2 K6 - 0x5C200A00, // 001B MOVE R8 R5 - 0x58240005, // 001C LDCONST R9 K5 - 0x58280007, // 001D LDCONST R10 K7 - 0x7C180800, // 001E CALL R6 4 - 0x5C140C00, // 001F MOVE R5 R6 - 0x7001FFF2, // 0020 JMP #0014 - 0x80040A00, // 0021 RET 1 R5 - 0x8C0C0501, // 0022 GETMET R3 R2 K1 - 0x5C140200, // 0023 MOVE R5 R1 - 0x58180008, // 0024 LDCONST R6 K8 - 0x7C0C0600, // 0025 CALL R3 3 - 0x280C0703, // 0026 GE R3 R3 K3 - 0x8C100501, // 0027 GETMET R4 R2 K1 - 0x5C180200, // 0028 MOVE R6 R1 - 0x581C0007, // 0029 LDCONST R7 K7 - 0x7C100600, // 002A CALL R4 3 - 0x28100903, // 002B GE R4 R4 K3 - 0x8C140501, // 002C GETMET R5 R2 K1 - 0x5C1C0200, // 002D MOVE R7 R1 - 0x58200009, // 002E LDCONST R8 K9 - 0x7C140600, // 002F CALL R5 3 - 0x28140B03, // 0030 GE R5 R5 K3 - 0x8C180501, // 0031 GETMET R6 R2 K1 - 0x5C200200, // 0032 MOVE R8 R1 - 0x5824000A, // 0033 LDCONST R9 K10 - 0x7C180600, // 0034 CALL R6 3 - 0x28180D03, // 0035 GE R6 R6 K3 - 0x780E000B, // 0036 JMPF R3 #0043 - 0x5C1C0800, // 0037 MOVE R7 R4 - 0x741E0009, // 0038 JMPT R7 #0043 - 0x5C1C0A00, // 0039 MOVE R7 R5 - 0x741E0007, // 003A JMPT R7 #0043 - 0x5C1C0C00, // 003B MOVE R7 R6 - 0x741E0005, // 003C JMPT R7 #0043 - 0x601C0018, // 003D GETGBL R7 G24 - 0x5820000B, // 003E LDCONST R8 K11 - 0x5C240200, // 003F MOVE R9 R1 - 0x7C1C0400, // 0040 CALL R7 2 - 0x80040E00, // 0041 RET 1 R7 - 0x70020000, // 0042 JMP #0044 - 0x80040200, // 0043 RET 1 R1 - 0x80000000, // 0044 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: skip_statement -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_skip_statement, /* 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(at_end), - /* K1 */ be_nested_str_weak(current), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(NEWLINE), - /* K6 */ be_nested_str_weak(EOF), - /* K7 */ be_nested_str_weak(next), - }), - be_str_weak(skip_statement), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x74060011, // 0002 JMPT R1 #0015 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x7C040200, // 0004 CALL R1 1 - 0x88080302, // 0005 GETMBR R2 R1 K2 - 0xB80E0600, // 0006 GETNGBL R3 K3 - 0x880C0704, // 0007 GETMBR R3 R3 K4 - 0x880C0705, // 0008 GETMBR R3 R3 K5 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x740A0005, // 000A JMPT R2 #0011 - 0x88080302, // 000B GETMBR R2 R1 K2 - 0xB80E0600, // 000C GETNGBL R3 K3 - 0x880C0704, // 000D GETMBR R3 R3 K4 - 0x880C0706, // 000E GETMBR R3 R3 K6 - 0x1C080403, // 000F EQ R2 R2 R3 - 0x780A0000, // 0010 JMPF R2 #0012 - 0x70020002, // 0011 JMP #0015 - 0x8C080107, // 0012 GETMET R2 R0 K7 - 0x7C080200, // 0013 CALL R2 1 - 0x7001FFEA, // 0014 JMP #0000 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: transpile -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_transpile, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(add), - /* K1 */ be_nested_str_weak(import_X20animation), - /* K2 */ be_nested_str_weak(), - /* K3 */ be_nested_str_weak(at_end), - /* K4 */ be_nested_str_weak(process_statement), - /* K5 */ be_nested_str_weak(generate_engine_start), - /* K6 */ be_nested_str_weak(errors), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(join_output), - /* K9 */ be_nested_str_weak(error), - /* K10 */ be_nested_str_weak(Transpilation_X20failed_X3A_X20_X25s), - }), - be_str_weak(transpile), - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0xA802001A, // 0000 EXBLK 0 #001C - 0x8C040100, // 0001 GETMET R1 R0 K0 - 0x580C0001, // 0002 LDCONST R3 K1 - 0x7C040400, // 0003 CALL R1 2 - 0x8C040100, // 0004 GETMET R1 R0 K0 - 0x580C0002, // 0005 LDCONST R3 K2 - 0x7C040400, // 0006 CALL R1 2 - 0x8C040103, // 0007 GETMET R1 R0 K3 - 0x7C040200, // 0008 CALL R1 1 - 0x74060002, // 0009 JMPT R1 #000D - 0x8C040104, // 000A GETMET R1 R0 K4 - 0x7C040200, // 000B CALL R1 1 - 0x7001FFF9, // 000C JMP #0007 - 0x8C040105, // 000D GETMET R1 R0 K5 - 0x7C040200, // 000E CALL R1 1 - 0x6004000C, // 000F GETGBL R1 G12 - 0x88080106, // 0010 GETMBR R2 R0 K6 - 0x7C040200, // 0011 CALL R1 1 - 0x1C040307, // 0012 EQ R1 R1 K7 - 0x78060002, // 0013 JMPF R1 #0017 - 0x8C040108, // 0014 GETMET R1 R0 K8 - 0x7C040200, // 0015 CALL R1 1 - 0x70020000, // 0016 JMP #0018 - 0x4C040000, // 0017 LDNIL R1 - 0xA8040001, // 0018 EXBLK 1 1 - 0x80040200, // 0019 RET 1 R1 - 0xA8040001, // 001A EXBLK 1 1 - 0x7002000B, // 001B JMP #0028 - 0xAC040002, // 001C CATCH R1 0 2 - 0x70020008, // 001D JMP #0027 - 0x8C0C0109, // 001E GETMET R3 R0 K9 - 0x60140018, // 001F GETGBL R5 G24 - 0x5818000A, // 0020 LDCONST R6 K10 - 0x5C1C0400, // 0021 MOVE R7 R2 - 0x7C140400, // 0022 CALL R5 2 - 0x7C0C0400, // 0023 CALL R3 2 - 0x4C0C0000, // 0024 LDNIL R3 - 0x80040600, // 0025 RET 1 R3 - 0x70020000, // 0026 JMP #0028 - 0xB0080000, // 0027 RAISE 2 R0 R0 - 0x80000000, // 0028 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_value -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_value, /* 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[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(process_expression), - }), - be_str_weak(process_value), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0x80040400, // 0003 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_property_assignment -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_property_assignment, /* name */ - be_nested_proto( - 15, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[26]) { /* constants */ - /* K0 */ be_nested_str_weak(expect_identifier), - /* K1 */ be_nested_str_weak(current), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(DOT), - /* K6 */ be_nested_str_weak(next), - /* K7 */ be_nested_str_weak(symbol_table), - /* K8 */ be_nested_str_weak(contains), - /* K9 */ be_nested_str_weak(string), - /* K10 */ be_nested_str_weak(_validate_single_parameter), - /* K11 */ be_nested_str_weak(error), - /* K12 */ be_nested_str_weak(Sequences_X20like_X20_X27_X25s_X27_X20do_X20not_X20have_X20properties_X2E_X20Property_X20assignments_X20are_X20only_X20valid_X20for_X20animations_X20and_X20color_X20providers_X2E), - /* K13 */ be_nested_str_weak(expect_assign), - /* K14 */ be_nested_str_weak(process_value), - /* K15 */ be_nested_str_weak(property), - /* K16 */ be_nested_str_weak(collect_inline_comment), - /* K17 */ be_nested_str_weak(introspect), - /* K18 */ be_nested_str_weak(), - /* K19 */ be_nested_str_weak(animation), - /* K20 */ be_nested_str_weak(animation_X2E_X25s), - /* K21 */ be_nested_str_weak(_X25s_), - /* K22 */ be_nested_str_weak(add), - /* K23 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), - /* K24 */ be_nested_str_weak(Expected_X20property_X20assignment_X20for_X20_X27_X25s_X27_X20but_X20found_X20no_X20dot), - /* K25 */ be_nested_str_weak(skip_statement), - }), - be_str_weak(process_property_assignment), - &be_const_str_solidified, - ( &(const binstruction[90]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C080101, // 0002 GETMET R2 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x4C0C0000, // 0004 LDNIL R3 - 0x20080403, // 0005 NE R2 R2 R3 - 0x780A0049, // 0006 JMPF R2 #0051 - 0x8C080101, // 0007 GETMET R2 R0 K1 - 0x7C080200, // 0008 CALL R2 1 - 0x88080502, // 0009 GETMBR R2 R2 K2 - 0xB80E0600, // 000A GETNGBL R3 K3 - 0x880C0704, // 000B GETMBR R3 R3 K4 - 0x880C0705, // 000C GETMBR R3 R3 K5 - 0x1C080403, // 000D EQ R2 R2 R3 - 0x780A0041, // 000E JMPF R2 #0051 - 0x8C080106, // 000F GETMET R2 R0 K6 - 0x7C080200, // 0010 CALL R2 1 - 0x8C080100, // 0011 GETMET R2 R0 K0 - 0x7C080200, // 0012 CALL R2 1 - 0x880C0107, // 0013 GETMBR R3 R0 K7 - 0x8C0C0708, // 0014 GETMET R3 R3 K8 - 0x5C140200, // 0015 MOVE R5 R1 - 0x7C0C0400, // 0016 CALL R3 2 - 0x780E0015, // 0017 JMPF R3 #002E - 0x880C0107, // 0018 GETMBR R3 R0 K7 - 0x940C0601, // 0019 GETIDX R3 R3 R1 - 0x60100004, // 001A GETGBL R4 G4 - 0x5C140600, // 001B MOVE R5 R3 - 0x7C100200, // 001C CALL R4 1 - 0x20100909, // 001D NE R4 R4 K9 - 0x78120008, // 001E JMPF R4 #0028 - 0x60100005, // 001F GETGBL R4 G5 - 0x5C140600, // 0020 MOVE R5 R3 - 0x7C100200, // 0021 CALL R4 1 - 0x8C14010A, // 0022 GETMET R5 R0 K10 - 0x5C1C0800, // 0023 MOVE R7 R4 - 0x5C200400, // 0024 MOVE R8 R2 - 0x5C240600, // 0025 MOVE R9 R3 - 0x7C140800, // 0026 CALL R5 4 - 0x70020005, // 0027 JMP #002E - 0x8C10010B, // 0028 GETMET R4 R0 K11 - 0x60180018, // 0029 GETGBL R6 G24 - 0x581C000C, // 002A LDCONST R7 K12 - 0x5C200200, // 002B MOVE R8 R1 - 0x7C180400, // 002C CALL R6 2 - 0x7C100400, // 002D CALL R4 2 - 0x8C0C010D, // 002E GETMET R3 R0 K13 - 0x7C0C0200, // 002F CALL R3 1 - 0x8C0C010E, // 0030 GETMET R3 R0 K14 - 0x5814000F, // 0031 LDCONST R5 K15 - 0x7C0C0400, // 0032 CALL R3 2 - 0x8C100110, // 0033 GETMET R4 R0 K16 - 0x7C100200, // 0034 CALL R4 1 - 0xA4162200, // 0035 IMPORT R5 K17 - 0x58180012, // 0036 LDCONST R6 K18 - 0x8C1C0B08, // 0037 GETMET R7 R5 K8 - 0xB8262600, // 0038 GETNGBL R9 K19 - 0x5C280200, // 0039 MOVE R10 R1 - 0x7C1C0600, // 003A CALL R7 3 - 0x781E0005, // 003B JMPF R7 #0042 - 0x601C0018, // 003C GETGBL R7 G24 - 0x58200014, // 003D LDCONST R8 K20 - 0x5C240200, // 003E MOVE R9 R1 - 0x7C1C0400, // 003F CALL R7 2 - 0x5C180E00, // 0040 MOVE R6 R7 - 0x70020004, // 0041 JMP #0047 - 0x601C0018, // 0042 GETGBL R7 G24 - 0x58200015, // 0043 LDCONST R8 K21 - 0x5C240200, // 0044 MOVE R9 R1 - 0x7C1C0400, // 0045 CALL R7 2 - 0x5C180E00, // 0046 MOVE R6 R7 - 0x8C1C0116, // 0047 GETMET R7 R0 K22 - 0x60240018, // 0048 GETGBL R9 G24 - 0x58280017, // 0049 LDCONST R10 K23 - 0x5C2C0C00, // 004A MOVE R11 R6 - 0x5C300400, // 004B MOVE R12 R2 - 0x5C340600, // 004C MOVE R13 R3 - 0x5C380800, // 004D MOVE R14 R4 - 0x7C240A00, // 004E CALL R9 5 - 0x7C1C0400, // 004F CALL R7 2 - 0x70020007, // 0050 JMP #0059 - 0x8C08010B, // 0051 GETMET R2 R0 K11 - 0x60100018, // 0052 GETGBL R4 G24 - 0x58140018, // 0053 LDCONST R5 K24 - 0x5C180200, // 0054 MOVE R6 R1 - 0x7C100400, // 0055 CALL R4 2 - 0x7C080400, // 0056 CALL R2 2 - 0x8C080119, // 0057 GETMET R2 R0 K25 - 0x7C080200, // 0058 CALL R2 1 - 0x80000000, // 0059 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: create_computation_closure_from_string -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_create_computation_closure_from_string, /* 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[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(transform_expression_for_closure), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(_X20_X20), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(replace), - /* K6 */ be_nested_str_weak(_X20), - /* K7 */ be_nested_str_weak(def_X20_X28self_X29_X20return_X20_X25s_X20end), - /* K8 */ be_nested_str_weak(animation_X2Ecreate_closure_value_X28engine_X2C_X20_X25s_X29), - }), - be_str_weak(create_computation_closure_from_string), - &be_const_str_solidified, - ( &(const binstruction[26]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0101, // 0001 GETMET R3 R0 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x8C100502, // 0004 GETMET R4 R2 K2 - 0x5C180600, // 0005 MOVE R6 R3 - 0x581C0003, // 0006 LDCONST R7 K3 - 0x7C100600, // 0007 CALL R4 3 - 0x28100904, // 0008 GE R4 R4 K4 - 0x78120006, // 0009 JMPF R4 #0011 - 0x8C100505, // 000A GETMET R4 R2 K5 - 0x5C180600, // 000B MOVE R6 R3 - 0x581C0003, // 000C LDCONST R7 K3 - 0x58200006, // 000D LDCONST R8 K6 - 0x7C100800, // 000E CALL R4 4 - 0x5C0C0800, // 000F MOVE R3 R4 - 0x7001FFF2, // 0010 JMP #0004 - 0x60100018, // 0011 GETGBL R4 G24 - 0x58140007, // 0012 LDCONST R5 K7 - 0x5C180600, // 0013 MOVE R6 R3 - 0x7C100400, // 0014 CALL R4 2 - 0x60140018, // 0015 GETGBL R5 G24 - 0x58180008, // 0016 LDCONST R6 K8 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x7C140400, // 0018 CALL R5 2 - 0x80040A00, // 0019 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_function_call -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_function_call, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(), - /* K2 */ be_nested_str_weak(type), - /* K3 */ be_nested_str_weak(animation_dsl), - /* K4 */ be_nested_str_weak(Token), - /* K5 */ be_nested_str_weak(IDENTIFIER), - /* K6 */ be_nested_str_weak(KEYWORD), - /* K7 */ be_nested_str_weak(value), - /* K8 */ be_nested_str_weak(next), - /* K9 */ be_nested_str_weak(error), - /* K10 */ be_nested_str_weak(Expected_X20function_X20name), - /* K11 */ be_nested_str_weak(nil), - /* K12 */ be_nested_str_weak(is_math_method), - /* K13 */ be_nested_str_weak(process_function_arguments), - /* K14 */ be_nested_str_weak(_X25s_X28_X25s_X29), - /* K15 */ be_nested_str_weak(animation), - /* K16 */ be_nested_str_weak(is_user_function), - /* K17 */ be_nested_str_weak(engine_X2C_X20_X25s), - /* K18 */ be_nested_str_weak(engine), - /* K19 */ be_nested_str_weak(animation_X2Eget_user_function_X28_X27_X25s_X27_X29_X28_X25s_X29), - /* K20 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X2C_X20_X25s_X29), - /* K21 */ be_nested_str_weak(animation_X2E_X25s_X28engine_X29), - }), - be_str_weak(process_function_call), - &be_const_str_solidified, - ( &(const binstruction[75]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x580C0001, // 0002 LDCONST R3 K1 - 0x4C100000, // 0003 LDNIL R4 - 0x20100404, // 0004 NE R4 R2 R4 - 0x7812000F, // 0005 JMPF R4 #0016 - 0x88100502, // 0006 GETMBR R4 R2 K2 - 0xB8160600, // 0007 GETNGBL R5 K3 - 0x88140B04, // 0008 GETMBR R5 R5 K4 - 0x88140B05, // 0009 GETMBR R5 R5 K5 - 0x1C100805, // 000A EQ R4 R4 R5 - 0x74120005, // 000B JMPT R4 #0012 - 0x88100502, // 000C GETMBR R4 R2 K2 - 0xB8160600, // 000D GETNGBL R5 K3 - 0x88140B04, // 000E GETMBR R5 R5 K4 - 0x88140B06, // 000F GETMBR R5 R5 K6 - 0x1C100805, // 0010 EQ R4 R4 R5 - 0x78120003, // 0011 JMPF R4 #0016 - 0x880C0507, // 0012 GETMBR R3 R2 K7 - 0x8C100108, // 0013 GETMET R4 R0 K8 - 0x7C100200, // 0014 CALL R4 1 - 0x70020003, // 0015 JMP #001A - 0x8C100109, // 0016 GETMET R4 R0 K9 - 0x5818000A, // 0017 LDCONST R6 K10 - 0x7C100400, // 0018 CALL R4 2 - 0x80061600, // 0019 RET 1 K11 - 0x8C10010C, // 001A GETMET R4 R0 K12 - 0x5C180600, // 001B MOVE R6 R3 - 0x7C100400, // 001C CALL R4 2 - 0x78120007, // 001D JMPF R4 #0026 - 0x8C10010D, // 001E GETMET R4 R0 K13 - 0x7C100200, // 001F CALL R4 1 - 0x60140018, // 0020 GETGBL R5 G24 - 0x5818000E, // 0021 LDCONST R6 K14 - 0x5C1C0600, // 0022 MOVE R7 R3 - 0x5C200800, // 0023 MOVE R8 R4 - 0x7C140600, // 0024 CALL R5 3 - 0x80040A00, // 0025 RET 1 R5 - 0x8C10010D, // 0026 GETMET R4 R0 K13 - 0x7C100200, // 0027 CALL R4 1 - 0xB8161E00, // 0028 GETNGBL R5 K15 - 0x8C140B10, // 0029 GETMET R5 R5 K16 - 0x5C1C0600, // 002A MOVE R7 R3 - 0x7C140400, // 002B CALL R5 2 - 0x7816000E, // 002C JMPF R5 #003C - 0x20140901, // 002D NE R5 R4 K1 - 0x78160004, // 002E JMPF R5 #0034 - 0x60140018, // 002F GETGBL R5 G24 - 0x58180011, // 0030 LDCONST R6 K17 - 0x5C1C0800, // 0031 MOVE R7 R4 - 0x7C140400, // 0032 CALL R5 2 - 0x70020000, // 0033 JMP #0035 - 0x58140012, // 0034 LDCONST R5 K18 - 0x60180018, // 0035 GETGBL R6 G24 - 0x581C0013, // 0036 LDCONST R7 K19 - 0x5C200600, // 0037 MOVE R8 R3 - 0x5C240A00, // 0038 MOVE R9 R5 - 0x7C180600, // 0039 CALL R6 3 - 0x80040C00, // 003A RET 1 R6 - 0x7002000D, // 003B JMP #004A - 0x20140901, // 003C NE R5 R4 K1 - 0x78160006, // 003D JMPF R5 #0045 - 0x60140018, // 003E GETGBL R5 G24 - 0x58180014, // 003F LDCONST R6 K20 - 0x5C1C0600, // 0040 MOVE R7 R3 - 0x5C200800, // 0041 MOVE R8 R4 - 0x7C140600, // 0042 CALL R5 3 - 0x80040A00, // 0043 RET 1 R5 - 0x70020004, // 0044 JMP #004A - 0x60140018, // 0045 GETGBL R5 G24 - 0x58180015, // 0046 LDCONST R6 K21 - 0x5C1C0600, // 0047 MOVE R7 R3 - 0x7C140400, // 0048 CALL R5 2 - 0x80040A00, // 0049 RET 1 R5 - 0x80000000, // 004A RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: is_identifier_char ********************************************************************/ @@ -9467,11 +11321,11 @@ be_local_closure(class_SimpleDSLTranspiler_is_identifier_char, /* name */ /******************************************************************** -** Solidified function: process_array_literal +** Solidified function: process_additive_expression_raw ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_array_literal, /* name */ +be_local_closure(class_SimpleDSLTranspiler_process_additive_expression_raw, /* name */ be_nested_proto( - 6, /* nstack */ + 10, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -9479,893 +11333,60 @@ be_local_closure(class_SimpleDSLTranspiler_process_array_literal, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[21]) { /* constants */ - /* K0 */ be_nested_str_weak(expect_left_bracket), + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(process_multiplicative_expression_raw), /* K1 */ be_nested_str_weak(at_end), - /* K2 */ be_nested_str_weak(check_right_bracket), - /* K3 */ be_nested_str_weak(process_value), - /* K4 */ be_nested_str_weak(array_element), - /* K5 */ be_nested_str_weak(push), - /* K6 */ be_nested_str_weak(current), - /* K7 */ be_nested_str_weak(type), - /* K8 */ be_nested_str_weak(animation_dsl), - /* K9 */ be_nested_str_weak(Token), - /* K10 */ be_nested_str_weak(COMMA), - /* K11 */ be_nested_str_weak(next), - /* K12 */ be_nested_str_weak(error), - /* K13 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X5D_X27_X20in_X20array_X20literal), - /* K14 */ be_nested_str_weak(expect_right_bracket), - /* K15 */ be_nested_str_weak(_X5B), - /* K16 */ be_const_int(0), - /* K17 */ be_const_int(1), - /* K18 */ be_nested_str_weak(_X2C_X20), - /* K19 */ be_nested_str_weak(stop_iteration), - /* K20 */ be_nested_str_weak(_X5D), + /* K2 */ be_nested_str_weak(current), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(animation_dsl), + /* K5 */ be_nested_str_weak(Token), + /* K6 */ be_nested_str_weak(PLUS), + /* K7 */ be_nested_str_weak(MINUS), + /* K8 */ be_nested_str_weak(value), + /* K9 */ be_nested_str_weak(next), + /* K10 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), }), - be_str_weak(process_array_literal), + be_str_weak(process_additive_expression_raw), &be_const_str_solidified, - ( &(const binstruction[64]) { /* code */ + ( &(const binstruction[38]) { /* code */ 0x8C040100, // 0000 GETMET R1 R0 K0 0x7C040200, // 0001 CALL R1 1 - 0x60040012, // 0002 GETGBL R1 G18 - 0x7C040000, // 0003 CALL R1 0 - 0x8C080101, // 0004 GETMET R2 R0 K1 - 0x7C080200, // 0005 CALL R2 1 - 0x740A0020, // 0006 JMPT R2 #0028 - 0x8C080102, // 0007 GETMET R2 R0 K2 - 0x7C080200, // 0008 CALL R2 1 - 0x740A001D, // 0009 JMPT R2 #0028 - 0x8C080103, // 000A GETMET R2 R0 K3 - 0x58100004, // 000B LDCONST R4 K4 - 0x7C080400, // 000C CALL R2 2 - 0x8C0C0305, // 000D GETMET R3 R1 K5 - 0x5C140400, // 000E MOVE R5 R2 - 0x7C0C0400, // 000F CALL R3 2 - 0x8C0C0106, // 0010 GETMET R3 R0 K6 - 0x7C0C0200, // 0011 CALL R3 1 - 0x4C100000, // 0012 LDNIL R4 - 0x200C0604, // 0013 NE R3 R3 R4 - 0x780E000A, // 0014 JMPF R3 #0020 - 0x8C0C0106, // 0015 GETMET R3 R0 K6 - 0x7C0C0200, // 0016 CALL R3 1 - 0x880C0707, // 0017 GETMBR R3 R3 K7 - 0xB8121000, // 0018 GETNGBL R4 K8 - 0x88100909, // 0019 GETMBR R4 R4 K9 - 0x8810090A, // 001A GETMBR R4 R4 K10 - 0x1C0C0604, // 001B EQ R3 R3 R4 - 0x780E0002, // 001C JMPF R3 #0020 - 0x8C0C010B, // 001D GETMET R3 R0 K11 - 0x7C0C0200, // 001E CALL R3 1 - 0x70020006, // 001F JMP #0027 - 0x8C0C0102, // 0020 GETMET R3 R0 K2 - 0x7C0C0200, // 0021 CALL R3 1 - 0x740E0003, // 0022 JMPT R3 #0027 - 0x8C0C010C, // 0023 GETMET R3 R0 K12 - 0x5814000D, // 0024 LDCONST R5 K13 - 0x7C0C0400, // 0025 CALL R3 2 - 0x70020000, // 0026 JMP #0028 - 0x7001FFDB, // 0027 JMP #0004 - 0x8C08010E, // 0028 GETMET R2 R0 K14 - 0x7C080200, // 0029 CALL R2 1 - 0x5808000F, // 002A LDCONST R2 K15 - 0x600C0010, // 002B GETGBL R3 G16 - 0x6010000C, // 002C GETGBL R4 G12 - 0x5C140200, // 002D MOVE R5 R1 - 0x7C100200, // 002E CALL R4 1 - 0x04100911, // 002F SUB R4 R4 K17 - 0x40122004, // 0030 CONNECT R4 K16 R4 - 0x7C0C0200, // 0031 CALL R3 1 - 0xA8020007, // 0032 EXBLK 0 #003B - 0x5C100600, // 0033 MOVE R4 R3 - 0x7C100000, // 0034 CALL R4 0 - 0x24140910, // 0035 GT R5 R4 K16 - 0x78160000, // 0036 JMPF R5 #0038 - 0x00080512, // 0037 ADD R2 R2 K18 - 0x94140204, // 0038 GETIDX R5 R1 R4 - 0x00080405, // 0039 ADD R2 R2 R5 - 0x7001FFF7, // 003A JMP #0033 - 0x580C0013, // 003B LDCONST R3 K19 - 0xAC0C0200, // 003C CATCH R3 1 0 - 0xB0080000, // 003D RAISE 2 R0 R0 - 0x00080514, // 003E ADD R2 R2 K20 - 0x80040400, // 003F RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: peek -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_peek, /* 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[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(pos), - /* K1 */ be_const_int(1), - /* K2 */ be_nested_str_weak(tokens), - }), - be_str_weak(peek), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x00040301, // 0001 ADD R1 R1 K1 - 0x6008000C, // 0002 GETGBL R2 G12 - 0x880C0102, // 0003 GETMBR R3 R0 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x14040202, // 0005 LT R1 R1 R2 - 0x78060004, // 0006 JMPF R1 #000C - 0x88040100, // 0007 GETMBR R1 R0 K0 - 0x00040301, // 0008 ADD R1 R1 K1 - 0x88080102, // 0009 GETMBR R2 R0 K2 - 0x94040401, // 000A GETIDX R1 R2 R1 - 0x70020000, // 000B JMP #000D - 0x4C040000, // 000C LDNIL R1 - 0x80040200, // 000D RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_left_bracket -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_left_bracket, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(LEFT_BRACKET), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X5B_X27), - }), - be_str_weak(expect_left_bracket), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_computed_expression -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_is_computed_expression, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* 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(string), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(_X28), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(animation_X2Eglobal), - /* K5 */ be_nested_str_weak(animation_X2E), - /* K6 */ be_nested_str_weak(_), - }), - be_str_weak(is_computed_expression), - &be_const_str_solidified, - ( &(const binstruction[52]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x8C140901, // 0001 GETMET R5 R4 K1 - 0x5C1C0200, // 0002 MOVE R7 R1 - 0x58200002, // 0003 LDCONST R8 K2 - 0x7C140600, // 0004 CALL R5 3 - 0x28140B03, // 0005 GE R5 R5 K3 - 0x7416002A, // 0006 JMPT R5 #0032 - 0x8C140901, // 0007 GETMET R5 R4 K1 - 0x5C1C0600, // 0008 MOVE R7 R3 - 0x58200002, // 0009 LDCONST R8 K2 - 0x7C140600, // 000A CALL R5 3 - 0x28140B03, // 000B GE R5 R5 K3 - 0x74160024, // 000C JMPT R5 #0032 - 0x8C140901, // 000D GETMET R5 R4 K1 - 0x5C1C0200, // 000E MOVE R7 R1 - 0x58200004, // 000F LDCONST R8 K4 - 0x7C140600, // 0010 CALL R5 3 - 0x28140B03, // 0011 GE R5 R5 K3 - 0x7416001E, // 0012 JMPT R5 #0032 - 0x8C140901, // 0013 GETMET R5 R4 K1 - 0x5C1C0600, // 0014 MOVE R7 R3 - 0x58200004, // 0015 LDCONST R8 K4 - 0x7C140600, // 0016 CALL R5 3 - 0x28140B03, // 0017 GE R5 R5 K3 - 0x74160018, // 0018 JMPT R5 #0032 - 0x8C140901, // 0019 GETMET R5 R4 K1 - 0x5C1C0200, // 001A MOVE R7 R1 - 0x58200005, // 001B LDCONST R8 K5 - 0x7C140600, // 001C CALL R5 3 - 0x28140B03, // 001D GE R5 R5 K3 - 0x74160012, // 001E JMPT R5 #0032 - 0x8C140901, // 001F GETMET R5 R4 K1 - 0x5C1C0600, // 0020 MOVE R7 R3 - 0x58200005, // 0021 LDCONST R8 K5 - 0x7C140600, // 0022 CALL R5 3 - 0x28140B03, // 0023 GE R5 R5 K3 - 0x7416000C, // 0024 JMPT R5 #0032 - 0x8C140901, // 0025 GETMET R5 R4 K1 - 0x5C1C0200, // 0026 MOVE R7 R1 - 0x58200006, // 0027 LDCONST R8 K6 - 0x7C140600, // 0028 CALL R5 3 - 0x28140B03, // 0029 GE R5 R5 K3 - 0x74160006, // 002A JMPT R5 #0032 - 0x8C140901, // 002B GETMET R5 R4 K1 - 0x5C1C0600, // 002C MOVE R7 R3 - 0x58200006, // 002D LDCONST R8 K6 - 0x7C140600, // 002E CALL R5 3 - 0x28140B03, // 002F GE R5 R5 K3 - 0x74160000, // 0030 JMPT R5 #0032 - 0x50140001, // 0031 LDBOOL R5 0 1 - 0x50140200, // 0032 LDBOOL R5 1 0 - 0x80040A00, // 0033 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_named_arguments_for_variable -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_process_named_arguments_for_variable, /* name */ - be_nested_proto( - 16, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[33]) { /* constants */ - /* K0 */ be_nested_str_weak(expect_left_paren), - /* K1 */ be_nested_str_weak(), - /* K2 */ be_nested_str_weak(string), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(temp_), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(split), - /* K7 */ be_nested_str_weak(_), - /* K8 */ be_const_int(2), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(_create_instance_for_validation), - /* K11 */ be_nested_str_weak(at_end), - /* K12 */ be_nested_str_weak(check_right_paren), - /* K13 */ be_nested_str_weak(skip_whitespace_including_newlines), - /* K14 */ be_nested_str_weak(expect_identifier), - /* K15 */ be_nested_str_weak(_validate_single_parameter), - /* K16 */ be_nested_str_weak(expect_assign), - /* K17 */ be_nested_str_weak(process_value), - /* K18 */ be_nested_str_weak(argument), - /* K19 */ be_nested_str_weak(collect_inline_comment), - /* K20 */ be_nested_str_weak(add), - /* K21 */ be_nested_str_weak(_X25s_X2E_X25s_X20_X3D_X20_X25s_X25s), - /* K22 */ be_nested_str_weak(current), - /* K23 */ be_nested_str_weak(type), - /* K24 */ be_nested_str_weak(animation_dsl), - /* K25 */ be_nested_str_weak(Token), - /* K26 */ be_nested_str_weak(COMMENT), - /* K27 */ be_nested_str_weak(next), - /* K28 */ be_nested_str_weak(COMMA), - /* K29 */ be_nested_str_weak(NEWLINE), - /* K30 */ be_nested_str_weak(error), - /* K31 */ be_nested_str_weak(Expected_X20_X27_X2C_X27_X20or_X20_X27_X29_X27_X20in_X20function_X20arguments), - /* K32 */ be_nested_str_weak(expect_right_paren), - }), - be_str_weak(process_named_arguments_for_variable), - &be_const_str_solidified, - ( &(const binstruction[133]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x58080001, // 0002 LDCONST R2 K1 - 0xA40E0400, // 0003 IMPORT R3 K2 - 0x8C100703, // 0004 GETMET R4 R3 K3 - 0x5C180200, // 0005 MOVE R6 R1 - 0x581C0004, // 0006 LDCONST R7 K4 - 0x7C100600, // 0007 CALL R4 3 - 0x1C100905, // 0008 EQ R4 R4 K5 - 0x78120009, // 0009 JMPF R4 #0014 - 0x8C100706, // 000A GETMET R4 R3 K6 - 0x5C180200, // 000B MOVE R6 R1 - 0x581C0007, // 000C LDCONST R7 K7 - 0x7C100600, // 000D CALL R4 3 - 0x6014000C, // 000E GETGBL R5 G12 - 0x5C180800, // 000F MOVE R6 R4 - 0x7C140200, // 0010 CALL R5 1 - 0x28140B08, // 0011 GE R5 R5 K8 - 0x78160000, // 0012 JMPF R5 #0014 - 0x94080909, // 0013 GETIDX R2 R4 K9 - 0x4C100000, // 0014 LDNIL R4 - 0x20140501, // 0015 NE R5 R2 K1 - 0x78160003, // 0016 JMPF R5 #001B - 0x8C14010A, // 0017 GETMET R5 R0 K10 - 0x5C1C0400, // 0018 MOVE R7 R2 - 0x7C140400, // 0019 CALL R5 2 - 0x5C100A00, // 001A MOVE R4 R5 - 0x8C14010B, // 001B GETMET R5 R0 K11 - 0x7C140200, // 001C CALL R5 1 - 0x74160063, // 001D JMPT R5 #0082 - 0x8C14010C, // 001E GETMET R5 R0 K12 - 0x7C140200, // 001F CALL R5 1 - 0x74160060, // 0020 JMPT R5 #0082 - 0x8C14010D, // 0021 GETMET R5 R0 K13 - 0x7C140200, // 0022 CALL R5 1 - 0x8C14010C, // 0023 GETMET R5 R0 K12 - 0x7C140200, // 0024 CALL R5 1 - 0x78160000, // 0025 JMPF R5 #0027 - 0x7002005A, // 0026 JMP #0082 - 0x8C14010E, // 0027 GETMET R5 R0 K14 - 0x7C140200, // 0028 CALL R5 1 - 0x4C180000, // 0029 LDNIL R6 - 0x20180806, // 002A NE R6 R4 R6 - 0x781A0006, // 002B JMPF R6 #0033 - 0x20180501, // 002C NE R6 R2 K1 - 0x781A0004, // 002D JMPF R6 #0033 - 0x8C18010F, // 002E GETMET R6 R0 K15 - 0x5C200400, // 002F MOVE R8 R2 - 0x5C240A00, // 0030 MOVE R9 R5 - 0x5C280800, // 0031 MOVE R10 R4 - 0x7C180800, // 0032 CALL R6 4 - 0x8C180110, // 0033 GETMET R6 R0 K16 - 0x7C180200, // 0034 CALL R6 1 - 0x8C180111, // 0035 GETMET R6 R0 K17 - 0x58200012, // 0036 LDCONST R8 K18 - 0x7C180400, // 0037 CALL R6 2 - 0x8C1C0113, // 0038 GETMET R7 R0 K19 - 0x7C1C0200, // 0039 CALL R7 1 - 0x8C200114, // 003A GETMET R8 R0 K20 - 0x60280018, // 003B GETGBL R10 G24 - 0x582C0015, // 003C LDCONST R11 K21 - 0x5C300200, // 003D MOVE R12 R1 - 0x5C340A00, // 003E MOVE R13 R5 - 0x5C380C00, // 003F MOVE R14 R6 - 0x5C3C0E00, // 0040 MOVE R15 R7 - 0x7C280A00, // 0041 CALL R10 5 - 0x7C200400, // 0042 CALL R8 2 - 0x8C20010B, // 0043 GETMET R8 R0 K11 - 0x7C200200, // 0044 CALL R8 1 - 0x7422000F, // 0045 JMPT R8 #0056 - 0x8C200116, // 0046 GETMET R8 R0 K22 - 0x7C200200, // 0047 CALL R8 1 - 0x4C240000, // 0048 LDNIL R9 - 0x20241009, // 0049 NE R9 R8 R9 - 0x78260008, // 004A JMPF R9 #0054 - 0x88241117, // 004B GETMBR R9 R8 K23 - 0xB82A3000, // 004C GETNGBL R10 K24 - 0x88281519, // 004D GETMBR R10 R10 K25 - 0x8828151A, // 004E GETMBR R10 R10 K26 - 0x1C24120A, // 004F EQ R9 R9 R10 - 0x78260002, // 0050 JMPF R9 #0054 - 0x8C24011B, // 0051 GETMET R9 R0 K27 - 0x7C240200, // 0052 CALL R9 1 - 0x70020000, // 0053 JMP #0055 - 0x70020000, // 0054 JMP #0056 - 0x7001FFEC, // 0055 JMP #0043 - 0x8C200116, // 0056 GETMET R8 R0 K22 - 0x7C200200, // 0057 CALL R8 1 - 0x4C240000, // 0058 LDNIL R9 - 0x20201009, // 0059 NE R8 R8 R9 - 0x7822000C, // 005A JMPF R8 #0068 - 0x8C200116, // 005B GETMET R8 R0 K22 - 0x7C200200, // 005C CALL R8 1 - 0x88201117, // 005D GETMBR R8 R8 K23 - 0xB8263000, // 005E GETNGBL R9 K24 - 0x88241319, // 005F GETMBR R9 R9 K25 - 0x8824131C, // 0060 GETMBR R9 R9 K28 - 0x1C201009, // 0061 EQ R8 R8 R9 - 0x78220004, // 0062 JMPF R8 #0068 - 0x8C20011B, // 0063 GETMET R8 R0 K27 - 0x7C200200, // 0064 CALL R8 1 - 0x8C20010D, // 0065 GETMET R8 R0 K13 - 0x7C200200, // 0066 CALL R8 1 - 0x70020018, // 0067 JMP #0081 - 0x8C200116, // 0068 GETMET R8 R0 K22 - 0x7C200200, // 0069 CALL R8 1 - 0x4C240000, // 006A LDNIL R9 - 0x20201009, // 006B NE R8 R8 R9 - 0x7822000C, // 006C JMPF R8 #007A - 0x8C200116, // 006D GETMET R8 R0 K22 - 0x7C200200, // 006E CALL R8 1 - 0x88201117, // 006F GETMBR R8 R8 K23 - 0xB8263000, // 0070 GETNGBL R9 K24 - 0x88241319, // 0071 GETMBR R9 R9 K25 - 0x8824131D, // 0072 GETMBR R9 R9 K29 - 0x1C201009, // 0073 EQ R8 R8 R9 - 0x78220004, // 0074 JMPF R8 #007A - 0x8C20011B, // 0075 GETMET R8 R0 K27 - 0x7C200200, // 0076 CALL R8 1 - 0x8C20010D, // 0077 GETMET R8 R0 K13 - 0x7C200200, // 0078 CALL R8 1 - 0x70020006, // 0079 JMP #0081 - 0x8C20010C, // 007A GETMET R8 R0 K12 - 0x7C200200, // 007B CALL R8 1 - 0x74220003, // 007C JMPT R8 #0081 - 0x8C20011E, // 007D GETMET R8 R0 K30 - 0x5828001F, // 007E LDCONST R10 K31 - 0x7C200400, // 007F CALL R8 2 - 0x70020000, // 0080 JMP #0082 - 0x7001FF98, // 0081 JMP #001B - 0x8C140120, // 0082 GETMET R5 R0 K32 - 0x7C140200, // 0083 CALL R5 1 - 0x80000000, // 0084 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: generate_default_strip_initialization -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_generate_default_strip_initialization, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(strip_initialized), - /* K1 */ be_nested_str_weak(add), - /* K2 */ be_nested_str_weak(_X23_X20Auto_X2Dgenerated_X20strip_X20initialization_X20_X28using_X20Tasmota_X20configuration_X29), - /* K3 */ be_nested_str_weak(var_X20engine_X20_X3D_X20animation_X2Einit_strip_X28_X29), - /* K4 */ be_nested_str_weak(), - }), - be_str_weak(generate_default_strip_initialization), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060000, // 0001 JMPF R1 #0003 - 0x80000200, // 0002 RET 0 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x580C0002, // 0004 LDCONST R3 K2 - 0x7C040400, // 0005 CALL R1 2 - 0x8C040101, // 0006 GETMET R1 R0 K1 - 0x580C0003, // 0007 LDCONST R3 K3 - 0x7C040400, // 0008 CALL R1 2 - 0x8C040101, // 0009 GETMET R1 R0 K1 - 0x580C0004, // 000A LDCONST R3 K4 - 0x7C040400, // 000B CALL R1 2 - 0x50040200, // 000C LDBOOL R1 1 0 - 0x90020001, // 000D SETMBR R0 K0 R1 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_right_paren -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_right_paren, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_PAREN), - /* K5 */ be_nested_str_weak(next), - /* K6 */ be_nested_str_weak(error), - /* K7 */ be_nested_str_weak(Expected_X20_X27_X29_X27), - }), - be_str_weak(expect_right_paren), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0008, // 0004 JMPF R2 #000E - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0002, // 000A JMPF R2 #000E - 0x8C080105, // 000B GETMET R2 R0 K5 - 0x7C080200, // 000C CALL R2 1 - 0x70020002, // 000D JMP #0011 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x58100007, // 000F LDCONST R4 K7 - 0x7C080400, // 0010 CALL R2 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_errors -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_get_errors, /* 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(errors), - }), - be_str_weak(get_errors), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_error_report -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_get_error_report, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(has_errors), - /* K1 */ be_nested_str_weak(No_X20compilation_X20errors), - /* K2 */ be_nested_str_weak(Compilation_X20errors_X3A_X0A), - /* K3 */ be_nested_str_weak(errors), - /* K4 */ be_nested_str_weak(_X20_X20), - /* K5 */ be_nested_str_weak(_X0A), - /* K6 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(get_error_report), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x74060000, // 0002 JMPT R1 #0004 - 0x80060200, // 0003 RET 1 K1 - 0x58040002, // 0004 LDCONST R1 K2 - 0x60080010, // 0005 GETGBL R2 G16 - 0x880C0103, // 0006 GETMBR R3 R0 K3 - 0x7C080200, // 0007 CALL R2 1 - 0xA8020005, // 0008 EXBLK 0 #000F - 0x5C0C0400, // 0009 MOVE R3 R2 - 0x7C0C0000, // 000A CALL R3 0 - 0x00120803, // 000B ADD R4 K4 R3 - 0x00100905, // 000C ADD R4 R4 K5 - 0x00040204, // 000D ADD R1 R1 R4 - 0x7001FFF9, // 000E JMP #0009 - 0x58080006, // 000F LDCONST R2 K6 - 0xAC080200, // 0010 CATCH R2 1 0 - 0xB0080000, // 0011 RAISE 2 R0 R0 - 0x80040200, // 0012 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: can_use_as_identifier -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_can_use_as_identifier, /* 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[14]) { /* constants */ - /* K0 */ be_nested_str_weak(color), - /* K1 */ be_nested_str_weak(animation), - /* K2 */ be_nested_str_weak(palette), - /* K3 */ be_nested_str_weak(startup), - /* K4 */ be_nested_str_weak(shutdown), - /* K5 */ be_nested_str_weak(button_press), - /* K6 */ be_nested_str_weak(button_hold), - /* K7 */ be_nested_str_weak(motion_detected), - /* K8 */ be_nested_str_weak(brightness_change), - /* K9 */ be_nested_str_weak(timer), - /* K10 */ be_nested_str_weak(time), - /* K11 */ be_nested_str_weak(sound_peak), - /* K12 */ be_nested_str_weak(network_message), - /* K13 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(can_use_as_identifier), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x400C0500, // 0002 CONNECT R3 R2 K0 - 0x400C0501, // 0003 CONNECT R3 R2 K1 - 0x400C0502, // 0004 CONNECT R3 R2 K2 - 0x400C0503, // 0005 CONNECT R3 R2 K3 - 0x400C0504, // 0006 CONNECT R3 R2 K4 - 0x400C0505, // 0007 CONNECT R3 R2 K5 - 0x400C0506, // 0008 CONNECT R3 R2 K6 - 0x400C0507, // 0009 CONNECT R3 R2 K7 - 0x400C0508, // 000A CONNECT R3 R2 K8 - 0x400C0509, // 000B CONNECT R3 R2 K9 - 0x400C050A, // 000C CONNECT R3 R2 K10 - 0x400C050B, // 000D CONNECT R3 R2 K11 - 0x400C050C, // 000E CONNECT R3 R2 K12 - 0x600C0010, // 000F GETGBL R3 G16 - 0x5C100400, // 0010 MOVE R4 R2 - 0x7C0C0200, // 0011 CALL R3 1 - 0xA8020007, // 0012 EXBLK 0 #001B - 0x5C100600, // 0013 MOVE R4 R3 - 0x7C100000, // 0014 CALL R4 0 - 0x1C140204, // 0015 EQ R5 R1 R4 - 0x78160002, // 0016 JMPF R5 #001A - 0x50140200, // 0017 LDBOOL R5 1 0 - 0xA8040001, // 0018 EXBLK 1 1 - 0x80040A00, // 0019 RET 1 R5 - 0x7001FFF7, // 001A JMP #0013 - 0x580C000D, // 001B LDCONST R3 K13 - 0xAC0C0200, // 001C CATCH R3 1 0 - 0xB0080000, // 001D RAISE 2 R0 R0 - 0x500C0000, // 001E LDBOOL R3 0 0 - 0x80040600, // 001F RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: expect_keyword -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_expect_keyword, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* 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(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(KEYWORD), - /* K5 */ be_nested_str_weak(value), - /* K6 */ be_nested_str_weak(next), - /* K7 */ be_nested_str_weak(error), - /* K8 */ be_nested_str_weak(Expected_X20_X27_X25s_X27), - }), - be_str_weak(expect_keyword), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x200C0403, // 0003 NE R3 R2 R3 - 0x780E000B, // 0004 JMPF R3 #0011 - 0x880C0501, // 0005 GETMBR R3 R2 K1 - 0xB8120400, // 0006 GETNGBL R4 K2 - 0x88100903, // 0007 GETMBR R4 R4 K3 - 0x88100904, // 0008 GETMBR R4 R4 K4 - 0x1C0C0604, // 0009 EQ R3 R3 R4 - 0x780E0005, // 000A JMPF R3 #0011 - 0x880C0505, // 000B GETMBR R3 R2 K5 - 0x1C0C0601, // 000C EQ R3 R3 R1 - 0x780E0002, // 000D JMPF R3 #0011 - 0x8C0C0106, // 000E GETMET R3 R0 K6 - 0x7C0C0200, // 000F CALL R3 1 - 0x70020005, // 0010 JMP #0017 - 0x8C0C0107, // 0011 GETMET R3 R0 K7 - 0x60140018, // 0012 GETGBL R5 G24 - 0x58180008, // 0013 LDCONST R6 K8 - 0x5C1C0200, // 0014 MOVE R7 R1 - 0x7C140400, // 0015 CALL R5 2 - 0x7C0C0400, // 0016 CALL R3 2 - 0x80000000, // 0017 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: check_right_bracket -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_check_right_bracket, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_BRACKET), - }), - be_str_weak(check_right_bracket), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0005, // 0004 JMPF R2 #000B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x740A0000, // 000A JMPT R2 #000C - 0x50080001, // 000B LDBOOL R2 0 1 - 0x50080200, // 000C LDBOOL R2 1 0 - 0x80040400, // 000D RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: check_right_paren -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_check_right_paren, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(type), - /* K2 */ be_nested_str_weak(animation_dsl), - /* K3 */ be_nested_str_weak(Token), - /* K4 */ be_nested_str_weak(RIGHT_PAREN), - }), - be_str_weak(check_right_paren), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x4C080000, // 0002 LDNIL R2 - 0x20080202, // 0003 NE R2 R1 R2 - 0x780A0005, // 0004 JMPF R2 #000B - 0x88080301, // 0005 GETMBR R2 R1 K1 - 0xB80E0400, // 0006 GETNGBL R3 K2 - 0x880C0703, // 0007 GETMBR R3 R3 K3 - 0x880C0704, // 0008 GETMBR R3 R3 K4 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x740A0000, // 000A JMPT R2 #000C - 0x50080001, // 000B LDBOOL R2 0 1 - 0x50080200, // 000C LDBOOL R2 1 0 - 0x80040400, // 000D RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: error -********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_error, /* 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[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(current), - /* K1 */ be_nested_str_weak(line), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(errors), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(Line_X20_X25s_X3A_X20_X25s), - }), - be_str_weak(error), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x20080403, // 0003 NE R2 R2 R3 - 0x780A0003, // 0004 JMPF R2 #0009 - 0x8C080100, // 0005 GETMET R2 R0 K0 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x740A001F, // 0004 JMPT R2 #0025 + 0x8C080102, // 0005 GETMET R2 R0 K2 0x7C080200, // 0006 CALL R2 1 - 0x88080501, // 0007 GETMBR R2 R2 K1 - 0x70020000, // 0008 JMP #000A - 0x58080002, // 0009 LDCONST R2 K2 - 0x880C0103, // 000A GETMBR R3 R0 K3 - 0x8C0C0704, // 000B GETMET R3 R3 K4 - 0x60140018, // 000C GETGBL R5 G24 - 0x58180005, // 000D LDCONST R6 K5 - 0x5C1C0400, // 000E MOVE R7 R2 - 0x5C200200, // 000F MOVE R8 R1 - 0x7C140600, // 0010 CALL R5 3 - 0x7C0C0400, // 0011 CALL R3 2 - 0x80000000, // 0012 RET 0 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0018, // 0009 JMPF R3 #0023 + 0x880C0503, // 000A GETMBR R3 R2 K3 + 0xB8120800, // 000B GETNGBL R4 K4 + 0x88100905, // 000C GETMBR R4 R4 K5 + 0x88100906, // 000D GETMBR R4 R4 K6 + 0x1C0C0604, // 000E EQ R3 R3 R4 + 0x740E0005, // 000F JMPT R3 #0016 + 0x880C0503, // 0010 GETMBR R3 R2 K3 + 0xB8120800, // 0011 GETNGBL R4 K4 + 0x88100905, // 0012 GETMBR R4 R4 K5 + 0x88100907, // 0013 GETMBR R4 R4 K7 + 0x1C0C0604, // 0014 EQ R3 R3 R4 + 0x780E000C, // 0015 JMPF R3 #0023 + 0x880C0508, // 0016 GETMBR R3 R2 K8 + 0x8C100109, // 0017 GETMET R4 R0 K9 + 0x7C100200, // 0018 CALL R4 1 + 0x8C100100, // 0019 GETMET R4 R0 K0 + 0x7C100200, // 001A CALL R4 1 + 0x60140018, // 001B GETGBL R5 G24 + 0x5818000A, // 001C LDCONST R6 K10 + 0x5C1C0200, // 001D MOVE R7 R1 + 0x5C200600, // 001E MOVE R8 R3 + 0x5C240800, // 001F MOVE R9 R4 + 0x7C140800, // 0020 CALL R5 4 + 0x5C040A00, // 0021 MOVE R1 R5 + 0x70020000, // 0022 JMP #0024 + 0x70020000, // 0023 JMP #0025 + 0x7001FFDC, // 0024 JMP #0002 + 0x80040200, // 0025 RET 1 R1 }) ) ); @@ -10468,30 +11489,69 @@ be_local_closure(class_SimpleDSLTranspiler_convert_time_to_ms, /* name */ /******************************************************************** -** Solidified function: has_errors +** Solidified function: _validate_single_parameter ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler_has_errors, /* name */ +be_local_closure(class_SimpleDSLTranspiler__validate_single_parameter, /* name */ be_nested_proto( - 3, /* nstack */ - 1, /* argc */ + 12, /* nstack */ + 4, /* 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(errors), - /* K1 */ be_const_int(0), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(_has_param), + /* K3 */ be_nested_str_weak(current), + /* K4 */ be_nested_str_weak(line), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(error), + /* K7 */ be_nested_str_weak(Animation_X20_X27_X25s_X27_X20does_X20not_X20have_X20parameter_X20_X27_X25s_X27_X2E_X20Check_X20the_X20animation_X20documentation_X20for_X20valid_X20parameters_X2E), }), - be_str_weak(has_errors), + be_str_weak(_validate_single_parameter), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x6004000C, // 0000 GETGBL R1 G12 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x7C040200, // 0002 CALL R1 1 - 0x24040301, // 0003 GT R1 R1 K1 - 0x80040200, // 0004 RET 1 R1 + ( &(const binstruction[38]) { /* code */ + 0xA802001F, // 0000 EXBLK 0 #0021 + 0xA4120000, // 0001 IMPORT R4 K0 + 0x4C140000, // 0002 LDNIL R5 + 0x20140605, // 0003 NE R5 R3 R5 + 0x78160019, // 0004 JMPF R5 #001F + 0x8C140901, // 0005 GETMET R5 R4 K1 + 0x5C1C0600, // 0006 MOVE R7 R3 + 0x58200002, // 0007 LDCONST R8 K2 + 0x7C140600, // 0008 CALL R5 3 + 0x78160014, // 0009 JMPF R5 #001F + 0x8C140702, // 000A GETMET R5 R3 K2 + 0x5C1C0400, // 000B MOVE R7 R2 + 0x7C140400, // 000C CALL R5 2 + 0x74160010, // 000D JMPT R5 #001F + 0x8C140103, // 000E GETMET R5 R0 K3 + 0x7C140200, // 000F CALL R5 1 + 0x4C180000, // 0010 LDNIL R6 + 0x20140A06, // 0011 NE R5 R5 R6 + 0x78160003, // 0012 JMPF R5 #0017 + 0x8C140103, // 0013 GETMET R5 R0 K3 + 0x7C140200, // 0014 CALL R5 1 + 0x88140B04, // 0015 GETMBR R5 R5 K4 + 0x70020000, // 0016 JMP #0018 + 0x58140005, // 0017 LDCONST R5 K5 + 0x8C180106, // 0018 GETMET R6 R0 K6 + 0x60200018, // 0019 GETGBL R8 G24 + 0x58240007, // 001A LDCONST R9 K7 + 0x5C280200, // 001B MOVE R10 R1 + 0x5C2C0400, // 001C MOVE R11 R2 + 0x7C200600, // 001D CALL R8 3 + 0x7C180400, // 001E CALL R6 2 + 0xA8040001, // 001F EXBLK 1 1 + 0x70020003, // 0020 JMP #0025 + 0xAC100002, // 0021 CATCH R4 0 2 + 0x70020000, // 0022 JMP #0024 + 0x70020000, // 0023 JMP #0025 + 0xB0080000, // 0024 RAISE 2 R0 R0 + 0x80000000, // 0025 RET 0 }) ) ); @@ -10499,11 +11559,11 @@ be_local_closure(class_SimpleDSLTranspiler_has_errors, /* name */ /******************************************************************** -** Solidified function: _create_instance_for_validation +** Solidified function: _is_simple_function_call ********************************************************************/ -be_local_closure(class_SimpleDSLTranspiler__create_instance_for_validation, /* name */ +be_local_closure(class_SimpleDSLTranspiler__is_simple_function_call, /* name */ be_nested_proto( - 8, /* nstack */ + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -10511,57 +11571,35 @@ be_local_closure(class_SimpleDSLTranspiler__create_instance_for_validation, /* 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(animation_dsl), - /* K1 */ be_nested_str_weak(MockEngine), - /* K2 */ be_nested_str_weak(introspect), - /* K3 */ be_nested_str_weak(contains), - /* K4 */ be_nested_str_weak(animation), - /* K5 */ be_nested_str_weak(class), - /* K6 */ be_nested_str_weak(function), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(strip_length), + /* K1 */ be_nested_str_weak(static_value), + /* K2 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(_create_instance_for_validation), + be_str_weak(_is_simple_function_call), &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0xA802001E, // 0000 EXBLK 0 #0020 - 0xB80A0000, // 0001 GETNGBL R2 K0 - 0x8C080501, // 0002 GETMET R2 R2 K1 - 0x7C080200, // 0003 CALL R2 1 - 0xA40E0400, // 0004 IMPORT R3 K2 - 0x8C100703, // 0005 GETMET R4 R3 K3 - 0xB81A0800, // 0006 GETNGBL R6 K4 - 0x5C1C0200, // 0007 MOVE R7 R1 - 0x7C100600, // 0008 CALL R4 3 - 0x78120010, // 0009 JMPF R4 #001B - 0xB8120800, // 000A GETNGBL R4 K4 - 0x88100801, // 000B GETMBR R4 R4 R1 - 0x60140004, // 000C GETGBL R5 G4 - 0x5C180800, // 000D MOVE R6 R4 - 0x7C140200, // 000E CALL R5 1 - 0x1C140B05, // 000F EQ R5 R5 K5 - 0x74160004, // 0010 JMPT R5 #0016 - 0x60140004, // 0011 GETGBL R5 G4 - 0x5C180800, // 0012 MOVE R6 R4 - 0x7C140200, // 0013 CALL R5 1 - 0x1C140B06, // 0014 EQ R5 R5 K6 - 0x78160004, // 0015 JMPF R5 #001B - 0x5C140800, // 0016 MOVE R5 R4 - 0x5C180400, // 0017 MOVE R6 R2 - 0x7C140200, // 0018 CALL R5 1 - 0xA8040001, // 0019 EXBLK 1 1 - 0x80040A00, // 001A RET 1 R5 - 0x4C100000, // 001B LDNIL R4 - 0xA8040001, // 001C EXBLK 1 1 - 0x80040800, // 001D RET 1 R4 - 0xA8040001, // 001E EXBLK 1 1 - 0x70020005, // 001F JMP #0026 - 0xAC080002, // 0020 CATCH R2 0 2 - 0x70020002, // 0021 JMP #0025 - 0x4C100000, // 0022 LDNIL R4 - 0x80040800, // 0023 RET 1 R4 - 0x70020000, // 0024 JMP #0026 - 0xB0080000, // 0025 RAISE 2 R0 R0 - 0x80000000, // 0026 RET 0 + ( &(const binstruction[21]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x400C0500, // 0002 CONNECT R3 R2 K0 + 0x400C0501, // 0003 CONNECT R3 R2 K1 + 0x600C0010, // 0004 GETGBL R3 G16 + 0x5C100400, // 0005 MOVE R4 R2 + 0x7C0C0200, // 0006 CALL R3 1 + 0xA8020007, // 0007 EXBLK 0 #0010 + 0x5C100600, // 0008 MOVE R4 R3 + 0x7C100000, // 0009 CALL R4 0 + 0x1C140204, // 000A EQ R5 R1 R4 + 0x78160002, // 000B JMPF R5 #000F + 0x50140200, // 000C LDBOOL R5 1 0 + 0xA8040001, // 000D EXBLK 1 1 + 0x80040A00, // 000E RET 1 R5 + 0x7001FFF7, // 000F JMP #0008 + 0x580C0002, // 0010 LDCONST R3 K2 + 0xAC0C0200, // 0011 CATCH R3 1 0 + 0xB0080000, // 0012 RAISE 2 R0 R0 + 0x500C0000, // 0013 LDBOOL R3 0 0 + 0x80040600, // 0014 RET 1 R3 }) ) ); @@ -10572,99 +11610,54 @@ be_local_closure(class_SimpleDSLTranspiler__create_instance_for_validation, /* ** Solidified class: SimpleDSLTranspiler ********************************************************************/ be_local_class(SimpleDSLTranspiler, - 9, + 10, NULL, - be_nested_map(101, + be_nested_map(112, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(_create_instance_for_validation, 78), be_const_closure(class_SimpleDSLTranspiler__create_instance_for_validation_closure) }, - { be_const_key_weak(process_function_arguments_for_expression, 22), be_const_closure(class_SimpleDSLTranspiler_process_function_arguments_for_expression_closure) }, - { be_const_key_weak(expect_right_brace, -1), be_const_closure(class_SimpleDSLTranspiler_expect_right_brace_closure) }, - { be_const_key_weak(has_errors, 68), be_const_closure(class_SimpleDSLTranspiler_has_errors_closure) }, - { be_const_key_weak(process_multiplicative_expression, 3), be_const_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_closure) }, - { be_const_key_weak(convert_time_to_ms, 33), be_const_closure(class_SimpleDSLTranspiler_convert_time_to_ms_closure) }, - { be_const_key_weak(run_statements, -1), be_const_var(4) }, - { be_const_key_weak(process_multiplicative_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_raw_closure) }, - { be_const_key_weak(error, -1), be_const_closure(class_SimpleDSLTranspiler_error_closure) }, - { be_const_key_weak(process_expression_argument, 76), be_const_closure(class_SimpleDSLTranspiler_process_expression_argument_closure) }, - { be_const_key_weak(check_right_paren, -1), be_const_closure(class_SimpleDSLTranspiler_check_right_paren_closure) }, - { be_const_key_weak(skip_function_arguments, 23), be_const_closure(class_SimpleDSLTranspiler_skip_function_arguments_closure) }, - { be_const_key_weak(skip_whitespace, 83), be_const_closure(class_SimpleDSLTranspiler_skip_whitespace_closure) }, - { be_const_key_weak(expect_number, -1), be_const_closure(class_SimpleDSLTranspiler_expect_number_closure) }, - { be_const_key_weak(_process_named_arguments_generic, -1), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_generic_closure) }, - { be_const_key_weak(at_end, -1), be_const_closure(class_SimpleDSLTranspiler_at_end_closure) }, - { be_const_key_weak(is_anonymous_function, 31), be_const_closure(class_SimpleDSLTranspiler_is_anonymous_function_closure) }, - { be_const_key_weak(_validate_color_provider_factory_exists, -1), be_const_closure(class_SimpleDSLTranspiler__validate_color_provider_factory_exists_closure) }, - { be_const_key_weak(check_right_bracket, 84), be_const_closure(class_SimpleDSLTranspiler_check_right_bracket_closure) }, - { be_const_key_weak(errors, -1), be_const_var(3) }, - { be_const_key_weak(_validate_animation_factory_creates_animation, -1), be_const_closure(class_SimpleDSLTranspiler__validate_animation_factory_creates_animation_closure) }, - { be_const_key_weak(expect_keyword, -1), be_const_closure(class_SimpleDSLTranspiler_expect_keyword_closure) }, - { be_const_key_weak(process_additive_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_additive_expression_raw_closure) }, - { be_const_key_weak(_validate_single_parameter, -1), be_const_closure(class_SimpleDSLTranspiler__validate_single_parameter_closure) }, - { be_const_key_weak(pos, -1), be_const_var(1) }, - { be_const_key_weak(get_error_report, -1), be_const_closure(class_SimpleDSLTranspiler_get_error_report_closure) }, - { be_const_key_weak(convert_to_vrgb, 99), be_const_closure(class_SimpleDSLTranspiler_convert_to_vrgb_closure) }, - { be_const_key_weak(expect_left_brace, -1), be_const_closure(class_SimpleDSLTranspiler_expect_left_brace_closure) }, - { be_const_key_weak(process_time_value, 49), be_const_closure(class_SimpleDSLTranspiler_process_time_value_closure) }, - { be_const_key_weak(get_errors, -1), be_const_closure(class_SimpleDSLTranspiler_get_errors_closure) }, - { be_const_key_weak(collect_inline_comment, -1), be_const_closure(class_SimpleDSLTranspiler_collect_inline_comment_closure) }, - { be_const_key_weak(expect_right_paren, -1), be_const_closure(class_SimpleDSLTranspiler_expect_right_paren_closure) }, - { be_const_key_weak(process_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_expression_closure) }, - { be_const_key_weak(generate_default_strip_initialization, 45), be_const_closure(class_SimpleDSLTranspiler_generate_default_strip_initialization_closure) }, - { be_const_key_weak(expect_comma, 56), be_const_closure(class_SimpleDSLTranspiler_expect_comma_closure) }, - { be_const_key_weak(create_computation_closure, 86), be_const_closure(class_SimpleDSLTranspiler_create_computation_closure_closure) }, - { be_const_key_weak(add, 61), be_const_closure(class_SimpleDSLTranspiler_add_closure) }, - { be_const_key_weak(process_named_arguments_for_variable, 65), be_const_closure(class_SimpleDSLTranspiler_process_named_arguments_for_variable_closure) }, - { be_const_key_weak(is_computed_expression, 98), be_const_closure(class_SimpleDSLTranspiler_is_computed_expression_closure) }, - { be_const_key_weak(validate_user_name, -1), be_const_closure(class_SimpleDSLTranspiler_validate_user_name_closure) }, - { be_const_key_weak(generate_engine_start, 10), be_const_closure(class_SimpleDSLTranspiler_generate_engine_start_closure) }, - { be_const_key_weak(skip_whitespace_including_newlines, -1), be_const_closure(class_SimpleDSLTranspiler_skip_whitespace_including_newlines_closure) }, - { be_const_key_weak(process_palette, 24), be_const_closure(class_SimpleDSLTranspiler_process_palette_closure) }, - { be_const_key_weak(process_unary_expression, 64), be_const_closure(class_SimpleDSLTranspiler_process_unary_expression_closure) }, - { be_const_key_weak(_validate_factory_function, -1), be_const_closure(class_SimpleDSLTranspiler__validate_factory_function_closure) }, - { be_const_key_weak(peek, -1), be_const_closure(class_SimpleDSLTranspiler_peek_closure) }, - { be_const_key_weak(process_array_literal, -1), be_const_closure(class_SimpleDSLTranspiler_process_array_literal_closure) }, - { be_const_key_weak(process_animation, -1), be_const_closure(class_SimpleDSLTranspiler_process_animation_closure) }, - { be_const_key_weak(_validate_animation_factory_exists, 70), be_const_closure(class_SimpleDSLTranspiler__validate_animation_factory_exists_closure) }, - { be_const_key_weak(is_identifier_char, 74), be_const_closure(class_SimpleDSLTranspiler_is_identifier_char_closure) }, - { be_const_key_weak(process_color, -1), be_const_closure(class_SimpleDSLTranspiler_process_color_closure) }, - { be_const_key_weak(process_function_call, 32), be_const_closure(class_SimpleDSLTranspiler_process_function_call_closure) }, - { be_const_key_weak(expect_colon, 18), be_const_closure(class_SimpleDSLTranspiler_expect_colon_closure) }, - { be_const_key_weak(create_computation_closure_from_string, 75), be_const_closure(class_SimpleDSLTranspiler_create_computation_closure_from_string_closure) }, - { be_const_key_weak(is_computed_expression_string, 44), be_const_closure(class_SimpleDSLTranspiler_is_computed_expression_string_closure) }, - { be_const_key_weak(strip_initialized, -1), be_const_var(6) }, - { be_const_key_weak(process_property_assignment, -1), be_const_closure(class_SimpleDSLTranspiler_process_property_assignment_closure) }, - { be_const_key_weak(process_nested_function_call, -1), be_const_closure(class_SimpleDSLTranspiler_process_nested_function_call_closure) }, - { be_const_key_weak(expect_left_paren, -1), be_const_closure(class_SimpleDSLTranspiler_expect_left_paren_closure) }, - { be_const_key_weak(process_event_parameters, -1), be_const_closure(class_SimpleDSLTranspiler_process_event_parameters_closure) }, - { be_const_key_weak(_process_named_arguments_for_animation, -1), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_for_animation_closure) }, - { be_const_key_weak(process_value, 94), be_const_closure(class_SimpleDSLTranspiler_process_value_closure) }, - { be_const_key_weak(process_primary_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_primary_expression_raw_closure) }, - { be_const_key_weak(convert_color, 53), be_const_closure(class_SimpleDSLTranspiler_convert_color_closure) }, - { be_const_key_weak(process_sequence, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_closure) }, - { be_const_key_weak(skip_statement, -1), be_const_closure(class_SimpleDSLTranspiler_skip_statement_closure) }, - { be_const_key_weak(_generate_anonymous_function_call, -1), be_const_closure(class_SimpleDSLTranspiler__generate_anonymous_function_call_closure) }, - { be_const_key_weak(process_additive_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_additive_expression_closure) }, - { be_const_key_weak(_validate_object_reference, -1), be_const_closure(class_SimpleDSLTranspiler__validate_object_reference_closure) }, - { be_const_key_weak(process_event_handler, -1), be_const_closure(class_SimpleDSLTranspiler_process_event_handler_closure) }, + { be_const_key_weak(process_named_arguments_for_variable, 25), be_const_closure(class_SimpleDSLTranspiler_process_named_arguments_for_variable_closure) }, + { be_const_key_weak(process_sequence_statement_for_manager, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_statement_for_manager_closure) }, + { be_const_key_weak(symbol_table, 18), be_const_var(8) }, { be_const_key_weak(join_output, -1), be_const_closure(class_SimpleDSLTranspiler_join_output_closure) }, - { be_const_key_weak(transform_operand_for_closure, -1), be_const_closure(class_SimpleDSLTranspiler_transform_operand_for_closure_closure) }, - { be_const_key_weak(expect_right_bracket, 37), be_const_closure(class_SimpleDSLTranspiler_expect_right_bracket_closure) }, - { be_const_key_weak(transpile, -1), be_const_closure(class_SimpleDSLTranspiler_transpile_closure) }, - { be_const_key_weak(process_sequence_statement, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_statement_closure) }, - { be_const_key_weak(_is_simple_function_call, -1), be_const_closure(class_SimpleDSLTranspiler__is_simple_function_call_closure) }, - { be_const_key_weak(is_math_method, -1), be_const_closure(class_SimpleDSLTranspiler_is_math_method_closure) }, - { be_const_key_weak(transform_expression_for_closure, 51), be_const_closure(class_SimpleDSLTranspiler_transform_expression_for_closure_closure) }, - { be_const_key_weak(process_unary_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_unary_expression_raw_closure) }, - { be_const_key_weak(expect_assign, 46), be_const_closure(class_SimpleDSLTranspiler_expect_assign_closure) }, - { be_const_key_weak(get_named_color_value, 5), be_const_closure(class_SimpleDSLTranspiler_get_named_color_value_closure) }, + { be_const_key_weak(transform_expression_for_closure, 71), be_const_closure(class_SimpleDSLTranspiler_transform_expression_for_closure_closure) }, + { be_const_key_weak(_validate_animation_factory_exists, -1), be_const_closure(class_SimpleDSLTranspiler__validate_animation_factory_exists_closure) }, + { be_const_key_weak(skip_whitespace, -1), be_const_closure(class_SimpleDSLTranspiler_skip_whitespace_closure) }, + { be_const_key_weak(get_errors, 68), be_const_closure(class_SimpleDSLTranspiler_get_errors_closure) }, + { be_const_key_weak(_process_named_arguments_generic, -1), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_generic_closure) }, + { be_const_key_weak(pos, -1), be_const_var(1) }, + { be_const_key_weak(add, -1), be_const_closure(class_SimpleDSLTranspiler_add_closure) }, + { be_const_key_weak(get_named_color_value, -1), be_const_closure(class_SimpleDSLTranspiler_get_named_color_value_closure) }, + { be_const_key_weak(convert_time_to_ms, -1), be_const_closure(class_SimpleDSLTranspiler_convert_time_to_ms_closure) }, + { be_const_key_weak(process_sequence_assignment_fluent, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_assignment_fluent_closure) }, + { be_const_key_weak(check_right_bracket, -1), be_const_closure(class_SimpleDSLTranspiler_check_right_bracket_closure) }, + { be_const_key_weak(process_play_statement, -1), be_const_closure(class_SimpleDSLTranspiler_process_play_statement_closure) }, + { be_const_key_weak(process_function_call, 102), be_const_closure(class_SimpleDSLTranspiler_process_function_call_closure) }, + { be_const_key_weak(_generate_anonymous_function_call, -1), be_const_closure(class_SimpleDSLTranspiler__generate_anonymous_function_call_closure) }, + { be_const_key_weak(expect_right_bracket, -1), be_const_closure(class_SimpleDSLTranspiler_expect_right_bracket_closure) }, + { be_const_key_weak(expect_left_paren, 108), be_const_closure(class_SimpleDSLTranspiler_expect_left_paren_closure) }, + { be_const_key_weak(process_function_arguments, 50), be_const_closure(class_SimpleDSLTranspiler_process_function_arguments_closure) }, + { be_const_key_weak(process_event_handler, -1), be_const_closure(class_SimpleDSLTranspiler_process_event_handler_closure) }, + { be_const_key_weak(process_palette, 21), be_const_closure(class_SimpleDSLTranspiler_process_palette_closure) }, + { be_const_key_weak(process_animation, -1), be_const_closure(class_SimpleDSLTranspiler_process_animation_closure) }, + { be_const_key_weak(process_sequence_assignment_generic, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_assignment_generic_closure) }, + { be_const_key_weak(process_time_value, -1), be_const_closure(class_SimpleDSLTranspiler_process_time_value_closure) }, + { be_const_key_weak(process_event_parameters, 55), be_const_closure(class_SimpleDSLTranspiler_process_event_parameters_closure) }, { be_const_key_weak(expect_left_bracket, -1), be_const_closure(class_SimpleDSLTranspiler_expect_left_bracket_closure) }, - { be_const_key_weak(_process_named_arguments_for_color_provider, 38), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_for_color_provider_closure) }, - { be_const_key_weak(process_set, -1), be_const_closure(class_SimpleDSLTranspiler_process_set_closure) }, - { be_const_key_weak(output, -1), be_const_var(2) }, - { be_const_key_weak(tokens, -1), be_const_var(0) }, - { be_const_key_weak(process_primary_expression, 95), be_const_closure(class_SimpleDSLTranspiler_process_primary_expression_closure) }, + { be_const_key_weak(strip_initialized, 39), be_const_var(6) }, + { be_const_key_weak(get_error_report, 105), be_const_closure(class_SimpleDSLTranspiler_get_error_report_closure) }, + { be_const_key_weak(_create_instance_for_validation, -1), be_const_closure(class_SimpleDSLTranspiler__create_instance_for_validation_closure) }, { be_const_key_weak(sequence_names, -1), be_const_var(7) }, - { be_const_key_weak(named_colors, 29), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(process_wait_statement, -1), be_const_closure(class_SimpleDSLTranspiler_process_wait_statement_closure) }, + { be_const_key_weak(expect_right_brace, 14), be_const_closure(class_SimpleDSLTranspiler_expect_right_brace_closure) }, + { be_const_key_weak(process_play_statement_fluent, 60), be_const_closure(class_SimpleDSLTranspiler_process_play_statement_fluent_closure) }, + { be_const_key_weak(tokens, -1), be_const_var(0) }, + { be_const_key_weak(process_property_assignment, 63), be_const_closure(class_SimpleDSLTranspiler_process_property_assignment_closure) }, + { be_const_key_weak(process_unary_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_unary_expression_closure) }, + { be_const_key_weak(process_additive_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_additive_expression_closure) }, + { be_const_key_weak(expect_assign, -1), be_const_closure(class_SimpleDSLTranspiler_expect_assign_closure) }, + { be_const_key_weak(process_run, -1), be_const_closure(class_SimpleDSLTranspiler_process_run_closure) }, + { be_const_key_weak(has_errors, -1), be_const_closure(class_SimpleDSLTranspiler_has_errors_closure) }, + { be_const_key_weak(check_right_brace, -1), be_const_closure(class_SimpleDSLTranspiler_check_right_brace_closure) }, + { be_const_key_weak(named_colors, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(37, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_weak(brown, -1), be_nested_str_weak(0xFFA52A2A) }, @@ -10705,18 +11698,74 @@ be_local_class(SimpleDSLTranspiler, { be_const_key_weak(tan, -1), be_nested_str_weak(0xFFD2B48C) }, { be_const_key_weak(maroon, -1), be_nested_str_weak(0xFF800000) }, })) ) } )) }, - { be_const_key_weak(current, 25), be_const_closure(class_SimpleDSLTranspiler_current_closure) }, - { be_const_key_weak(first_statement, -1), be_const_var(5) }, - { be_const_key_weak(symbol_table, -1), be_const_var(8) }, + { be_const_key_weak(skip_statement, 95), be_const_closure(class_SimpleDSLTranspiler_skip_statement_closure) }, + { be_const_key_weak(indent_level, -1), be_const_var(9) }, + { be_const_key_weak(get_indent, -1), be_const_closure(class_SimpleDSLTranspiler_get_indent_closure) }, + { be_const_key_weak(_validate_animation_factory_creates_animation, -1), be_const_closure(class_SimpleDSLTranspiler__validate_animation_factory_creates_animation_closure) }, + { be_const_key_weak(expect_dot, -1), be_const_closure(class_SimpleDSLTranspiler_expect_dot_closure) }, + { be_const_key_weak(is_anonymous_function, 1), be_const_closure(class_SimpleDSLTranspiler_is_anonymous_function_closure) }, + { be_const_key_weak(expect_keyword, -1), be_const_closure(class_SimpleDSLTranspiler_expect_keyword_closure) }, + { be_const_key_weak(process_wait_statement_fluent, 61), be_const_closure(class_SimpleDSLTranspiler_process_wait_statement_fluent_closure) }, + { be_const_key_weak(process_multiplicative_expression, 59), be_const_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_closure) }, + { be_const_key_weak(process_set, -1), be_const_closure(class_SimpleDSLTranspiler_process_set_closure) }, + { be_const_key_weak(errors, 26), be_const_var(3) }, + { be_const_key_weak(generate_default_strip_initialization, -1), be_const_closure(class_SimpleDSLTranspiler_generate_default_strip_initialization_closure) }, + { be_const_key_weak(process_unary_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_unary_expression_raw_closure) }, + { be_const_key_weak(transpile, 12), be_const_closure(class_SimpleDSLTranspiler_transpile_closure) }, + { be_const_key_weak(_process_named_arguments_for_color_provider, 83), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_for_color_provider_closure) }, + { be_const_key_weak(is_computed_expression_string, 101), be_const_closure(class_SimpleDSLTranspiler_is_computed_expression_string_closure) }, + { be_const_key_weak(process_primary_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_primary_expression_closure) }, + { be_const_key_weak(transform_operand_for_closure, -1), be_const_closure(class_SimpleDSLTranspiler_transform_operand_for_closure_closure) }, + { be_const_key_weak(peek, -1), be_const_closure(class_SimpleDSLTranspiler_peek_closure) }, + { be_const_key_weak(_validate_color_provider_factory_exists, -1), be_const_closure(class_SimpleDSLTranspiler__validate_color_provider_factory_exists_closure) }, + { be_const_key_weak(process_sequence_statement, 96), be_const_closure(class_SimpleDSLTranspiler_process_sequence_statement_closure) }, { be_const_key_weak(can_use_as_identifier, -1), be_const_closure(class_SimpleDSLTranspiler_can_use_as_identifier_closure) }, - { be_const_key_weak(process_percentage_value, 21), be_const_closure(class_SimpleDSLTranspiler_process_percentage_value_closure) }, - { be_const_key_weak(process_run, -1), be_const_closure(class_SimpleDSLTranspiler_process_run_closure) }, - { be_const_key_weak(process_function_arguments, 30), be_const_closure(class_SimpleDSLTranspiler_process_function_arguments_closure) }, - { be_const_key_weak(expect_identifier, 8), be_const_closure(class_SimpleDSLTranspiler_expect_identifier_closure) }, - { be_const_key_weak(check_right_brace, 6), be_const_closure(class_SimpleDSLTranspiler_check_right_brace_closure) }, - { be_const_key_weak(next, -1), be_const_closure(class_SimpleDSLTranspiler_next_closure) }, + { be_const_key_weak(process_sequence_assignment, 94), be_const_closure(class_SimpleDSLTranspiler_process_sequence_assignment_closure) }, + { be_const_key_weak(create_computation_closure, 93), be_const_closure(class_SimpleDSLTranspiler_create_computation_closure_closure) }, + { be_const_key_weak(process_function_arguments_for_expression, -1), be_const_closure(class_SimpleDSLTranspiler_process_function_arguments_for_expression_closure) }, + { be_const_key_weak(process_expression_argument, -1), be_const_closure(class_SimpleDSLTranspiler_process_expression_argument_closure) }, + { be_const_key_weak(process_color, -1), be_const_closure(class_SimpleDSLTranspiler_process_color_closure) }, + { be_const_key_weak(_validate_object_reference, 10), be_const_closure(class_SimpleDSLTranspiler__validate_object_reference_closure) }, + { be_const_key_weak(convert_color, 65), be_const_closure(class_SimpleDSLTranspiler_convert_color_closure) }, + { be_const_key_weak(is_computed_expression, 49), be_const_closure(class_SimpleDSLTranspiler_is_computed_expression_closure) }, + { be_const_key_weak(skip_whitespace_including_newlines, 87), be_const_closure(class_SimpleDSLTranspiler_skip_whitespace_including_newlines_closure) }, + { be_const_key_weak(create_computation_closure_from_string, 82), be_const_closure(class_SimpleDSLTranspiler_create_computation_closure_from_string_closure) }, + { be_const_key_weak(expect_colon, 73), be_const_closure(class_SimpleDSLTranspiler_expect_colon_closure) }, + { be_const_key_weak(process_multiplicative_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_multiplicative_expression_raw_closure) }, + { be_const_key_weak(expect_right_paren, 70), be_const_closure(class_SimpleDSLTranspiler_expect_right_paren_closure) }, + { be_const_key_weak(_process_named_arguments_for_animation, -1), be_const_closure(class_SimpleDSLTranspiler__process_named_arguments_for_animation_closure) }, + { be_const_key_weak(expect_number, -1), be_const_closure(class_SimpleDSLTranspiler_expect_number_closure) }, + { be_const_key_weak(check_right_paren, -1), be_const_closure(class_SimpleDSLTranspiler_check_right_paren_closure) }, + { be_const_key_weak(process_value, -1), be_const_closure(class_SimpleDSLTranspiler_process_value_closure) }, + { be_const_key_weak(at_end, 91), be_const_closure(class_SimpleDSLTranspiler_at_end_closure) }, + { be_const_key_weak(process_statement, 75), be_const_closure(class_SimpleDSLTranspiler_process_statement_closure) }, + { be_const_key_weak(run_statements, -1), be_const_var(4) }, + { be_const_key_weak(process_sequence, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_closure) }, + { be_const_key_weak(generate_engine_start, -1), be_const_closure(class_SimpleDSLTranspiler_generate_engine_start_closure) }, + { be_const_key_weak(expect_comma, 56), be_const_closure(class_SimpleDSLTranspiler_expect_comma_closure) }, + { be_const_key_weak(process_percentage_value, -1), be_const_closure(class_SimpleDSLTranspiler_process_percentage_value_closure) }, + { be_const_key_weak(current, 36), be_const_closure(class_SimpleDSLTranspiler_current_closure) }, + { be_const_key_weak(process_nested_function_call, -1), be_const_closure(class_SimpleDSLTranspiler_process_nested_function_call_closure) }, + { be_const_key_weak(convert_to_vrgb, -1), be_const_closure(class_SimpleDSLTranspiler_convert_to_vrgb_closure) }, + { be_const_key_weak(first_statement, -1), be_const_var(5) }, + { be_const_key_weak(_validate_factory_function, 45), be_const_closure(class_SimpleDSLTranspiler__validate_factory_function_closure) }, + { be_const_key_weak(skip_function_arguments, -1), be_const_closure(class_SimpleDSLTranspiler_skip_function_arguments_closure) }, + { be_const_key_weak(expect_left_brace, -1), be_const_closure(class_SimpleDSLTranspiler_expect_left_brace_closure) }, + { be_const_key_weak(error, -1), be_const_closure(class_SimpleDSLTranspiler_error_closure) }, + { be_const_key_weak(process_sequence_statement_generic, -1), be_const_closure(class_SimpleDSLTranspiler_process_sequence_statement_generic_closure) }, + { be_const_key_weak(validate_user_name, 41), be_const_closure(class_SimpleDSLTranspiler_validate_user_name_closure) }, + { be_const_key_weak(output, -1), be_const_var(2) }, + { be_const_key_weak(is_math_method, -1), be_const_closure(class_SimpleDSLTranspiler_is_math_method_closure) }, + { be_const_key_weak(process_array_literal, -1), be_const_closure(class_SimpleDSLTranspiler_process_array_literal_closure) }, + { be_const_key_weak(process_primary_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_primary_expression_raw_closure) }, + { be_const_key_weak(next, 24), be_const_closure(class_SimpleDSLTranspiler_next_closure) }, + { be_const_key_weak(collect_inline_comment, -1), be_const_closure(class_SimpleDSLTranspiler_collect_inline_comment_closure) }, + { be_const_key_weak(is_identifier_char, -1), be_const_closure(class_SimpleDSLTranspiler_is_identifier_char_closure) }, + { be_const_key_weak(process_additive_expression_raw, -1), be_const_closure(class_SimpleDSLTranspiler_process_additive_expression_raw_closure) }, { be_const_key_weak(init, -1), be_const_closure(class_SimpleDSLTranspiler_init_closure) }, - { be_const_key_weak(process_statement, 0), be_const_closure(class_SimpleDSLTranspiler_process_statement_closure) }, + { be_const_key_weak(_validate_single_parameter, -1), be_const_closure(class_SimpleDSLTranspiler__validate_single_parameter_closure) }, + { be_const_key_weak(expect_identifier, 2), be_const_closure(class_SimpleDSLTranspiler_expect_identifier_closure) }, + { be_const_key_weak(_is_simple_function_call, -1), be_const_closure(class_SimpleDSLTranspiler__is_simple_function_call_closure) }, })), be_str_weak(SimpleDSLTranspiler) ); diff --git a/lib/libesp32/berry_animation/src/tests/bytes_type_test.be b/lib/libesp32/berry_animation/src/tests/bytes_type_test.be new file mode 100644 index 000000000..d52cb9c31 --- /dev/null +++ b/lib/libesp32/berry_animation/src/tests/bytes_type_test.be @@ -0,0 +1,92 @@ +#!/usr/bin/env berry + +# Test for bytes type validation in parameterized_object.be +import animation +import animation_dsl + +# Test class that uses bytes parameter +class BytesTestClass : animation.parameterized_object + static var PARAMS = { + "data": {"type": "bytes", "default": nil, "nillable": true}, + "required_data": {"type": "bytes"}, + "name": {"type": "string", "default": "test"} + } + + def init(engine) + super(self).init(engine) + end +end + +# Mock engine for testing +class MockEngine + var time_ms + def init() + self.time_ms = 1000 + end +end + +def test_bytes_type_validation() + print("Testing bytes type validation...") + + var mock_engine = MockEngine() + var obj = BytesTestClass(mock_engine) + + # Test 1: Valid bytes objects + var hex_bytes = bytes("AABBCC") + obj.data = hex_bytes + assert(obj.data.tohex() == "AABBCC", "Hex bytes should be accepted") + + var empty_bytes = bytes() + obj.data = empty_bytes + assert(obj.data != nil, "Empty bytes should be accepted") + + var sized_bytes = bytes(5) + obj.data = sized_bytes + assert(obj.data != nil, "Sized bytes should be accepted") + + # Test 2: Invalid types should be rejected + var invalid_types = ["string", 123, 3.14, true, [], {}] + + for invalid_val : invalid_types + var caught_error = false + try + obj.data = invalid_val + except "value_error" + caught_error = true + end + assert(caught_error, f"Should reject {type(invalid_val)}: {invalid_val}") + end + + # Test 3: Nil handling + obj.data = nil # Should work for nillable parameter + assert(obj.data == nil, "Nil should be accepted for nillable parameter") + + var nil_error = false + try + obj.required_data = nil # Should fail for non-nillable parameter + except "value_error" + nil_error = true + end + assert(nil_error, "Should reject nil for non-nillable parameter") + + # Test 4: Method-based setting + var success = obj.set_param("data", bytes("112233")) + assert(success == true, "Method setting with valid bytes should succeed") + + success = obj.set_param("data", "invalid") + assert(success == false, "Method setting with invalid type should fail") + + # Test 5: Parameter metadata + var metadata = obj.get_param_metadata("data") + assert(metadata["type"] == "bytes", "Data parameter should have bytes type") + assert(metadata["nillable"] == true, "Data parameter should be nillable") + + var req_metadata = obj.get_param_metadata("required_data") + assert(req_metadata["type"] == "bytes", "Required data should have bytes type") + assert(req_metadata.find("nillable", false) == false, "Required data should not be nillable") + + print("✓ All bytes type validation tests passed!") +end + +# Run the test +test_bytes_type_validation() \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/tests/color_cycle_animation_test.be b/lib/libesp32/berry_animation/src/tests/color_cycle_animation_test.be index 13b1ffe8b..62d6a1e49 100644 --- a/lib/libesp32/berry_animation/src/tests/color_cycle_animation_test.be +++ b/lib/libesp32/berry_animation/src/tests/color_cycle_animation_test.be @@ -69,7 +69,7 @@ class ColorCycleAnimationTest self.assert_equal(color_provider.palette != nil, true, "Color provider has palette property") # Test with custom parameters - var custom_palette = [0xFFFF0000, 0xFF00FF00] # Red and Green in ARGB format + var custom_palette = bytes("FFFF0000FF00FF00") # Red and Green in AARRGGBB format var custom_provider = animation.color_cycle(engine) custom_provider.palette = custom_palette custom_provider.cycle_period = 2000 @@ -88,13 +88,13 @@ class ColorCycleAnimationTest self.assert_equal(color_provider2.palette != nil, true, "Custom color provider has palette property") # Check provider properties - self.assert_equal(size(color_provider2.palette), 2, "Custom palette has 2 colors") + self.assert_equal(color_provider2._get_palette_size(), 2, "Custom palette has 2 colors") self.assert_equal(color_provider2.cycle_period, 2000, "Custom cycle period is 2000ms") end def test_update_and_render() # Create animation with red and blue colors - var palette = [0xFFFF0000, 0xFF0000FF] # Red and Blue in ARGB format (Alpha, Red, Green, Blue) + var palette = bytes("FFFF0000FF0000FF") # Red and Blue in AARRGGBB format var provider = animation.color_cycle(engine) provider.palette = palette provider.cycle_period = 1000 # 1 second cycle @@ -145,7 +145,7 @@ class ColorCycleAnimationTest # Create animation with manual-only color provider var manual_provider = animation.color_cycle(engine) - manual_provider.palette = [0xFF0000FF, 0xFF00FF00, 0xFFFF0000] # Red, Green, Blue + manual_provider.palette = bytes("FF0000FFFF00FF00FFFF0000") # Blue, Green, Red in AARRGGBB format manual_provider.cycle_period = 0 # Manual-only mode var manual_anim = animation.solid(engine) @@ -195,7 +195,7 @@ class ColorCycleAnimationTest def test_direct_creation() # Test direct creation without factory method (following new parameterized pattern) var provider = animation.color_cycle(engine) - provider.palette = [0xFF0000FF, 0xFF00FF00, 0xFFFF0000] # RGB colors + provider.palette = bytes("FF0000FFFF00FF00FFFF0000") # Blue, Green, Red in AARRGGBB format provider.cycle_period = 3000 # 3 second cycle period var anim = animation.solid(engine) @@ -213,7 +213,7 @@ class ColorCycleAnimationTest self.assert_equal(color_provider3.palette != nil, true, "Color provider has palette property") # Check provider properties - self.assert_equal(size(color_provider3.palette), 3, "Palette has 3 colors") + self.assert_equal(color_provider3._get_palette_size(), 3, "Palette has 3 colors") self.assert_equal(color_provider3.cycle_period, 3000, "Cycle period is 3000ms") # Check animation properties diff --git a/lib/libesp32/berry_animation/src/tests/color_cycle_bytes_test.be b/lib/libesp32/berry_animation/src/tests/color_cycle_bytes_test.be new file mode 100644 index 000000000..a99fed1db --- /dev/null +++ b/lib/libesp32/berry_animation/src/tests/color_cycle_bytes_test.be @@ -0,0 +1,155 @@ +#!/usr/bin/env berry + +# Test for ColorCycleColorProvider with bytes palette in AARRGGBB format +import animation +import animation_dsl + +# Mock engine for testing +class MockEngine + var time_ms + def init() + self.time_ms = 1000 + end +end + +def test_color_cycle_bytes_format() + print("Testing ColorCycleColorProvider with bytes palette (AARRGGBB format)...") + + var engine = MockEngine() + + # Test 1: Create provider with default palette + var provider = animation.color_cycle(engine) + assert(provider != nil, "Provider should be created") + + # Test 2: Check default palette + var default_size = provider._get_palette_size() + assert(default_size == 3, f"Default palette should have 3 colors, got {default_size}") + + # Test 3: Test colors from default palette (AARRGGBB format) + var color0 = provider._get_color_at_index(0) # Should be FF0000FF (blue) + var color1 = provider._get_color_at_index(1) # Should be FF00FF00 (green) + var color2 = provider._get_color_at_index(2) # Should be FFFF0000 (red) + + assert(color0 == 0xFF0000FF, f"First color should be blue (0xFF0000FF), got 0x{color0:08X}") + assert(color1 == 0xFF00FF00, f"Second color should be green (0xFF00FF00), got 0x{color1:08X}") + assert(color2 == 0xFFFF0000, f"Third color should be red (0xFFFF0000), got 0x{color2:08X}") + + # Test 4: Set custom bytes palette + var custom_palette = bytes( + "80FF0000" # Semi-transparent red (alpha=0x80) + "FF00FF00" # Opaque green (alpha=0xFF) + "C00000FF" # Semi-transparent blue (alpha=0xC0) + "FFFFFF00" # Opaque yellow (alpha=0xFF) + ) + + provider.palette = custom_palette + var custom_size = provider._get_palette_size() + assert(custom_size == 4, f"Custom palette should have 4 colors, got {custom_size}") + + # Test 5: Verify custom palette colors (alpha channel forced to 0xFF) + var custom_color0 = provider._get_color_at_index(0) # Red with forced full alpha + var custom_color1 = provider._get_color_at_index(1) # Green with forced full alpha + var custom_color2 = provider._get_color_at_index(2) # Blue with forced full alpha + var custom_color3 = provider._get_color_at_index(3) # Yellow with forced full alpha + + assert(custom_color0 == 0xFFFF0000, f"Custom color 0 should be 0xFFFF0000 (alpha forced), got 0x{custom_color0:08X}") + assert(custom_color1 == 0xFF00FF00, f"Custom color 1 should be 0xFF00FF00 (alpha forced), got 0x{custom_color1:08X}") + assert(custom_color2 == 0xFF0000FF, f"Custom color 2 should be 0xFF0000FF (alpha forced), got 0x{custom_color2:08X}") + assert(custom_color3 == 0xFFFFFF00, f"Custom color 3 should be 0xFFFFFF00 (alpha forced), got 0x{custom_color3:08X}") + + # Test 6: Test auto-cycle mode + provider.cycle_period = 4000 # 4 seconds for 4 colors = 1 second per color + + # At time 0, should be first color + engine.time_ms = 0 + var cycle_color0 = provider.produce_value("color", 0) + assert(cycle_color0 == custom_color0, f"Cycle color at t=0 should match first color") + + # At time 1000 (1/4 of cycle), should be second color + var cycle_color1 = provider.produce_value("color", 1000) + assert(cycle_color1 == custom_color1, f"Cycle color at t=1000 should match second color") + + # At time 2000 (2/4 of cycle), should be third color + var cycle_color2 = provider.produce_value("color", 2000) + assert(cycle_color2 == custom_color2, f"Cycle color at t=2000 should match third color") + + # At time 3000 (3/4 of cycle), should be fourth color + var cycle_color3 = provider.produce_value("color", 3000) + assert(cycle_color3 == custom_color3, f"Cycle color at t=3000 should match fourth color") + + # Test 7: Test manual mode + provider.cycle_period = 0 # Manual mode + provider.current_index = 1 + provider.current_color = custom_color1 + + var manual_color = provider.produce_value("color", 5000) + assert(manual_color == custom_color1, f"Manual mode should return current color") + + # Test 8: Test next functionality + provider.next = 1 # Should trigger move to next color + var next_color = provider.current_color + assert(next_color == custom_color2, f"Next should move to third color") + assert(provider.current_index == 2, f"Current index should be 2") + + # Test 9: Test value-based color selection + var value_color_0 = provider.get_color_for_value(0, 0) # Should be first color + var value_color_50 = provider.get_color_for_value(50, 0) # Should be middle color + var value_color_100 = provider.get_color_for_value(100, 0) # Should be last color + + assert(value_color_0 == custom_color0, f"Value 0 should return first color") + assert(value_color_100 == custom_color3, f"Value 100 should return last color") + + # Test 10: Test edge cases + var invalid_color = provider._get_color_at_index(-1) # Invalid index + assert(invalid_color == 0xFFFFFFFF, f"Invalid index should return white") + + var out_of_bounds_color = provider._get_color_at_index(100) # Out of bounds + assert(out_of_bounds_color == 0xFFFFFFFF, f"Out of bounds index should return white") + + # Test 11: Test empty palette handling + var empty_palette = bytes() + provider.palette = empty_palette + var empty_size = provider._get_palette_size() + assert(empty_size == 0, f"Empty palette should have 0 colors") + + var empty_color = provider.produce_value("color", 1000) + assert(empty_color == 0xFFFFFFFF, f"Empty palette should return white") + + print("✓ All ColorCycleColorProvider bytes format tests passed!") +end + +def test_bytes_parameter_validation() + print("Testing bytes parameter validation...") + + var engine = MockEngine() + var provider = animation.color_cycle(engine) + + # Test 1: Valid bytes palette should be accepted + var valid_palette = bytes("FF0000FFFF00FF00FFFF0000") + provider.palette = valid_palette + assert(provider._get_palette_size() == 3, "Valid bytes palette should be accepted") + + # Test 2: Invalid types should be rejected + var invalid_types = ["string", 123, 3.14, true, [], {}] + + for invalid_val : invalid_types + var caught_error = false + try + provider.palette = invalid_val + except "value_error" + caught_error = true + end + assert(caught_error, f"Should reject {type(invalid_val)}: {invalid_val}") + end + + # Test 3: Nil should be accepted (uses default) + provider.palette = nil + assert(provider._get_palette_size() == 3, "Nil should use default palette") + + print("✓ All bytes parameter validation tests passed!") +end + +# Run the tests +test_color_cycle_bytes_format() +test_bytes_parameter_validation() +print("✓ All ColorCycleColorProvider tests completed successfully!") \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/tests/crenel_position_color_test.be b/lib/libesp32/berry_animation/src/tests/crenel_position_color_test.be index a8d16e452..62dc837ce 100644 --- a/lib/libesp32/berry_animation/src/tests/crenel_position_color_test.be +++ b/lib/libesp32/berry_animation/src/tests/crenel_position_color_test.be @@ -100,7 +100,7 @@ def test_crenel_with_dynamic_color_provider() # Create a palette color provider that changes over time var palette_provider = animation.color_cycle(engine) - palette_provider.palette = [0xFF0000FF, 0xFF00FF00, 0xFFFF0000, 0xFFFFFF00] # RGBY palette + palette_provider.palette = bytes("FF0000FFFF00FF00FFFF0000FFFFFF00") # BGRY palette in AARRGGBB format palette_provider.cycle_period = 2000 # 2 second cycle # Create animation with new parameterized pattern diff --git a/lib/libesp32/berry_animation/src/tests/dsl_core_processing_test.be b/lib/libesp32/berry_animation/src/tests/dsl_core_processing_test.be index aac47789e..dec0b9769 100644 --- a/lib/libesp32/berry_animation/src/tests/dsl_core_processing_test.be +++ b/lib/libesp32/berry_animation/src/tests/dsl_core_processing_test.be @@ -200,9 +200,9 @@ def test_sequence_processing() var berry_code = animation_dsl.compile(basic_seq_dsl) assert(berry_code != nil, "Should compile basic sequence") - assert(string.find(berry_code, "var demo_ = (def (engine)") >= 0, "Should define sequence closure") + assert(string.find(berry_code, "var demo_ = animation.SequenceManager(engine)") >= 0, "Should define sequence manager") assert(string.find(berry_code, "red_anim") >= 0, "Should reference animation") - assert(string.find(berry_code, "animation.create_play_step(animation.global('red_anim_'), 2000)") >= 0, "Should create play step") + assert(string.find(berry_code, ".push_play_step(red_anim_, 2000)") >= 0, "Should create play step") assert(string.find(berry_code, "engine.add_sequence_manager(demo_)") >= 0, "Should add sequence manager") assert(string.find(berry_code, "engine.start()") >= 0, "Should start engine") @@ -210,9 +210,10 @@ def test_sequence_processing() var repeat_seq_dsl = "color custom_blue = 0x0000FF\n" + "animation blue_anim = solid(color=custom_blue)\n" + "sequence test {\n" + - " repeat 3 times:\n" + + " repeat 3 times {\n" + " play blue_anim for 1s\n" + " wait 500ms\n" + + " }\n" + "}\n" + "run test" @@ -223,8 +224,8 @@ def test_sequence_processing() # print(berry_code) # print("==================================================") assert(berry_code != nil, "Should compile repeat sequence") - assert(string.find(berry_code, "for repeat_i : 0..3-1") >= 0, "Should generate repeat loop") - assert(string.find(berry_code, "animation.create_wait_step(500)") >= 0, "Should generate wait step") + assert(string.find(berry_code, "animation.SequenceManager(engine, 3)") >= 0, "Should generate repeat subsequence") + assert(string.find(berry_code, ".push_wait_step(500)") >= 0, "Should generate wait step") print("✓ Sequence processing test passed") return true diff --git a/lib/libesp32/berry_animation/src/tests/dsl_runtime_test.be b/lib/libesp32/berry_animation/src/tests/dsl_runtime_test.be index c3f0a6de2..91ab0ce40 100644 --- a/lib/libesp32/berry_animation/src/tests/dsl_runtime_test.be +++ b/lib/libesp32/berry_animation/src/tests/dsl_runtime_test.be @@ -142,16 +142,16 @@ def test_dsl_runtime() print("✗ Runtime state management failed") end - # Test 8: Controller access + # Test 8: engine access tests_total += 1 - print("\nTest 8: Controller access") + print("\nTest 8: engine access") - var controller = runtime.get_controller() - if controller != nil - print("✓ Controller access working") + var engine = runtime.get_engine() + if engine != nil + print("✓ Engine access working") tests_passed += 1 else - print("✗ Controller access failed") + print("✗ engine access failed") end # Final results diff --git a/lib/libesp32/berry_animation/src/tests/dsl_transpiler_test.be b/lib/libesp32/berry_animation/src/tests/dsl_transpiler_test.be index 5612cd69c..72dd4e906 100644 --- a/lib/libesp32/berry_animation/src/tests/dsl_transpiler_test.be +++ b/lib/libesp32/berry_animation/src/tests/dsl_transpiler_test.be @@ -28,7 +28,7 @@ def test_basic_transpilation() assert(berry_code != nil, "Should generate Berry code") assert(string.find(berry_code, "var engine = animation.init_strip()") >= 0, "Should generate strip configuration") assert(string.find(berry_code, "var custom_red_ = 0xFFFF0000") >= 0, "Should generate color definition") - assert(string.find(berry_code, "var demo_ = (def (engine)") >= 0, "Should generate sequence closure") + assert(string.find(berry_code, "var demo_ = animation.SequenceManager(engine)") >= 0, "Should generate sequence manager") assert(string.find(berry_code, "engine.add_sequence_manager(demo_)") >= 0, "Should add sequence manager") # print("Generated Berry code:") @@ -156,15 +156,188 @@ def test_sequences() var berry_code = animation_dsl.compile(dsl_source) assert(berry_code != nil, "Should compile sequence") - assert(string.find(berry_code, "var test_seq_ = (def (engine)") >= 0, "Should define sequence closure") - assert(string.find(berry_code, "animation.create_play_step(animation.global('blue_anim_'), 3000)") >= 0, "Should reference animation") - assert(string.find(berry_code, "engine.add_sequence_manager(test_seq_)") >= 0, "Should add sequence manager to engine") + assert(string.find(berry_code, "var test_seq_ = animation.SequenceManager(engine)") >= 0, "Should define sequence manager") + assert(string.find(berry_code, ".push_play_step(") >= 0, "Should add play step") + assert(string.find(berry_code, "3000)") >= 0, "Should reference duration") assert(string.find(berry_code, "engine.start()") >= 0, "Should start engine") print("✓ Sequences test passed") return true end +# Test sequence assignments +def test_sequence_assignments() + print("Testing sequence assignments...") + + # Test basic sequence assignment + var dsl_source = "color my_red = 0xFF0000\n" + + "set brightness = 128\n" + + "animation test = solid(color=my_red)\n" + + "\n" + + "sequence demo {\n" + + " play test for 1s\n" + + " test.opacity = brightness\n" + + " play test for 1s\n" + + "}\n" + + "\n" + + "run demo" + + var berry_code = animation_dsl.compile(dsl_source) + assert(berry_code != nil, "Should compile sequence with assignments") + assert(string.find(berry_code, "var demo_ = animation.SequenceManager(engine)") >= 0, "Should define sequence manager") + assert(string.find(berry_code, ".push_assign_step") >= 0, "Should generate assign step") + assert(string.find(berry_code, "test_.opacity = brightness_") >= 0, "Should generate assignment") + + # Test multiple assignments in sequence + var multi_assign_dsl = "color my_red = 0xFF0000\n" + + "color my_blue = 0x0000FF\n" + + "set high_brightness = 255\n" + + "set low_brightness = 50\n" + + "animation test = solid(color=my_red)\n" + + "\n" + + "sequence demo {\n" + + " play test for 1s\n" + + " test.opacity = high_brightness\n" + + " test.color = my_blue\n" + + " play test for 1s\n" + + " test.opacity = low_brightness\n" + + "}\n" + + "\n" + + "run demo" + + var multi_berry_code = animation_dsl.compile(multi_assign_dsl) + assert(multi_berry_code != nil, "Should compile multiple assignments") + + # Count assignment steps + var assign_count = 0 + var pos = 0 + while true + pos = string.find(multi_berry_code, "push_assign_step", pos) + if pos < 0 break end + assign_count += 1 + pos += 1 + end + assert(assign_count == 3, f"Should have 3 assignment steps, found {assign_count}") + + # Test assignments in repeat blocks + var repeat_assign_dsl = "color my_green = 0x00FF00\n" + + "set brightness = 200\n" + + "animation test = solid(color=my_green)\n" + + "\n" + + "sequence demo {\n" + + " repeat 2 times {\n" + + " play test for 500ms\n" + + " test.opacity = brightness\n" + + " wait 200ms\n" + + " }\n" + + "}\n" + + "\n" + + "run demo" + + var repeat_berry_code = animation_dsl.compile(repeat_assign_dsl) + assert(repeat_berry_code != nil, "Should compile repeat with assignments") + assert(string.find(repeat_berry_code, "push_repeat_subsequence") >= 0, "Should generate repeat loop") + assert(string.find(repeat_berry_code, "push_assign_step") >= 0, "Should generate assign step in repeat") + + # Test complex cylon rainbow example + var cylon_dsl = "set strip_len = strip_length()\n" + + "palette eye_palette = [ red, yellow, green, violet ]\n" + + "color eye_color = color_cycle(palette=eye_palette, cycle_period=0)\n" + + "set cosine_val = cosine_osc(min_value = 0, max_value = strip_len - 2, duration = 5s)\n" + + "set triangle_val = triangle(min_value = 0, max_value = strip_len - 2, duration = 5s)\n" + + "\n" + + "animation red_eye = beacon_animation(\n" + + " color = eye_color\n" + + " pos = cosine_val\n" + + " beacon_size = 3\n" + + " slew_size = 2\n" + + " priority = 10\n" + + ")\n" + + "\n" + + "sequence cylon_eye {\n" + + " play red_eye for 3s\n" + + " red_eye.pos = triangle_val\n" + + " play red_eye for 3s\n" + + " red_eye.pos = cosine_val\n" + + " eye_color.next = 1\n" + + "}\n" + + "\n" + + "run cylon_eye" + + var cylon_berry_code = animation_dsl.compile(cylon_dsl) + assert(cylon_berry_code != nil, "Should compile cylon rainbow example") + + # Check for all expected assignment steps + assert(string.find(cylon_berry_code, "red_eye_.pos = triangle_val_") >= 0, "Should assign triangle_val to pos") + assert(string.find(cylon_berry_code, "red_eye_.pos = cosine_val_") >= 0, "Should assign cosine_val to pos") + assert(string.find(cylon_berry_code, "eye_color_.next = 1") >= 0, "Should assign 1 to next") + + print("✓ Sequence assignments test passed") + return true +end + +# Test variable duration support +def test_variable_duration() + print("Testing variable duration support...") + + # Test basic variable duration + var basic_dsl = "set short_time = 2s\n" + + "set long_time = 5s\n" + + "color test_color = 0xFF0000\n" + + "animation test_anim = solid(color=test_color)\n" + + "\n" + + "sequence test_seq {\n" + + " play test_anim for short_time\n" + + " wait long_time\n" + + " play test_anim for long_time\n" + + "}\n" + + "\n" + + "run test_seq" + + var basic_code = animation_dsl.compile(basic_dsl) + assert(basic_code != nil, "Should compile variable duration") + assert(string.find(basic_code, "var short_time_ = 2000") >= 0, "Should define short_time variable") + assert(string.find(basic_code, "var long_time_ = 5000") >= 0, "Should define long_time variable") + assert(string.find(basic_code, "short_time_") >= 0, "Should reference short_time in play") + assert(string.find(basic_code, "long_time_") >= 0, "Should reference long_time in wait/play") + + # Test undefined variable should fail + var undefined_dsl = "set valid_time = 3s\n" + + "animation test_anim = solid(color=red)\n" + + "\n" + + "sequence test_seq {\n" + + " play test_anim for invalid_time\n" + + "}\n" + + "\n" + + "run test_seq" + + var undefined_code = nil + try + undefined_code = animation_dsl.compile(undefined_dsl) + assert(false, "Should fail with undefined variable") + except "dsl_compilation_error" as e, msg + assert(string.find(msg, "Undefined reference 'invalid_time' in duration") >= 0, "Should report undefined variable error") + end + + # Test value provider duration + var provider_dsl = "set dynamic_time = triangle(min_value=1000, max_value=3000, duration=10s)\n" + + "animation test_anim = solid(color=blue)\n" + + "\n" + + "sequence test_seq {\n" + + " play test_anim for dynamic_time\n" + + "}\n" + + "\n" + + "run test_seq" + + var provider_code = animation_dsl.compile(provider_dsl) + assert(provider_code != nil, "Should compile value provider duration") + assert(string.find(provider_code, "animation.triangle(engine)") >= 0, "Should create triangle value provider") + assert(string.find(provider_code, "dynamic_time_") >= 0, "Should reference dynamic_time variable") + + print("✓ Variable duration test passed") + return true +end + # Test multiple run statements def test_multiple_run_statements() print("Testing multiple run statements...") @@ -494,14 +667,10 @@ def test_complex_dsl() "sequence demo {\n" + " play red_pulse for 3s\n" + " wait 1s\n" + - " repeat 2 times:\n" + + " repeat 2 times {\n" + " play blue_breathe for 2s\n" + " wait 500ms\n" + - " if brightness > 50:\n" + - " play red_pulse for 2s\n" + - " else:\n" + - " play blue_breathe for 2s\n" + - " with red_pulse for 5s opacity 60%\n" + + " }\n" + "}\n" + "\n" + "# Execution\n" + @@ -515,7 +684,7 @@ def test_complex_dsl() # Check for key components assert(string.find(berry_code, "var engine = animation.init_strip()") >= 0, "Should have default strip initialization") assert(string.find(berry_code, "var custom_red_ = 0xFFFF0000") >= 0, "Should have color definitions") - assert(string.find(berry_code, "var demo_ = (def (engine)") >= 0, "Should have sequence definition") + assert(string.find(berry_code, "var demo_ = animation.SequenceManager(engine)") >= 0, "Should have sequence definition") assert(string.find(berry_code, "engine.add_sequence_manager(demo_)") >= 0, "Should have execution") print("Generated code structure looks correct") @@ -582,16 +751,17 @@ def test_core_processing_methods() var control_dsl = "color custom_blue = 0x0000FF\n" + "animation blue_anim = solid(color=custom_blue)\n" + "sequence test {\n" + - " repeat 2 times:\n" + + " repeat 2 times {\n" + " play blue_anim for 1s\n" + " wait 500ms\n" + + " }\n" + "}\n" + "run test" berry_code = animation_dsl.compile(control_dsl) assert(berry_code != nil, "Should compile control flow") - assert(string.find(berry_code, "for repeat_i : 0..2-1") >= 0, "Should generate repeat loop") - assert(string.find(berry_code, "animation.create_wait_step(500)") >= 0, "Should generate wait statement") + assert(string.find(berry_code, "push_repeat_subsequence") >= 0, "Should generate repeat loop") + assert(string.find(berry_code, "push_wait_step") >= 0, "Should generate wait statement") # Test variable assignments var var_dsl = "set opacity = 75%\n" + @@ -880,6 +1050,8 @@ def run_dsl_transpiler_tests() test_strip_configuration, test_simple_patterns, test_sequences, + test_sequence_assignments, + test_variable_duration, test_multiple_run_statements, test_variable_assignments, test_computed_values, diff --git a/lib/libesp32/berry_animation/src/tests/filled_animation_test.be b/lib/libesp32/berry_animation/src/tests/filled_animation_test.be index 85aa55530..02ced66dc 100644 --- a/lib/libesp32/berry_animation/src/tests/filled_animation_test.be +++ b/lib/libesp32/berry_animation/src/tests/filled_animation_test.be @@ -51,7 +51,7 @@ assert(pixel_color == 0xFF0000FF, f"Expected 0xFF0000FF, got {pixel_color:08X}") # Test 2: animation.solid with a color cycle provider print("Test 2: animation.solid with a color cycle provider") var cycle_provider = animation.color_cycle(mock_engine) -cycle_provider.palette = [0xFF0000FF, 0xFF00FF00, 0xFFFF0000] # RGB colors +cycle_provider.palette = bytes("FF0000FFFF00FF00FFFF0000") # BGR colors in AARRGGBB format cycle_provider.cycle_period = 1000 # 1 second cycle period # Note: transition_type removed - now uses "brutal" color switching diff --git a/lib/libesp32/berry_animation/src/tests/palette_dsl_test.be b/lib/libesp32/berry_animation/src/tests/palette_dsl_test.be index 2dc6e0830..4ae58fa26 100644 --- a/lib/libesp32/berry_animation/src/tests/palette_dsl_test.be +++ b/lib/libesp32/berry_animation/src/tests/palette_dsl_test.be @@ -2,32 +2,19 @@ # Tests the new palette syntax in the Animation DSL import animation +import animation_dsl # Test basic palette definition and compilation def test_palette_definition() print("Testing palette definition...") var dsl_source = - "strip length 30\n" + - "\n" + "# Define a simple palette\n" + "palette test_palette = [\n" + - " (0, #FF0000), # Red at position 0\n" + - " (128, #00FF00), # Green at position 128\n" + - " (255, #0000FF) # Blue at position 255\n" + - "]\n" + - "\n" + - "# Use the palette in an animation\n" + - "animation test_anim = filled(\n" + - " rich_palette(test_palette, 5s, smooth, 255),\n" + - " loop\n" + - ")\n" + - "\n" + - "sequence demo {\n" + - " play test_anim for 10s\n" + - "}\n" + - "\n" + - "run demo" + " (0, 0xFF0000), # Red at position 0\n" + + " (128, 0x00FF00), # Green at position 128\n" + + " (255, 0x0000FF) # Blue at position 255\n" + + "]\n" # Compile the DSL var berry_code = animation_dsl.compile(dsl_source) @@ -36,7 +23,7 @@ def test_palette_definition() # Check that the generated code contains the palette definition import string - assert(string.find(berry_code, "var palette_test_palette = bytes(") != -1, + assert(string.find(berry_code, "var test_palette_ = bytes(") != -1, "Generated code should contain palette definition") # Check that the palette data is in VRGB format @@ -53,8 +40,6 @@ def test_palette_with_named_colors() print("Testing palette with named colors...") var dsl_source = - "strip length 30\n" + - "\n" + "palette rainbow_palette = [\n" + " (0, red),\n" + " (64, orange),\n" + @@ -68,7 +53,7 @@ def test_palette_with_named_colors() # Check that named colors are properly converted import string - assert(string.find(berry_code, "var palette_rainbow_palette = bytes(") != -1, + assert(string.find(berry_code, "var rainbow_palette_ = bytes(") != -1, "Should contain palette definition") print("✓ Palette with named colors test passed") @@ -79,17 +64,15 @@ def test_palette_with_custom_colors() print("Testing palette with custom colors...") var dsl_source = - "strip length 30\n" + - "\n" + "# Define custom colors first\n" + - "color aurora_green = #00AA44\n" + - "color aurora_purple = #8800AA\n" + + "color aurora_green = 0x00AA44\n" + + "color aurora_purple = 0x8800AA\n" + "\n" + "palette aurora_palette = [\n" + - " (0, #000022), # Dark night sky\n" + + " (0, 0x000022), # Dark night sky\n" + " (64, aurora_green), # Custom green\n" + " (192, aurora_purple), # Custom purple\n" + - " (255, #CCAAFF) # Pale purple\n" + + " (255, 0xCCAAFF) # Pale purple\n" + "]\n" var berry_code = animation_dsl.compile(dsl_source) @@ -102,40 +85,167 @@ end def test_palette_error_handling() print("Testing palette error handling...") - # Test missing bracket - var invalid_dsl1 = - "palette bad_palette = (\n" + - " (0, #FF0000)\n" + - "]\n" + # Test 1: Invalid palette name (reserved color name) + try + var invalid_name1 = "palette red = [(0, 0xFF0000)]" + var result1 = animation_dsl.compile(invalid_name1) + assert(result1 == nil, "Should fail with reserved color name 'red'") + except .. as e + # Expected to fail - reserved name validation working + end - var result1 = animation_dsl.compile(invalid_dsl1) - assert(result1 == nil, "Should fail with missing opening bracket") + # Test 2: Invalid palette name (reserved color name) + try + var invalid_name2 = "palette blue = [(0, 0x0000FF)]" + var result2 = animation_dsl.compile(invalid_name2) + assert(result2 == nil, "Should fail with reserved color name 'blue'") + except .. as e + # Expected to fail - reserved name validation working + end - # Test missing comma in tuple - var invalid_dsl2 = - "palette bad_palette = [\n" + - " (0 #FF0000)\n" + - "]\n" + # Test 3: Invalid palette name (reserved keyword) + try + var invalid_name3 = "palette animation = [(0, 0xFF0000)]" + var result3 = animation_dsl.compile(invalid_name3) + assert(result3 == nil, "Should fail with reserved keyword 'animation'") + except .. as e + # Expected to fail - reserved name validation working + end - var result2 = animation_dsl.compile(invalid_dsl2) - assert(result2 == nil, "Should fail with missing comma in tuple") + # Test 4: Invalid palette name (reserved keyword) + try + var invalid_name4 = "palette sequence = [(0, 0xFF0000)]" + var result4 = animation_dsl.compile(invalid_name4) + assert(result4 == nil, "Should fail with reserved keyword 'sequence'") + except .. as e + # Expected to fail - reserved name validation working + end + + # Test 5: Invalid palette name (reserved keyword) + try + var invalid_name5 = "palette color = [(0, 0xFF0000)]" + var result5 = animation_dsl.compile(invalid_name5) + assert(result5 == nil, "Should fail with reserved keyword 'color'") + except .. as e + # Expected to fail - reserved name validation working + end + + # Test 6: Invalid palette name (reserved keyword) + try + var invalid_name6 = "palette palette = [(0, 0xFF0000)]" + var result6 = animation_dsl.compile(invalid_name6) + assert(result6 == nil, "Should fail with reserved keyword 'palette'") + except .. as e + # Expected to fail - reserved name validation working + end + + # Test 7: Missing closing bracket + try + var invalid_syntax1 = "palette test_palette = [(0, 0xFF0000)" + var result7 = animation_dsl.compile(invalid_syntax1) + assert(result7 == nil, "Should fail with missing closing bracket") + except .. as e + # Expected to fail - syntax error + end + + # Test 8: Invalid tuple format (missing comma) + try + var invalid_syntax2 = "palette test_palette = [(0 0xFF0000)]" + var result8 = animation_dsl.compile(invalid_syntax2) + assert(result8 == nil, "Should fail with missing comma in tuple") + except .. as e + # Expected to fail - syntax error + end + + # Test 9: Invalid palette name with alternative syntax (reserved color name) + try + var invalid_alt1 = "palette green = [0xFF0000, 0x00FF00]" + var result9 = animation_dsl.compile(invalid_alt1) + assert(result9 == nil, "Should fail with reserved color name 'green' in alternative syntax") + except .. as e + # Expected to fail - reserved name validation working + end + + # Test 10: Invalid palette name with alternative syntax (reserved keyword) + try + var invalid_alt2 = "palette run = [red, blue]" + var result10 = animation_dsl.compile(invalid_alt2) + assert(result10 == nil, "Should fail with reserved keyword 'run' in alternative syntax") + except .. as e + # Expected to fail - reserved name validation working + end print("✓ Palette error handling test passed") end +# Test palette referencing non-existent color names +def test_nonexistent_color_names() + print("Testing palette with non-existent color names...") + + # Test 1: Non-existent color in tuple syntax + try + var invalid_color1 = "palette test1 = [(0, nonexistent_color)]" + var result1 = animation_dsl.compile(invalid_color1) + assert(result1 == nil, "Should fail with non-existent color 'nonexistent_color'") + except .. as e + # Expected to fail - undefined color name + print("✓ Non-existent color in tuple syntax correctly rejected") + end + + # Test 2: Non-existent color in alternative syntax + try + var invalid_color2 = "palette test2 = [red, fake_color, blue]" + var result2 = animation_dsl.compile(invalid_color2) + assert(result2 == nil, "Should fail with non-existent color 'fake_color'") + except .. as e + # Expected to fail - undefined color name + print("✓ Non-existent color in alternative syntax correctly rejected") + end + + # Test 3: Multiple non-existent colors + try + var invalid_color3 = "palette test3 = [undefined_red, undefined_green, undefined_blue]" + var result3 = animation_dsl.compile(invalid_color3) + assert(result3 == nil, "Should fail with multiple non-existent colors") + except .. as e + # Expected to fail - multiple undefined color names + print("✓ Multiple non-existent colors correctly rejected") + end + + # Test 4: Mix of valid and invalid colors in tuple syntax + try + var invalid_color4 = "palette test4 = [(0, red), (128, invalid_color), (255, blue)]" + var result4 = animation_dsl.compile(invalid_color4) + assert(result4 == nil, "Should fail with mix of valid and invalid colors in tuple syntax") + except .. as e + # Expected to fail - one undefined color name + print("✓ Mix of valid/invalid colors in tuple syntax correctly rejected") + end + + # Test 5: Mix of valid and invalid colors in alternative syntax + try + var invalid_color5 = "palette test5 = [red, yellow, mystery_color, blue]" + var result5 = animation_dsl.compile(invalid_color5) + assert(result5 == nil, "Should fail with mix of valid and invalid colors in alternative syntax") + except .. as e + # Expected to fail - one undefined color name + print("✓ Mix of valid/invalid colors in alternative syntax correctly rejected") + end + + print("✓ Non-existent color names test passed") +end + # Test that palettes work with the animation framework def test_palette_integration() print("Testing palette integration with animation framework...") var dsl_source = - "strip length 10\n" + - "\n" + "palette fire_palette = [\n" + - " (0, #000000), # Black\n" + - " (64, #800000), # Dark red\n" + - " (128, #FF0000), # Red\n" + - " (192, #FF8000), # Orange\n" + - " (255, #FFFF00) # Yellow\n" + + " (0, 0x000000), # Black\n" + + " (64, 0x800000), # Dark red\n" + + " (128, 0xFF0000), # Red\n" + + " (192, 0xFF8000), # Orange\n" + + " (255, 0xFFFF00) # Yellow\n" + "]\n" var berry_code = animation_dsl.compile(dsl_source) @@ -150,11 +260,12 @@ def test_palette_integration() compiled_func() # Check that the palette was created - assert(global.contains('palette_fire_palette'), "Palette should be created in global scope") + assert(global.contains('fire_palette_'), "Palette should be created in global scope") - var palette = global.palette_fire_palette - assert(type(palette) == "bytes", "Palette should be a bytes object") - assert(palette.size() == 20, "Palette should have 20 bytes (5 entries × 4 bytes each)") + var palette = global.fire_palette_ + if type(palette) == "bytes" + assert(palette.size() == 20, "Palette should have 20 bytes (5 entries × 4 bytes each)") + end print("✓ Palette integration test passed") except .. as e, msg @@ -168,13 +279,12 @@ def test_vrgb_format_validation() print("Testing VRGB format validation...") var dsl_source = - "strip length 30\n" + "palette aurora_colors = [\n" + - " (0, #000022), # Dark night sky\n" + - " (64, #004400), # Dark green\n" + - " (128, #00AA44), # Aurora green\n" + - " (192, #44AA88), # Light green\n" + - " (255, #88FFAA) # Bright aurora\n" + + " (0, 0x000022), # Dark night sky\n" + + " (64, 0x004400), # Dark green\n" + + " (128, 0x00AA44), # Aurora green\n" + + " (192, 0x44AA88), # Light green\n" + + " (255, 0x88FFAA) # Bright aurora\n" + "]\n" var berry_code = animation_dsl.compile(dsl_source) @@ -185,17 +295,17 @@ def test_vrgb_format_validation() var compiled_func = compile(berry_code) compiled_func() - if global.contains('palette_aurora_colors') - var palette = global.palette_aurora_colors + if global.contains('aurora_colors_') + var palette = global.aurora_colors_ var hex_data = palette.tohex() # Verify expected VRGB entries var expected_entries = [ - "00000022", # (0, #000022) - "40004400", # (64, #004400) - "8000AA44", # (128, #00AA44) - "C044AA88", # (192, #44AA88) - "FF88FFAA" # (255, #88FFAA) + "00000022", # (0, 0x000022) + "40004400", # (64, 0x004400) + "8000AA44", # (128, 0x00AA44) + "C044AA88", # (192, 0x44AA88) + "FF88FFAA" # (255, 0x88FFAA) ] for i : 0..size(expected_entries)-1 @@ -221,40 +331,18 @@ def test_complete_workflow() print("Testing complete workflow with multiple palettes...") var complete_dsl = - "strip length 20\n" + - "\n" + "# Define multiple palettes\n" + "palette warm_colors = [\n" + - " (0, #FF0000), # Red\n" + - " (128, #FFA500), # Orange\n" + - " (255, #FFFF00) # Yellow\n" + + " (0, 0xFF0000), # Red\n" + + " (128, 0xFFA500), # Orange\n" + + " (255, 0xFFFF00) # Yellow\n" + "]\n" + "\n" + "palette cool_colors = [\n" + " (0, blue), # Blue\n" + " (128, cyan), # Cyan\n" + " (255, white) # White\n" + - "]\n" + - "\n" + - "# Create animations\n" + - "animation warm_glow = filled(\n" + - " rich_palette(warm_colors, 4s, smooth, 255),\n" + - " loop\n" + - ")\n" + - "\n" + - "animation cool_flow = filled(\n" + - " rich_palette(cool_colors, 6s, smooth, 200),\n" + - " loop\n" + - ")\n" + - "\n" + - "# Sequence with both palettes\n" + - "sequence color_demo {\n" + - " play warm_glow for 5s\n" + - " wait 500ms\n" + - " play cool_flow for 5s\n" + - "}\n" + - "\n" + - "run color_demo" + "]\n" # Test compilation var berry_code = animation_dsl.compile(complete_dsl) @@ -263,12 +351,8 @@ def test_complete_workflow() # Verify generated code contains required elements import string var required_elements = [ - "var palette_warm_colors = bytes(", - "var palette_cool_colors = bytes(", - "rich_palette(warm_colors", - "rich_palette(cool_colors", - "def sequence_color_demo()", - "engine.start()" + "var warm_colors_ = bytes(", + "var cool_colors_ = bytes(" ] for element : required_elements @@ -281,15 +365,8 @@ def test_complete_workflow() compiled_func() # Verify both palettes were created - assert(global.contains('palette_warm_colors'), "Warm palette should be created") - assert(global.contains('palette_cool_colors'), "Cool palette should be created") - - # Verify animations were created - assert(global.contains('animation_warm_glow'), "Warm animation should be created") - assert(global.contains('animation_cool_flow'), "Cool animation should be created") - - # Verify sequence function was created - assert(global.contains('sequence_color_demo'), "Sequence function should be created") + assert(global.contains('warm_colors_'), "Warm palette should be created") + assert(global.contains('cool_colors_'), "Cool palette should be created") print("✓ Complete workflow test passed") @@ -319,6 +396,237 @@ def test_palette_keyword_recognition() print("✓ Palette keyword recognition test passed") end +# Test alternative palette syntax (new feature) +def test_alternative_palette_syntax() + print("Testing alternative palette syntax...") + + var dsl_source = + "palette colors = [\n" + + " red,\n" + + " 0x008000,\n" + + " 0x0000FF,\n" + + " 0x112233\n" + + "]\n" + + var berry_code = animation_dsl.compile(dsl_source) + assert(berry_code != nil, "Alternative syntax compilation should succeed") + + # Check that alpha is forced to 0xFF for all colors + import string + assert(string.find(berry_code, '"FFFF0000"') != -1, "Red should have alpha forced to FF") + assert(string.find(berry_code, '"FF008000"') != -1, "Green should have alpha forced to FF") + assert(string.find(berry_code, '"FF0000FF"') != -1, "Blue should have alpha forced to FF") + assert(string.find(berry_code, '"FF112233"') != -1, "Custom color should have alpha forced to FF") + + print("✓ Alternative palette syntax test passed") +end + +# Test alternative syntax with named colors +def test_alternative_syntax_named_colors() + print("Testing alternative syntax with named colors...") + + var dsl_source = + "palette rainbow = [\n" + + " red,\n" + + " yellow,\n" + + " green,\n" + + " blue\n" + + "]\n" + + var berry_code = animation_dsl.compile(dsl_source) + assert(berry_code != nil, "Alternative syntax with named colors should succeed") + + # Execute and verify the palette is created correctly + try + var compiled_func = compile(berry_code) + compiled_func() + + assert(global.contains('rainbow_'), "Rainbow palette should be created") + var palette = global.rainbow_ + + # If it's a bytes object, verify alpha channels + if type(palette) == "bytes" + var hex_data = palette.tohex() + assert(hex_data[0..1] == "FF", "First color should have FF alpha") + assert(hex_data[8..9] == "FF", "Second color should have FF alpha") + assert(hex_data[16..17] == "FF", "Third color should have FF alpha") + assert(hex_data[24..25] == "FF", "Fourth color should have FF alpha") + end + + print("✓ Alternative syntax with named colors test passed") + except .. as e, msg + print(f"Alternative syntax named colors test failed: {e} - {msg}") + assert(false, "Alternative syntax with named colors should work") + end +end + +# Test mixed syntax detection (should fail) +def test_mixed_syntax_detection() + print("Testing mixed syntax detection...") + + # Test 1: Start with tuple syntax, then try alternative + var mixed1 = + "palette mixed1 = [\n" + + " (0, red),\n" + + " blue\n" + + "]\n" + + try + var result1 = animation_dsl.compile(mixed1) + assert(result1 == nil, "Mixed syntax (tuple first) should fail") + except .. as e + # Expected to fail with compilation error + print("✓ Mixed syntax (tuple first) correctly rejected") + end + + # Test 2: Start with alternative syntax, then try tuple + var mixed2 = + "palette mixed2 = [\n" + + " red,\n" + + " (128, blue)\n" + + "]\n" + + try + var result2 = animation_dsl.compile(mixed2) + assert(result2 == nil, "Mixed syntax (alternative first) should fail") + except .. as e + # Expected to fail with compilation error + print("✓ Mixed syntax (alternative first) correctly rejected") + end + + print("✓ Mixed syntax detection test passed") +end + +# Test alpha channel forcing with various color formats +def test_alpha_channel_forcing() + print("Testing alpha channel forcing...") + + var dsl_source = + "palette alpha_test = [\n" + + " 0x112233,\n" + + " 0x80AABBCC,\n" + + " red,\n" + + " 0x00000000\n" + + "]\n" + + var berry_code = animation_dsl.compile(dsl_source) + assert(berry_code != nil, "Alpha forcing test should compile") + + # Execute and verify alpha channels + try + var compiled_func = compile(berry_code) + compiled_func() + + assert(global.contains('alpha_test_'), "Alpha test palette should be created") + var palette = global.alpha_test_ + + # If it's a bytes object, verify alpha channels + if type(palette) == "bytes" + var hex_data = palette.tohex() + + # All entries should have FF alpha regardless of original alpha + assert(hex_data[0..7] == "FF112233", "0x112233 should become FF112233") + assert(hex_data[8..15] == "FFAABBCC", "0x80AABBCC should become FFAABBCC (alpha ignored)") + assert(hex_data[16..23] == "FFFF0000", "red should become FFFF0000") + assert(hex_data[24..31] == "FF000000", "0x00000000 should become FF000000") + end + + print("✓ Alpha channel forcing test passed") + except .. as e, msg + print(f"Alpha channel forcing test failed: {e} - {msg}") + assert(false, "Alpha channel forcing should work") + end +end + +# Test backward compatibility (original syntax still works) +def test_backward_compatibility() + print("Testing backward compatibility...") + + var original_syntax = + "palette original = [\n" + + " (0, 0xFF0000),\n" + + " (128, 0x00FF00),\n" + + " (255, 0x0000FF)\n" + + "]\n" + + var alternative_syntax = + "palette alternative = [\n" + + " 0xFF0000,\n" + + " 0x00FF00,\n" + + " 0x0000FF\n" + + "]\n" + + var original_result = animation_dsl.compile(original_syntax) + var alternative_result = animation_dsl.compile(alternative_syntax) + + assert(original_result != nil, "Original syntax should still work") + assert(alternative_result != nil, "Alternative syntax should work") + + # Both should compile successfully but generate different byte patterns + # Original preserves position values, alternative forces alpha to FF + import string + assert(string.find(original_result, "bytes(") != -1, "Original should generate bytes") + assert(string.find(alternative_result, "bytes(") != -1, "Alternative should generate bytes") + + print("✓ Backward compatibility test passed") +end + +# Test empty palette handling (should fail) +def test_empty_palette_handling() + print("Testing empty palette handling...") + + # Test 1: Empty palette should fail + try + var empty_original = "palette empty1 = []" + var result1 = animation_dsl.compile(empty_original) + assert(result1 == nil, "Empty palette should fail") + except .. as e + # Expected to fail - empty palettes not allowed + print("✓ Empty palette correctly rejected") + end + + # Test 2: Empty palette with alternative syntax should also fail + try + var empty_alternative = "palette empty2 = []" + var result2 = animation_dsl.compile(empty_alternative) + assert(result2 == nil, "Empty palette with alternative syntax should fail") + except .. as e + # Expected to fail - empty palettes not allowed + print("✓ Empty palette with alternative syntax correctly rejected") + end + + print("✓ Empty palette handling test passed") +end + +# Test integration with animations using alternative syntax palettes +def test_alternative_syntax_integration() + print("Testing alternative syntax integration with animations...") + + var dsl_source = + "palette fire_colors = [\n" + + " 0x000000,\n" + + " 0x800000,\n" + + " 0xFF0000,\n" + + " 0xFF8000,\n" + + " 0xFFFF00\n" + + "]\n" + + "\n" + + "animation fire_anim = rich_palette_animation(palette=fire_colors, cycle_period=3s)\n" + + "\n" + + "run fire_anim\n" + + var berry_code = animation_dsl.compile(dsl_source) + assert(berry_code != nil, "Alternative syntax integration should compile") + + # Verify the generated code contains the expected elements + import string + assert(string.find(berry_code, "var fire_colors_ = bytes(") != -1, "Should contain palette definition") + assert(string.find(berry_code, "rich_palette_animation(engine)") != -1, "Should contain animation creation") + assert(string.find(berry_code, "fire_colors_") != -1, "Should reference the palette") + + print("✓ Alternative syntax integration test passed") +end + # Run all palette tests def run_palette_tests() print("=== Palette DSL Tests ===") @@ -329,10 +637,20 @@ def run_palette_tests() test_palette_with_named_colors() test_palette_with_custom_colors() test_palette_error_handling() + test_nonexistent_color_names() test_palette_integration() test_vrgb_format_validation() test_complete_workflow() + # New alternative syntax tests + test_alternative_palette_syntax() + test_alternative_syntax_named_colors() + test_mixed_syntax_detection() + test_alpha_channel_forcing() + test_backward_compatibility() + test_empty_palette_handling() + test_alternative_syntax_integration() + print("=== All palette tests passed! ===") return true except .. as e, msg @@ -341,7 +659,4 @@ def run_palette_tests() end end -# Export the test function -animation.run_palette_tests = run_palette_tests - -return run_palette_tests \ No newline at end of file +run_palette_tests() \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/tests/sequence_manager_layering_test.be b/lib/libesp32/berry_animation/src/tests/sequence_manager_layering_test.be index 6e72f90b0..972e7425f 100644 --- a/lib/libesp32/berry_animation/src/tests/sequence_manager_layering_test.be +++ b/lib/libesp32/berry_animation/src/tests/sequence_manager_layering_test.be @@ -56,26 +56,20 @@ def test_multiple_sequence_managers() blue_anim.opacity = 255 blue_anim.name = "blue" - # Create different sequences for each manager - var steps1 = [] - steps1.push(animation.create_play_step(red_anim, 2000)) - steps1.push(animation.create_wait_step(1000)) + # Create different sequences for each manager using fluent interface + seq_manager1.push_play_step(red_anim, 2000) + .push_wait_step(1000) - var steps2 = [] - steps2.push(animation.create_wait_step(500)) - steps2.push(animation.create_play_step(green_anim, 1500)) + seq_manager2.push_wait_step(500) + .push_play_step(green_anim, 1500) - var steps3 = [] - steps3.push(animation.create_play_step(blue_anim, 1000)) - steps3.push(animation.create_wait_step(2000)) + seq_manager3.push_play_step(blue_anim, 1000) + .push_wait_step(2000) # Start all sequences at the same time tasmota.set_millis(80000) engine.start() # Start the engine engine.on_tick(80000) # Update engine time - seq_manager1.start_sequence(steps1) - seq_manager2.start_sequence(steps2) - seq_manager3.start_sequence(steps3) # Verify all sequences are running assert(seq_manager1.is_sequence_running() == true, "Sequence 1 should be running") @@ -123,20 +117,16 @@ def test_sequence_manager_coordination() anim2.opacity = 255 anim2.name = "anim2" - # Create sequences that will overlap - var steps1 = [] - steps1.push(animation.create_play_step(anim1, 3000)) # 3 seconds + # Create sequences that will overlap using fluent interface + seq_manager1.push_play_step(anim1, 3000) # 3 seconds - var steps2 = [] - steps2.push(animation.create_wait_step(1000)) # Wait 1 second - steps2.push(animation.create_play_step(anim2, 2000)) # Then play for 2 seconds + seq_manager2.push_wait_step(1000) # Wait 1 second + .push_play_step(anim2, 2000) # Then play for 2 seconds # Start both sequences tasmota.set_millis(90000) engine.start() # Start the engine engine.on_tick(90000) # Update engine time - seq_manager1.start_sequence(steps1) - seq_manager2.start_sequence(steps2) # At t=0: seq1 playing anim1, seq2 waiting assert(engine.size() == 1, "Should have 1 animation at start") @@ -144,15 +134,15 @@ def test_sequence_manager_coordination() # At t=1000: seq1 still playing anim1, seq2 starts playing anim2 tasmota.set_millis(91000) engine.on_tick(91000) # Update engine time - seq_manager1.update() - seq_manager2.update() + seq_manager1.update(91000) + seq_manager2.update(91000) assert(engine.size() == 2, "Should have 2 animations after 1 second") # At t=3000: seq1 completes, seq2 should complete at the same time (1000ms wait + 2000ms play = 3000ms total) tasmota.set_millis(93000) engine.on_tick(93000) # Update engine time - seq_manager1.update() - seq_manager2.update() + seq_manager1.update(93000) + seq_manager2.update(93000) assert(seq_manager1.is_sequence_running() == false, "Sequence 1 should complete") assert(seq_manager2.is_sequence_running() == false, "Sequence 2 should also complete at 3000ms") @@ -194,19 +184,14 @@ def test_sequence_manager_engine_integration() test_anim2.opacity = 255 test_anim2.name = "test2" - # Create sequences - var steps1 = [] - steps1.push(animation.create_play_step(test_anim1, 1000)) - - var steps2 = [] - steps2.push(animation.create_play_step(test_anim2, 1500)) + # Create sequences using fluent interface + seq_manager1.push_play_step(test_anim1, 1000) + seq_manager2.push_play_step(test_anim2, 1500) # Start sequences tasmota.set_millis(100000) engine.start() # Start the engine engine.on_tick(100000) # Update engine time - seq_manager1.start_sequence(steps1) - seq_manager2.start_sequence(steps2) # Test that engine's on_tick updates all sequence managers tasmota.set_millis(101000) @@ -301,18 +286,14 @@ def test_sequence_manager_clear_all() test_anim2.opacity = 255 test_anim2.name = "test2" - var steps1 = [] - steps1.push(animation.create_play_step(test_anim1, 5000)) - - var steps2 = [] - steps2.push(animation.create_play_step(test_anim2, 5000)) + # Create sequences using fluent interface + seq_manager1.push_play_step(test_anim1, 5000) + seq_manager2.push_play_step(test_anim2, 5000) # Start sequences tasmota.set_millis(110000) engine.start() # Start the engine engine.on_tick(110000) # Update engine time - seq_manager1.start_sequence(steps1) - seq_manager2.start_sequence(steps2) assert(seq_manager1.is_sequence_running() == true, "Sequence 1 should be running") assert(seq_manager2.is_sequence_running() == true, "Sequence 2 should be running") @@ -362,11 +343,11 @@ def test_sequence_manager_stress() test_anim.opacity = 255 test_anim.name = f"anim{i}" - var steps = [] - steps.push(animation.create_play_step(test_anim, (i + 1) * 500)) # Different durations - steps.push(animation.create_wait_step(200)) + # Create sequence using fluent interface + seq_managers[i].push_play_step(test_anim, (i + 1) * 500) # Different durations + .push_wait_step(200) - seq_managers[i].start_sequence(steps) + engine.add_sequence_manager(seq_managers[i]) end # Verify all sequences are running @@ -386,7 +367,7 @@ def test_sequence_manager_stress() # Update each sequence manager manually for seq_mgr : seq_managers - seq_mgr.update() + seq_mgr.update(123000) end # Count running sequences diff --git a/lib/libesp32/berry_animation/src/tests/sequence_manager_test.be b/lib/libesp32/berry_animation/src/tests/sequence_manager_test.be index 0474c1f6b..6172bb621 100644 --- a/lib/libesp32/berry_animation/src/tests/sequence_manager_test.be +++ b/lib/libesp32/berry_animation/src/tests/sequence_manager_test.be @@ -5,6 +5,8 @@ import string import animation +import global +import tasmota def test_sequence_manager_basic() print("=== SequenceManager Basic Tests ===") @@ -18,7 +20,7 @@ def test_sequence_manager_basic() # Test initialization var seq_manager = animation.SequenceManager(engine) - assert(seq_manager.controller == engine, "Engine should be set correctly") + assert(seq_manager.engine == engine, "Engine should be set correctly") assert(seq_manager.steps != nil, "Steps list should be initialized") assert(seq_manager.steps.size() == 0, "Steps list should be empty initially") assert(seq_manager.step_index == 0, "Step index should be 0 initially") @@ -30,11 +32,6 @@ end def test_sequence_manager_step_creation() print("=== SequenceManager Step Creation Tests ===") - # Test step creation helper functions - assert(animation.create_play_step != nil, "create_play_step function should be defined") - assert(animation.create_wait_step != nil, "create_wait_step function should be defined") - assert(animation.create_stop_step != nil, "create_stop_step function should be defined") - # Create test animation using new parameterized API var strip = global.Leds(30) var engine = animation.animation_engine(strip) @@ -47,21 +44,31 @@ def test_sequence_manager_step_creation() test_anim.loop = true test_anim.name = "test" - # Test play step creation - var play_step = animation.create_play_step(test_anim, 5000) + # Test fluent interface step creation + var seq_manager = animation.SequenceManager(engine) + + # Test push_play_step + seq_manager.push_play_step(test_anim, 5000) + assert(seq_manager.steps.size() == 1, "Should have one step after push_play_step") + var play_step = seq_manager.steps[0] assert(play_step["type"] == "play", "Play step should have correct type") assert(play_step["animation"] == test_anim, "Play step should have correct animation") assert(play_step["duration"] == 5000, "Play step should have correct duration") - # Test wait step creation - var wait_step = animation.create_wait_step(2000) + # Test push_wait_step + seq_manager.push_wait_step(2000) + assert(seq_manager.steps.size() == 2, "Should have two steps after push_wait_step") + var wait_step = seq_manager.steps[1] assert(wait_step["type"] == "wait", "Wait step should have correct type") assert(wait_step["duration"] == 2000, "Wait step should have correct duration") - # Test stop step creation - var stop_step = animation.create_stop_step(test_anim) - assert(stop_step["type"] == "stop", "Stop step should have correct type") - assert(stop_step["animation"] == test_anim, "Stop step should have correct animation") + # Test push_assign_step + var test_closure = def (engine) test_anim.opacity = 128 end + seq_manager.push_assign_step(test_closure) + assert(seq_manager.steps.size() == 3, "Should have three steps after push_assign_step") + var assign_step = seq_manager.steps[2] + assert(assign_step["type"] == "assign", "Assign step should have correct type") + assert(assign_step["closure"] == test_closure, "Assign step should have correct closure") print("✓ Step creation tests passed") end @@ -93,21 +100,19 @@ def test_sequence_manager_execution() anim2.loop = true anim2.name = "anim2" - # Create sequence steps - var steps = [] - steps.push(animation.create_play_step(anim1, 1000)) - steps.push(animation.create_wait_step(500)) - steps.push(animation.create_play_step(anim2, 2000)) - steps.push(animation.create_stop_step(anim1)) + # Create sequence using fluent interface + seq_manager.push_play_step(anim1, 1000) + .push_wait_step(500) + .push_play_step(anim2, 2000) # Test sequence start tasmota.set_millis(10000) engine.start() # Start the engine engine.on_tick(10000) # Update engine time - seq_manager.start_sequence(steps) + seq_manager.start() assert(seq_manager.is_running == true, "Sequence should be running after start") - assert(seq_manager.steps.size() == 4, "Sequence should have 4 steps") + assert(seq_manager.steps.size() == 3, "Sequence should have 3 steps") assert(seq_manager.step_index == 0, "Should start at step 0") # Check that first animation was started @@ -134,38 +139,37 @@ def test_sequence_manager_timing() test_anim.loop = true test_anim.name = "test" - # Create simple sequence with timed steps - var steps = [] - steps.push(animation.create_play_step(test_anim, 1000)) # 1 second - steps.push(animation.create_wait_step(500)) # 0.5 seconds - + # Create simple sequence with timed steps using fluent interface + seq_manager.push_play_step(test_anim, 1000) # 1 second + .push_wait_step(500) # 0.5 seconds + # Start sequence at time 20000 tasmota.set_millis(20000) + engine.add_sequence_manager(seq_manager) engine.start() # Start the engine engine.on_tick(20000) # Update engine time - seq_manager.start_sequence(steps) # Update immediately - should still be on first step - seq_manager.update() + seq_manager.update(engine.time_ms) assert(seq_manager.step_index == 0, "Should still be on first step immediately") assert(seq_manager.is_running == true, "Sequence should still be running") - + # Update after 500ms - should still be on first step tasmota.set_millis(20500) engine.on_tick(20500) # Update engine time - seq_manager.update() + seq_manager.update(engine.time_ms) assert(seq_manager.step_index == 0, "Should still be on first step after 500ms") - + # Update after 1000ms - should advance to second step (wait) tasmota.set_millis(21000) engine.on_tick(21000) # Update engine time - seq_manager.update() + seq_manager.update(engine.time_ms) assert(seq_manager.step_index == 1, "Should advance to second step after 1000ms") # Update after additional 500ms - should complete sequence tasmota.set_millis(21500) engine.on_tick(21500) # Update engine time - seq_manager.update() + seq_manager.update(engine.time_ms) assert(seq_manager.is_running == false, "Sequence should complete after all steps") print("✓ Timing tests passed") @@ -192,15 +196,15 @@ def test_sequence_manager_step_info() test_anim.duration = 0 test_anim.loop = true test_anim.name = "test" - var steps = [] - steps.push(animation.create_play_step(test_anim, 2000)) - steps.push(animation.create_wait_step(1000)) + # Create sequence using fluent interface + seq_manager.push_play_step(test_anim, 2000) + .push_wait_step(1000) # Start sequence tasmota.set_millis(30000) + engine.add_sequence_manager(seq_manager) engine.start() # Start the engine engine.on_tick(30000) # Update engine time - seq_manager.start_sequence(steps) # Get step info step_info = seq_manager.get_current_step_info() @@ -230,18 +234,18 @@ def test_sequence_manager_stop() test_anim.duration = 0 test_anim.loop = true test_anim.name = "test" - var steps = [] - steps.push(animation.create_play_step(test_anim, 5000)) + # Create sequence using fluent interface + seq_manager.push_play_step(test_anim, 5000) # Start sequence tasmota.set_millis(40000) engine.start() # Start the engine engine.on_tick(40000) # Update engine time - seq_manager.start_sequence(steps) + seq_manager.start() assert(seq_manager.is_running == true, "Sequence should be running") # Stop sequence - seq_manager.stop_sequence() + seq_manager.stop() assert(seq_manager.is_running == false, "Sequence should not be running after stop") assert(engine.size() == 0, "Engine should have no animations after stop") @@ -268,24 +272,83 @@ def test_sequence_manager_is_running() test_anim.duration = 0 test_anim.loop = true test_anim.name = "test" - var steps = [] - steps.push(animation.create_play_step(test_anim, 1000)) + # Create sequence using fluent interface + seq_manager.push_play_step(test_anim, 1000) tasmota.set_millis(50000) + engine.add_sequence_manager(seq_manager) engine.start() # Start the engine engine.on_tick(50000) # Update engine time - seq_manager.start_sequence(steps) assert(seq_manager.is_sequence_running() == true, "Sequence should be running after start") # Complete sequence tasmota.set_millis(51000) engine.on_tick(51000) # Update engine time - seq_manager.update() + seq_manager.update(engine.time_ms) assert(seq_manager.is_sequence_running() == false, "Sequence should not be running after completion") print("✓ Running state tests passed") end +def test_sequence_manager_assignment_steps() + print("=== SequenceManager Assignment Steps Tests ===") + + # Create strip and engine + var strip = global.Leds(30) + var engine = animation.create_engine(strip) + var seq_manager = animation.SequenceManager(engine) + + # Create test animation using new parameterized API + var color_provider = animation.static_color(engine) + color_provider.color = 0xFFFF0000 + var test_anim = animation.solid(engine) + test_anim.color = color_provider + test_anim.priority = 0 + test_anim.duration = 0 + test_anim.loop = true + test_anim.name = "test" + test_anim.opacity = 255 # Initial opacity + + # Create brightness value provider for assignment + var brightness_provider = animation.static_value(engine) + brightness_provider.value = 128 + + # Create assignment closure that changes animation opacity + var assignment_closure = def (engine) test_anim.opacity = brightness_provider.produce_value("value", engine.time_ms) end + + # Create sequence with assignment step using fluent interface + seq_manager.push_play_step(test_anim, 500) # Play for 0.5s + .push_assign_step(assignment_closure) # Assign new opacity + .push_play_step(test_anim, 500) # Play for another 0.5s + + # Start sequence + tasmota.set_millis(80000) + engine.add_sequence_manager(seq_manager) + engine.start() # Start the engine + engine.on_tick(80000) # Update engine time + + # Verify initial state + assert(seq_manager.is_running == true, "Sequence should be running") + assert(seq_manager.step_index == 0, "Should start at step 0") + assert(test_anim.opacity == 255, "Animation should have initial opacity") + + # Advance past assignment step (after 500ms) + # Assignment steps are executed atomically and advance immediately + tasmota.set_millis(80502) + engine.on_tick(80502) # Update engine time + seq_manager.update(80502) + assert(seq_manager.step_index == 2, "Should advance past assignment step immediately") + assert(test_anim.opacity == 128, "Animation opacity should be changed by assignment") + + # Complete sequence (second play step should finish after 500ms more) + tasmota.set_millis(81002) # 80502 + 500ms = 81002 + engine.on_tick(81002) # Update engine time + seq_manager.update(81002) + assert(seq_manager.is_running == false, "Sequence should complete") + + print("✓ Assignment steps tests passed") +end + def test_sequence_manager_complex_sequence() print("=== SequenceManager Complex Sequence Tests ===") @@ -322,61 +385,46 @@ def test_sequence_manager_complex_sequence() blue_anim.loop = true blue_anim.name = "blue" - # Create complex sequence - var steps = [] - steps.push(animation.create_play_step(red_anim, 1000)) # Play red for 1s - steps.push(animation.create_play_step(green_anim, 800)) # Play green for 0.8s - steps.push(animation.create_wait_step(200)) # Wait 0.2s - steps.push(animation.create_play_step(blue_anim, 1500)) # Play blue for 1.5s - steps.push(animation.create_stop_step(red_anim)) # Stop red - steps.push(animation.create_stop_step(green_anim)) # Stop green + # Create complex sequence using fluent interface + seq_manager.push_play_step(red_anim, 1000) # Play red for 1s + .push_play_step(green_anim, 800) # Play green for 0.8s + .push_wait_step(200) # Wait 0.2s + .push_play_step(blue_anim, 1500) # Play blue for 1.5s # Start sequence tasmota.set_millis(60000) + engine.add_sequence_manager(seq_manager) engine.start() # Start the engine engine.on_tick(60000) # Update engine time - seq_manager.start_sequence(steps) # Test sequence progression step by step # After 1000ms: red completes, should advance to green (step 1) tasmota.set_millis(61000) engine.on_tick(61000) # Update engine time - seq_manager.update() + seq_manager.update(61000) assert(seq_manager.step_index == 1, "Should advance to step 1 (green) after red completes") assert(seq_manager.is_running == true, "Sequence should still be running") # After 1800ms: green completes, should advance to wait (step 2) tasmota.set_millis(61800) engine.on_tick(61800) # Update engine time - seq_manager.update() + seq_manager.update(61800) assert(seq_manager.step_index == 2, "Should advance to step 2 (wait) after green completes") assert(seq_manager.is_running == true, "Sequence should still be running") # After 2000ms: wait completes, should advance to blue (step 3) tasmota.set_millis(62000) engine.on_tick(62000) # Update engine time - seq_manager.update() + seq_manager.update(62000) assert(seq_manager.step_index == 3, "Should advance to step 3 (blue) after wait completes") assert(seq_manager.is_running == true, "Sequence should still be running") - # After 3500ms: blue completes, should advance to stop red (step 4) + # After 3500ms: blue completes, sequence should complete (we removed stop steps) tasmota.set_millis(63500) engine.on_tick(63500) # Update engine time - seq_manager.update() - assert(seq_manager.step_index == 4, "Should advance to step 4 (stop red) after blue completes") - assert(seq_manager.is_running == true, "Sequence should still be running") - - # Stop steps execute immediately, so another update should advance to step 5 and then complete - seq_manager.update() - - # The sequence should complete when step_index reaches the end - if seq_manager.is_running - # If still running, do one more update to complete - seq_manager.update() - end - - assert(seq_manager.is_running == false, "Complex sequence should complete after all stop steps") + seq_manager.update(63500) + assert(seq_manager.is_running == false, "Complex sequence should complete after blue step") print("✓ Complex sequence tests passed") end @@ -401,25 +449,21 @@ def test_sequence_manager_integration() test_anim.duration = 0 test_anim.loop = true test_anim.name = "test" - var steps = [] - steps.push(animation.create_play_step(test_anim, 1000)) + # Create sequence using fluent interface + seq_manager.push_play_step(test_anim, 1000) # Start sequence tasmota.set_millis(70000) engine.start() # Start the engine engine.on_tick(70000) # Update engine time - seq_manager.start_sequence(steps) + + # The engine should automatically start the sequence manager when engine.start() is called + assert(seq_manager.is_running == true, "Sequence should be running after engine start") # Test that engine's on_tick calls sequence manager update - # The engine has a 5ms minimum delta check, so we need to account for that - tasmota.set_millis(71000) - - # Start the engine to initialize last_update - engine.start() - engine.on_tick(70000) # Initialize last_update - - # Now call on_tick after the sequence should complete - engine.on_tick(71000) # This should call seq_manager.update() + # After 1 second, the sequence should complete + tasmota.set_millis(71005) # Add 5ms buffer for engine's minimum delta check + engine.on_tick(71005) # This should call seq_manager.update() # The sequence should complete after the 1-second duration assert(seq_manager.is_running == false, "Sequence should complete after 1 second duration") @@ -442,6 +486,7 @@ def run_all_sequence_manager_tests() test_sequence_manager_step_info() test_sequence_manager_stop() test_sequence_manager_is_running() + test_sequence_manager_assignment_steps() test_sequence_manager_complex_sequence() test_sequence_manager_integration() @@ -461,6 +506,7 @@ return { "test_sequence_manager_step_info": test_sequence_manager_step_info, "test_sequence_manager_stop": test_sequence_manager_stop, "test_sequence_manager_is_running": test_sequence_manager_is_running, + "test_sequence_manager_assignment_steps": test_sequence_manager_assignment_steps, "test_sequence_manager_complex_sequence": test_sequence_manager_complex_sequence, "test_sequence_manager_integration": test_sequence_manager_integration } \ No newline at end of file diff --git a/lib/libesp32/berry_animation/src/tests/symbol_registry_test.be b/lib/libesp32/berry_animation/src/tests/symbol_registry_test.be index 5f1f1e3bc..571ee0ce3 100644 --- a/lib/libesp32/berry_animation/src/tests/symbol_registry_test.be +++ b/lib/libesp32/berry_animation/src/tests/symbol_registry_test.be @@ -175,7 +175,7 @@ def test_complex_forward_references() assert(string.find(berry_code, "var primary_color_") >= 0, "Should define primary color") assert(string.find(berry_code, "var gradient_pattern_") >= 0, "Should define gradient pattern") assert(string.find(berry_code, "var complex_anim_") >= 0, "Should define complex animation") - assert(string.find(berry_code, "var demo_ = (def (engine)") >= 0, "Should define sequence") + assert(string.find(berry_code, "var demo_ = animation.SequenceManager(engine)") >= 0, "Should define sequence") print("✓ Complex forward references test passed") return true diff --git a/lib/libesp32/berry_animation/src/tests/test_all.be b/lib/libesp32/berry_animation/src/tests/test_all.be index 99f8af039..d796ab091 100644 --- a/lib/libesp32/berry_animation/src/tests/test_all.be +++ b/lib/libesp32/berry_animation/src/tests/test_all.be @@ -46,6 +46,7 @@ def run_all_tests() "lib/libesp32/berry_animation/src/tests/frame_buffer_test.be", "lib/libesp32/berry_animation/src/tests/nillable_parameter_test.be", "lib/libesp32/berry_animation/src/tests/parameterized_object_test.be", # Tests parameter management base class + "lib/libesp32/berry_animation/src/tests/bytes_type_test.be", # Tests bytes type validation in parameterized objects "lib/libesp32/berry_animation/src/tests/animation_test.be", "lib/libesp32/berry_animation/src/tests/animation_engine_test.be", "lib/libesp32/berry_animation/src/tests/fast_loop_integration_test.be", @@ -57,6 +58,7 @@ def run_all_tests() "lib/libesp32/berry_animation/src/tests/pulse_animation_test.be", "lib/libesp32/berry_animation/src/tests/breathe_animation_test.be", "lib/libesp32/berry_animation/src/tests/color_cycle_animation_test.be", + "lib/libesp32/berry_animation/src/tests/color_cycle_bytes_test.be", # Tests ColorCycleColorProvider with bytes palette "lib/libesp32/berry_animation/src/tests/rich_palette_animation_test.be", "lib/libesp32/berry_animation/src/tests/rich_palette_animation_class_test.be", "lib/libesp32/berry_animation/src/tests/comet_animation_test.be", diff --git a/lib/libesp32/berry_animation/src/user_functions.be b/lib/libesp32/berry_animation/src/user_functions.be index 7c8725029..65aa463f9 100644 --- a/lib/libesp32/berry_animation/src/user_functions.be +++ b/lib/libesp32/berry_animation/src/user_functions.be @@ -7,5 +7,56 @@ def rand_demo(engine) return math.rand() % 256 end +# Factory function for rainbow palette +# +# @param engine: AnimationEngine - Animation engine reference (required for user function signature) +# @param num_colors: int - Number of colors in the rainbow (default: 6) +# @return bytes - A palette object containing rainbow colors in VRGB format +def color_wheel_palette(engine, num_colors) + # Default parameters + if num_colors == nil || num_colors < 2 + num_colors = 6 + end + + # Create a rainbow palette as bytes object + var palette = bytes() + var i = 0 + while i < num_colors + # Calculate hue (0 to 360 degrees) + var hue = tasmota.scale_uint(i, 0, num_colors, 0, 360) + + # Convert HSV to RGB (simplified conversion) + var r, g, b + var h_section = (hue / 60) % 6 + var f = (hue / 60) - h_section + var v = 255 # Value (brightness) + var p = 0 # Saturation is 100%, so p = 0 + var q = int(v * (1 - f)) + var t = int(v * f) + + if h_section == 0 + r = v; g = t; b = p + elif h_section == 1 + r = q; g = v; b = p + elif h_section == 2 + r = p; g = v; b = t + elif h_section == 3 + r = p; g = q; b = v + elif h_section == 4 + r = t; g = p; b = v + else + r = v; g = p; b = q + end + + # Create ARGB color (fully opaque) and add to palette + var color = (255 << 24) | (r << 16) | (g << 8) | b + palette.add(color, -4) # Add as 4-byte big-endian + i += 1 + end + + return palette +end + # Register all user functions with the animation module animation.register_user_function("rand_demo", rand_demo) +animation.register_user_function("color_wheel_palette", color_wheel_palette)