diff --git a/LEGO1/lego/legoomni/include/legopathboundary.h b/LEGO1/lego/legoomni/include/legopathboundary.h index 570b2ea2..4f8d2e24 100644 --- a/LEGO1/lego/legoomni/include/legopathboundary.h +++ b/LEGO1/lego/legoomni/include/legopathboundary.h @@ -7,17 +7,23 @@ #include "mxstl/stlcompat.h" #include "mxtypes.h" +#if defined(_M_IX86) || defined(__i386__) +#define COMPARE_POINTER_TYPE MxS32 +#else +#define COMPARE_POINTER_TYPE MxS32* +#endif + struct LegoPathActorSetCompare { MxU32 operator()(const LegoPathActor* p_lhs, const LegoPathActor* p_rhs) const { - return (MxS32) p_lhs < (MxS32) p_rhs; + return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs; } }; struct LegoAnimPresenterSetCompare { MxBool operator()(const LegoAnimPresenter* p_lhs, const LegoAnimPresenter* p_rhs) const { - return (MxS32) p_lhs < (MxS32) p_rhs; + return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs; } }; diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index 7bb38b61..7ee0228e 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -14,6 +14,12 @@ class LegoWorld; class MxAtomId; class Vector3; +#if defined(_M_IX86) || defined(__i386__) +#define COMPARE_POINTER_TYPE MxS32 +#else +#define COMPARE_POINTER_TYPE MxS32* +#endif + // VTABLE: LEGO1 0x100d7da8 // SIZE 0x40 struct LegoPathCtrlEdge : public LegoUnknown100db7f4 {}; @@ -21,7 +27,7 @@ struct LegoPathCtrlEdge : public LegoUnknown100db7f4 {}; struct LegoPathCtrlEdgeCompare { MxU32 operator()(const LegoPathCtrlEdge* p_lhs, const LegoPathCtrlEdge* p_rhs) const { - return (MxS32) p_lhs < (MxS32) p_rhs; + return (COMPARE_POINTER_TYPE) p_lhs < (COMPARE_POINTER_TYPE) p_rhs; } }; diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 0ae00795..4faedb90 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -12,8 +12,17 @@ class LegoEntityList; class LegoPathBoundary; class LegoHideAnimPresenter; +#if defined(_M_IX86) || defined(__i386__) +#define COMPARE_POINTER_TYPE MxS32 +#else +#define COMPARE_POINTER_TYPE MxS32* +#endif + struct CoreSetCompare { - MxS32 operator()(MxCore* const& p_a, MxCore* const& p_b) const { return (MxS32) p_a < (MxS32) p_b; } + MxS32 operator()(MxCore* const& p_a, MxCore* const& p_b) const + { + return (COMPARE_POINTER_TYPE) p_a < (COMPARE_POINTER_TYPE) p_b; + } }; typedef set MxCoreSet;