- This is a feature that never saw the light of day in this form, so get
rid of its vestigial remnants. (Note that this is NOT the l: print
formatter that causes the game to look up a string in the LANGUAGE
lump.)
- Script arrays are semantically identical to map arrays: They have fixed
sizes and can be multidimensional. They can also be initialized, although
this is just syntactic sugar. e.g.
int init_array[2] = { 10, 20 }
produces code identical to:
int init_array[2];
init_array[0] = 10;
init_array[1] = 20;
Script arrays are also implicitly initialized to 0, just like any other
variable in ACS.
- Unlike map arrays, they only exist for the life of the script, and each
script gets its own copy of the array.
- Script arrays exists in a separate space from script variables. I did
not repeat the bullshittery of map arrays here. (I still have no idea what I
was thinking when I designed them that way.)
- Each script and function that uses local arrays is recorded with a new
chunk: SARY for scripts and FARY for functions. The first two bytes are the
script/function number, and the rest of the chunk consists of four-byte
integers describing the size (in ints) of each array used by that
script/function. To determine how many arrays a script/function uses,
take the chunk length, subtract two, and divide by four.
- Increase the maximum script number from 999 to 32767.
- Only create dummy scripts for scripts WadAuthor's error checker might be interested in: If its
number doesn't fit in a byte, WadAuthor doesn't need to know about it, because you can't
call it directly from a Hexen-format map.
SVN r3358 (trunk)