News:
1. Renamed components
DefineVariable -> Variable
DefineConstant -> Constant
DefineArray -> Array
This makes the naming consistent with other components (i.e. Mesh, Bitmap, Sound etc.). Existing projects will open without errors but when they are saved the xml will contain the new names so they will no longer open in older versions of ZGE.
2. Arrays as parameters to functions. For example:
Code: Select all
//Add item to end of array
void addItem(int item, int[] ar) {
ar.SizeDim1++;
ar[ ar.SizeDim1-1 ] = item;
}
Code: Select all
addItem(42, MyArray);
3. Local arrays
A function can declare local arrays. Examples:
Code: Select all
int x[]; //Declare a one-dimensional int array
int xx[ , ]; //Declare a two-dimensional int array
int xx[ , , ]; //Declare a three-dimensional int array
x.SizeDim1=10; //Set array to hold 10 items
As usual I've barely tested this so please report any errors or strange issues, thanks!
Download here:
http://www.zgameeditor.org/files/ZGameEditor_beta.zip