Release v1.1
The second release of the Diannex tool. This version includes a number of bug fixes and quality of life changes, as well as a brand new feature to the language: flags.
The new flag syntax provides a simple way for games with scenes that get called repeatedly to define and use fields for a specific Diannex scene. For an example, a use case could be this:
scene sample : flag(false)
{
if $flag
"This runs after the line below, indefinitely"
else
{
"This runs before the line above, once"
$flag = true
}
}
The new syntax itself is shown on the first line, and can be applied to functions as well. It follows the general form of : <flag field name>(<initial value>, <custom name>)
, and multiple flags can be defined, if delimited by commas: : flag1(false), flag2(2, "testFlag")
. The parameters for each flag are expressions, and can be evaluated at a time that the interpreter/game sees fit (this includes calling functions, however, pausing the interpreter when doing so is undefined behavior).
In the scene/function block, flags act identically to local variables, however, when they are freed, their values should be assigned to the name of their flag, handled by the game (such as through a callback).