add DECOMP_SIZE_ASSERT macro

This commit is contained in:
itsmattkc 2023-07-01 20:23:19 -07:00
parent 0c6847d2ba
commit 7dcc924430
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#define DECOMP_H #define DECOMP_H
#define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; } #define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; }
#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S)
typedef unsigned char undefined; typedef unsigned char undefined;
typedef unsigned short undefined2; typedef unsigned short undefined2;

View File

@ -2,7 +2,7 @@
#include "decomp.h" #include "decomp.h"
DECOMP_STATIC_ASSERT(sizeof(LegoInputManager) == 824); // 0x10059085 DECOMP_SIZE_ASSERT(LegoInputManager, 0x338); // 0x10059085
// OFFSET: LEGO1 0x1005b790 STUB // OFFSET: LEGO1 0x1005b790 STUB
LegoInputManager::LegoInputManager() LegoInputManager::LegoInputManager()