Swords of Glass names format
Jump to navigation
Jump to search
Swords of Glass names format
Format type | Text |
---|---|
Text purpose | Story |
Line endings | None |
Character set | Code Page 437 |
Games |
The names of items in Swords of Glass is stored in the CNames.dat file. The file is fixed-width and stores 49 items.
Data type | Description |
---|---|
UINT8 Name length | The length of the item's name. Always 0x0A. |
char[10] Name | The name of the item. |
Source Code
Exporter
This FreeBASIC program will export each of the game's item names into a text file.
Dim As Integer ItemNo
Dim As String Buffer = Space(10)
Dim As UByte Length
Open "CNames.dat" For Binary As #1
Open "CNames.txt" For Binary As #2
For ItemNo = 0 To 48
Get #1, , Length
Get #1, , Buffer
Put #2, , "Item: " + Str(ItemNo) + " - " + Left(Buffer, Length) + Chr(13) + Chr(10)
Next ItemNo
Credits
This format was reverse engineered by TheAlmightyGuru. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)