Skip to content

Commit

Permalink
More tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwheeler committed Jun 24, 2024
1 parent cc15aa5 commit 33f3faf
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 53 deletions.
94 changes: 47 additions & 47 deletions src/lib/printing/printers.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#else
#include <arpa/inet.h>
#endif
#include <stdint.h>
#include <cstdint>

#include "lib/structure/types.h"

Expand All @@ -18,147 +18,147 @@
(print_struct((const void *)&fs->MAP.at(KEY), fs, DEPTH))

template <AllegroVersion version>
void default_printer(const void *untyped_inst, File<version> *fs, const int d);
void default_printer(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x01(const void *untyped_inst, File<version> *fs, const int d);
void print_x01(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x03(const void *untyped_inst, File<version> *fs, const int d);
void print_x03(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x04(const void *untyped_inst, File<version> *fs, const int d);
void print_x04(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x05(const void *untyped_inst, File<version> *fs, const int d);
void print_x05(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x06(const void *untyped_inst, File<version> *fs, const int d);
void print_x06(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x07(const void *untyped_inst, File<version> *fs, const int d);
void print_x07(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x08(const void *untyped_inst, File<version> *fs, const int d);
void print_x08(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x09(const void *untyped_inst, File<version> *fs, const int d);
void print_x09(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x0A(const void *untyped_inst, File<version> *fs, const int d);
void print_x0A(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x0C(const void *untyped_inst, File<version> *fs, const int d);
void print_x0C(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x0D(const void *untyped_inst, File<version> *fs, const int d);
void print_x0D(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x0F(const void *untyped_inst, File<version> *fs, const int d);
void print_x0F(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x10(const void *untyped_inst, File<version> *fs, const int d);
void print_x10(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x11(const void *untyped_inst, File<version> *fs, const int d);
void print_x11(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x12(const void *untyped_inst, File<version> *fs, const int d);
void print_x12(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x14(const void *untyped_inst, File<version> *fs, const int d);
void print_x14(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x15(const void *untyped_inst, File<version> *fs, const int d);
void print_x15(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x16(const void *untyped_inst, File<version> *fs, const int d);
void print_x16(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x17(const void *untyped_inst, File<version> *fs, const int d);
void print_x17(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x1B(const void *untyped_inst, File<version> *fs, const int d);
void print_x1B(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_t13(const t13<version> &t13_inst, File<version> *fs, const int d,
void print_t13(const t13<version> &t13_inst, File<version> *fs, int d,
const int i);

template <AllegroVersion version>
void print_x1C(const void *untyped_inst, File<version> *fs, const int d);
void print_x1C(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x1E(const void *untyped_inst, File<version> *fs, const int d);
void print_x1E(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x22(const void *untyped_inst, File<version> *fs, const int d);
void print_x22(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x23(const void *untyped_inst, File<version> *fs, const int d);
void print_x23(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x24(const void *untyped_inst, File<version> *fs, const int d);
void print_x24(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x26(const void *untyped_inst, File<version> *fs, const int d);
void print_x26(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x28(const void *untyped_inst, File<version> *fs, const int d);
void print_x28(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x2A(const void *untyped_inst, File<version> *fs, const int d);
void print_x2A(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x2B(const void *untyped_inst, File<version> *fs, const int d);
void print_x2B(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x2C(const void *untyped_inst, File<version> *fs, const int d);
void print_x2C(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x2D(const void *untyped_inst, File<version> *fs, const int d);
void print_x2D(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x30(const void *untyped_inst, File<version> *fs, const int d);
void print_x30(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x31(const void *untyped_inst, File<version> *fs, const int d);
void print_x31(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x32(const void *untyped_inst, File<version> *fs, const int d);
void print_x32(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x33(const void *untyped_inst, File<version> *fs, const int d);
void print_x33(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x34(const void *untyped_inst, File<version> *fs, const int d);
void print_x34(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x36(const void *untyped_inst, File<version> *fs, const int d);
void print_x36(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x37(const void *untyped_inst, File<version> *fs, const int d);
void print_x37(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x38(const void *untyped_inst, File<version> *fs, const int d);
void print_x38(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x39(const void *untyped_inst, File<version> *fs, const int d);
void print_x39(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x3A(const void *untyped_inst, File<version> *fs, const int d);
void print_x3A(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
void print_x3C(const void *untyped_inst, File<version> *fs, const int d);
void print_x3C(const void *untyped_inst, File<version> *fs, int d);

template <AllegroVersion version>
struct sfs {
void (*print)(const void *, File<version> *, const int);
};

template <AllegroVersion version>
void print_struct(const void *untyped_inst, File<version> *fs, const int depth);
void print_struct(const void *untyped_inst, File<version> *fs, int depth);

template <AllegroVersion version>
void print_struct(const uint32_t k, File<version> &fs, const int d);
void print_struct(uint32_t k, File<version> &fs, int d);

#endif
12 changes: 6 additions & 6 deletions src/lib/structure/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ enum class Units : uint8_t {

struct Header {
uint32_t magic;
uint32_t un1[4];
std::array<uint32_t, 4> un1;
uint32_t object_count;
uint32_t un2[9];
std::array<uint32_t, 9> un2;
LinkedListPtrs ll_x04;
LinkedListPtrs ll_x06;
LinkedListPtrs ll_x0C_2;
Expand Down Expand Up @@ -149,20 +149,20 @@ struct Header {
char allegro_version[60];
uint32_t un4;
uint32_t max_key;
uint32_t un5[17];
std::array<uint32_t, 17> un5;

Units units;
uint8_t un6;
uint16_t un7;

uint32_t un8[2];
std::array<uint32_t, 2> un8;
uint32_t x27_end_offset;
uint32_t un9;
uint32_t strings_count;

uint32_t un10[53];
std::array<uint32_t, 53> un10;
uint32_t unit_divisor;
uint32_t un11[112];
std::array<uint32_t, 112> un11;
};

static_assert(offsetof(Header, unit_divisor) == 620);
Expand Down

0 comments on commit 33f3faf

Please sign in to comment.