Created
August 28, 2012 02:25
-
-
Save Bigcheese/3494377 to your computer and use it in GitHub Desktop.
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
/* | |
* esm-format.bt | |
* | |
* Michael Spencer <[email protected]> | |
* | |
* This is a 010 Editor script for parsing Fallout 3 esm/esp files. It does not | |
* fully parse sub records or compressed records. | |
* | |
*/ | |
struct SubRecord(uint32 size) { | |
char Name[4]; | |
if (Name == "XXXX") { | |
uint16 Unk; | |
uint32 Size; | |
struct SubRecord subRecord(Size); | |
} else { | |
uint16 Size; | |
if (size == 0) | |
char Data[Size]; | |
else | |
char Data[size]; | |
} | |
}; | |
struct Record { | |
char Name[4]; | |
uint32 Size; | |
if (Name == "GRUP") { | |
uint32 Datur; | |
uint32 GroupType; | |
uint32 DateStamp; | |
uint32 Flags; | |
local uint32 start = FTell(); | |
while (FTell() - start < Size - 24) { | |
struct Record records; | |
} | |
} else { | |
uint32 Flags1; | |
uint32 FormID; | |
uint32 Flags2; | |
uint32 Flags3; | |
if (Flags1 & 0x00040000) { | |
uint32 NewSize; | |
char Data[Size - 4]; | |
} else { | |
local uint32 start = FTell(); | |
while (FTell() - start < Size) { | |
struct SubRecord subRecords(0); | |
} | |
} | |
} | |
}; | |
while (!FEof()) { | |
Record records; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment