Reformatting.
This commit is contained in:
@@ -66,7 +66,6 @@ extern "C" {
|
|||||||
// === SIMPLE TYPES ===
|
// === SIMPLE TYPES ===
|
||||||
//
|
//
|
||||||
|
|
||||||
// Basic types
|
|
||||||
typedef uint32_t formid;
|
typedef uint32_t formid;
|
||||||
|
|
||||||
// char[4] with uint32_t access
|
// char[4] with uint32_t access
|
||||||
@@ -90,7 +89,6 @@ extern "C" {
|
|||||||
|
|
||||||
// Record type enum
|
// Record type enum
|
||||||
enum record_type {
|
enum record_type {
|
||||||
_NONE,
|
|
||||||
AACT, ACHR, ACTI, ADDN, ALCH, AMMO,
|
AACT, ACHR, ACTI, ADDN, ALCH, AMMO,
|
||||||
ANIO, APPA, ARMA, ARMO, ARTO, ASPC,
|
ANIO, APPA, ARMA, ARMO, ARTO, ASPC,
|
||||||
ASTP, AVIF, BOOK, BPTD, CAMS, CELL,
|
ASTP, AVIF, BOOK, BPTD, CAMS, CELL,
|
||||||
@@ -224,7 +222,6 @@ extern "C" {
|
|||||||
// Printable strings for group types
|
// Printable strings for group types
|
||||||
extern const char *const group_type_strings[GTS_SIZE];
|
extern const char *const group_type_strings[GTS_SIZE];
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// === FUNCTIONS ===
|
// === FUNCTIONS ===
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -65,7 +65,10 @@ void asserts(void) {
|
|||||||
assert(sizeof(Group) == 24); // Group struct incorrect size
|
assert(sizeof(Group) == 24); // Group struct incorrect size
|
||||||
assert(sizeof((Group) { 0 }.label) == 4); // Label union in group struct incorrect size
|
assert(sizeof((Group) { 0 }.label) == 4); // Label union in group struct incorrect size
|
||||||
assert(sizeof(Field) == 6); // Field struct incorrect size
|
assert(sizeof(Field) == 6); // Field struct incorrect size
|
||||||
assert(sizeof(uLongf) == sizeof(uint32_t)); // zlib compatability
|
|
||||||
|
// zlib compatability
|
||||||
|
assert(sizeof(uLongf) == sizeof(uint32_t));
|
||||||
|
assert(sizeof(Bytef) == sizeof(char));
|
||||||
}
|
}
|
||||||
|
|
||||||
void espr_walk(char *data, size_t size, struct walker_callbacks cb) {
|
void espr_walk(char *data, size_t size, struct walker_callbacks cb) {
|
||||||
@@ -124,7 +127,8 @@ void dc_size_cb(Node n, void *data, void **carry_out) {
|
|||||||
if (n.header.record->flags & COMPRESSED_FLAG) {
|
if (n.header.record->flags & COMPRESSED_FLAG) {
|
||||||
// Read decompressed size
|
// Read decompressed size
|
||||||
*dc_size += *((uint32_t *)n.data);
|
*dc_size += *((uint32_t *)n.data);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
*dc_size += n.header.record->size;
|
*dc_size += n.header.record->size;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -379,7 +383,8 @@ void print_record_flags(Record *header) {
|
|||||||
// TODO
|
// TODO
|
||||||
// REFR requires FormID lookup
|
// REFR requires FormID lookup
|
||||||
flags = 0;
|
flags = 0;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
rfs_inner *const flag_lut = rfs[rt_hash(type)];
|
rfs_inner *const flag_lut = rfs[rt_hash(type)];
|
||||||
if (flag_lut) {
|
if (flag_lut) {
|
||||||
while (flags != 0) {
|
while (flags != 0) {
|
||||||
@@ -390,7 +395,8 @@ void print_record_flags(Record *header) {
|
|||||||
if (str) {
|
if (str) {
|
||||||
printf(" - %s\n", str);
|
printf(" - %s\n", str);
|
||||||
flags -= ((uint32_t)1) << highest;
|
flags -= ((uint32_t)1) << highest;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ int main() {
|
|||||||
}
|
}
|
||||||
clash = true;
|
clash = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
buf[index] = true;
|
buf[index] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,7 +74,8 @@ int main() {
|
|||||||
printf(" ");
|
printf(" ");
|
||||||
printf("RT_%s = %3u,", name, index);
|
printf("RT_%s = %3u,", name, index);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
printf("Seed not found. Max: %llu\n", max);
|
printf("Seed not found. Max: %llu\n", max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user