Compiling

The compiler, dh-acc, should be placed under util/dh-acc/

DH-ACC should be set to compile each category into its own object, and then compile the resultant output into a single .o

Each category is a .ds file which contains some base definitions and then a list of #includes to its components, such as _Structs.dh, _Scripts.dh.

example: ''//inv.ds /////////////////////////////////////////// // Include order is important, defines and variable declarations must always come before functions, which must come before scripts script void SetPlayerTID (void) enter { Thing_ChangeTID(0, PLAYER_TID); };'' The inclusion of stdlib.h gives you access to the the c stdlib function library, likewise string.h includes the c string function library. These must both be compiled alongside the script objects.
 * 1) include 
 * 2) include 
 * 3) include 
 * 1) include "math.dh"
 * 1) define script				__extscript "ACS"
 * 2) define enter				__enter
 * 3) define open				__open
 * 4) define CallACS(arg1)		ACS_NamedExecuteAlways((arg1), 0)
 * 5) define Print				__printf<__printf_print>
 * 6) define Log					__printf<__printf_log>
 * 7) define HudMessage			__printf<__printf_hud>
 * 8) define HudMessageBold		__printf<__printf_hud_bold>
 * 9) define StrParam			__printf<__printf_string>
 * 10) define GlobalArr			__global_array
 * 11) define GlobalReg			__global_register
 * 12) define AddrSpace			__address_space
 * 13) define function			__function
 * 14) define lib					__library
 * 1) define PLAYER_TID			5000
 * 2) define TEMP_TID			5001			// Temporary tid is assigned to items which are dropped in order to match their properties
 * 1) define restart Delay(1); goto Start
 * 1) include "INV_Globals.dh"
 * 1) include "HUD_Defines.dh"
 * 2) include "INV_Defines.dh"
 * 1) include "INV_Structs.dh"
 * 2) include "HUD_Structs.dh"
 * 3) include "PLAYER_Structs.dh"
 * 1) include "ITEM_Database.dh"
 * 2) include "RECIPE_Database.dh"
 * 1) include "HUD_Init.dh"
 * 2) include "INV_Init.dh"
 * 1) include "INV_Funcs.dh"
 * 2) include "HUD_Funcs.dh"
 * 3) include "CRAFT_Funcs.dh"
 * 1) include "INV_Scripts.dh"
 * 2) include "ITEM_Scripts.dh"
 * 1) include "HUD_Cursor.dh"

Batch compiling:
in this example, the file structure would be as follows; set fname=inv set c_path=script\inventory set acc_path=util\dh-acc\ set PATH=%PATH%;%acc_path% dh-acc -Z -c -D__LIBDS_NOLIB --named-scripts script\stdlib.ds pk3\acs\stdlib.obj dh-acc -Z -c -D__LIBDS_NOLIB --named-scripts script\string.ds pk3\acs\string.obj dh-acc -Z -c -D__LIBDS_NOLIB --named-scripts %c_path%\%fname%.ds pk3\acs\%fname%.obj dh-acc -Z pk3\acs\stdlib.obj pk3\acs\string.obj pk3\acs\%fname%.obj -o pk3\acs\%fname%.o del pk3\acs\stdlib.obj del pk3\acs\string.obj del pk3\acs\%fname%.obj endlocal pause // dh-acc -flags input output obj ''// dh-acc -flags input obj ... output o'' This would output pk3/acs/inv.o
 * root\
 * script\
 * stdlib.ds
 * string.ds
 * inventory\
 * inv.ds
 * .dh
 * util\
 * dh-acc\
 * pk3\
 * acs\

Parameters:

 * -Z - Targets the ZDOOM engine
 * -c - Creates an .obj
 * -D__LIBDS_NOLIB -  This is not a library
 * --named-scripts - Allow named scripts
 * -o - output .o filename