THG2
Sprites placed on the map. A pure sprite (flag 0x1000) is a picture drawn where it stands: a tree top, a glow, a doodad's overlay. Without that flag the record is a unit sprite, and the game creates a unit of that type when the map loads; that is how StarEdit places the Installation's doors and traps. Flag 0x8000 starts such a unit disabled.
| Name | THG2 (54 48 47 32) |
|---|---|
| Size | 10 bytes per sprite. |
| Read by | The game. |
| Required | Yes. The game does not load a map without it. |
| More than one copy | Every copy counts: the records of all of them, in file order. |
| In scmJS | Read, and written again when you change what it holds. |
Each sprite:
| Offset | Type | Holds |
|---|---|---|
| 0 | u16 | Sprite number, or the unit type for a unit sprite (see the flags) |
| 2 | u16 | X in pixels |
| 4 | u16 | Y in pixels |
| 6 | u8 | Owner |
| 7 | u8 | Unused |
| 8 | u16 | Flags (below) |
Flags:
| Bit | Meaning |
|---|---|
| 0x1000 | Pure sprite |
| 0x4000 | Flipped |
| 0x8000 | Disabled |
Example#
Two records: a pure sprite, drawn and nothing more, and an Installation door, which the game makes into a unit of that type when the map loads. Its disabled flag makes it start closed.
0 82 00 sprite 130
2 80 02 x 640 px
4 90 01 y 400 px
6 0B owner: Player 12
7 00 unused
8 00 10 flags: pure sprite
10 CD 00 unit type 205, Left Upper Level Door
12 C0 04 x 1216 px
14 50 02 y 592 px
16 0B owner: Player 12
17 00 unused
18 00 80 flags: disabled