I was performing a value check on fade_step in the timer, and then multiplying it fivefold in the alpha
calculation, meaning full alpha was reached long before the fade in sequence stopped and the duration timer
was initialized.
Since all the floating images' data was set with a formula that relied on a canvas-wide variable whose value
was constantly changing and no serialization was done, the formulas all evaluated to the same location.
To fix this, we do away with the use of the variables and insert the necessary values directly into the formula
string.
For rectangles, color_t::null_color() needs to be specified as the default since typed_formula
utilizes the default type ctor if no default value is provided. In this case, color_t's default
ctor returns opaque white, which doesn't mesh well with GUI2's drawing.
Other shapes don't get this default value, since color is essentially mandatory for them, whereas
in rectangles either fill_color or border_color may be omitted.
Essentially, I delegated the call to variant::evaluate to the operator() function and not the execute
specializations, which are now passed he resulting variant instead.
That and a ton of formatting and a bunch of moving stuff around.
This fixes several warnings of this type:
ld: warning: direct access in return_to_play_side_exception::execute()
to global weak symbol typeinfo for lua_jailbreak_exception means the
weak symbol cannot be overridden at runtime. This was likely caused by
different translation units being compiled with different visibility
settings.
For some reason, when the variant constructor only accepts
std::shared_ptr<const variant_callable>, MSVC2013 gets confused about which
constructor it should call when it has, say,
std::shared_ptr<ai::attack_analysis>. Making the constructor a template
fixes it.
This allows the variant_callable to store a shared_ptr to its callable while ensuring that
callables that were allocated on the stack or as part of a larger structure are not
double-freed.