Add stlcompat.h so this can still be built on modern compilers, fix affected type size asserts.

This commit is contained in:
Brendan Dougherty 2023-07-11 13:53:46 -05:00
parent f0ddc605ce
commit 6d533f3977
4 changed files with 18 additions and 5 deletions

View File

@ -2,4 +2,5 @@
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxList<unsigned int>, 0xc);
// Can't use DECOMP_SIZE_ASSERT due to STL type size changes.
//DECOMP_SIZE_ASSERT(MxList<unsigned int>, 0xc);

View File

@ -1,12 +1,11 @@
#ifndef MXLIST_H
#define MXLIST_H
#include "stlcompat.h"
#ifndef ISLE_COMPAT
#include <STL.H>
#define LIST_T List<T>
#else
#include <list>
#define LIST_T std::list<T>
#define LIST_T list<T>
#endif
template <class T>

View File

@ -7,9 +7,11 @@
#include "mxtypes.h"
#include "decomp.h"
#include "stlcompat.h"
DECOMP_SIZE_ASSERT(MxNotification, 0x8);
DECOMP_SIZE_ASSERT(MxNotificationManager, 0x40);
// Can't use DECOMP_SIZE_ASSERT due to STL type size changes.
//DECOMP_SIZE_ASSERT(MxNotificationManager, 0x40);
// OFFSET: LEGO1 0x100ac220
MxNotification::MxNotification(MxCore *p_target, MxParam *p_param)

11
LEGO1/stlcompat.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef STLCOMPAT_H
#define STLCOMPAT_H
#ifndef ISLE_COMPAT
#include <STL.H>
#else
#include <list>
using namespace std;
#endif
#endif // STLCOMPAT_H