Beta matching MxOmniCreateFlags (#817)

* Beta matching MxOmniCreateFlags

* Add newlines and swap order

* Add newline
This commit is contained in:
MS 2024-04-17 16:37:16 -04:00 committed by GitHub
parent e7aec124a2
commit 9c6120fc37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 57 additions and 79 deletions

View file

@ -5,82 +5,53 @@
class MxOmniCreateFlags {
public:
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
};
enum HighFlags {
c_createTimer = 0x02,
c_createStreamer = 0x04
};
MxOmniCreateFlags();
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; }
// FUNCTION: BETA10 0x10092b50
inline void CreateObjectFactory(MxBool p_enable) { this->m_flags1.m_bit0 = p_enable; }
inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
// FUNCTION: BETA10 0x10092b90
inline void CreateTickleManager(MxBool p_enable) { this->m_flags1.m_bit2 = p_enable; }
inline void CreateObjectFactory(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
}
inline void CreateVariableTable(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
}
inline void CreateTickleManager(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
}
inline void CreateNotificationManager(MxBool p_enable)
{
this->m_flags1 =
(p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
}
inline void CreateVideoManager(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
}
inline void CreateSoundManager(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
}
inline void CreateMusicManager(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
}
inline void CreateEventManager(MxBool p_enable)
{
this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
}
// FUNCTION: BETA10 0x10092bd0
inline void CreateVideoManager(MxBool p_enable) { this->m_flags1.m_bit4 = p_enable; }
inline void CreateTimer(MxBool p_enable)
{
this->m_flags2 = (p_enable ? this->m_flags2 | c_createTimer : this->m_flags2 & ~c_createTimer);
}
inline void CreateStreamer(MxBool p_enable)
{
this->m_flags2 = (p_enable ? this->m_flags2 | c_createStreamer : this->m_flags2 & ~c_createStreamer);
}
// FUNCTION: BETA10 0x10092c10
inline void CreateSoundManager(MxBool p_enable) { this->m_flags1.m_bit5 = p_enable; }
// FUNCTION: BETA10 0x10130cd0
inline const MxBool CreateObjectFactory() const { return this->m_flags1.m_bit0; }
// FUNCTION: BETA10 0x10130cf0
inline const MxBool CreateVariableTable() const { return this->m_flags1.m_bit1; }
// FUNCTION: BETA10 0x10130d10
inline const MxBool CreateTickleManager() const { return this->m_flags1.m_bit2; }
// FUNCTION: BETA10 0x10130d30
inline const MxBool CreateNotificationManager() const { return this->m_flags1.m_bit3; }
// FUNCTION: BETA10 0x10130d50
inline const MxBool CreateVideoManager() const { return this->m_flags1.m_bit4; }
// FUNCTION: BETA10 0x10130d70
inline const MxBool CreateSoundManager() const { return this->m_flags1.m_bit5; }
// FUNCTION: BETA10 0x10130d90
inline const MxBool CreateMusicManager() const { return this->m_flags1.m_bit6; }
// FUNCTION: BETA10 0x10130db0
inline const MxBool CreateEventManager() const { return this->m_flags1.m_bit7; }
// FUNCTION: BETA10 0x10130dd0
inline const MxBool CreateTimer() const { return this->m_flags2.m_bit1; }
// FUNCTION: BETA10 0x10130e00
inline const MxBool CreateStreamer() const { return this->m_flags2.m_bit2; }
private:
MxU8 m_flags1;
MxU8 m_flags2;
FlagBitfield m_flags1;
FlagBitfield m_flags2;
};
#endif // MXOMNICREATEFLAGS_H

View file

@ -9,6 +9,7 @@
#include <windows.h>
// VTABLE: LEGO1 0x100dc218
// VTABLE: BETA10 0x101c1ca8
class MxOmniCreateParam : public MxParam {
public:
MxOmniCreateParam(
@ -18,13 +19,16 @@ class MxOmniCreateParam : public MxParam {
MxOmniCreateFlags p_flags
);
// FUNCTION: BETA10 0x10092cb0
MxOmniCreateFlags& CreateFlags() { return this->m_createFlags; }
const MxString& GetMediaPath() const { return m_mediaPath; }
const HWND GetWindowHandle() const { return m_windowHandle; }
MxVideoParam& GetVideoParam() { return m_videoParam; }
const MxVideoParam& GetVideoParam() const { return m_videoParam; }
// SYNTHETIC: LEGO1 0x100b0a70
// SYNTHETIC: BETA10 0x10132740
// MxOmniCreateParam::`scalar deleting destructor'
private:
@ -35,6 +39,7 @@ class MxOmniCreateParam : public MxParam {
};
// SYNTHETIC: ISLE 0x4014b0
// SYNTHETIC: BETA10 0x10132780
// MxOmniCreateParam::~MxOmniCreateParam
#endif // MXOMNICREATEPARAM_H

View file

@ -1,17 +1,18 @@
#include "mxomnicreateflags.h"
// FUNCTION: LEGO1 0x100b0a30
// FUNCTION: BETA10 0x10130a1c
MxOmniCreateFlags::MxOmniCreateFlags()
{
this->CreateObjectFactory(TRUE);
this->CreateVariableTable(TRUE);
this->CreateTickleManager(TRUE);
this->CreateNotificationManager(TRUE);
this->CreateVideoManager(TRUE);
this->CreateSoundManager(TRUE);
this->CreateMusicManager(TRUE);
this->CreateEventManager(TRUE);
this->m_flags1.m_bit0 = TRUE; // CreateObjectFactory
this->m_flags1.m_bit1 = TRUE; // CreateVariableTable
this->m_flags1.m_bit2 = TRUE; // CreateTickleManager
this->m_flags1.m_bit3 = TRUE; // CreateNotificationManager
this->m_flags1.m_bit4 = TRUE; // CreateVideoManager
this->m_flags1.m_bit5 = TRUE; // CreateSoundManager
this->m_flags1.m_bit6 = TRUE; // CreateMusicManager
this->m_flags1.m_bit7 = TRUE; // CreateEventManager
this->CreateTimer(TRUE);
this->CreateStreamer(TRUE);
this->m_flags2.m_bit1 = TRUE; // CreateTimer
this->m_flags2.m_bit2 = TRUE; // CreateStreamer
}

View file

@ -1,6 +1,7 @@
#include "mxomnicreateparam.h"
// FUNCTION: LEGO1 0x100b0b00
// FUNCTION: BETA10 0x10130b6b
MxOmniCreateParam::MxOmniCreateParam(
const char* p_mediaPath,
struct HWND__* p_windowHandle,