Use setters

This commit is contained in:
Christian Semmler 2024-01-14 16:54:14 -05:00
parent 2a761172c2
commit 7bc350cccc
4 changed files with 8 additions and 6 deletions

View File

@ -614,8 +614,8 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
LegoAnimationManager::configureLegoAnimationManager(m_islandQuality); LegoAnimationManager::configureLegoAnimationManager(m_islandQuality);
if (LegoOmni::GetInstance()) { if (LegoOmni::GetInstance()) {
if (LegoOmni::GetInstance()->GetInputManager()) { if (LegoOmni::GetInstance()->GetInputManager()) {
LegoOmni::GetInstance()->GetInputManager()->m_useJoystick = m_useJoystick; LegoOmni::GetInstance()->GetInputManager()->SetUseJoystick(m_useJoystick);
LegoOmni::GetInstance()->GetInputManager()->m_joystickIndex = m_joystickIndex; LegoOmni::GetInstance()->GetInputManager()->SetJoystickIndex(m_joystickIndex);
} }
} }
if (m_fullScreen) { if (m_fullScreen) {

View File

@ -53,6 +53,8 @@ class LegoInputManager : public MxPresenter {
inline void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; } inline void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; }
inline void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; } inline void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; }
inline void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; }
inline void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; }
inline LegoControlManager* GetControlManager() { return m_controlManager; } inline LegoControlManager* GetControlManager() { return m_controlManager; }
inline LegoWorld* GetWorld() { return m_world; } inline LegoWorld* GetWorld() { return m_world; }
@ -61,7 +63,7 @@ class LegoInputManager : public MxPresenter {
void ProcessEvents(); void ProcessEvents();
MxBool ProcessOneEvent(LegoEventNotificationParam& p_param); MxBool ProcessOneEvent(LegoEventNotificationParam& p_param);
// private: private:
MxCriticalSection m_criticalSection; MxCriticalSection m_criticalSection;
MxList<undefined4>* m_unk0x5c; // list or hash table MxList<undefined4>* m_unk0x5c; // list or hash table
LegoCameraController* m_camera; LegoCameraController* m_camera;

View File

@ -18,7 +18,7 @@ ElevatorBottom::ElevatorBottom()
// FUNCTION: LEGO1 0x10018060 // FUNCTION: LEGO1 0x10018060
ElevatorBottom::~ElevatorBottom() ElevatorBottom::~ElevatorBottom()
{ {
if (InputManager()->m_world == this) { if (InputManager()->GetWorld() == this) {
InputManager()->ClearWorld(); InputManager()->ClearWorld();
} }
ControlManager()->Unregister(this); ControlManager()->Unregister(this);

View File

@ -114,8 +114,8 @@ MxResult MxTransitionManager::StartTransition(
tickleManager->RegisterClient(this, p_speed); tickleManager->RegisterClient(this, p_speed);
LegoInputManager* inputManager = InputManager(); LegoInputManager* inputManager = InputManager();
inputManager->m_unk0x88 = TRUE; inputManager->SetUnknown88(TRUE);
inputManager->m_unk0x336 = FALSE; inputManager->SetUnknown336(FALSE);
LegoVideoManager* videoManager = VideoManager(); LegoVideoManager* videoManager = VideoManager();
videoManager->SetRender3D(FALSE); videoManager->SetRender3D(FALSE);