Skip to content

Commit

Permalink
read_pat: add part4 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
brliron committed Apr 19, 2018
1 parent c44b351 commit 2cb401f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions read_pat/part4.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#include "read_pat.h"

static void part4_entry(FILE* fp, unsigned int entry_index, json_t *js)
{
uint32_t unk1 = read_u32(fp, js, "unk1");
uint32_t unk2 = read_u32(fp, js, "unk2");
printf(" entry %d: unk1=%d, unk2=%d\n", entry_index, unk1, unk2);
}

void part4(FILE* fp, char* pat_path, json_t *js)
{
(void)pat_path;
uint32_t nb_entries = read_u32(fp, js, "nb_entries");
printf("part4: nb_entries = %d\n", nb_entries);
if (nb_entries > 0)
printf("Error: part4_entries are not supported.\n");

unsigned int i;
for (i = 0; i < nb_entries; i++)
part4_entry(fp, i, js_enter(js, idx_to_str("entry_", i)));
}

0 comments on commit 2cb401f

Please sign in to comment.