The Saboteur
Posted: Fri Dec 04, 2009 1:47 pm
The contents of this post was deleted because of possible forum rules violation.
Code: Select all
struct DLGFile
{
uint32_t unk1;
uint32_t unk2; // Number of sections?
uint32_t unk3;
DLGSection[] sections;
}
struct DLGSection
{
char type[4]; // "TXTD" for string sections, "DNEC" for the last section;
if type == "TXTD"
{
uint unk; // ID?
ushort textNameLen;
char[textNameLen] textName;
ushort textLen;
wchar[textLen] text;
}
}
Code: Select all
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
Get Unknown1 Long
Get Unknown2 Long
Get Unknown3 Long
Do
GetDString Type 4
# Print "Section %Type%"
If Type == "TXTD"
Get Unk Long
Get TextNameLen Short
GetDString TextName TextNameLen
# Print "TextNameLen: %TextNameLen% TextName: %TextName%"
Get TextLen Short
Math TextLen *= 2
Math TextLen -= 2 # strip last 00 00
SavePos CurrentOffset
Log TextName CurrentOffset TextLen
Math TextLen += 2
Math CurrentOffset += TextLen
Goto CurrentOffset
# GetDString Text TextLen
# Print "TextLen: %TextLen% Text: %Text%"
Else If Type == "DENC"
Get Unk Long
Get Unk Long
Else
print "Unkown Type: %Type%"
Endif
While 1 = 1
There is a mistake in it.evilpie wrote:I ported Zeldas Struct to an quickbms script, but i doesnt work perfect because of the "DNEC" Type.