2023-07-02 03:00:28 -04:00
|
|
|
#ifndef DECOMP_H
|
|
|
|
#define DECOMP_H
|
|
|
|
|
2024-08-29 14:54:23 -04:00
|
|
|
#ifndef NDEBUG
|
|
|
|
// Disable size assertions for debug builds because the sizes differ between debug and release builds.
|
|
|
|
// The release LEGO1.DLL is what we ultimately want to decompile, so this is what we assert against.
|
|
|
|
#undef ENABLE_DECOMP_ASSERTS
|
|
|
|
#endif
|
|
|
|
|
2024-01-10 17:34:32 -05:00
|
|
|
#if defined(ENABLE_DECOMP_ASSERTS)
|
2023-10-24 19:38:27 -04:00
|
|
|
#define DECOMP_STATIC_ASSERT(V) \
|
|
|
|
namespace \
|
|
|
|
{ \
|
|
|
|
typedef int foo[(V) ? 1 : -1]; \
|
|
|
|
}
|
2023-07-02 03:00:28 -04:00
|
|
|
#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S)
|
2023-10-24 19:24:29 -04:00
|
|
|
#else
|
|
|
|
#define DECOMP_STATIC_ASSERT(V)
|
|
|
|
#define DECOMP_SIZE_ASSERT(T, S)
|
|
|
|
#endif
|
2023-07-02 03:00:28 -04:00
|
|
|
|
2024-05-14 10:35:22 -04:00
|
|
|
#ifndef sizeOfArray
|
|
|
|
#define sizeOfArray(arr) (sizeof(arr) / sizeof(arr[0]))
|
2023-08-03 13:09:22 -04:00
|
|
|
#endif
|
|
|
|
|
2023-07-02 03:00:28 -04:00
|
|
|
typedef unsigned char undefined;
|
|
|
|
typedef unsigned short undefined2;
|
|
|
|
typedef unsigned int undefined4;
|
|
|
|
|
|
|
|
#endif // DECOMP_H
|