From fb13aac014f89f6a2696d00b4513c231e4fe9d20 Mon Sep 17 00:00:00 2001 From: Mark Langen Date: Thu, 6 Jul 2023 19:45:14 -0700 Subject: [PATCH] Assert size --- LEGO1/legostream.cpp | 7 +++++++ LEGO1/legostream.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/LEGO1/legostream.cpp b/LEGO1/legostream.cpp index 7f2e5387..1fd2bf11 100644 --- a/LEGO1/legostream.cpp +++ b/LEGO1/legostream.cpp @@ -4,6 +4,13 @@ #include #include +// Very likely but not certain sizes. +// The classes are only used on the stack in functions we have not 100% matched +// yet, we can confirm the size once we have. +DECOMP_SIZE_ASSERT(LegoStream, 0x8); +DECOMP_SIZE_ASSERT(LegoFileStream, 0xC); +DECOMP_SIZE_ASSERT(LegoMemoryStream, 0x10); + // OFFSET: LEGO1 0x10045ae0 MxBool LegoStream::IsWriteMode() { diff --git a/LEGO1/legostream.h b/LEGO1/legostream.h index 899bd7e1..a505cd54 100644 --- a/LEGO1/legostream.h +++ b/LEGO1/legostream.h @@ -9,6 +9,7 @@ #define LEGOSTREAM_MODE_READ 1 #define LEGOSTREAM_MODE_WRITE 2 +// VTABLE 0x100d7d80 class LegoStream { public: @@ -34,6 +35,7 @@ class LegoStream MxU8 m_mode; }; +// VTABLE 0x100db730 class LegoFileStream : public LegoStream { public: @@ -51,6 +53,7 @@ class LegoFileStream : public LegoStream FILE *m_hFile; }; +// VTABLE 0x100db710 class LegoMemoryStream : public LegoStream { public: