Talk:Baddons.wcf

Here is the source of an quick'n'dirty parser for the baddons.wcf file:
 * 1) include 
 * 2) include 

struct wcf {	uint32_t id; uint8_t name_hash[16]; uint8_t version_hash[16]; uint32_t extra; uint32_t islast; };

static void print_wcf(struct wcf *wcf) {	printf("ID:     %d\n", wcf->id); printf("Name:   "); int i=0; for (i < 16; ++i) { printf("%02x", wcf->name_hash[i]); }	printf("\nVersion: "); for (i=0; i < 16; ++i) { printf("%02x", wcf->version_hash[i]); }	printf("\nExtra:  %x\n", wcf->extra); printf("Last:   %s\n", wcf->islast ? "yes": "no"); }

int main(int argc, char **argv) {	FILE *baddons = fopen("baddons.wcf", "rb");

while (!feof(baddons)) { struct wcf data; size_t len = fread(&data, sizeof(data), 1, baddons); if (!len) { break; }

print_wcf(&data); }

return 0; }