isle-portable/LEGO1/omni/include/mxomnicreateflags.h

87 lines
3.1 KiB
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef MXOMNICREATEFLAGS_H
#define MXOMNICREATEFLAGS_H
#include "mxtypes.h"
2023-10-24 19:38:27 -04:00
class MxOmniCreateFlags {
2023-04-27 22:19:39 -04:00
public:
2023-10-24 19:38:27 -04:00
enum LowFlags {
c_createObjectFactory = 0x01,
c_createVariableTable = 0x02,
c_createTickleManager = 0x04,
c_createNotificationManager = 0x08,
c_createVideoManager = 0x10,
c_createSoundManager = 0x20,
c_createMusicManager = 0x40,
c_createEventManager = 0x80
2023-10-24 19:38:27 -04:00
};
enum HighFlags {
c_createTimer = 0x02,
c_createStreamer = 0x04
2023-10-24 19:38:27 -04:00
};
MxOmniCreateFlags();
2023-10-24 19:38:27 -04:00
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & c_createObjectFactory; }
inline const MxBool CreateVariableTable() const { return this->m_flags1 & c_createVariableTable; }
inline const MxBool CreateTickleManager() const { return this->m_flags1 & c_createTickleManager; }
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & c_createNotificationManager; }
inline const MxBool CreateVideoManager() const { return this->m_flags1 & c_createVideoManager; }
inline const MxBool CreateSoundManager() const { return this->m_flags1 & c_createSoundManager; }
inline const MxBool CreateMusicManager() const { return this->m_flags1 & c_createMusicManager; }
inline const MxBool CreateEventManager() const { return this->m_flags1 & c_createEventManager; }
2023-10-24 19:38:27 -04:00
inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
2023-10-24 19:38:27 -04:00
inline void CreateObjectFactory(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
2023-10-24 19:38:27 -04:00
}
inline void CreateVariableTable(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
2023-10-24 19:38:27 -04:00
}
inline void CreateTickleManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateNotificationManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 =
(p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateVideoManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateSoundManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateMusicManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateEventManager(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
2023-10-24 19:38:27 -04:00
}
inline void CreateTimer(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags2 = (p_enable ? this->m_flags2 | c_createTimer : this->m_flags2 & ~c_createTimer);
2023-10-24 19:38:27 -04:00
}
inline void CreateStreamer(MxBool p_enable)
2023-10-24 19:38:27 -04:00
{
this->m_flags2 = (p_enable ? this->m_flags2 | c_createStreamer : this->m_flags2 & ~c_createStreamer);
2023-10-24 19:38:27 -04:00
}
private:
MxU8 m_flags1;
MxU8 m_flags2;
2023-04-27 22:19:39 -04:00
};
#endif // MXOMNICREATEFLAGS_H