Reformatting.

This commit is contained in:
2022-09-06 18:45:31 +10:00
parent 7063f4b763
commit 5471bcf102
5 changed files with 960 additions and 955 deletions

View File

@@ -66,7 +66,6 @@ extern "C" {
// === SIMPLE TYPES ===
//
// Basic types
typedef uint32_t formid;
// char[4] with uint32_t access
@@ -90,7 +89,6 @@ extern "C" {
// Record type enum
enum record_type {
_NONE,
AACT, ACHR, ACTI, ADDN, ALCH, AMMO,
ANIO, APPA, ARMA, ARMO, ARTO, ASPC,
ASTP, AVIF, BOOK, BPTD, CAMS, CELL,
@@ -224,7 +222,6 @@ extern "C" {
// Printable strings for group types
extern const char *const group_type_strings[GTS_SIZE];
//
// === FUNCTIONS ===
//

View File

@@ -65,7 +65,10 @@ void asserts(void) {
assert(sizeof(Group) == 24); // 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(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) {
@@ -124,7 +127,8 @@ void dc_size_cb(Node n, void *data, void **carry_out) {
if (n.header.record->flags & COMPRESSED_FLAG) {
// Read decompressed size
*dc_size += *((uint32_t *)n.data);
} else
}
else
*dc_size += n.header.record->size;
break;
default:
@@ -379,7 +383,8 @@ void print_record_flags(Record *header) {
// TODO
// REFR requires FormID lookup
flags = 0;
} else {
}
else {
rfs_inner *const flag_lut = rfs[rt_hash(type)];
if (flag_lut) {
while (flags != 0) {
@@ -390,7 +395,8 @@ void print_record_flags(Record *header) {
if (str) {
printf(" - %s\n", str);
flags -= ((uint32_t)1) << highest;
} else
}
else
break;
}
}

View File

@@ -46,7 +46,8 @@ int main() {
}
clash = true;
break;
} else {
}
else {
buf[index] = true;
}
}
@@ -73,7 +74,8 @@ int main() {
printf(" ");
printf("RT_%s = %3u,", name, index);
}
} else {
}
else {
printf("Seed not found. Max: %llu\n", max);
}