is a command line program which can be used to 'assemble' a collection of text files containing code into a main.scm
file you can use with GTA:VC. It is also possible to make it generate a main.scm
file that is compatible with GTA 3.
The included readme details the command line arguments you may use.
The format for the code it accepts is very simple:
- A line is only used up to the first semicolon (';'), anything beyond that is regarded as a comment.
- Every line can either be empty, a label, an opcode with its parameters, or an assembler directive.
- Labels start with the at-sign ('@'); for example @Foobar.
- Opcodes are named uniquely, and their names contain only letters, numbers, and underscores. Instead of the name, a hexadecimal number may also be used. Conditional opcodes can be prefixed with an exclamation mark ('!') to negate the condition.
- If an opcode has parameters, these follow after the opcode and some whitespace. Multiple parameters are separated by commas.
- Several types of parameters can be used:
- Integers: simple whole numbers. For example: 123.
- Floats: floating point values. For example: 123.456. Note: Opcodes that expect float parameters will not work with integers. Coordinates, for example, are always floats; if you have a coordinate 145, you will need to use 145.0 in your script.
- Strings: up to seven characters. For example: "MAIN". Used to name threads, refer to GXT entries, etc.
- Models: these are defined in the ide files. For example: %PALETTE. Unless a model is defined in default.ide, it is necessary to put the name in all uppercase.
- Global variables: these can store integers and floats across threads. For example $Foobar.
- Local variables: these can also store integers and floats, but are unique for every thread. They are also (hexadecimally) numbered instead of named, for example: !7.
- Labels: used to refer to a specific line in the script. For example: @Foobar.
- Assembler directives such as #include, #ifdef and #define tell GTAMA to do something special with your code.
To get a feel for the code, it is recommended that you read some of the code produced by VCDisAsm, and try to follow what it is doing.