PMODE_SPARK does weird colour ops with alpha values larger than 255, so of course it looks odd with the new code that expects alpha to be at most 255. The solution is to do the work on the spot.
Other effects may also be affected by this new assumption.
This was because brushes are not in an initialized state by default, SetRadius needs to be called on them before they can be used. This is ensured elsewhere but had not been ensured on this code path.
This is hilariously bad design and needs to be fixed sometime.
This had been overlooked for a long time because intensity defaults to 1.0f and is seldom changed. The underlying issue is that an intensity value higher than 1.0f produces fire_alpha values above 255, which the new graphics code doesn't deal with properly. That said, that code works fine for every other case, so the solution is to add a special case for when fire_alpha is used.
By refusing to exit unless the property being set is correct, rather than throwing an error when it's not and exiting anyway. It's still possible to cancel changing the current setting by exiting with Esc.
This was an unused and by default disabled element that did nothing even when enabled. 146 used to be the element ID allocated to some legacy GOL variant that I cannot be bothered to look into, and the element itself existed in this vegetative state for years to ensure some sort of compatibility that I found no trace of or reason for.
Also make the element list friendlier, both for humans and for git. The list held consecutive integers starting from 0, so it was ripe for factoring. Element ID's are skipped if the name that they would normally belong to is not a string but rather a disabler(), the closest thing to a null/nil/none value in meson.
This allows multiple instances of the game to be loaded in a single page.
Also stop emitting htmls as a build artifact and require presence of #PowderSessionInfo.
Notable changes:
- tpt.{input,throw_error,message_box,confirm} have been superseded by ui.begin{Input,ThrowError,MessageBox,Confirm}, each with an extra callback argument and no blocking behaviour, but otherwise the same semantics as their predecessors.
- The "script not responding" error doesn't wait for user confirmation anymore, it fires without asking. Future exercise: maybe let the user configure the timeout.
- Remove the confirmPrompt argument of tpt.getscript; this also means it unconditionally fails if the destination file exists.