WFoundation/WF.Compiler: Compiler for Wherigo cartridges (github.com)
driquet/gwcd (github.com)
A GWC file consists of five sections
- Signature
- Information about the existing files
- Header with general information about the cartridge
- Start coordinate and description of the start
- Creation date
- Type of cartridge
- Name and ID of the player
- Cartridge name
- Cartridge description
- Version
- Author and company
- Completion code
- LUA byte code
- Files of images, sounds, texts
The byte-wise structure is as shown in the following table. Here applies:
- Numbers are stored in the format “Little endian”.
- Strings end with 0x00.
- Double numbers are stored in “double-precision floating point” format.
Note: Earwigo has added more data fields in the header!
Adress | Length | Content | Note |
@0000 | Beginn Signature | ||
2 Byte | Version | 0x02 followed by 0x0a or 0x0b | |
4 Byte | CART | ||
1 Byte | 0x00 | ||
@0007 | Number of objects | ||
2 Byte | |||
@0009 | ID and adress of each object | 6 Bytes per object | |
2 Byte | Objekt-ID | ||
4 Byte | Adress of object | ||
@xxxx | Begin of Header | @0009 + Number of objects * 6 Byte | |
4 Byte | Length of Header | ||
8 Byte | Latitude | ||
8 Byte | Longitude | ||
8 Byte | Altitude | ||
4 Byte | Creation Date | Seconds from 10.02.2004 01:00 | |
2 Byte | Objekt-ID of Splashscreen | -1 if no Splashscreen | |
2 Byte | Objekt-ID of Icon | -1 if no Icon | |
? Byte | Type of Cartridge | Tour guide, Puzzle, etc. | |
? Byte | Name of Player | ||
4 Byte | Player-ID | ID aus der Groundspeak-Datenbank | |
? Byte | Name of Cartridge | ||
? Byte | GUID of Cartridge | ||
? Byte | Description of Cartridge | ||
? Byte | Description of Starting location | ||
? Byte | Version | ||
? Byte | Autor | ||
? Byte | Company | ||
? Byte | Recommended device | Garmin Colorado, Windows PPC, etc. | |
4 Byte | Length of Completion Codes | ||
? Byte | Completion Code | ||
? Byte | Additional Datafields by Earwigo; bspw. – Country – State – Completed – Date of last Play – Date Publish – Date Update – Builder Version | ||
@yyyy | Begin of Data/Files | @0009 + Number of objects * 6 Byte + Length Header | |
LUA-Bytecode | Objekt-ID = 0 | ||
4 Byte | Size of LUA-Bytecode | ||
? Byte | LUA-Bytecode | ||
@zzzz | Media files | Objekt-ID = 1, 2, 3, … | |
1 Byte | valid object | if 0, object is deleted | |
4 Byte | Type of object | 1 = BMP 2 = PNG 3 = JPG 4 = GIF 17 = WAV 18 = MP3 19 = FDL 20 = SND 21 = OGG 33 = SWF 49 = TXT | |
4 Byte | Size of object | ||
? Byte | Content of object |