Sanny Builder supports writing a raw content in an output file. All values within this construct are written in an output file without any checks.
Use this feature only if you know what you're doing. Any mistakes will corrupt the script file making it unreadable by the game or a script editor.
hex <any hexadecimal numbers> end
04 00 02 0800 04 01
This sequence of bytes is the compiled version of the opcode
0004: $2 = 1, so the game will correctly read it and set the value of the variable
You must specify each byte you're going to write with two digits. All spaces are ignored. The compiler treats any two digits with a space between them as a single byte value. A single digit (
0..F) is prefixed with
0. So, for example, a sequence of three letters
A B Cwill be compiled as the number
HEX..ENDconstruct also accepts string literals, labels, global variables, model names. They are compiled without a preceding data type byte.
04 00 02 $PLAYER_CHAR 01 @get_offset
This is the exact copy of the opcode
0004: $PLAYER_CHAR = @get_offset
A string literal enclosed in double quotes is compiled as a sequence of characters.
"This is a string"
The following escape sequences are supported within a string literal:
Numeric escape sequence
It produces the following sequence of bytes:
00 08 09 0A 0D DD.
Currently multiple spaces in a string literal are converted into a single one. Thus a line
"This is a string"is converted into
"This is a string". Use the backward slash character
\to add multiple spaces in a string literal:
"This \ \ \ is \ a \ \ \ \ string".
Also you can use the aDMA data type to write a numeric constant in an output file. The number after the
&sign can be both positive or negative, decimal or hexadecimal.
This example produces the following sequence of bytes:
E8 03 00 CB 5C FF.