This commit is contained in:
Misha 2023-12-26 16:50:35 -05:00
parent cd9c62ff6e
commit d6234b4354
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
3 changed files with 33 additions and 34 deletions

View File

@ -37,6 +37,13 @@ LegoVideoManager::~LegoVideoManager()
delete m_palette; delete m_palette;
} }
// STUB: LEGO1 0x1007ac40
MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread)
{
// TODO
return MxVideoManager::Create(p_videoParam, p_frequencyMS, p_createThread);
}
// FUNCTION: LEGO1 0x1007b5e0 // FUNCTION: LEGO1 0x1007b5e0
void LegoVideoManager::Destroy() void LegoVideoManager::Destroy()
{ {
@ -76,13 +83,6 @@ MxResult LegoVideoManager::Tickle()
return FAILURE; return FAILURE;
} }
// STUB: LEGO1 0x1007ac40
MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread)
{
// TODO
return MxVideoManager::Create(p_videoParam, p_frequencyMS, p_createThread);
}
// STUB: LEGO1 0x1007c080 // STUB: LEGO1 0x1007c080
void LegoVideoManager::VTable0x38(undefined4, undefined4) void LegoVideoManager::VTable0x38(undefined4, undefined4)
{ {
@ -101,21 +101,6 @@ MxResult LegoVideoManager::RealizePalette(MxPalette* p_pallete)
return SUCCESS; return SUCCESS;
} }
// FUNCTION: LEGO1 0x1007c4d0
void LegoVideoManager::VTable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
{
if (p_width == 0) {
p_width = m_videoParam.GetRect().GetWidth();
}
if (p_height == 0) {
p_height = m_videoParam.GetRect().GetHeight();
}
if (!m_initialized) {
m_3dManager->GetLego3DView()->GetViewPort()->ForceUpdate(p_x, p_y, p_width, p_height);
}
}
// FUNCTION: LEGO1 0x1007c300 // FUNCTION: LEGO1 0x1007c300
void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable) void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable)
{ {
@ -191,6 +176,21 @@ void LegoVideoManager::OverrideSkyColor(MxBool p_shouldOverride)
this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride); this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride);
} }
// FUNCTION: LEGO1 0x1007c4d0
void LegoVideoManager::VTable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height)
{
if (p_width == 0) {
p_width = m_videoParam.GetRect().GetWidth();
}
if (p_height == 0) {
p_height = m_videoParam.GetRect().GetHeight();
}
if (!m_initialized) {
m_3dManager->GetLego3DView()->GetViewPort()->ForceUpdate(p_x, p_y, p_width, p_height);
}
}
// STUB: LEGO1 0x1007c560 // STUB: LEGO1 0x1007c560
int LegoVideoManager::EnableRMDevice() int LegoVideoManager::EnableRMDevice()
{ {

View File

@ -22,7 +22,7 @@ class LegoVideoManager : public MxVideoManager {
__declspec(dllexport) void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY); __declspec(dllexport) void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY);
virtual MxResult Tickle() override; // vtable+0x8 virtual MxResult Tickle() override; // vtable+0x8
virtual void Destroy() override; // vtable+0x18 virtual void Destroy() override; // vtable+0x18
virtual MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread) virtual MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread)
override; // vtable+0x2c override; // vtable+0x2c
virtual MxResult RealizePalette(MxPalette*) override; // vtable+0x30 virtual MxResult RealizePalette(MxPalette*) override; // vtable+0x30

View File

@ -251,7 +251,7 @@ undefined4 MxDisplaySurface::VTable0x34(undefined4, undefined4, undefined4, unde
} }
// FUNCTION: LEGO1 0x100bba50 // FUNCTION: LEGO1 0x100bba50
void MxDisplaySurface::Display(MxS16 left, MxS16 top, MxS16 left2, MxS16 top2, MxS16 width, MxS16 height) void MxDisplaySurface::Display(MxS16 p_left, MxS16 p_top, MxS16 p_left2, MxS16 p_top2, MxS16 p_width, MxS16 p_height)
{ {
if (m_videoParam.Flags().GetF2bit1()) { if (m_videoParam.Flags().GetF2bit1()) {
if (m_videoParam.Flags().GetFlipSurfaces() != 0) { if (m_videoParam.Flags().GetFlipSurfaces() != 0) {
@ -265,8 +265,7 @@ void MxDisplaySurface::Display(MxS16 left, MxS16 top, MxS16 left2, MxS16 top2, M
MxU8* surface = (MxU8*) ddsd.lpSurface; MxU8* surface = (MxU8*) ddsd.lpSurface;
MxS32 height = m_videoParam.GetRect().GetHeight(); MxS32 height = m_videoParam.GetRect().GetHeight();
for (MxU32 i = 0; i < ddsd.dwHeight; i++) for (MxU32 i = 0; i < ddsd.dwHeight; i++) {
{
memset(surface, 0, ddsd.dwWidth * ddsd.ddpfPixelFormat.dwRGBBitCount / 8); memset(surface, 0, ddsd.dwWidth * ddsd.ddpfPixelFormat.dwRGBBitCount / 8);
surface += ddsd.lPitch; surface += ddsd.lPitch;
} }
@ -285,14 +284,14 @@ void MxDisplaySurface::Display(MxS16 left, MxS16 top, MxS16 left2, MxS16 top2, M
RECT rect1; RECT rect1;
RECT rect2; RECT rect2;
rect1.left = left2 + m_videoParam.GetRect().GetLeft() + point.x; rect1.left = p_left2 + m_videoParam.GetRect().GetLeft() + point.x;
rect2.left = left; rect2.left = p_left;
rect1.top = top2 + m_videoParam.GetRect().GetTop() + point.y; rect1.top = p_top2 + m_videoParam.GetRect().GetTop() + point.y;
rect2.right = left + width; rect2.right = p_left + p_width;
rect2.top = top; rect2.top = p_top;
rect2.bottom = top + height; rect2.bottom = p_top + p_height;
rect1.right = rect1.left + width; rect1.right = rect1.left + p_width;
rect1.bottom = rect1.top + height; rect1.bottom = rect1.top + p_height;
DDBLTFX data; DDBLTFX data;
memset(&data, 0, sizeof(data)); memset(&data, 0, sizeof(data));