GZ 1 format - MisterMarty/bahn-gz-editor GitHub Wiki
Content of a GZ-1 file:
| Name | Type | Value | Length (in bytes) | Description |
|---|---|---|---|---|
| Header Text | char (ANSI) | Any ANSI text (e.g. "Hello, world!") | 1-* | ASCII text containing meta-info about the file |
| Header End | byte | 0x1A | 1 | Marks the end of the Header Text |
| File Identifier | char | 0x47, 0x5a, 0x47 ('G', 'Z', 'G') | 3 | Static text "GZG" used to identify GZ-* files |
| Zoom Factor | char | 0x49 ('1') | 1 | Zoom factor as char. '1' for GZ-1 files, '2' and '4' for GZ-2 and GZ-4 respectively |
| Version | byte | 0x03, 0x84 | 2 | Version of Bahn |
| Sub-version | byte | 0x00, 0x03 | 2 | Sub-version of Bahn |
| Properties | int32 | bitmask | 4 | See Flags below |
| Steam/Smoke origin X * | int32 | any int32 | 4 | X position of the smoke origin. Only set when either the steam- or smoke-flag is set |
| Steam/Smoke origin Y * | int32 | any int32 | 4 | Y position of the smoke origin. Only set when either the steam- or smoke-flag is set |
| Steam/Smoke origin Width * | int32 | any int32 | 4 | Width (length) of steam/smoke. Only set when either the steam- or smoke-flag is set |
| Clock future flag * | int32 | 1 | 4 | For future use. Set to 1 if clock flag is set, otherwise omit |
| ... | ... | ... | ... | ... |
Flags
| Flag | Binary | Hex | Description |
|---|---|---|---|
| Smoke | 0000000000000001 | 0x0001 | Element emits smoke (exclusive to Steam) |
| Steam | 0000000000000010 | 0x0002 | Element emits steam (exclusive to Smoke) |
| Clock | 0000000000000100 | 0x0004 | Element contains a clock |
| Cursor info available | 0000000000001000 | 0x0008 | Element contains custom cursor info |
| Driveway info available | 0000000000010000 | 0x0010 | Element contains custom driveway info |
| Colormap info available | 0000000000100000 | 0x0020 | Element contains custom colormap info |
| 24BPP | 0010000000000000 | 0x0200 | Encoded in new color format (required) |
Example of a flag combination: 00100000 00110010 This means, the element emits steam and contains custom driveway- and colormap info. The 24BPP flag must always be set.