Last active
September 25, 2018 17:00
-
-
Save TheCrazyT/1d1e75ef9201b23b5fd4e848f886a594 to your computer and use it in GitHub Desktop.
MHWGui.bt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------ | |
//--- 010 Editor v8.0.1 Binary Template | |
// | |
// File: | |
// Authors: CrazyT | |
// Version: | |
// Purpose: | |
// Category: | |
// File Mask: *.gui | |
// ID Bytes: | |
// History: | |
//------------------------------------------------ | |
SetForeColor(0xffffff); | |
struct PropertiesVal; | |
struct Object; | |
struct SubUI; | |
struct UnknStruct; | |
struct UnknStruct2; | |
struct UnknStruct3; | |
struct Head{ | |
uint signature <format=hex>; | |
uint unkn1; | |
uint size; | |
ubyte unkn2[32]; | |
uint unknStruct3Count; | |
uint objCount; | |
ubyte unkn3[4]; | |
uint count; | |
uint unknStructCount; | |
uint unkn4; | |
uint unknStruct2Count; | |
uint textRefCount; | |
ubyte unkn4_[36]; | |
uint subuiCount; | |
ubyte unkn5[12]; | |
uint unknUiCount; | |
ubyte unkn6[36]; | |
uint unknStructOff3<format=hex>; | |
ubyte unkn8[12]; | |
uint objectOff<format=hex>; | |
ubyte unkn9[12]; | |
uint propertiesValArrayOff <format=hex>; | |
uint unkn10<format=hex>; | |
uint64 unknStructOff<format=hex>; | |
uint64 unknStructOff2<format=hex>; | |
uint64 startEnd<format=hex>; | |
uint64 unkn<format=hex>; | |
uint64 subUI[9]<format=hex>; | |
uint64 unkUI[4]<format=hex>; | |
ubyte unkn13[16]; | |
uint propertiesTextArrayOff <format=hex>; | |
uint unkn14[12]; | |
uint unkn15; | |
uint floatArrOff <format=hex>; | |
uint unkn16[3]; | |
} head <bgcolor=0xFF00FF>; | |
struct UnknUI{ | |
uint id; | |
uint unkn1[3]; | |
uint suiToff; | |
local int suipos = FTell(); | |
local int textPos<format=hex> = head.propertiesTextArrayOff+suiToff; | |
FSeek(textPos); | |
char suiText[]; | |
FSeek(suipos); | |
uint unkn2; | |
}; | |
struct TextRef{ | |
uint id; | |
uint unkn1[3]; | |
uint suiToff; | |
uint unkn2[3]; | |
local int suipos = FTell(); | |
local int textPos<format=hex> = head.propertiesTextArrayOff+suiToff; | |
FSeek(textPos); | |
char text[]; | |
FSeek(suipos); | |
}; | |
string PropertiesValRead(PropertiesVal &v){ | |
if(v.type==7){ | |
return v.text + " \"" + v.vStr+"\""; | |
}else{ | |
return v.text; | |
} | |
} | |
string ObjectRead(Object &v){ | |
return v.text; | |
} | |
string SubUIRead(SubUI &v){ | |
return v.suiText2 + " \"" + v.suiText + "\""; | |
} | |
string UnknUIRead(UnknUI &v){ | |
return "\"" + v.suiText + "\""; | |
} | |
string TextRefRead(TextRef &v){ | |
return v.text; | |
} | |
string UnknStructRead(UnknStruct &v){ | |
return v.text; | |
} | |
string UnknStruct2Read(UnknStruct2 &v){ | |
string s; | |
SPrintf( s, "%d", (int)v.id ); | |
return s+": "+v.text; | |
} | |
string UnknStruct3Read(UnknStruct3 &v){ | |
string s; | |
SPrintf( s, "%d", (int)v.id ); | |
return s+": "+v.text; | |
} | |
struct StartEnd{ | |
local int i; | |
for(i=0;i<head.textRefCount;i++){ | |
TextRef textRef<read=TextRefRead>; | |
} | |
}; | |
struct SubUI{ | |
uint id; | |
ubyte unkn1[44]; | |
uint suiToff; | |
local int suipos = FTell(); | |
local int textPos<format=hex> = head.propertiesTextArrayOff+suiToff; | |
FSeek(textPos); | |
char suiText[]; | |
FSeek(suipos); | |
uint unkn1; | |
uint suiToff2; | |
local int suipos2 = FTell(); | |
local int textPos2<format=hex> = head.propertiesTextArrayOff+suiToff2; | |
FSeek(textPos2); | |
char suiText2[]; | |
FSeek(suipos2); | |
uint unkn2; | |
}; | |
struct Object (uint currentProp){ | |
local int cp = currentProp; | |
uint id; | |
ubyte propertyCount; | |
ubyte unkn1[3]; | |
uint unkn2; | |
uint unkn3; | |
uint toff<format=hex>; | |
local int pos2 = FTell(); | |
FSeek(head.propertiesTextArrayOff+toff); | |
char text[]; | |
FSeek(pos2); | |
uint unkn4; | |
uint unkn5 <format=hex>; | |
ubyte unkn6[28]; | |
local int pos3 = FTell(); | |
FSeek(propertiesValOff[currentProp]); | |
struct ObjectProperties{ | |
local int i; | |
for(i=0;i<propertyCount;i++){ | |
PropertiesVal property<read=PropertiesValRead>; | |
} | |
} objectProperties<bgcolor=0x00ff00>; | |
FSeek(pos3); | |
}; | |
struct PropertiesVal{ | |
uint type; | |
uint unkn1[3]; | |
uint toff; | |
uint unkn2; | |
if(type==7){ | |
local int pos1 = FTell()+4; | |
local int j = 0; | |
uint v; | |
FSeek(head.propertiesTextArrayOff); | |
for(j=0;j<v;j++){ | |
FSeek(FTell()+ReadStringLength(FTell())); | |
} | |
SetForeColor(0x0000ff); | |
char vStr[]; | |
SetForeColor(0xffffff); | |
FSeek(pos1); | |
}else{ | |
SetForeColor(0xffffff); | |
uint v; | |
} | |
local int pos2 = FTell(); | |
FSeek(head.propertiesTextArrayOff+toff); | |
char text[]; | |
FSeek(pos2); | |
uint unkn3; | |
}; | |
struct UnknStruct{ | |
uint unkn1; | |
uint unkn2; | |
uint unkn3; | |
uint unkn4; | |
uint unkn5; | |
uint unkn6; | |
uint toff; | |
local int pos1<format=hex> = FTell(); | |
FSeek(head.propertiesTextArrayOff+toff); | |
char text[]; | |
FSeek(pos1); | |
uint unkn7; | |
uint unkn8; | |
uint unkn9; | |
uint maybeTextOff<format=hex>; | |
uint unkn11; | |
}; | |
struct UnknStruct2{ | |
uint id; | |
uint unkn2; | |
uint unkn3; | |
uint unkn4; | |
uint unkn5; | |
uint unkn6; | |
uint toff; | |
local int pos1<format=hex> = FTell(); | |
local int atoff<format=hex> = head.propertiesTextArrayOff+toff; | |
FSeek(atoff); | |
char text[]; | |
FSeek(pos1); | |
uint unkn7; | |
uint unkn8<format=hex>; | |
uint unkn9; | |
uint unkn10; | |
uint unkn11[3]; | |
}; | |
struct UnknStruct3{ | |
uint id; | |
uint unkn2; | |
uint toff; | |
local int pos1<format=hex> = FTell(); | |
local int atoff<format=hex> = head.propertiesTextArrayOff+toff; | |
FSeek(atoff); | |
char text[]; | |
FSeek(pos1); | |
uint unkn3; | |
}; | |
local int i; | |
local int propertiesValOff[head.count]; | |
FSeek(head.propertiesValArrayOff); | |
struct Properties{ | |
for(i=0;i<head.count;i++){ | |
propertiesValOff[i] = FTell(); | |
PropertiesVal property<read=PropertiesValRead>; | |
} | |
} allProperties<bgcolor=0x00ff00>; | |
FSeek(head.objectOff); | |
struct Objects{ | |
local int currentProp = 0; | |
for(i=0;i<head.objCount;i++){ | |
Object object(currentProp)<read=ObjectRead>; | |
currentProp += object.propertyCount; | |
} | |
} objects<bgcolor=0x0000ff>; | |
local int x; | |
FSeek(head.startEnd); | |
StartEnd startEnd<bgcolor=0xAAAAAA>; | |
//TODO ... this does not seem right | |
struct SubuiArr{ | |
for(x=0;x<9;x++){ | |
FSeek(head.subUI[x]); | |
struct SubUIs{ | |
for(i=0;i<head.subuiCount;i++){ | |
SubUI subUI<read=SubUIRead>; | |
} | |
}subuis <bgcolor=0xFFFF00>; | |
} | |
}subuiarr; | |
for(x=0;x<4;x++){ | |
FSeek(head.unkUI[x]); | |
struct UnkUIs{ | |
for(i=0;i<head.unknUiCount;i++){ | |
UnknUI unkUI<read=UnknUIRead>; | |
} | |
}unknuis <bgcolor=0xFFFF00>; | |
} | |
FSeek(head.unknStructOff); | |
struct UnknStructs{ | |
for(i=0;i<head.unknStructCount;i++){ | |
UnknStruct unknStruct <read=UnknStructRead>; | |
} | |
}unknStructs1<bgcolor=0x336600>; | |
FSeek(head.unknStructOff2); | |
struct UnknStructs2{ | |
for(i=0;i<head.unknStruct2Count;i++){ | |
UnknStruct2 unknStruct2 <read=UnknStruct2Read>; | |
} | |
}unknStructs2<bgcolor=0x663300>; | |
FSeek(head.unknStructOff3); | |
struct UnknStructs3{ | |
uint unkn[16]; | |
for(i=0;i<head.unknStruct3Count;i++){ | |
UnknStruct3 unknStruct3 <read=UnknStruct3Read>; | |
} | |
}unknStructs3<bgcolor=0x660033>; | |
FSeek(head.floatArrOff); | |
if(head.floatArrOff!=head.size){ | |
struct FloatArr{ | |
float f[(head.size-head.floatArrOff)/4]; | |
}floatArr<bgcolor=0x330066>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment