Difference between revisions of "Action10"
From GRFSpecs
Jump to navigationJump to searchm (6 revisions) |
m (cleanup in aisle 10) |
||
Line 1: | Line 1: | ||
+ | ==Introduction== |
||
− | |||
− | '''''Define GOTO label for action 7/9''''' |
||
− | |||
⚫ | |||
Define GOTO label for action 7/9 |
Define GOTO label for action 7/9 |
||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
Available since 2.0.1 alpha 49. |
Available since 2.0.1 alpha 49. |
||
+ | ==Syntax== |
||
− | -=Format=- |
||
The data looks as follows: |
The data looks as follows: |
||
− | <pre> |
+ | <pre><sprite-number> * <length> 10 <label> [<comment>]</pre> |
− | |||
⚫ | |||
− | |||
⚫ | |||
− | |||
⚫ | |||
− | |||
− | 10|B|Action 10 |
||
− | |||
⚫ | |||
+ | {| |
||
⚫ | |||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |- |
||
⚫ | |||
+ | |} |
||
⚫ | |||
− | -=Filling in the terms=- |
||
===sprite-number=== |
===sprite-number=== |
Revision as of 15:40, 14 June 2011
Introduction
Define GOTO label for action 7/9
To eliminate having to change all action 7/9 entries after adding sprites to a .grf file, you can define labels using this action 10. Additionally, this is the only way to skip more than 255 sprites at once.
Available since 2.0.1 alpha 49.
Syntax
The data looks as follows:
<sprite-number> * <length> 10 <label> [<comment>]
Element | Size | Description |
---|---|---|
<sprite-number> | dec | A sequential sprite number |
<length> | dec | The total number of bytes in the action |
10 | B | Action 10 |
<label> | B | Which label to define |
<comment> | V | Optional comment, ignored by TTDPatch |
Description
sprite-number
The current sprite number.
length
The total number of bytes in this action 7 or 9.
label
This sets the number of the label to define. It may range from E0 to FF (allowing 32 labels per grf file).
If two labels are defined with the same number, only the last definition counts.
Since 2.0.1 alpha 70, the label may have any number (instead of just E0..FF). In addition, duplicate labels are handled differently, see action 7 for details.