Releases: Rupitian/diannex
Release v1.4.1
- Major changes in the binary format, as such the version number for the binary has been bumped up to version 4.
- Sizes added so that parsers can ignore data on first read (and parse it on the fly, instead)
- String interpolation parsing updated
- Added token-based macros (defined in the project JSON) for use in code
- Diannex-defined function calls now resolve in priority of local to global scope, rather than the other way around
- Definition blocks with the same name are now allowed (only no duplicate fully-qualified entries are allowed now)
- File include order through
#include
now processes in a more intuitive order (especially for translation files) - Added a new string ID feature for use in translation files (to track and upgrade files across game versions)
- Added translation file conversion and upgrade options
- Added new translation file format that uses binary format, rather than plaintext
- Miscellaneous optimizations and code cleanup
- Various code parsing bugs fixed
- Some small bugs with code output fixed
Changes in 1.4.1:
- Updated miniz dependency to version 3.0.2
Release v1.3
- Major changes in the binary format, as such the version number for the binary has been bumped up to version 3.
- Added a new
sequence
statement, which works similarly to aswitch
statement, however the expression passed gets incremented after every run (or to the next value in the sequence, unless inside of a range). It can also act as a loop withcontinue
andbreak
, if wanted. The expression passed in must be a variable, or an index inside of an array variable (to any dimension). - Added a new "simplified" switch statement, which removes the
case
keyword, which is slightly more restrictive. One one statement is supported after each case, include a block ({}
), which you can use to get multiple statements. The purpose is to minimize code length and match the sequence statement in design. - Added ranges only for
sequence
statements and simplified switch statements, which take two numbers separated by..
, such as1..3
, equivalent to1 <= val <= 3
- Changed how instructions are indexed, instead of jump offsets being by Instruction count, it's now by byte offset. References from outside the bytecode are relative to the start of the bytecode, in bytes.
- Various misc. bug fixes/optimizations.
Example usage of the new sequences
statement:
sequence $var // optional parentheses
{
0: "This is the initial line"
1:
{
"This is the second line"
}, // optional comma
2..3: "This runs the third and fourth times the code is executed"
100: "This runs the fifth time, and every time after"
}
Example usage of the new "simplified" switch statement:
switch $var
{
0: "Sample"
1: "123"
3:
{
"Line when $var happens to be 3"
specialCommandHere
}
}
Release v1.2
A couple of bugfixes, alongside a new undefined
constant, as well as a few bytecode optimizations
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).
Release v1.0
Initial feature complete release of the Diannex tool.