mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-29 07:01:55 +00:00
ACC is an ACS script compiler for use with ZDoom and Hexen.
ac678ff7b8
- 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. |
||
---|---|---|
.gitignore | ||
acc.c | ||
acc.dsp | ||
acc.dsw | ||
common.h | ||
error.c | ||
error.h | ||
Makefile | ||
misc.c | ||
misc.h | ||
parse.c | ||
parse.h | ||
pcode.c | ||
pcode.h | ||
strlist.c | ||
strlist.h | ||
symbol.c | ||
symbol.h | ||
token.c | ||
token.h | ||
zcommon.acs | ||
zdefs.acs | ||
zspecial.acs | ||
zwvars.acs |