Skip to content

Instantly share code, notes, and snippets.

@Pupix
Created May 7, 2016 11:33
Show Gist options
  • Save Pupix/cc7d5c1eb4f254caa4add88398f7611a to your computer and use it in GitHub Desktop.
Save Pupix/cc7d5c1eb4f254caa4add88398f7611a to your computer and use it in GitHub Desktop.
//--------------------------------------
//--- 010 Editor v6.0.0 Binary Template
//
// File: WADTemplate
// Author: Pupix <[email protected]>
// Purpose: League of Legends .wad file parsing
// Licence: MIT
//--------------------------------------
// PREDEFINE
struct HEADER;
struct ENTRYHEADER;
struct ENTRYLIST;
struct ENTRY;
// STRUCTS
struct HEADER {
char magic[2];
byte verMinor;
byte verMajor;
short entryHeaderOffset;
short entryHeaderCellSize;
uint entries;
};
struct ENTRYHEADER {
uint unk;
uint unk1;
uint offset;
uint zipSize;
uint size;
uint zipped;
};
struct ENTRYLIST(ENTRYHEADER header[], uint size) {
local int i = 0;
for (i = 0; i < size; i ++) {
FSeek(header[i].offset);
ENTRY entries(header[i].zipSize);
}
};
struct ENTRY (uint size) {
byte bytes[size];
};
// PARSING
HEADER header;
ENTRYHEADER entriesHeader[header.entries];
ENTRYLIST entries(entriesHeader, header.entries);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment