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.
Pure sprites are drawn in every game type. A unit sprite is made only in a Use Map Settings game or when Player 12 owns it, and the game always gives the four Installation doors (unit types 205 to 208) to Player 12, whatever the record says. Unlike a placed unit, a unit sprite is made even for a player who is not in the game. The game reads no flag but 0x1000 and 0x8000: 0x4000, which editors call flipped, has no effect in play, and the sprite faces the way the game's own animation turns it. StarEdit still writes 0x4000 on the overlays of some doodads, such as the right-hand doors and traps of Installation. Checked against 1.16.1; Remastered's code reads the same two flags.
| Name | THG2 (54 48 47 32) |
|---|---|
| Size | 10 bytes per sprite. |
| Read by | The game, at the start of every game, whatever its type. |
| Required | Yes. Without it the map is listed, but every game on it stops at the start with Error loading scenario file. |
| The game accepts | Whole sprites only. A length that is not a multiple of 10 refuses the map. |
| More than one copy | The copies are joined into one list: 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