Minor improvements

This commit is contained in:
Christian Semmler 2023-10-08 15:52:08 -04:00
parent 327dc7184c
commit 9dbb8d4f0b
2 changed files with 20 additions and 24 deletions

View File

@ -1,5 +1,7 @@
#include "legovideomanager.h" #include "legovideomanager.h"
DECOMP_SIZE_ASSERT(LegoVideoManager, 0x590);
// OFFSET: LEGO1 0x1007aa20 STUB // OFFSET: LEGO1 0x1007aa20 STUB
LegoVideoManager::LegoVideoManager() LegoVideoManager::LegoVideoManager()
{ {
@ -39,20 +41,17 @@ void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable, MxBool p_scale)
} }
// OFFSET: LEGO1 0x1007b6a0 // OFFSET: LEGO1 0x1007b6a0
void LegoVideoManager::MoveCursor(int p_x, int p_y) void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY)
{ {
m_cursorX = p_x; m_cursorX = p_cursorX;
m_cursorY = p_y; m_cursorY = p_cursorY;
m_cursorMoved = TRUE; m_cursorMoved = TRUE;
if(623 < p_x)
{
m_cursorX = 623;
}
if (463 < p_y) if (623 < p_cursorX)
{ m_cursorX = 623;
if (463 < p_cursorY)
m_cursorY = 463; m_cursorY = 463;
}
} }
// OFFSET: LEGO1 0x1007c440 // OFFSET: LEGO1 0x1007c440

View File

@ -5,7 +5,8 @@
#include "mxdirect3d.h" #include "mxdirect3d.h"
#include "lego3dmanager.h" #include "lego3dmanager.h"
#include "decomp.h" #include "decomp.h"
#include "ddraw.h"
#include <ddraw.h>
// VTABLE 0x100d9c88 // VTABLE 0x100d9c88
// SIZE 0x590 // SIZE 0x590
@ -25,7 +26,7 @@ class LegoVideoManager : public MxVideoManager
inline MxDirect3D *GetDirect3D() { return this->m_direct3d; } inline MxDirect3D *GetDirect3D() { return this->m_direct3d; }
void SetSkyColor(float r, float g, float b); void SetSkyColor(float r, float g, float b);
inline void SetUnkE4(MxBool p_value) { this->m_unke4 = p_value; } inline void SetUnkE4(MxBool p_unk0xe4) { this->m_unk0xe4 = p_unk0xe4; }
// OFFSET: LEGO1 0x1007c4c0 // OFFSET: LEGO1 0x1007c4c0
void OverrideSkyColor(MxBool p_shouldOverride) { this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride);} void OverrideSkyColor(MxBool p_shouldOverride) { this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride);}
@ -36,18 +37,14 @@ class LegoVideoManager : public MxVideoManager
undefined4 m_unk6c; undefined4 m_unk6c;
undefined4 m_unk70; undefined4 m_unk70;
MxDirect3D *m_direct3d; MxDirect3D *m_direct3d;
undefined m_pad78[0x6c]; undefined m_pad0x78[0x6c];
MxBool m_unke4; MxBool m_unk0xe4;
undefined m_pade5[2]; undefined m_pad0xe8[0x41c];
PALETTEENTRY m_paletteEntries[256]; MxBool m_cursorMoved; // 0x501
MxBool m_unk4e7; undefined m_pad0x502[0x8];
undefined4 m_unk4e8; MxS32 m_cursorX; // 0x50c
MxBool m_isFullScreenMovie; MxS32 m_cursorY; // 0x510
undefined m_pad4ed[0x14]; undefined m_pad0x514[0x7c];
MxBool m_cursorMoved;
undefined m_pad4f8[8];
int m_cursorX;
int m_cursorY;
}; };
#endif // LEGOVIDEOMANAGER_H #endif // LEGOVIDEOMANAGER_H