Berry animation remove tostring() (#24285)
This commit is contained in:
parent
dda901780c
commit
27d8b35a8e
@ -33,16 +33,6 @@ global.animation = animation
|
|||||||
# Format: 0xAABBCCDD (AA=major, BB=minor, CC=patch, DD=build)
|
# Format: 0xAABBCCDD (AA=major, BB=minor, CC=patch, DD=build)
|
||||||
animation.VERSION = 0x00010000
|
animation.VERSION = 0x00010000
|
||||||
|
|
||||||
# Convert version number to human-readable string format "major.minor.patch"
|
|
||||||
def animation_version_string(version_num)
|
|
||||||
if version_num == nil version_num = animation.VERSION end
|
|
||||||
var major = (version_num >> 24) & 0xFF
|
|
||||||
var minor = (version_num >> 16) & 0xFF
|
|
||||||
var patch = (version_num >> 8) & 0xFF
|
|
||||||
return f"{major}.{minor}.{patch}"
|
|
||||||
end
|
|
||||||
animation.version_string = animation_version_string
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Helper function to register all exports from imported modules into the main animation object
|
# Helper function to register all exports from imported modules into the main animation object
|
||||||
|
|||||||
@ -30,9 +30,6 @@ import animation
|
|||||||
var animation_dsl = module("animation_dsl")
|
var animation_dsl = module("animation_dsl")
|
||||||
global.animation_dsl = animation_dsl
|
global.animation_dsl = animation_dsl
|
||||||
|
|
||||||
# Version information for compatibility tracking
|
|
||||||
animation_dsl.VERSION = animation.VERSION
|
|
||||||
|
|
||||||
# Helper function to register all exports from imported modules into the DSL module
|
# Helper function to register all exports from imported modules into the DSL module
|
||||||
def register_to_dsl(m)
|
def register_to_dsl(m)
|
||||||
for k: m.keys()
|
for k: m.keys()
|
||||||
|
|||||||
@ -116,11 +116,6 @@ class BeaconAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
return f"BeaconAnimation(color=0x{self.color :08x}, pos={self.pos}, beacon_size={self.beacon_size}, slew_size={self.slew_size})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Export class directly - no redundant factory function needed
|
# Export class directly - no redundant factory function needed
|
||||||
|
|||||||
@ -80,11 +80,6 @@ class BreatheAnimation : animation.animation
|
|||||||
# The render method is inherited from Animation base class
|
# The render method is inherited from Animation base class
|
||||||
# It automatically uses self.color (which is set to self.breathe_provider)
|
# It automatically uses self.color (which is set to self.breathe_provider)
|
||||||
# The breathe_provider produces the breathing color effect
|
# The breathe_provider produces the breathing color effect
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
return f"BreatheAnimation(color=0x{self.breathe_provider.base_color :08x}, min_brightness={self.min_brightness}, max_brightness={self.max_brightness}, period={self.period}, curve_factor={self.curve_factor}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory method to create a pulsating animation (sine wave, equivalent to old pulse.be)
|
# Factory method to create a pulsating animation (sine wave, equivalent to old pulse.be)
|
||||||
|
|||||||
@ -168,17 +168,6 @@ class CometAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
var color_str
|
|
||||||
if animation.is_value_provider(self.color)
|
|
||||||
color_str = str(self.color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{self.color :08x}"
|
|
||||||
end
|
|
||||||
return f"CometAnimation(color={color_str}, head_pos={self.head_position / 256:.1f}, tail_length={self.tail_length}, speed={self.speed}, direction={self.direction}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'comet_animation': CometAnimation}
|
return {'comet_animation': CometAnimation}
|
||||||
|
|||||||
@ -107,18 +107,6 @@ class CrenelPositionAnimation : animation.animation
|
|||||||
# obj.pulse_size = value
|
# obj.pulse_size = value
|
||||||
# obj.low_size = value
|
# obj.low_size = value
|
||||||
# obj.nb_pulse = value
|
# obj.nb_pulse = value
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
var color_str
|
|
||||||
var raw_color = self.get_param("color")
|
|
||||||
if animation.is_value_provider(raw_color)
|
|
||||||
color_str = str(raw_color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{self.color :08x}"
|
|
||||||
end
|
|
||||||
return f"CrenelPositionAnimation(color={color_str}, pos={self.pos}, pulse_size={self.pulse_size}, low_size={self.low_size}, nb_pulse={self.nb_pulse}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'crenel_animation': CrenelPositionAnimation}
|
return {'crenel_animation': CrenelPositionAnimation}
|
||||||
|
|||||||
@ -250,11 +250,6 @@ class FireAnimation : animation.animation
|
|||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
return f"FireAnimation(intensity={self.intensity}, flicker_speed={self.flicker_speed}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'fire_animation': FireAnimation}
|
return {'fire_animation': FireAnimation}
|
||||||
@ -204,27 +204,6 @@ class GradientAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var gradient_type = self.gradient_type
|
|
||||||
var color = self.color
|
|
||||||
var movement_speed = self.movement_speed
|
|
||||||
var priority = self.priority
|
|
||||||
|
|
||||||
var type_str = gradient_type == 0 ? "linear" : "radial"
|
|
||||||
var color_str
|
|
||||||
if animation.is_value_provider(color)
|
|
||||||
color_str = str(color)
|
|
||||||
elif color == nil
|
|
||||||
color_str = "rainbow"
|
|
||||||
else
|
|
||||||
color_str = f"0x{color :08x}"
|
|
||||||
end
|
|
||||||
return f"GradientAnimation({type_str}, color={color_str}, movement={movement_speed}, priority={priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions following parameterized class specification
|
# Factory functions following parameterized class specification
|
||||||
|
|||||||
@ -237,20 +237,6 @@ class NoiseAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var current_color = self.color
|
|
||||||
var color_str
|
|
||||||
if animation.is_value_provider(current_color)
|
|
||||||
color_str = str(current_color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{current_color :08x}"
|
|
||||||
end
|
|
||||||
return f"NoiseAnimation(color={color_str}, scale={self.scale}, speed={self.speed}, octaves={self.octaves}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions following new specification
|
# Factory functions following new specification
|
||||||
|
|||||||
@ -136,13 +136,6 @@ class GradientMeterAnimation : animation.palette_gradient_animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var level = self.level
|
|
||||||
var peak_hold = self.peak_hold
|
|
||||||
return f"GradientMeterAnimation(level={level}, peak_hold={peak_hold}ms, peak={self.peak_level})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'palette_meter_animation': GradientMeterAnimation}
|
return {'palette_meter_animation': GradientMeterAnimation}
|
||||||
|
|||||||
@ -190,12 +190,6 @@ class PaletteGradientAnimation : animation.animation
|
|||||||
self._initialize_value_buffer()
|
self._initialize_value_buffer()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
var strip_length = self.engine.strip_length
|
|
||||||
return f"{classname(self)}(strip_length={strip_length}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -215,20 +215,6 @@ class TwinkleAnimation : animation.animation
|
|||||||
# obj.fade_speed = value
|
# obj.fade_speed = value
|
||||||
# obj.min_brightness = value
|
# obj.min_brightness = value
|
||||||
# obj.max_brightness = value
|
# obj.max_brightness = value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
var color_str
|
|
||||||
var raw_color = self.get_param("color")
|
|
||||||
if animation.is_value_provider(raw_color)
|
|
||||||
color_str = str(raw_color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{self.color :08x}"
|
|
||||||
end
|
|
||||||
return f"TwinkleAnimation(color={color_str}, density={self.density}, twinkle_speed={self.twinkle_speed}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory function to create a classic white twinkle animation
|
# Factory function to create a classic white twinkle animation
|
||||||
|
|||||||
@ -204,23 +204,6 @@ class WaveAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var wave_names = ["sine", "triangle", "square", "sawtooth"]
|
|
||||||
var current_wave_type = self.wave_type
|
|
||||||
var wave_name = wave_names[current_wave_type] != nil ? wave_names[current_wave_type] : "unknown"
|
|
||||||
var current_color = self.color
|
|
||||||
var color_str
|
|
||||||
if animation.is_value_provider(current_color)
|
|
||||||
color_str = str(current_color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{current_color :08x}"
|
|
||||||
end
|
|
||||||
return f"WaveAnimation({wave_name}, color={color_str}, freq={self.frequency}, speed={self.wave_speed}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions
|
# Factory functions
|
||||||
|
|||||||
@ -227,11 +227,6 @@ class BounceAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
return f"BounceAnimation(speed={self.bounce_speed}, damping={self.damping}, gravity={self.gravity}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions following parameterized class specification
|
# Factory functions following parameterized class specification
|
||||||
|
|||||||
@ -244,14 +244,6 @@ class JitterAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var type_names = ["position", "color", "brightness", "all"]
|
|
||||||
var jitter_type = self.jitter_type
|
|
||||||
var type_name = type_names[jitter_type] != nil ? type_names[jitter_type] : "unknown"
|
|
||||||
return f"JitterAnimation({type_name}, intensity={self.jitter_intensity}, frequency={self.jitter_frequency})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions for common jitter presets
|
# Factory functions for common jitter presets
|
||||||
|
|||||||
@ -191,20 +191,6 @@ class PlasmaAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var color_str
|
|
||||||
var current_color = self.color
|
|
||||||
if animation.is_value_provider(current_color)
|
|
||||||
color_str = str(current_color)
|
|
||||||
else
|
|
||||||
color_str = f"0x{current_color :08x}"
|
|
||||||
end
|
|
||||||
return f"PlasmaAnimation(color={color_str}, freq_x={self.freq_x}, freq_y={self.freq_y}, time_speed={self.time_speed}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions
|
# Factory functions
|
||||||
|
|||||||
@ -242,16 +242,6 @@ class ScaleAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var mode_names = ["static", "oscillate", "grow", "shrink"]
|
|
||||||
var current_scale_mode = self.scale_mode
|
|
||||||
var current_scale_factor = self.scale_factor
|
|
||||||
var current_scale_speed = self.scale_speed
|
|
||||||
var mode_name = mode_names[current_scale_mode] != nil ? mode_names[current_scale_mode] : "unknown"
|
|
||||||
return f"ScaleAnimation({mode_name}, factor={current_scale_factor}, speed={current_scale_speed})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions following parameterized class specification
|
# Factory functions following parameterized class specification
|
||||||
|
|||||||
@ -159,16 +159,6 @@ class ShiftAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var current_direction = self.direction
|
|
||||||
var current_shift_speed = self.shift_speed
|
|
||||||
var current_wrap_around = self.wrap_around
|
|
||||||
var current_priority = self.priority
|
|
||||||
var dir_str = current_direction > 0 ? "right" : "left"
|
|
||||||
return f"ShiftAnimation({dir_str}, speed={current_shift_speed}, wrap={current_wrap_around}, priority={current_priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions
|
# Factory functions
|
||||||
|
|||||||
@ -205,20 +205,6 @@ class SparkleAnimation : animation.animation
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
var color_param = self.get_param("color")
|
|
||||||
var color_str
|
|
||||||
if animation.is_value_provider(color_param)
|
|
||||||
color_str = str(color_param)
|
|
||||||
else
|
|
||||||
color_str = f"0x{self.color :08x}"
|
|
||||||
end
|
|
||||||
return f"SparkleAnimation(color={color_str}, density={self.density}, fade_speed={self.fade_speed}, priority={self.priority}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory functions following parameterized class specification
|
# Factory functions following parameterized class specification
|
||||||
|
|||||||
@ -154,10 +154,6 @@ class Animation : animation.parameterized_object
|
|||||||
return self.get_color_at(0, time_ms)
|
return self.get_color_at(0, time_ms)
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the animation
|
|
||||||
def tostring()
|
|
||||||
return f"{classname(self)}(priority={self.priority})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'animation': Animation}
|
return {'animation': Animation}
|
||||||
|
|||||||
@ -474,10 +474,6 @@ class EngineProxy : animation.animation
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
return f"{classname(self)}(animations={size(self.animations)}, sequences={size(self.sequences)}, value_providers={size(self.value_providers)}, running={self.is_running})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'engine_proxy': EngineProxy}
|
return {'engine_proxy': EngineProxy}
|
||||||
|
|||||||
@ -458,9 +458,10 @@ class ParameterizedObject
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
# Minimal string representation - returns class name only
|
||||||
|
# Subclasses no longer override this to reduce code size
|
||||||
def tostring()
|
def tostring()
|
||||||
return f"{classname(self)}(running={self.is_running})"
|
return f"<instance: {classname(self)}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Inequality operator for object identity comparison
|
# Inequality operator for object identity comparison
|
||||||
|
|||||||
@ -456,20 +456,6 @@ class SequenceManager : animation.parameterized_object
|
|||||||
return self.is_running
|
return self.is_running
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the sequence manager
|
|
||||||
def tostring()
|
|
||||||
var repeat_str = ""
|
|
||||||
if self.is_repeat_sequence
|
|
||||||
var resolved_count = self.get_resolved_repeat_count()
|
|
||||||
if resolved_count == -1
|
|
||||||
repeat_str = f", repeat=forever, iter={self.current_iteration}"
|
|
||||||
else
|
|
||||||
repeat_str = f", repeat={resolved_count}, iter={self.current_iteration}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return f"SequenceManager(steps={size(self.steps)}, current={self.step_index}, running={self.is_running}{repeat_str})"
|
|
||||||
end
|
|
||||||
|
|
||||||
# # Get current step info for debugging
|
# # Get current step info for debugging
|
||||||
# def get_current_step_info()
|
# def get_current_step_info()
|
||||||
# if !self.is_running || self.step_index >= size(self.steps)
|
# if !self.is_running || self.step_index >= size(self.steps)
|
||||||
|
|||||||
@ -104,11 +104,6 @@ class BreatheColorProvider : animation.oscillator_value
|
|||||||
# Reconstruct color
|
# Reconstruct color
|
||||||
return (alpha << 24) | (red << 16) | (green << 8) | blue
|
return (alpha << 24) | (red << 16) | (green << 8) | blue
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the color provider
|
|
||||||
def tostring()
|
|
||||||
return f"BreatheColorProvider(base_color=0x{self.base_color :08x}, min_brightness={self.min_brightness}, max_brightness={self.max_brightness}, duration={self.duration}, curve_factor={self.curve_factor})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Factory function to create a pulsating color provider (sine wave)
|
# Factory function to create a pulsating color provider (sine wave)
|
||||||
|
|||||||
@ -52,13 +52,6 @@ class ClosureValueProvider : animation.value_provider
|
|||||||
# Call the closure with the parameter self, name and time
|
# Call the closure with the parameter self, name and time
|
||||||
return closure(self.engine, name, time_ms)
|
return closure(self.engine, name, time_ms)
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation for debugging
|
|
||||||
#
|
|
||||||
# @return string - Human-readable description of the provider
|
|
||||||
def tostring()
|
|
||||||
return f"ClosureValueProvider({self._closure ? 'closure set' :: 'no closure'})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Create a ClosureValueProvider in a single call, by passing the closure argument
|
# Create a ClosureValueProvider in a single call, by passing the closure argument
|
||||||
|
|||||||
@ -214,11 +214,6 @@ class ColorCycleColorProvider : animation.color_provider
|
|||||||
end
|
end
|
||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the provider
|
|
||||||
def tostring()
|
|
||||||
return f"ColorCycleColorProvider(palette_size={self._get_palette_size()}, period={self.period}, mode={self.period ? 'manual' :: 'auto'}, current_index={self.current_index})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'color_cycle': ColorCycleColorProvider}
|
return {'color_cycle': ColorCycleColorProvider}
|
||||||
|
|||||||
@ -155,11 +155,6 @@ class CompositeColorProvider : animation.color_provider
|
|||||||
|
|
||||||
return (a << 24) | (b << 16) | (g << 8) | r
|
return (a << 24) | (b << 16) | (g << 8) | r
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the provider
|
|
||||||
def tostring()
|
|
||||||
return f"CompositeColorProvider(providers={size(self.providers)}, blend_mode={self.blend_mode})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'composite_color': CompositeColorProvider}
|
return {'composite_color': CompositeColorProvider}
|
||||||
@ -32,18 +32,6 @@ class IterationNumberProvider : animation.value_provider
|
|||||||
# Get the current iteration number from the engine's sequence stack
|
# Get the current iteration number from the engine's sequence stack
|
||||||
return self.engine.get_current_iteration_number()
|
return self.engine.get_current_iteration_number()
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation for debugging
|
|
||||||
#
|
|
||||||
# @return string - Human-readable description of the provider
|
|
||||||
def tostring()
|
|
||||||
var current_iteration = self.engine.get_current_iteration_number()
|
|
||||||
if current_iteration != nil
|
|
||||||
return f"IterationNumberProvider(current: {current_iteration})"
|
|
||||||
else
|
|
||||||
return "IterationNumberProvider(not_in_sequence)"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'iteration_number': IterationNumberProvider}
|
return {'iteration_number': IterationNumberProvider}
|
||||||
@ -196,14 +196,6 @@ class OscillatorValueProvider : animation.value_provider
|
|||||||
|
|
||||||
return self.value
|
return self.value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# String representation of the provider
|
|
||||||
def tostring()
|
|
||||||
var form_name = self.form >= 1 && self.form <= 9 ? self.form_names[self.form] : "UNKNOWN"
|
|
||||||
return f"OscillatorValueProvider(min_value={self.min_value}, max_value={self.max_value}, duration={self.duration}ms, form={form_name})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Static constructor functions for common use cases
|
# Static constructor functions for common use cases
|
||||||
|
|||||||
@ -516,15 +516,6 @@ class RichPaletteColorProvider : animation.color_provider
|
|||||||
ret += ");"
|
ret += ");"
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation
|
|
||||||
def tostring()
|
|
||||||
try
|
|
||||||
return f"RichPaletteColorProvider(slots={self._slots}, period={self.period})"
|
|
||||||
except ..
|
|
||||||
return "RichPaletteColorProvider(uninitialized)"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'rich_palette': RichPaletteColorProvider}
|
return {'rich_palette': RichPaletteColorProvider}
|
||||||
@ -43,11 +43,6 @@ class StaticColorProvider : animation.color_provider
|
|||||||
end
|
end
|
||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the provider
|
|
||||||
def tostring()
|
|
||||||
return f"StaticColorProvider(color=0x{self.color:08X})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'static_color': StaticColorProvider}
|
return {'static_color': StaticColorProvider}
|
||||||
@ -20,40 +20,40 @@ class StaticValueProvider : animation.value_provider
|
|||||||
"value": {"default": nil, "type": "any"}
|
"value": {"default": nil, "type": "any"}
|
||||||
})
|
})
|
||||||
|
|
||||||
# Comparison operators to make StaticValueProvider work with validation code
|
# # Comparison operators to make StaticValueProvider work with validation code
|
||||||
def <(other)
|
# def <(other)
|
||||||
return self.value < int(other)
|
# return self.value < int(other)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def >(other)
|
# def >(other)
|
||||||
return self.value > int(other)
|
# return self.value > int(other)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def <=(other)
|
# def <=(other)
|
||||||
return self.value <= int(other)
|
# return self.value <= int(other)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def >=(other)
|
# def >=(other)
|
||||||
return self.value >= int(other)
|
# return self.value >= int(other)
|
||||||
end
|
# end
|
||||||
|
|
||||||
def ==(other)
|
# def ==(other)
|
||||||
if type(other) == 'instance'
|
# if type(other) == 'instance'
|
||||||
import introspect
|
# import introspect
|
||||||
return introspect.toptr(self) == introspect.toptr(other)
|
# return introspect.toptr(self) == introspect.toptr(other)
|
||||||
else
|
# else
|
||||||
return self.value == int(other)
|
# return self.value == int(other)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
def !=(other)
|
# def !=(other)
|
||||||
if type(other) == 'instance'
|
# if type(other) == 'instance'
|
||||||
import introspect
|
# import introspect
|
||||||
return introspect.toptr(self) != introspect.toptr(other)
|
# return introspect.toptr(self) != introspect.toptr(other)
|
||||||
else
|
# else
|
||||||
return self.value != int(other)
|
# return self.value != int(other)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Produce the static value for any parameter name
|
# Produce the static value for any parameter name
|
||||||
#
|
#
|
||||||
@ -65,9 +65,9 @@ class StaticValueProvider : animation.value_provider
|
|||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the provider
|
# String representation of the provider
|
||||||
def tostring()
|
# def tostring()
|
||||||
return f"StaticValueProvider(value={self.value})"
|
# return f"StaticValueProvider(value={self.value})"
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'static_value': StaticValueProvider}
|
return {'static_value': StaticValueProvider}
|
||||||
@ -21,12 +21,6 @@ class StripLengthProvider : animation.value_provider
|
|||||||
def produce_value(name, time_ms)
|
def produce_value(name, time_ms)
|
||||||
return self.engine.strip_length
|
return self.engine.strip_length
|
||||||
end
|
end
|
||||||
|
|
||||||
# String representation of the provider
|
|
||||||
def tostring()
|
|
||||||
var strip_width = (self.engine != nil) ? self.engine.strip_length : 'unknown'
|
|
||||||
return f"StripLengthProvider(length={strip_width})"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {'strip_length': StripLengthProvider}
|
return {'strip_length': StripLengthProvider}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -2192,89 +2192,12 @@ be_local_class(Token,
|
|||||||
be_str_weak(Token)
|
be_str_weak(Token)
|
||||||
);
|
);
|
||||||
|
|
||||||
extern const bclass be_class_WLED_Palettes;
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: WLED_Palettes
|
** Solidified function: load_file
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(WLED_Palettes,
|
be_local_closure(load_file, /* name */
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
be_nested_map(1,
|
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
|
||||||
{ be_const_key_weak(map, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
|
||||||
be_const_map( * be_nested_map(59,
|
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
|
||||||
{ be_const_key_weak(Red_X20_X26_X20Blue, 38), be_const_bytes_instance(00290E631F80184A3FE322325F841F4C7F2F1D669F6D2F65BFB04264DF813968FF54306C) },
|
|
||||||
{ be_const_key_weak(Red_X20Tide, -1), be_const_bytes_instance(00FB2E001CFF8B192BF69E3F3AF6D87B54F35E0A72B1410B8CFFF173A8B1410BC4FAE99ED8FF5E06FF7E0804) },
|
|
||||||
{ be_const_key_weak(C9_X202, 5), be_const_bytes_instance(00067E022D067E022E041E725A041E725BFF050087FF050088C43902B4C43902B5895502FF895502) },
|
|
||||||
{ be_const_key_weak(Aqua_X20Flash, -1), be_const_bytes_instance(000000004282F2F560FFFF357CFFFFFF99FFFF35BC82F2F5FF000000) },
|
|
||||||
{ be_const_key_weak(Icefire, -1), be_const_bytes_instance(000000003B003375770066FF952699FFB456CCFFD9A7E6FFFFFFFFFF) },
|
|
||||||
{ be_const_key_weak(Hult, 15), be_const_bytes_instance(00FBD8FC30FFC0FF59EF5FF1A03399D9D818B8AEFF18B8AE) },
|
|
||||||
{ be_const_key_weak(Yelmag, 47), be_const_bytes_instance(000000002A71000054FF00007FFF0075AAFF00FFD4FF8075FFFFFF00) },
|
|
||||||
{ be_const_key_weak(Red_X20Flash, -1), be_const_bytes_instance(0000000063F20C0882FDE4A39BF20C08FF000000) },
|
|
||||||
{ be_const_key_weak(Beech, -1), be_const_bytes_instance(00FFFEEC0CFFFEEC16FFFEEC1ADFE0B21CC0C37C1CB0FFE7327BFBEC474AF6F15D21E1E47800CCD78504A8B2880A848F8833BDD4D0179FC9FF0081BE) },
|
|
||||||
{ be_const_key_weak(Landscape, -1), be_const_bytes_instance(00000000251F59134C48B22B7F96EB0580BAEA7782DEE9FC99C5DBE7CC84B3FDFF1C6BE1) },
|
|
||||||
{ be_const_key_weak(Rewhi, -1), be_const_bytes_instance(00B1A0C748CD9E9559E99B656BFF5F3F8DC0626DFF84659F) },
|
|
||||||
{ be_const_key_weak(C9_X20New, -1), be_const_bytes_instance(00FF05003CFF05003DC4390278C4390279067E02B4067E02B5041E72FF041E72) },
|
|
||||||
{ be_const_key_weak(Jul, 37), be_const_bytes_instance(00E2060C5E1A604E8482BD5EFFB10309) },
|
|
||||||
{ be_const_key_weak(Cyane, -1), be_const_bytes_instance(003D9B2C195FAE4D3C84C1715D9AA67D6AAF8A886DB7798971C2688A74E1B3A57CFFFFC0A8A7DACBFF54B6D7) },
|
|
||||||
{ be_const_key_weak(C9, -1), be_const_bytes_instance(00B804003CB8040041902C027D902C0282046002BE046002C3070758FF070758) },
|
|
||||||
{ be_const_key_weak(Light_X20Pink, -1), be_const_bytes_instance(004F206D195A28753366307C4C8D87B966B4DEF86DD0ECFC72EDFAFF7ACEC8EF95B195DEB7BB82CBFFC66FB8) },
|
|
||||||
{ be_const_key_weak(Lite_X20Light, -1), be_const_bytes_instance(0000000009141516282E2B31422E2B31653D1041FF000000) },
|
|
||||||
{ be_const_key_weak(Orange_X20_X26_X20Teal, 50), be_const_bytes_instance(0000965C3700965CC8FF4800FFFF4800) },
|
|
||||||
{ be_const_key_weak(Sunset2, -1), be_const_bytes_instance(00AF793E1D80673C4454543A44F8B83761EFCC5D7CE6E185B2667D81FF001A7D) },
|
|
||||||
{ be_const_key_weak(Toxy_X20Reaf, 9), be_const_bytes_instance(0002EF7EFF9123D9) },
|
|
||||||
{ be_const_key_weak(Aurora_X202, -1), be_const_bytes_instance(0011B10D4079F2058019AD79C0FA4D7FFFAB65DD) },
|
|
||||||
{ be_const_key_weak(Vintage, 44), be_const_bytes_instance(00291218334900164CA5AA2665FFBD507F8B382899490016E5291218FF291218) },
|
|
||||||
{ be_const_key_weak(Fire, 3), be_const_bytes_instance(000000002E4D000060B100006CC4260977D74C1392EB731DAEFF9929BCFFB229CAFFCC29DAFFE629EAFFFF29F4FFFF8FFFFFFFFF) },
|
|
||||||
{ be_const_key_weak(Rivendell, 29), be_const_bytes_instance(0018452C65496946A5818C61F2C8CCA6FFC8CCA6) },
|
|
||||||
{ be_const_key_weak(Blink_X20Red, -1), be_const_bytes_instance(000407042B28193E4C3D0F246DCF27607FFF9CB8A5B949CFCC6942F0FF4D1D4E) },
|
|
||||||
{ be_const_key_weak(Magred, -1), be_const_bytes_instance(000000003F7100757FFF00FFBFFF0075FFFF0000) },
|
|
||||||
{ be_const_key_weak(Semi_X20Blue, -1), be_const_bytes_instance(000000000C18042635370854502B309F771F59ED91323BA6BA471E62E91F0F2DFF000000) },
|
|
||||||
{ be_const_key_weak(Analogous, 39), be_const_bytes_instance(002600FF3F5600FF7F8B00FFBFC40075FFFF0000) },
|
|
||||||
{ be_const_key_weak(Sakura, 20), be_const_bytes_instance(00C4130A41FF452D82DF2D48C3FF5267FFDF0D11) },
|
|
||||||
{ be_const_key_weak(Pastel, -1), be_const_bytes_instance(003D87B82481BCA957CBF19B64E4ED8D6BFFE87F73FBCA8278F8AC8580FBCA82B4FFE87FDFFFF278FFFFFC71) },
|
|
||||||
{ be_const_key_weak(Candy2, -1), be_const_bytes_instance(006D6666192A31473079605449F1D61A59D8682C822A3147A3FFB12FBAF1D61AD36D6666FF14130D) },
|
|
||||||
{ be_const_key_weak(Red_X20Reaf, -1), be_const_bytes_instance(002444726895C3F8BCFF0000FF5E0E09) },
|
|
||||||
{ be_const_key_weak(Red_X20Shift, 40), be_const_bytes_instance(0062165D2D67164963C02D3884EBBB3BAFE4551AC9E43830FF020002) },
|
|
||||||
{ be_const_key_weak(Grintage, -1), be_const_bytes_instance(001D0803354C0100688E601C99D3BF3DFF75812A) },
|
|
||||||
{ be_const_key_weak(Pink_X20Candy, 14), be_const_bytes_instance(00FFFFFF2D3240FF70F210BA8CFFFFFF9BF210BAC4740DA6FFFFFFFF) },
|
|
||||||
{ be_const_key_weak(Temperature, 12), be_const_bytes_instance(00145CAB0E0F6FBA1C068ED32A02A1E33810B5EF4626BCC95456CCC8638BDBB071B6E57D7FC4E63F8DF1F0169BFEDE1EAAFBC704B8F79D09C6F3720FE2D51E1DF0972623FF972623) },
|
|
||||||
{ be_const_key_weak(Departure, -1), be_const_bytes_instance(003522002A5633003F936C3154D4A66C6AEBD4B474FFFFFF8ABFFFC19454FF58AA00FF00BF00C000D4008000FF008000) },
|
|
||||||
{ be_const_key_weak(Candy, -1), be_const_bytes_instance(00F3F2170FF2A8268E6F1597C64A1696FF000075) },
|
|
||||||
{ be_const_key_weak(Retro_X20Clown, 46), be_const_bytes_instance(00F2A82675E24E50FFA136E1) },
|
|
||||||
{ be_const_key_weak(Beach, 26), be_const_bytes_instance(000C2D001365560226CF80043FF3C512426DC492FF052707) },
|
|
||||||
{ be_const_key_weak(Sunset, -1), be_const_bytes_instance(00B5000016DA550033FFAA0055D3554D87A700A9C64900BCFF0000CF) },
|
|
||||||
{ be_const_key_weak(Yelblu, -1), be_const_bytes_instance(000000FF3F0080FF7F00FFFFBF71FF75FFFFFF00) },
|
|
||||||
{ be_const_key_weak(Atlantica, -1), be_const_bytes_instance(00001C70322060FF6400F32D960C5F52C819BE5FFF28AA50) },
|
|
||||||
{ be_const_key_weak(Sherbet, -1), be_const_bytes_instance(00FF66292BFF8C5A56FF335A7FFF99A9AAFFFFF9D171FF55FF9DFF89) },
|
|
||||||
{ be_const_key_weak(Orangery, -1), be_const_bytes_instance(00FF5F171EFF52003CDF0D085A902C0278FF6E1196FF4500B49E0D0BD2F15211FFD52504) },
|
|
||||||
{ be_const_key_weak(Yellowout, -1), be_const_bytes_instance(00DEBF08FF753401) },
|
|
||||||
{ be_const_key_weak(April_X20Night, -1), be_const_bytes_instance(0001052D0A01052D1905A9AF2801052D3D01052D4C2DAF1F5B01052D7001052D7FF996058F01052DA201052DB2FF5C00C101052DD601052DE5DF2D48F401052DFF01052D) },
|
|
||||||
{ be_const_key_weak(Aurora, -1), be_const_bytes_instance(0001052D4000C8178000FF00AA00F32DC8008707FF01052D) },
|
|
||||||
{ be_const_key_weak(Magenta, 28), be_const_bytes_instance(000000002A000075540000FF7F7100FFAAFF00FFD4FF80FFFFFFFFFF) },
|
|
||||||
{ be_const_key_weak(Autumn, 18), be_const_bytes_instance(005A0E05338B290D54B4461168C0CA7D70B189037ABEC8837CC0CA7C87B189038EC2CB76A3B14411CC80230CF94A0502FF4A0502) },
|
|
||||||
{ be_const_key_weak(Drywet, -1), be_const_bytes_instance(007761212AEBC75854A9EE7C7F25EEE8AA0778ECD41B01AFFF043365) },
|
|
||||||
{ be_const_key_weak(Hult64, -1), be_const_bytes_instance(0018B8AE4208A296687C890782B2BA16967C8907C9069C90EF008075FF008075) },
|
|
||||||
{ be_const_key_weak(Yelblu_X20Hot, -1), be_const_bytes_instance(002B1E393A4900777A57004A9EC53916B7DA751BDBEFB120FFF6F71B) },
|
|
||||||
{ be_const_key_weak(Traffic_X20Light, 13), be_const_bytes_instance(000000005500FF00AAFFFF00FFFF0000) },
|
|
||||||
{ be_const_key_weak(Splash, 34), be_const_bytes_instance(00BA3FFF7FE30955AFEACDD5DDCD26B0FFCD26B0) },
|
|
||||||
{ be_const_key_weak(Breeze, -1), be_const_bytes_instance(00103033591BA6AF99C5E9FFFF009198) },
|
|
||||||
{ be_const_key_weak(Tertiary, -1), be_const_bytes_instance(000019FF3F268C757F56FF00BFA78C13FFFF1929) },
|
|
||||||
{ be_const_key_weak(Tiamat, 27), be_const_bytes_instance(0001020E21020523640D875C782BFFC18CF707F9A0C111D0B427FF9AC804D5ECDC27FC87F0C1D5FDFFFFF9FF) },
|
|
||||||
{ be_const_key_weak(Fairy_X20Reaf, 31), be_const_bytes_instance(00DC13BBA00CE1DBDBCBF2DFFFFFFFFF) },
|
|
||||||
})) ) } )) },
|
|
||||||
})),
|
|
||||||
be_str_weak(WLED_Palettes)
|
|
||||||
);
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: compile_file
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(compile_file, /* name */
|
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
13, /* nstack */
|
7, /* nstack */
|
||||||
1, /* argc */
|
1, /* argc */
|
||||||
0, /* varg */
|
0, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
@ -2282,221 +2205,39 @@ be_local_closure(compile_file, /* name */
|
|||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[25]) { /* constants */
|
( &(const bvalue[ 7]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(string),
|
|
||||||
/* K1 */ be_nested_str_weak(animation_dsl),
|
|
||||||
/* K2 */ be_nested_str_weak(endswith),
|
|
||||||
/* K3 */ be_nested_str_weak(_X2Eanim),
|
|
||||||
/* K4 */ be_nested_str_weak(Input_X20file_X20must_X20have_X20_X2Eanim_X20extension_X3A_X20_X25s),
|
|
||||||
/* K5 */ be_nested_str_weak(invalid_filename),
|
|
||||||
/* K6 */ be_const_int(0),
|
|
||||||
/* K7 */ be_nested_str_weak(_X2Ebe),
|
|
||||||
/* K8 */ be_nested_str_weak(r),
|
|
||||||
/* K9 */ be_nested_str_weak(Cannot_X20open_X20input_X20file_X3A_X20_X25s),
|
|
||||||
/* K10 */ be_nested_str_weak(io_error),
|
|
||||||
/* K11 */ be_nested_str_weak(read),
|
|
||||||
/* K12 */ be_nested_str_weak(close),
|
|
||||||
/* K13 */ be_nested_str_weak(compile),
|
|
||||||
/* K14 */ be_nested_str_weak(DSL_X20compilation_X20failed_X20for_X3A_X20_X25s),
|
|
||||||
/* K15 */ be_nested_str_weak(dsl_compilation_error),
|
|
||||||
/* K16 */ be_nested_str_weak(_X23_X20Generated_X20Berry_X20code_X20from_X20Animation_X20DSL_X0A),
|
|
||||||
/* K17 */ be_nested_str_weak(_X23_X20Source_X3A_X20_X25s_X0A),
|
|
||||||
/* K18 */ be_nested_str_weak(_X23_X20Generated_X20automatically_X20by_X20animation_dsl_X2Ecompile_file_X28_X29_X0A),
|
|
||||||
/* K19 */ be_nested_str_weak(_X23_X20_X0A),
|
|
||||||
/* K20 */ be_nested_str_weak(_X23_X20Do_X20not_X20edit_X20manually_X20_X2D_X20changes_X20will_X20be_X20overwritten_X0A),
|
|
||||||
/* K21 */ be_nested_str_weak(_X0A),
|
|
||||||
/* K22 */ be_nested_str_weak(w),
|
|
||||||
/* K23 */ be_nested_str_weak(Cannot_X20create_X20output_X20file_X3A_X20_X25s),
|
|
||||||
/* K24 */ be_nested_str_weak(write),
|
|
||||||
}),
|
|
||||||
be_str_weak(compile_file),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[71]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0xA40A0200, // 0001 IMPORT R2 K1
|
|
||||||
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
|
||||||
0x5C140000, // 0003 MOVE R5 R0
|
|
||||||
0x58180003, // 0004 LDCONST R6 K3
|
|
||||||
0x7C0C0600, // 0005 CALL R3 3
|
|
||||||
0x740E0004, // 0006 JMPT R3 #000C
|
|
||||||
0x600C0018, // 0007 GETGBL R3 G24
|
|
||||||
0x58100004, // 0008 LDCONST R4 K4
|
|
||||||
0x5C140000, // 0009 MOVE R5 R0
|
|
||||||
0x7C0C0400, // 000A CALL R3 2
|
|
||||||
0xB0060A03, // 000B RAISE 1 K5 R3
|
|
||||||
0x540DFFF9, // 000C LDINT R3 -6
|
|
||||||
0x400E0C03, // 000D CONNECT R3 K6 R3
|
|
||||||
0x940C0003, // 000E GETIDX R3 R0 R3
|
|
||||||
0x00100707, // 000F ADD R4 R3 K7
|
|
||||||
0x60140011, // 0010 GETGBL R5 G17
|
|
||||||
0x5C180000, // 0011 MOVE R6 R0
|
|
||||||
0x581C0008, // 0012 LDCONST R7 K8
|
|
||||||
0x7C140400, // 0013 CALL R5 2
|
|
||||||
0x4C180000, // 0014 LDNIL R6
|
|
||||||
0x1C180A06, // 0015 EQ R6 R5 R6
|
|
||||||
0x781A0004, // 0016 JMPF R6 #001C
|
|
||||||
0x60180018, // 0017 GETGBL R6 G24
|
|
||||||
0x581C0009, // 0018 LDCONST R7 K9
|
|
||||||
0x5C200000, // 0019 MOVE R8 R0
|
|
||||||
0x7C180400, // 001A CALL R6 2
|
|
||||||
0xB0061406, // 001B RAISE 1 K10 R6
|
|
||||||
0x8C180B0B, // 001C GETMET R6 R5 K11
|
|
||||||
0x7C180200, // 001D CALL R6 1
|
|
||||||
0x8C1C0B0C, // 001E GETMET R7 R5 K12
|
|
||||||
0x7C1C0200, // 001F CALL R7 1
|
|
||||||
0x8C1C050D, // 0020 GETMET R7 R2 K13
|
|
||||||
0x5C240C00, // 0021 MOVE R9 R6
|
|
||||||
0x7C1C0400, // 0022 CALL R7 2
|
|
||||||
0x4C200000, // 0023 LDNIL R8
|
|
||||||
0x1C200E08, // 0024 EQ R8 R7 R8
|
|
||||||
0x78220004, // 0025 JMPF R8 #002B
|
|
||||||
0x60200018, // 0026 GETGBL R8 G24
|
|
||||||
0x5824000E, // 0027 LDCONST R9 K14
|
|
||||||
0x5C280000, // 0028 MOVE R10 R0
|
|
||||||
0x7C200400, // 0029 CALL R8 2
|
|
||||||
0xB0061E08, // 002A RAISE 1 K15 R8
|
|
||||||
0x60200018, // 002B GETGBL R8 G24
|
|
||||||
0x58240011, // 002C LDCONST R9 K17
|
|
||||||
0x5C280000, // 002D MOVE R10 R0
|
|
||||||
0x7C200400, // 002E CALL R8 2
|
|
||||||
0x00222008, // 002F ADD R8 K16 R8
|
|
||||||
0x00201112, // 0030 ADD R8 R8 K18
|
|
||||||
0x00201113, // 0031 ADD R8 R8 K19
|
|
||||||
0x00201114, // 0032 ADD R8 R8 K20
|
|
||||||
0x00201115, // 0033 ADD R8 R8 K21
|
|
||||||
0x60240011, // 0034 GETGBL R9 G17
|
|
||||||
0x5C280800, // 0035 MOVE R10 R4
|
|
||||||
0x582C0016, // 0036 LDCONST R11 K22
|
|
||||||
0x7C240400, // 0037 CALL R9 2
|
|
||||||
0x4C280000, // 0038 LDNIL R10
|
|
||||||
0x1C28120A, // 0039 EQ R10 R9 R10
|
|
||||||
0x782A0004, // 003A JMPF R10 #0040
|
|
||||||
0x60280018, // 003B GETGBL R10 G24
|
|
||||||
0x582C0017, // 003C LDCONST R11 K23
|
|
||||||
0x5C300800, // 003D MOVE R12 R4
|
|
||||||
0x7C280400, // 003E CALL R10 2
|
|
||||||
0xB006140A, // 003F RAISE 1 K10 R10
|
|
||||||
0x8C281318, // 0040 GETMET R10 R9 K24
|
|
||||||
0x00301007, // 0041 ADD R12 R8 R7
|
|
||||||
0x7C280400, // 0042 CALL R10 2
|
|
||||||
0x8C28130C, // 0043 GETMET R10 R9 K12
|
|
||||||
0x7C280200, // 0044 CALL R10 1
|
|
||||||
0x50280200, // 0045 LDBOOL R10 1 0
|
|
||||||
0x80041400, // 0046 RET 1 R10
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: is_keyword
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(is_keyword, /* 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[ 4]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(animation_dsl),
|
/* K0 */ be_nested_str_weak(animation_dsl),
|
||||||
/* K1 */ be_nested_str_weak(Token),
|
/* K1 */ be_nested_str_weak(r),
|
||||||
/* K2 */ be_nested_str_weak(keywords),
|
/* K2 */ be_nested_str_weak(Cannot_X20open_X20DSL_X20file_X3A_X20_X25s),
|
||||||
/* K3 */ be_nested_str_weak(stop_iteration),
|
/* K3 */ be_nested_str_weak(io_error),
|
||||||
|
/* K4 */ be_nested_str_weak(read),
|
||||||
|
/* K5 */ be_nested_str_weak(close),
|
||||||
|
/* K6 */ be_nested_str_weak(execute),
|
||||||
}),
|
}),
|
||||||
be_str_weak(is_keyword),
|
be_str_weak(load_file),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[19]) { /* code */
|
( &(const binstruction[21]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x60080010, // 0001 GETGBL R2 G16
|
0x60080011, // 0001 GETGBL R2 G17
|
||||||
0x880C0301, // 0002 GETMBR R3 R1 K1
|
0x5C0C0000, // 0002 MOVE R3 R0
|
||||||
0x880C0702, // 0003 GETMBR R3 R3 K2
|
0x58100001, // 0003 LDCONST R4 K1
|
||||||
0x7C080200, // 0004 CALL R2 1
|
0x7C080400, // 0004 CALL R2 2
|
||||||
0xA8020007, // 0005 EXBLK 0 #000E
|
0x4C0C0000, // 0005 LDNIL R3
|
||||||
0x5C0C0400, // 0006 MOVE R3 R2
|
0x1C0C0403, // 0006 EQ R3 R2 R3
|
||||||
0x7C0C0000, // 0007 CALL R3 0
|
0x780E0004, // 0007 JMPF R3 #000D
|
||||||
0x1C100003, // 0008 EQ R4 R0 R3
|
0x600C0018, // 0008 GETGBL R3 G24
|
||||||
0x78120002, // 0009 JMPF R4 #000D
|
0x58100002, // 0009 LDCONST R4 K2
|
||||||
0x50100200, // 000A LDBOOL R4 1 0
|
0x5C140000, // 000A MOVE R5 R0
|
||||||
0xA8040001, // 000B EXBLK 1 1
|
0x7C0C0400, // 000B CALL R3 2
|
||||||
0x80040800, // 000C RET 1 R4
|
0xB0060603, // 000C RAISE 1 K3 R3
|
||||||
0x7001FFF7, // 000D JMP #0006
|
0x8C0C0504, // 000D GETMET R3 R2 K4
|
||||||
0x58080003, // 000E LDCONST R2 K3
|
0x7C0C0200, // 000E CALL R3 1
|
||||||
0xAC080200, // 000F CATCH R2 1 0
|
0x8C100505, // 000F GETMET R4 R2 K5
|
||||||
0xB0080000, // 0010 RAISE 2 R0 R0
|
0x7C100200, // 0010 CALL R4 1
|
||||||
0x50080000, // 0011 LDBOOL R2 0 0
|
0x8C100306, // 0011 GETMET R4 R1 K6
|
||||||
0x80040400, // 0012 RET 1 R2
|
0x5C180600, // 0012 MOVE R6 R3
|
||||||
})
|
0x7C100400, // 0013 CALL R4 2
|
||||||
)
|
0x80040800, // 0014 RET 1 R4
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: compile_dsl_source
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(compile_dsl_source, /* 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[ 2]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(animation_dsl),
|
|
||||||
/* K1 */ be_nested_str_weak(compile_dsl),
|
|
||||||
}),
|
|
||||||
be_str_weak(compile_dsl_source),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 5]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
|
||||||
0x5C100000, // 0002 MOVE R4 R0
|
|
||||||
0x7C080400, // 0003 CALL R2 2
|
|
||||||
0x80040400, // 0004 RET 1 R2
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: execute
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(execute, /* 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[ 2]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(animation_dsl),
|
|
||||||
/* K1 */ be_nested_str_weak(compile),
|
|
||||||
}),
|
|
||||||
be_str_weak(execute),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[10]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
|
||||||
0x5C100000, // 0002 MOVE R4 R0
|
|
||||||
0x7C080400, // 0003 CALL R2 2
|
|
||||||
0x600C000D, // 0004 GETGBL R3 G13
|
|
||||||
0x5C100400, // 0005 MOVE R4 R2
|
|
||||||
0x7C0C0200, // 0006 CALL R3 1
|
|
||||||
0x5C100600, // 0007 MOVE R4 R3
|
|
||||||
0x7C100000, // 0008 CALL R4 0
|
|
||||||
0x80040800, // 0009 RET 1 R4
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -3671,6 +3412,158 @@ be_local_class(SymbolTable,
|
|||||||
})),
|
})),
|
||||||
be_str_weak(SymbolTable)
|
be_str_weak(SymbolTable)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: compile_dsl_source
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(compile_dsl_source, /* 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[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(animation_dsl),
|
||||||
|
/* K1 */ be_nested_str_weak(compile_dsl),
|
||||||
|
}),
|
||||||
|
be_str_weak(compile_dsl_source),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 5]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
|
0x5C100000, // 0002 MOVE R4 R0
|
||||||
|
0x7C080400, // 0003 CALL R2 2
|
||||||
|
0x80040400, // 0004 RET 1 R2
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: execute
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(execute, /* 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[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(animation_dsl),
|
||||||
|
/* K1 */ be_nested_str_weak(compile),
|
||||||
|
}),
|
||||||
|
be_str_weak(execute),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[10]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
|
0x5C100000, // 0002 MOVE R4 R0
|
||||||
|
0x7C080400, // 0003 CALL R2 2
|
||||||
|
0x600C000D, // 0004 GETGBL R3 G13
|
||||||
|
0x5C100400, // 0005 MOVE R4 R2
|
||||||
|
0x7C0C0200, // 0006 CALL R3 1
|
||||||
|
0x5C100600, // 0007 MOVE R4 R3
|
||||||
|
0x7C100000, // 0008 CALL R4 0
|
||||||
|
0x80040800, // 0009 RET 1 R4
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: is_keyword
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(is_keyword, /* 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[ 4]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(animation_dsl),
|
||||||
|
/* K1 */ be_nested_str_weak(Token),
|
||||||
|
/* K2 */ be_nested_str_weak(keywords),
|
||||||
|
/* K3 */ be_nested_str_weak(stop_iteration),
|
||||||
|
}),
|
||||||
|
be_str_weak(is_keyword),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[19]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0x60080010, // 0001 GETGBL R2 G16
|
||||||
|
0x880C0301, // 0002 GETMBR R3 R1 K1
|
||||||
|
0x880C0702, // 0003 GETMBR R3 R3 K2
|
||||||
|
0x7C080200, // 0004 CALL R2 1
|
||||||
|
0xA8020007, // 0005 EXBLK 0 #000E
|
||||||
|
0x5C0C0400, // 0006 MOVE R3 R2
|
||||||
|
0x7C0C0000, // 0007 CALL R3 0
|
||||||
|
0x1C100003, // 0008 EQ R4 R0 R3
|
||||||
|
0x78120002, // 0009 JMPF R4 #000D
|
||||||
|
0x50100200, // 000A LDBOOL R4 1 0
|
||||||
|
0xA8040001, // 000B EXBLK 1 1
|
||||||
|
0x80040800, // 000C RET 1 R4
|
||||||
|
0x7001FFF7, // 000D JMP #0006
|
||||||
|
0x58080003, // 000E LDCONST R2 K3
|
||||||
|
0xAC080200, // 000F CATCH R2 1 0
|
||||||
|
0xB0080000, // 0010 RAISE 2 R0 R0
|
||||||
|
0x50080000, // 0011 LDBOOL R2 0 0
|
||||||
|
0x80040400, // 0012 RET 1 R2
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: compile_dsl
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(compile_dsl, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* 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_dsl),
|
||||||
|
/* K1 */ be_nested_str_weak(create_lexer),
|
||||||
|
/* K2 */ be_nested_str_weak(SimpleDSLTranspiler),
|
||||||
|
/* K3 */ be_nested_str_weak(transpile),
|
||||||
|
}),
|
||||||
|
be_str_weak(compile_dsl),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[10]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
|
0x5C100000, // 0002 MOVE R4 R0
|
||||||
|
0x7C080400, // 0003 CALL R2 2
|
||||||
|
0x8C0C0302, // 0004 GETMET R3 R1 K2
|
||||||
|
0x5C140400, // 0005 MOVE R5 R2
|
||||||
|
0x7C0C0400, // 0006 CALL R3 2
|
||||||
|
0x8C100703, // 0007 GETMET R4 R3 K3
|
||||||
|
0x7C100200, // 0008 CALL R4 1
|
||||||
|
0x80040800, // 0009 RET 1 R4
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
// compact class 'Lexer' ktab size: 109, total: 288 (saved 1432 bytes)
|
// compact class 'Lexer' ktab size: 109, total: 288 (saved 1432 bytes)
|
||||||
static const bvalue be_ktab_class_Lexer[109] = {
|
static const bvalue be_ktab_class_Lexer[109] = {
|
||||||
/* K0 */ be_nested_str_weak(position),
|
/* K0 */ be_nested_str_weak(position),
|
||||||
@ -5807,129 +5700,6 @@ be_local_closure(is_color_name, /* name */
|
|||||||
);
|
);
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: compile_dsl
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(compile_dsl, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
6, /* 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_dsl),
|
|
||||||
/* K1 */ be_nested_str_weak(create_lexer),
|
|
||||||
/* K2 */ be_nested_str_weak(SimpleDSLTranspiler),
|
|
||||||
/* K3 */ be_nested_str_weak(transpile),
|
|
||||||
}),
|
|
||||||
be_str_weak(compile_dsl),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[10]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
|
||||||
0x5C100000, // 0002 MOVE R4 R0
|
|
||||||
0x7C080400, // 0003 CALL R2 2
|
|
||||||
0x8C0C0302, // 0004 GETMET R3 R1 K2
|
|
||||||
0x5C140400, // 0005 MOVE R5 R2
|
|
||||||
0x7C0C0400, // 0006 CALL R3 2
|
|
||||||
0x8C100703, // 0007 GETMET R4 R3 K3
|
|
||||||
0x7C100200, // 0008 CALL R4 1
|
|
||||||
0x80040800, // 0009 RET 1 R4
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: animation_dsl_init
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(animation_dsl_init, /* 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(animation_web_ui),
|
|
||||||
/* K2 */ be_nested_str_weak(web_ui),
|
|
||||||
}),
|
|
||||||
be_str_weak(animation_dsl_init),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 6]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
|
||||||
0x5C0C0400, // 0002 MOVE R3 R2
|
|
||||||
0x7C0C0000, // 0003 CALL R3 0
|
|
||||||
0x90060403, // 0004 SETMBR R1 K2 R3
|
|
||||||
0x80040000, // 0005 RET 1 R0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: load_file
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(load_file, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
7, /* 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_dsl),
|
|
||||||
/* K1 */ be_nested_str_weak(r),
|
|
||||||
/* K2 */ be_nested_str_weak(Cannot_X20open_X20DSL_X20file_X3A_X20_X25s),
|
|
||||||
/* K3 */ be_nested_str_weak(io_error),
|
|
||||||
/* K4 */ be_nested_str_weak(read),
|
|
||||||
/* K5 */ be_nested_str_weak(close),
|
|
||||||
/* K6 */ be_nested_str_weak(execute),
|
|
||||||
}),
|
|
||||||
be_str_weak(load_file),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[21]) { /* code */
|
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
|
||||||
0x60080011, // 0001 GETGBL R2 G17
|
|
||||||
0x5C0C0000, // 0002 MOVE R3 R0
|
|
||||||
0x58100001, // 0003 LDCONST R4 K1
|
|
||||||
0x7C080400, // 0004 CALL R2 2
|
|
||||||
0x4C0C0000, // 0005 LDNIL R3
|
|
||||||
0x1C0C0403, // 0006 EQ R3 R2 R3
|
|
||||||
0x780E0004, // 0007 JMPF R3 #000D
|
|
||||||
0x600C0018, // 0008 GETGBL R3 G24
|
|
||||||
0x58100002, // 0009 LDCONST R4 K2
|
|
||||||
0x5C140000, // 000A MOVE R5 R0
|
|
||||||
0x7C0C0400, // 000B CALL R3 2
|
|
||||||
0xB0060603, // 000C RAISE 1 K3 R3
|
|
||||||
0x8C0C0504, // 000D GETMET R3 R2 K4
|
|
||||||
0x7C0C0200, // 000E CALL R3 1
|
|
||||||
0x8C100505, // 000F GETMET R4 R2 K5
|
|
||||||
0x7C100200, // 0010 CALL R4 1
|
|
||||||
0x8C100306, // 0011 GETMET R4 R1 K6
|
|
||||||
0x5C180600, // 0012 MOVE R6 R3
|
|
||||||
0x7C100400, // 0013 CALL R4 2
|
|
||||||
0x80040800, // 0014 RET 1 R4
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
// compact class 'MockEngine' ktab size: 3, total: 4 (saved 8 bytes)
|
// compact class 'MockEngine' ktab size: 3, total: 4 (saved 8 bytes)
|
||||||
static const bvalue be_ktab_class_MockEngine[3] = {
|
static const bvalue be_ktab_class_MockEngine[3] = {
|
||||||
/* K0 */ be_nested_str_weak(time_ms),
|
/* K0 */ be_nested_str_weak(time_ms),
|
||||||
@ -6033,6 +5803,236 @@ be_local_class(MockEngine,
|
|||||||
})),
|
})),
|
||||||
be_str_weak(MockEngine)
|
be_str_weak(MockEngine)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: animation_dsl_init
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(animation_dsl_init, /* 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(animation_web_ui),
|
||||||
|
/* K2 */ be_nested_str_weak(web_ui),
|
||||||
|
}),
|
||||||
|
be_str_weak(animation_dsl_init),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 6]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||||
|
0x5C0C0400, // 0002 MOVE R3 R2
|
||||||
|
0x7C0C0000, // 0003 CALL R3 0
|
||||||
|
0x90060403, // 0004 SETMBR R1 K2 R3
|
||||||
|
0x80040000, // 0005 RET 1 R0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
extern const bclass be_class_WLED_Palettes;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: WLED_Palettes
|
||||||
|
********************************************************************/
|
||||||
|
be_local_class(WLED_Palettes,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
be_nested_map(1,
|
||||||
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
{ be_const_key_weak(map, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||||
|
be_const_map( * be_nested_map(59,
|
||||||
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
{ be_const_key_weak(Red_X20_X26_X20Blue, 38), be_const_bytes_instance(00290E631F80184A3FE322325F841F4C7F2F1D669F6D2F65BFB04264DF813968FF54306C) },
|
||||||
|
{ be_const_key_weak(Red_X20Tide, -1), be_const_bytes_instance(00FB2E001CFF8B192BF69E3F3AF6D87B54F35E0A72B1410B8CFFF173A8B1410BC4FAE99ED8FF5E06FF7E0804) },
|
||||||
|
{ be_const_key_weak(C9_X202, 5), be_const_bytes_instance(00067E022D067E022E041E725A041E725BFF050087FF050088C43902B4C43902B5895502FF895502) },
|
||||||
|
{ be_const_key_weak(Aqua_X20Flash, -1), be_const_bytes_instance(000000004282F2F560FFFF357CFFFFFF99FFFF35BC82F2F5FF000000) },
|
||||||
|
{ be_const_key_weak(Icefire, -1), be_const_bytes_instance(000000003B003375770066FF952699FFB456CCFFD9A7E6FFFFFFFFFF) },
|
||||||
|
{ be_const_key_weak(Hult, 15), be_const_bytes_instance(00FBD8FC30FFC0FF59EF5FF1A03399D9D818B8AEFF18B8AE) },
|
||||||
|
{ be_const_key_weak(Yelmag, 47), be_const_bytes_instance(000000002A71000054FF00007FFF0075AAFF00FFD4FF8075FFFFFF00) },
|
||||||
|
{ be_const_key_weak(Red_X20Flash, -1), be_const_bytes_instance(0000000063F20C0882FDE4A39BF20C08FF000000) },
|
||||||
|
{ be_const_key_weak(Beech, -1), be_const_bytes_instance(00FFFEEC0CFFFEEC16FFFEEC1ADFE0B21CC0C37C1CB0FFE7327BFBEC474AF6F15D21E1E47800CCD78504A8B2880A848F8833BDD4D0179FC9FF0081BE) },
|
||||||
|
{ be_const_key_weak(Landscape, -1), be_const_bytes_instance(00000000251F59134C48B22B7F96EB0580BAEA7782DEE9FC99C5DBE7CC84B3FDFF1C6BE1) },
|
||||||
|
{ be_const_key_weak(Rewhi, -1), be_const_bytes_instance(00B1A0C748CD9E9559E99B656BFF5F3F8DC0626DFF84659F) },
|
||||||
|
{ be_const_key_weak(C9_X20New, -1), be_const_bytes_instance(00FF05003CFF05003DC4390278C4390279067E02B4067E02B5041E72FF041E72) },
|
||||||
|
{ be_const_key_weak(Jul, 37), be_const_bytes_instance(00E2060C5E1A604E8482BD5EFFB10309) },
|
||||||
|
{ be_const_key_weak(Cyane, -1), be_const_bytes_instance(003D9B2C195FAE4D3C84C1715D9AA67D6AAF8A886DB7798971C2688A74E1B3A57CFFFFC0A8A7DACBFF54B6D7) },
|
||||||
|
{ be_const_key_weak(C9, -1), be_const_bytes_instance(00B804003CB8040041902C027D902C0282046002BE046002C3070758FF070758) },
|
||||||
|
{ be_const_key_weak(Light_X20Pink, -1), be_const_bytes_instance(004F206D195A28753366307C4C8D87B966B4DEF86DD0ECFC72EDFAFF7ACEC8EF95B195DEB7BB82CBFFC66FB8) },
|
||||||
|
{ be_const_key_weak(Lite_X20Light, -1), be_const_bytes_instance(0000000009141516282E2B31422E2B31653D1041FF000000) },
|
||||||
|
{ be_const_key_weak(Orange_X20_X26_X20Teal, 50), be_const_bytes_instance(0000965C3700965CC8FF4800FFFF4800) },
|
||||||
|
{ be_const_key_weak(Sunset2, -1), be_const_bytes_instance(00AF793E1D80673C4454543A44F8B83761EFCC5D7CE6E185B2667D81FF001A7D) },
|
||||||
|
{ be_const_key_weak(Toxy_X20Reaf, 9), be_const_bytes_instance(0002EF7EFF9123D9) },
|
||||||
|
{ be_const_key_weak(Aurora_X202, -1), be_const_bytes_instance(0011B10D4079F2058019AD79C0FA4D7FFFAB65DD) },
|
||||||
|
{ be_const_key_weak(Vintage, 44), be_const_bytes_instance(00291218334900164CA5AA2665FFBD507F8B382899490016E5291218FF291218) },
|
||||||
|
{ be_const_key_weak(Fire, 3), be_const_bytes_instance(000000002E4D000060B100006CC4260977D74C1392EB731DAEFF9929BCFFB229CAFFCC29DAFFE629EAFFFF29F4FFFF8FFFFFFFFF) },
|
||||||
|
{ be_const_key_weak(Rivendell, 29), be_const_bytes_instance(0018452C65496946A5818C61F2C8CCA6FFC8CCA6) },
|
||||||
|
{ be_const_key_weak(Blink_X20Red, -1), be_const_bytes_instance(000407042B28193E4C3D0F246DCF27607FFF9CB8A5B949CFCC6942F0FF4D1D4E) },
|
||||||
|
{ be_const_key_weak(Magred, -1), be_const_bytes_instance(000000003F7100757FFF00FFBFFF0075FFFF0000) },
|
||||||
|
{ be_const_key_weak(Semi_X20Blue, -1), be_const_bytes_instance(000000000C18042635370854502B309F771F59ED91323BA6BA471E62E91F0F2DFF000000) },
|
||||||
|
{ be_const_key_weak(Analogous, 39), be_const_bytes_instance(002600FF3F5600FF7F8B00FFBFC40075FFFF0000) },
|
||||||
|
{ be_const_key_weak(Sakura, 20), be_const_bytes_instance(00C4130A41FF452D82DF2D48C3FF5267FFDF0D11) },
|
||||||
|
{ be_const_key_weak(Pastel, -1), be_const_bytes_instance(003D87B82481BCA957CBF19B64E4ED8D6BFFE87F73FBCA8278F8AC8580FBCA82B4FFE87FDFFFF278FFFFFC71) },
|
||||||
|
{ be_const_key_weak(Candy2, -1), be_const_bytes_instance(006D6666192A31473079605449F1D61A59D8682C822A3147A3FFB12FBAF1D61AD36D6666FF14130D) },
|
||||||
|
{ be_const_key_weak(Red_X20Reaf, -1), be_const_bytes_instance(002444726895C3F8BCFF0000FF5E0E09) },
|
||||||
|
{ be_const_key_weak(Red_X20Shift, 40), be_const_bytes_instance(0062165D2D67164963C02D3884EBBB3BAFE4551AC9E43830FF020002) },
|
||||||
|
{ be_const_key_weak(Grintage, -1), be_const_bytes_instance(001D0803354C0100688E601C99D3BF3DFF75812A) },
|
||||||
|
{ be_const_key_weak(Pink_X20Candy, 14), be_const_bytes_instance(00FFFFFF2D3240FF70F210BA8CFFFFFF9BF210BAC4740DA6FFFFFFFF) },
|
||||||
|
{ be_const_key_weak(Temperature, 12), be_const_bytes_instance(00145CAB0E0F6FBA1C068ED32A02A1E33810B5EF4626BCC95456CCC8638BDBB071B6E57D7FC4E63F8DF1F0169BFEDE1EAAFBC704B8F79D09C6F3720FE2D51E1DF0972623FF972623) },
|
||||||
|
{ be_const_key_weak(Departure, -1), be_const_bytes_instance(003522002A5633003F936C3154D4A66C6AEBD4B474FFFFFF8ABFFFC19454FF58AA00FF00BF00C000D4008000FF008000) },
|
||||||
|
{ be_const_key_weak(Candy, -1), be_const_bytes_instance(00F3F2170FF2A8268E6F1597C64A1696FF000075) },
|
||||||
|
{ be_const_key_weak(Retro_X20Clown, 46), be_const_bytes_instance(00F2A82675E24E50FFA136E1) },
|
||||||
|
{ be_const_key_weak(Beach, 26), be_const_bytes_instance(000C2D001365560226CF80043FF3C512426DC492FF052707) },
|
||||||
|
{ be_const_key_weak(Sunset, -1), be_const_bytes_instance(00B5000016DA550033FFAA0055D3554D87A700A9C64900BCFF0000CF) },
|
||||||
|
{ be_const_key_weak(Yelblu, -1), be_const_bytes_instance(000000FF3F0080FF7F00FFFFBF71FF75FFFFFF00) },
|
||||||
|
{ be_const_key_weak(Atlantica, -1), be_const_bytes_instance(00001C70322060FF6400F32D960C5F52C819BE5FFF28AA50) },
|
||||||
|
{ be_const_key_weak(Sherbet, -1), be_const_bytes_instance(00FF66292BFF8C5A56FF335A7FFF99A9AAFFFFF9D171FF55FF9DFF89) },
|
||||||
|
{ be_const_key_weak(Orangery, -1), be_const_bytes_instance(00FF5F171EFF52003CDF0D085A902C0278FF6E1196FF4500B49E0D0BD2F15211FFD52504) },
|
||||||
|
{ be_const_key_weak(Yellowout, -1), be_const_bytes_instance(00DEBF08FF753401) },
|
||||||
|
{ be_const_key_weak(April_X20Night, -1), be_const_bytes_instance(0001052D0A01052D1905A9AF2801052D3D01052D4C2DAF1F5B01052D7001052D7FF996058F01052DA201052DB2FF5C00C101052DD601052DE5DF2D48F401052DFF01052D) },
|
||||||
|
{ be_const_key_weak(Aurora, -1), be_const_bytes_instance(0001052D4000C8178000FF00AA00F32DC8008707FF01052D) },
|
||||||
|
{ be_const_key_weak(Magenta, 28), be_const_bytes_instance(000000002A000075540000FF7F7100FFAAFF00FFD4FF80FFFFFFFFFF) },
|
||||||
|
{ be_const_key_weak(Autumn, 18), be_const_bytes_instance(005A0E05338B290D54B4461168C0CA7D70B189037ABEC8837CC0CA7C87B189038EC2CB76A3B14411CC80230CF94A0502FF4A0502) },
|
||||||
|
{ be_const_key_weak(Drywet, -1), be_const_bytes_instance(007761212AEBC75854A9EE7C7F25EEE8AA0778ECD41B01AFFF043365) },
|
||||||
|
{ be_const_key_weak(Hult64, -1), be_const_bytes_instance(0018B8AE4208A296687C890782B2BA16967C8907C9069C90EF008075FF008075) },
|
||||||
|
{ be_const_key_weak(Yelblu_X20Hot, -1), be_const_bytes_instance(002B1E393A4900777A57004A9EC53916B7DA751BDBEFB120FFF6F71B) },
|
||||||
|
{ be_const_key_weak(Traffic_X20Light, 13), be_const_bytes_instance(000000005500FF00AAFFFF00FFFF0000) },
|
||||||
|
{ be_const_key_weak(Splash, 34), be_const_bytes_instance(00BA3FFF7FE30955AFEACDD5DDCD26B0FFCD26B0) },
|
||||||
|
{ be_const_key_weak(Breeze, -1), be_const_bytes_instance(00103033591BA6AF99C5E9FFFF009198) },
|
||||||
|
{ be_const_key_weak(Tertiary, -1), be_const_bytes_instance(000019FF3F268C757F56FF00BFA78C13FFFF1929) },
|
||||||
|
{ be_const_key_weak(Tiamat, 27), be_const_bytes_instance(0001020E21020523640D875C782BFFC18CF707F9A0C111D0B427FF9AC804D5ECDC27FC87F0C1D5FDFFFFF9FF) },
|
||||||
|
{ be_const_key_weak(Fairy_X20Reaf, 31), be_const_bytes_instance(00DC13BBA00CE1DBDBCBF2DFFFFFFFFF) },
|
||||||
|
})) ) } )) },
|
||||||
|
})),
|
||||||
|
be_str_weak(WLED_Palettes)
|
||||||
|
);
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: compile_file
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(compile_file, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
13, /* nstack */
|
||||||
|
1, /* argc */
|
||||||
|
0, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[25]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(string),
|
||||||
|
/* K1 */ be_nested_str_weak(animation_dsl),
|
||||||
|
/* K2 */ be_nested_str_weak(endswith),
|
||||||
|
/* K3 */ be_nested_str_weak(_X2Eanim),
|
||||||
|
/* K4 */ be_nested_str_weak(Input_X20file_X20must_X20have_X20_X2Eanim_X20extension_X3A_X20_X25s),
|
||||||
|
/* K5 */ be_nested_str_weak(invalid_filename),
|
||||||
|
/* K6 */ be_const_int(0),
|
||||||
|
/* K7 */ be_nested_str_weak(_X2Ebe),
|
||||||
|
/* K8 */ be_nested_str_weak(r),
|
||||||
|
/* K9 */ be_nested_str_weak(Cannot_X20open_X20input_X20file_X3A_X20_X25s),
|
||||||
|
/* K10 */ be_nested_str_weak(io_error),
|
||||||
|
/* K11 */ be_nested_str_weak(read),
|
||||||
|
/* K12 */ be_nested_str_weak(close),
|
||||||
|
/* K13 */ be_nested_str_weak(compile),
|
||||||
|
/* K14 */ be_nested_str_weak(DSL_X20compilation_X20failed_X20for_X3A_X20_X25s),
|
||||||
|
/* K15 */ be_nested_str_weak(dsl_compilation_error),
|
||||||
|
/* K16 */ be_nested_str_weak(_X23_X20Generated_X20Berry_X20code_X20from_X20Animation_X20DSL_X0A),
|
||||||
|
/* K17 */ be_nested_str_weak(_X23_X20Source_X3A_X20_X25s_X0A),
|
||||||
|
/* K18 */ be_nested_str_weak(_X23_X20Generated_X20automatically_X20by_X20animation_dsl_X2Ecompile_file_X28_X29_X0A),
|
||||||
|
/* K19 */ be_nested_str_weak(_X23_X20_X0A),
|
||||||
|
/* K20 */ be_nested_str_weak(_X23_X20Do_X20not_X20edit_X20manually_X20_X2D_X20changes_X20will_X20be_X20overwritten_X0A),
|
||||||
|
/* K21 */ be_nested_str_weak(_X0A),
|
||||||
|
/* K22 */ be_nested_str_weak(w),
|
||||||
|
/* K23 */ be_nested_str_weak(Cannot_X20create_X20output_X20file_X3A_X20_X25s),
|
||||||
|
/* K24 */ be_nested_str_weak(write),
|
||||||
|
}),
|
||||||
|
be_str_weak(compile_file),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[71]) { /* code */
|
||||||
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
|
0xA40A0200, // 0001 IMPORT R2 K1
|
||||||
|
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
||||||
|
0x5C140000, // 0003 MOVE R5 R0
|
||||||
|
0x58180003, // 0004 LDCONST R6 K3
|
||||||
|
0x7C0C0600, // 0005 CALL R3 3
|
||||||
|
0x740E0004, // 0006 JMPT R3 #000C
|
||||||
|
0x600C0018, // 0007 GETGBL R3 G24
|
||||||
|
0x58100004, // 0008 LDCONST R4 K4
|
||||||
|
0x5C140000, // 0009 MOVE R5 R0
|
||||||
|
0x7C0C0400, // 000A CALL R3 2
|
||||||
|
0xB0060A03, // 000B RAISE 1 K5 R3
|
||||||
|
0x540DFFF9, // 000C LDINT R3 -6
|
||||||
|
0x400E0C03, // 000D CONNECT R3 K6 R3
|
||||||
|
0x940C0003, // 000E GETIDX R3 R0 R3
|
||||||
|
0x00100707, // 000F ADD R4 R3 K7
|
||||||
|
0x60140011, // 0010 GETGBL R5 G17
|
||||||
|
0x5C180000, // 0011 MOVE R6 R0
|
||||||
|
0x581C0008, // 0012 LDCONST R7 K8
|
||||||
|
0x7C140400, // 0013 CALL R5 2
|
||||||
|
0x4C180000, // 0014 LDNIL R6
|
||||||
|
0x1C180A06, // 0015 EQ R6 R5 R6
|
||||||
|
0x781A0004, // 0016 JMPF R6 #001C
|
||||||
|
0x60180018, // 0017 GETGBL R6 G24
|
||||||
|
0x581C0009, // 0018 LDCONST R7 K9
|
||||||
|
0x5C200000, // 0019 MOVE R8 R0
|
||||||
|
0x7C180400, // 001A CALL R6 2
|
||||||
|
0xB0061406, // 001B RAISE 1 K10 R6
|
||||||
|
0x8C180B0B, // 001C GETMET R6 R5 K11
|
||||||
|
0x7C180200, // 001D CALL R6 1
|
||||||
|
0x8C1C0B0C, // 001E GETMET R7 R5 K12
|
||||||
|
0x7C1C0200, // 001F CALL R7 1
|
||||||
|
0x8C1C050D, // 0020 GETMET R7 R2 K13
|
||||||
|
0x5C240C00, // 0021 MOVE R9 R6
|
||||||
|
0x7C1C0400, // 0022 CALL R7 2
|
||||||
|
0x4C200000, // 0023 LDNIL R8
|
||||||
|
0x1C200E08, // 0024 EQ R8 R7 R8
|
||||||
|
0x78220004, // 0025 JMPF R8 #002B
|
||||||
|
0x60200018, // 0026 GETGBL R8 G24
|
||||||
|
0x5824000E, // 0027 LDCONST R9 K14
|
||||||
|
0x5C280000, // 0028 MOVE R10 R0
|
||||||
|
0x7C200400, // 0029 CALL R8 2
|
||||||
|
0xB0061E08, // 002A RAISE 1 K15 R8
|
||||||
|
0x60200018, // 002B GETGBL R8 G24
|
||||||
|
0x58240011, // 002C LDCONST R9 K17
|
||||||
|
0x5C280000, // 002D MOVE R10 R0
|
||||||
|
0x7C200400, // 002E CALL R8 2
|
||||||
|
0x00222008, // 002F ADD R8 K16 R8
|
||||||
|
0x00201112, // 0030 ADD R8 R8 K18
|
||||||
|
0x00201113, // 0031 ADD R8 R8 K19
|
||||||
|
0x00201114, // 0032 ADD R8 R8 K20
|
||||||
|
0x00201115, // 0033 ADD R8 R8 K21
|
||||||
|
0x60240011, // 0034 GETGBL R9 G17
|
||||||
|
0x5C280800, // 0035 MOVE R10 R4
|
||||||
|
0x582C0016, // 0036 LDCONST R11 K22
|
||||||
|
0x7C240400, // 0037 CALL R9 2
|
||||||
|
0x4C280000, // 0038 LDNIL R10
|
||||||
|
0x1C28120A, // 0039 EQ R10 R9 R10
|
||||||
|
0x782A0004, // 003A JMPF R10 #0040
|
||||||
|
0x60280018, // 003B GETGBL R10 G24
|
||||||
|
0x582C0017, // 003C LDCONST R11 K23
|
||||||
|
0x5C300800, // 003D MOVE R12 R4
|
||||||
|
0x7C280400, // 003E CALL R10 2
|
||||||
|
0xB006140A, // 003F RAISE 1 K10 R10
|
||||||
|
0x8C281318, // 0040 GETMET R10 R9 K24
|
||||||
|
0x00301007, // 0041 ADD R12 R8 R7
|
||||||
|
0x7C280400, // 0042 CALL R10 2
|
||||||
|
0x8C28130C, // 0043 GETMET R10 R9 K12
|
||||||
|
0x7C280200, // 0044 CALL R10 1
|
||||||
|
0x50280200, // 0045 LDBOOL R10 1 0
|
||||||
|
0x80041400, // 0046 RET 1 R10
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
// ktab too big for class 'SimpleDSLTranspiler' - skipping
|
// ktab too big for class 'SimpleDSLTranspiler' - skipping
|
||||||
|
|
||||||
extern const bclass be_class_SimpleDSLTranspiler;
|
extern const bclass be_class_SimpleDSLTranspiler;
|
||||||
@ -17046,22 +17046,17 @@ be_local_class(AnimationWebUI,
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_module(animation_dsl,
|
be_local_module(animation_dsl,
|
||||||
"animation_dsl",
|
"animation_dsl",
|
||||||
be_nested_map(18,
|
be_nested_map(17,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(create_lexer, -1), be_const_class(be_class_Lexer) },
|
|
||||||
{ be_const_key_weak(animation_web_ui, -1), be_const_class(be_class_AnimationWebUI) },
|
{ be_const_key_weak(animation_web_ui, -1), be_const_class(be_class_AnimationWebUI) },
|
||||||
{ be_const_key_weak(SimpleDSLTranspiler, -1), be_const_class(be_class_SimpleDSLTranspiler) },
|
|
||||||
{ be_const_key_weak(compile_dsl, 8), be_const_closure(compile_dsl_closure) },
|
|
||||||
{ be_const_key_weak(Token, -1), be_const_class(be_class_Token) },
|
|
||||||
{ be_const_key_weak(VERSION, -1), be_const_int(65536) },
|
|
||||||
{ be_const_key_weak(compile, -1), be_const_closure(compile_dsl_source_closure) },
|
|
||||||
{ be_const_key_weak(_symbol_table, 1), be_const_class(be_class_SymbolTable) },
|
|
||||||
{ be_const_key_weak(execute, -1), be_const_closure(execute_closure) },
|
|
||||||
{ be_const_key_weak(MockEngine, -1), be_const_class(be_class_MockEngine) },
|
{ be_const_key_weak(MockEngine, -1), be_const_class(be_class_MockEngine) },
|
||||||
{ be_const_key_weak(wled_palettes, 3), be_const_class(be_class_WLED_Palettes) },
|
{ be_const_key_weak(compile_dsl, -1), be_const_closure(compile_dsl_closure) },
|
||||||
{ be_const_key_weak(compile_file, 16), be_const_closure(compile_file_closure) },
|
{ be_const_key_weak(is_keyword, -1), be_const_closure(is_keyword_closure) },
|
||||||
{ be_const_key_weak(is_color_name, -1), be_const_closure(is_color_name_closure) },
|
{ be_const_key_weak(Token, -1), be_const_class(be_class_Token) },
|
||||||
{ be_const_key_weak(named_colors, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
{ be_const_key_weak(create_lexer, -1), be_const_class(be_class_Lexer) },
|
||||||
|
{ be_const_key_weak(compile, -1), be_const_closure(compile_dsl_source_closure) },
|
||||||
|
{ be_const_key_weak(wled_palettes, -1), be_const_class(be_class_WLED_Palettes) },
|
||||||
|
{ 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,
|
be_const_map( * be_nested_map(37,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(brown, -1), be_const_int(-5952982) },
|
{ be_const_key_weak(brown, -1), be_const_int(-5952982) },
|
||||||
@ -17102,10 +17097,14 @@ be_local_module(animation_dsl,
|
|||||||
{ be_const_key_weak(teal, -1), be_const_int(-16744320) },
|
{ be_const_key_weak(teal, -1), be_const_int(-16744320) },
|
||||||
{ be_const_key_weak(maroon, -1), be_const_int(-8388608) },
|
{ be_const_key_weak(maroon, -1), be_const_int(-8388608) },
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
{ be_const_key_weak(load_file, -1), be_const_closure(load_file_closure) },
|
{ be_const_key_weak(compile_file, 14), be_const_closure(compile_file_closure) },
|
||||||
|
{ be_const_key_weak(_symbol_entry, 6), be_const_class(be_class_SymbolEntry) },
|
||||||
|
{ be_const_key_weak(load_file, 9), be_const_closure(load_file_closure) },
|
||||||
|
{ be_const_key_weak(execute, 0), be_const_closure(execute_closure) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(animation_dsl_init_closure) },
|
{ be_const_key_weak(init, -1), be_const_closure(animation_dsl_init_closure) },
|
||||||
{ be_const_key_weak(is_keyword, -1), be_const_closure(is_keyword_closure) },
|
{ be_const_key_weak(is_color_name, -1), be_const_closure(is_color_name_closure) },
|
||||||
{ be_const_key_weak(_symbol_entry, 12), be_const_class(be_class_SymbolEntry) },
|
{ be_const_key_weak(_symbol_table, 13), be_const_class(be_class_SymbolTable) },
|
||||||
|
{ be_const_key_weak(SimpleDSLTranspiler, -1), be_const_class(be_class_SimpleDSLTranspiler) },
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
BE_EXPORT_VARIABLE be_define_const_native_module(animation_dsl);
|
BE_EXPORT_VARIABLE be_define_const_native_module(animation_dsl);
|
||||||
|
|||||||
@ -162,6 +162,6 @@ assert(render_result == true, "Base render method should return true (renders co
|
|||||||
|
|
||||||
# Test tostring method
|
# Test tostring method
|
||||||
var anim_str = str(anim)
|
var anim_str = str(anim)
|
||||||
assert(string.find(anim_str, "Animation") >= 0, "String representation should contain 'Animation'")
|
assert(type(anim_str) == "string", "String representation should be a string")
|
||||||
|
|
||||||
print("All Animation tests passed!")
|
print("All Animation tests passed!")
|
||||||
@ -170,11 +170,9 @@ def run_tests()
|
|||||||
pulse.slew_size = 3
|
pulse.slew_size = 3
|
||||||
test_assert(pulse.slew_size == 3, "Slew size parameter updated")
|
test_assert(pulse.slew_size == 3, "Slew size parameter updated")
|
||||||
|
|
||||||
# Test 12: String representation
|
# Test 12: String representation (uses default from Berry)
|
||||||
var str_repr = pulse.tostring()
|
var str_repr = str(pulse)
|
||||||
test_assert(type(str_repr) == "string", "String representation returns string")
|
test_assert(type(str_repr) == "string", "String representation returns string")
|
||||||
import string
|
|
||||||
test_assert(string.find(str_repr, "BeaconAnimation") >= 0, "String representation contains class name")
|
|
||||||
|
|
||||||
print("==================================================")
|
print("==================================================")
|
||||||
print(f"Tests completed: {passed_count}/{test_count} passed")
|
print(f"Tests completed: {passed_count}/{test_count} passed")
|
||||||
|
|||||||
@ -194,8 +194,8 @@ var alpha_color = alpha_test.produce_value("color", engine.time_ms)
|
|||||||
var alpha_actual = (alpha_color >> 24) & 0xFF
|
var alpha_actual = (alpha_color >> 24) & 0xFF
|
||||||
print(f"Alpha preservation test - expected 128, got: {alpha_actual}")
|
print(f"Alpha preservation test - expected 128, got: {alpha_actual}")
|
||||||
|
|
||||||
# Test tostring method
|
# Test string representation (uses default from Berry)
|
||||||
print(f"Provider string representation: {blue_breathe.tostring()}")
|
print(f"Provider string representation: {str(blue_breathe)}")
|
||||||
|
|
||||||
# Validate key test results
|
# Validate key test results
|
||||||
assert(provider != nil, "Default breathe color provider should be created")
|
assert(provider != nil, "Default breathe color provider should be created")
|
||||||
|
|||||||
@ -222,11 +222,9 @@ def run_tests()
|
|||||||
crenel.nb_pulse = 10
|
crenel.nb_pulse = 10
|
||||||
test_assert(crenel.nb_pulse == 10, "Nb_pulse parameter updated")
|
test_assert(crenel.nb_pulse == 10, "Nb_pulse parameter updated")
|
||||||
|
|
||||||
# Test 15: String representation
|
# Test 15: String representation (uses default from Berry)
|
||||||
var str_repr = crenel.tostring()
|
var str_repr = str(crenel)
|
||||||
test_assert(type(str_repr) == "string", "String representation returns string")
|
test_assert(type(str_repr) == "string", "String representation returns string")
|
||||||
import string
|
|
||||||
test_assert(string.find(str_repr, "CrenelPositionAnimation") >= 0, "String representation contains class name")
|
|
||||||
|
|
||||||
# Test 16: Edge case - very large frame
|
# Test 16: Edge case - very large frame
|
||||||
var large_frame = animation.frame_buffer(100)
|
var large_frame = animation.frame_buffer(100)
|
||||||
|
|||||||
@ -279,8 +279,6 @@ end
|
|||||||
def test_gradient_tostring()
|
def test_gradient_tostring()
|
||||||
print("Testing GradientAnimation tostring...")
|
print("Testing GradientAnimation tostring...")
|
||||||
|
|
||||||
import string
|
|
||||||
|
|
||||||
var strip = global.Leds(10)
|
var strip = global.Leds(10)
|
||||||
var engine = animation.create_engine(strip)
|
var engine = animation.create_engine(strip)
|
||||||
|
|
||||||
@ -290,8 +288,7 @@ def test_gradient_tostring()
|
|||||||
static_gradient.movement_speed = 50
|
static_gradient.movement_speed = 50
|
||||||
var str_static = str(static_gradient)
|
var str_static = str(static_gradient)
|
||||||
assert(str_static != nil, "Should have string representation")
|
assert(str_static != nil, "Should have string representation")
|
||||||
assert(string.find(str_static, "linear") != -1, "Should mention gradient type")
|
assert(type(str_static) == "string", "Should be a string")
|
||||||
assert(string.find(str_static, "movement=50") != -1, "Should mention movement speed")
|
|
||||||
|
|
||||||
# Test with color provider
|
# Test with color provider
|
||||||
var color_provider = animation.static_color(engine)
|
var color_provider = animation.static_color(engine)
|
||||||
@ -302,7 +299,7 @@ def test_gradient_tostring()
|
|||||||
provider_gradient.movement_speed = 25
|
provider_gradient.movement_speed = 25
|
||||||
var str_provider = str(provider_gradient)
|
var str_provider = str(provider_gradient)
|
||||||
assert(str_provider != nil, "Should have string representation")
|
assert(str_provider != nil, "Should have string representation")
|
||||||
assert(string.find(str_provider, "radial") != -1, "Should mention radial type")
|
assert(type(str_provider) == "string", "Should be a string")
|
||||||
|
|
||||||
print("✓ GradientAnimation tostring test passed")
|
print("✓ GradientAnimation tostring test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -177,9 +177,6 @@ def test_noise_tostring()
|
|||||||
var str_repr = str(noise_anim)
|
var str_repr = str(noise_anim)
|
||||||
|
|
||||||
assert(type(str_repr) == "string", "String representation should be a string")
|
assert(type(str_repr) == "string", "String representation should be a string")
|
||||||
assert(string.find(str_repr, "NoiseAnimation") >= 0, "String should contain 'NoiseAnimation'")
|
|
||||||
assert(string.find(str_repr, "75") >= 0, "String should contain scale value")
|
|
||||||
assert(string.find(str_repr, "45") >= 0, "String should contain speed value")
|
|
||||||
|
|
||||||
print("✓ NoiseAnimation string representation test passed")
|
print("✓ NoiseAnimation string representation test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -182,11 +182,9 @@ def test_ease_tostring()
|
|||||||
ease_out_provider.max_value = 200
|
ease_out_provider.max_value = 200
|
||||||
ease_out_provider.duration = 2500
|
ease_out_provider.duration = 2500
|
||||||
|
|
||||||
var ease_in_str = ease_in_provider.tostring()
|
# Verify form values are set correctly
|
||||||
var ease_out_str = ease_out_provider.tostring()
|
assert(ease_in_provider.form == animation.EASE_IN, "EASE_IN form should be set")
|
||||||
|
assert(ease_out_provider.form == animation.EASE_OUT, "EASE_OUT form should be set")
|
||||||
assert(string.find(ease_in_str, "EASE_IN") >= 0, "EASE_IN tostring should contain 'EASE_IN'")
|
|
||||||
assert(string.find(ease_out_str, "EASE_OUT") >= 0, "EASE_OUT tostring should contain 'EASE_OUT'")
|
|
||||||
|
|
||||||
print("✓ Ease tostring test passed")
|
print("✓ Ease tostring test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -171,11 +171,9 @@ def test_elastic_bounce_tostring()
|
|||||||
bounce_provider.max_value = 200
|
bounce_provider.max_value = 200
|
||||||
bounce_provider.duration = 2500
|
bounce_provider.duration = 2500
|
||||||
|
|
||||||
var elastic_str = elastic_provider.tostring()
|
# Verify form values are set correctly
|
||||||
var bounce_str = bounce_provider.tostring()
|
assert(elastic_provider.form == animation.ELASTIC, "ELASTIC form should be set")
|
||||||
|
assert(bounce_provider.form == animation.BOUNCE, "BOUNCE form should be set")
|
||||||
assert(string.find(elastic_str, "ELASTIC") >= 0, "ELASTIC tostring should contain 'ELASTIC'")
|
|
||||||
assert(string.find(bounce_str, "BOUNCE") >= 0, "BOUNCE tostring should contain 'BOUNCE'")
|
|
||||||
|
|
||||||
print("✓ Elastic and bounce tostring test passed")
|
print("✓ Elastic and bounce tostring test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -515,15 +515,11 @@ def test_tostring()
|
|||||||
osc.duration = 2000
|
osc.duration = 2000
|
||||||
osc.form = animation.TRIANGLE
|
osc.form = animation.TRIANGLE
|
||||||
|
|
||||||
var str_repr = osc.tostring()
|
# Verify parameters are set correctly
|
||||||
|
assert(osc.min_value == 10, "min_value should be 10")
|
||||||
# Should contain key information
|
assert(osc.max_value == 90, "max_value should be 90")
|
||||||
import string
|
assert(osc.duration == 2000, "duration should be 2000")
|
||||||
assert(string.find(str_repr, "OscillatorValueProvider") >= 0, "String should contain class name")
|
assert(osc.form == animation.TRIANGLE, "form should be TRIANGLE")
|
||||||
assert(string.find(str_repr, "10") >= 0, "String should contain min_value")
|
|
||||||
assert(string.find(str_repr, "90") >= 0, "String should contain max_value")
|
|
||||||
assert(string.find(str_repr, "2000") >= 0, "String should contain duration")
|
|
||||||
assert(string.find(str_repr, "TRIANGLE") >= 0, "String should contain waveform name")
|
|
||||||
|
|
||||||
print("✓ tostring() method test passed")
|
print("✓ tostring() method test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -191,8 +191,6 @@ end
|
|||||||
def test_gradient_meter_tostring()
|
def test_gradient_meter_tostring()
|
||||||
print("Testing GradientMeterAnimation tostring...")
|
print("Testing GradientMeterAnimation tostring...")
|
||||||
|
|
||||||
import string
|
|
||||||
|
|
||||||
var strip = global.Leds(10)
|
var strip = global.Leds(10)
|
||||||
var engine = animation.create_engine(strip)
|
var engine = animation.create_engine(strip)
|
||||||
var meter = animation.palette_meter_animation(engine)
|
var meter = animation.palette_meter_animation(engine)
|
||||||
@ -201,9 +199,7 @@ def test_gradient_meter_tostring()
|
|||||||
|
|
||||||
var s = str(meter)
|
var s = str(meter)
|
||||||
assert(s != nil, "Should have string representation")
|
assert(s != nil, "Should have string representation")
|
||||||
assert(string.find(s, "GradientMeterAnimation") != -1, "Should contain class name")
|
assert(type(s) == "string", "Should be a string")
|
||||||
assert(string.find(s, "level=150") != -1, "Should contain level")
|
|
||||||
assert(string.find(s, "peak_hold=500") != -1, "Should contain peak_hold")
|
|
||||||
|
|
||||||
print("✓ GradientMeterAnimation tostring test passed")
|
print("✓ GradientMeterAnimation tostring test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -191,13 +191,11 @@ frame.clear()
|
|||||||
result = no_color_anim.render(frame, mock_engine.time_ms, mock_engine.strip_length)
|
result = no_color_anim.render(frame, mock_engine.time_ms, mock_engine.strip_length)
|
||||||
assert(!result, "Render should return false when no color source is set")
|
assert(!result, "Render should return false when no color source is set")
|
||||||
|
|
||||||
# Test 8: String representation
|
# Test 8: String representation (uses default from Berry)
|
||||||
print("Test 8: String representation")
|
print("Test 8: String representation")
|
||||||
var str_anim = animation.palette_gradient_animation(mock_engine)
|
var str_anim = animation.palette_gradient_animation(mock_engine)
|
||||||
var str_repr = str_anim.tostring()
|
var str_repr = str(str_anim)
|
||||||
print(f"String representation: {str_repr}")
|
print(f"String representation: {str_repr}")
|
||||||
assert(str_repr != nil, "String representation should not be nil")
|
assert(str_repr != nil, "String representation should not be nil")
|
||||||
# The string representation might use the base class name, so let's check for that
|
|
||||||
assert(string.find(str_repr, "Animation") >= 0, "String should contain Animation in class name")
|
|
||||||
|
|
||||||
print("All palette pattern animation tests passed!")
|
print("All palette pattern animation tests passed!")
|
||||||
@ -79,7 +79,7 @@ def test_string_representation()
|
|||||||
var provider = animation.strip_length(engine)
|
var provider = animation.strip_length(engine)
|
||||||
|
|
||||||
var str_repr = str(provider)
|
var str_repr = str(provider)
|
||||||
assert(str_repr == "StripLengthProvider(length=42)", f"Unexpected string representation: {str_repr}")
|
assert(type(str_repr) == "string", "String representation should be a string")
|
||||||
|
|
||||||
print(" ✓ String representation test passed")
|
print(" ✓ String representation test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -219,10 +219,6 @@ def test_wave_tostring()
|
|||||||
var str_repr = str(wave_anim)
|
var str_repr = str(wave_anim)
|
||||||
|
|
||||||
assert(type(str_repr) == "string", "String representation should be a string")
|
assert(type(str_repr) == "string", "String representation should be a string")
|
||||||
assert(string.find(str_repr, "WaveAnimation") >= 0, "String should contain 'WaveAnimation'")
|
|
||||||
assert(string.find(str_repr, "triangle") >= 0, "String should contain wave type name")
|
|
||||||
assert(string.find(str_repr, "75") >= 0, "String should contain frequency value")
|
|
||||||
assert(string.find(str_repr, "45") >= 0, "String should contain wave_speed value")
|
|
||||||
|
|
||||||
print("✓ WaveAnimation string representation test passed")
|
print("✓ WaveAnimation string representation test passed")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user