User:Pkmnfrk/Textbox.stb
This lump contains all the text for the text boxes. It is a variable width string table with a header. Text boxes should point to the header, which will then point you into the soup of text in the body.
Formal Specs[edit]
About Formal Specs - Note: This table uses byte-offsets, not word offsets
Offset | Data | Meaning |
0-3 | STR(4) | ID code (should always be "OSTB") |
4 | INT | Version (currently 1) |
6 | LONG | Number of entries in the table |
10 | LONG | Offset to beginning of string data (including this header, and the actual table) Note that the offsets listed in the table are offset from the beginning of the string data, not the beginning of the file. |
Next is the table portion of the header. It is 13 bytes long, and repeats for as many as there are entries.
Offset | Data | Meaning |
0 | BYTE | Used or free (0 is free, 1 is used. Anything else is reserved, but should be interpreted as used) |
1 | LONG | Pointer to string data |
5 | LONG | Length of string data (actual usage) |
9 | LONG | Allocated space (how much room the string data has to grow) |
Finally, after the table, is the string data. A given string is padded out to its "Allocated" length with nulls. This does not mean that it is null terminated, however. When reading the string, always use the "Used" length to read the string. This is because if the string is exactly big enough to fill the space, it will not have any nulls at all. Further, if a string has an embedded null (i.e. 0x0 in the middle), you cannot assume it marks the end of the string.
ARCHINYM.LMP
. ATTACK.BIN
. BINSIZE.BIN
. BROWSE.TXT
. DEFPAL#.BIN
. DEFPASS.BIN
. distrib.reld
. FIXBITS.BIN
. general.reld
. heroes.reld
. heroform.reld
. LOOKUP1.BIN
. MENUITEM.BIN
. MENUS.BIN
. PALETTES.BIN
. PLOTSCR.LST
. SFXDATA.BIN
. SLICELOOKUP.TXT
. slicetree_#_#.reld
. SONGDATA.BIN
. UICOLORS.BIN
Map Format :
E
. D
. L
. N
. P
. T
. Z
BAM
. DOR
. DOX
. DT0
. DT1
. DT6
. EFS
. FNT
. FOR
. GEN
. HSP
. HSZ
. ITM
. MAP
. MAS
. MN
. MXS
. PAL
. PT0 ... PT8
. RGFX
. SAY
. SHO
. SNG
. STF
. STT
. TAP
. TIL
. TMN
. VEH