Swords of Glass info format

From ModdingWiki
Jump to navigation Jump to search
Swords of Glass info format
Format typeText
Text purposeStory
Line endingsNone
Character setCode Page 437
Games

The description of each item in Swords of Glass, which must be purchased in the temple, is stored in the Info.dat file. The file is fixed-width and stores 49 descriptions which match up to the Swords of Glass names format.

Data type Description
UINT8 Description length The length of the description.
char[80] Name The description of the item.

Source Code

Exporter

This FreeBASIC program will export each of the game's item descriptions into a text file.

Dim As Integer ItemNo
Dim As String Buffer = Space(80)
Dim As UByte Length

Open "Info.dat" For Binary As #1
Open "Info.txt" For Binary As #2

For ItemNo = 0 To 48
	Put #2, , "Item: " + Str(ItemNo) + Chr(13) + Chr(10)

	Get #1, , Length
	Get #1, , Buffer
	
	Put #2, , Left(Buffer, Length) + Chr(13) + Chr(10)
	
	Put #2, , 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!)