-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for GetDString statements
- Loading branch information
1 parent
701ddc2
commit 6b218b4
Showing
5 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
GetDString VAR LENGTH [FILENUM] | ||
|
||
It reads a defined amount of data from the file and stores it | ||
in the given variable. | ||
It's useful with filenames and other strings that have a length | ||
specified in a previous 8, 16 or 32 bit field. | ||
|
||
Arguments: | ||
VAR Variable which will receive the read data | ||
LENGTH Amount of bytes to read. | ||
There is also an experimental method in which you | ||
can specify the elements and their size like | ||
LENGTH*NUM, for example: | ||
getdstring ARRAY NUMBERS*4 | ||
FILENUM Number of the file associated to the archive (0) | ||
|
||
Examples: | ||
GetDString NAME NAME_LENGTH | ||
GetDString NAME 0x100 | ||
getdstring ARRAY ELEMENTS*4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
================================================================================ | ||
GetDString statements | ||
================================================================================ | ||
|
||
GetDString NAME NAME_LENGTH | ||
GetDString NAME 0x100 | ||
getdstring ARRAY ELEMENTS*4 | ||
|
||
getdstring name 0x10 | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(getdstring_statement | ||
(getdstring) | ||
(identifier) | ||
(identifier)) | ||
(getdstring_statement | ||
(getdstring) | ||
(identifier) | ||
(integer_literal)) | ||
(getdstring_statement | ||
(getdstring) | ||
(identifier) | ||
(array_size_expression | ||
(identifier) | ||
(integer_literal))) | ||
(getdstring_statement | ||
(getdstring) | ||
(identifier) | ||
(integer_literal))) |