diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index a16b6251..a42e4c14 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -89,7 +89,7 @@ IsleApp::IsleApp() m_backBuffersInVram = TRUE; m_using8bit = FALSE; m_using16bit = TRUE; - m_unk0x24 = 0; + m_hasLightSupport = FALSE; m_drawCursor = FALSE; m_use3dSound = TRUE; m_useMusic = TRUE; @@ -214,7 +214,7 @@ void IsleApp::SetupVideoFlags( MxS32 backBuffers, MxS32 using8bit, MxS32 using16bit, - MxS32 param_6, + MxS32 hasLightSupport, MxS32 param_7, MxS32 wideViewAngle, char* deviceId @@ -223,7 +223,7 @@ void IsleApp::SetupVideoFlags( m_videoParam.Flags().SetFullScreen(fullScreen); m_videoParam.Flags().SetFlipSurfaces(flipSurfaces); m_videoParam.Flags().SetBackBuffers(!backBuffers); - m_videoParam.Flags().SetLacksLightSupport(!param_6); + m_videoParam.Flags().SetLacksLightSupport(!hasLightSupport); m_videoParam.Flags().SetF1bit7(param_7); m_videoParam.Flags().SetWideViewAngle(wideViewAngle); m_videoParam.Flags().SetF2bit1(1); @@ -479,7 +479,7 @@ MxResult IsleApp::SetupWindow() m_backBuffersInVram, m_using8bit, m_using16bit, - m_unk0x24, + m_hasLightSupport, FALSE, m_wideViewAngle, m_deviceId diff --git a/ISLE/isleapp.h b/ISLE/isleapp.h index 7fd3c84f..91248d35 100644 --- a/ISLE/isleapp.h +++ b/ISLE/isleapp.h @@ -64,7 +64,7 @@ class IsleApp { MxS32 m_backBuffersInVram; // 0x18 MxS32 m_using8bit; // 0x1c MxS32 m_using16bit; // 0x20 - MxS32 m_unk0x24; // 0x24 + MxS32 m_hasLightSupport; // 0x24 MxS32 m_use3dSound; // 0x28 MxS32 m_useMusic; // 0x2c MxS32 m_useJoystick; // 0x30 diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index a1ca65b3..54f1d601 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -137,7 +137,7 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM p_videoParam.Flags().SetLacksLightSupport(FALSE); } - ViewROI::SetUnk101013d8(p_videoParam.Flags().GetLacksLightSupport() == FALSE); + ViewROI::SetLightSupport(p_videoParam.Flags().GetLacksLightSupport() == FALSE); if (!m_direct3d->Create( hwnd, diff --git a/LEGO1/library_msvc.h b/LEGO1/library_msvc.h index 60f5988c..b0542e13 100644 --- a/LEGO1/library_msvc.h +++ b/LEGO1/library_msvc.h @@ -1,4 +1,4 @@ -#ifdef 0 +#if 0 // For LEGO1 symbols only // aka `operator new` diff --git a/LEGO1/library_smack.h b/LEGO1/library_smack.h index 0967aeab..56d00db6 100644 --- a/LEGO1/library_smack.h +++ b/LEGO1/library_smack.h @@ -1,4 +1,4 @@ -#ifdef 0 +#if 0 // LIBRARY: LEGO1 0x100cd782 // LIBRARY: BETA10 0x1015fb82 diff --git a/LEGO1/omni/src/video/mxpalette.cpp b/LEGO1/omni/src/video/mxpalette.cpp index 4c871971..14a09ed8 100644 --- a/LEGO1/omni/src/video/mxpalette.cpp +++ b/LEGO1/omni/src/video/mxpalette.cpp @@ -238,14 +238,14 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) // FUNCTION: BETA10 0x101442aa MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_skyColor) { - MxResult status = 0; + MxResult status = SUCCESS; if (m_palette != NULL) { m_entries[141].peRed = p_skyColor->peRed; m_entries[141].peGreen = p_skyColor->peGreen; m_entries[141].peBlue = p_skyColor->peBlue; m_skyColor = m_entries[141]; if (m_palette->SetEntries(0, 141, 1, &m_skyColor)) { - status = -1; + status = FAILURE; } } return status; diff --git a/LEGO1/tgl/d3drm/impl.h b/LEGO1/tgl/d3drm/impl.h index d2728023..6b89568b 100644 --- a/LEGO1/tgl/d3drm/impl.h +++ b/LEGO1/tgl/d3drm/impl.h @@ -1,3 +1,5 @@ +#ifndef TGL_D3DRM_IMPL_H +#define TGL_D3DRM_IMPL_H #include "compat.h" #include "decomp.h" @@ -820,3 +822,5 @@ inline D3DRMLIGHTTYPE Translate(LightType tglLightType) // IID_IDirect3DRMMeshBuilder } /* namespace TglImpl */ + +#endif diff --git a/LEGO1/viewmanager/viewroi.cpp b/LEGO1/viewmanager/viewroi.cpp index 8d8cbb6b..626fe311 100644 --- a/LEGO1/viewmanager/viewroi.cpp +++ b/LEGO1/viewmanager/viewroi.cpp @@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(ViewROI, 0xe4) // GLOBAL: LEGO1 0x101013d8 -undefined g_unk101013d8 = 0; +unsigned char g_lightSupport = FALSE; // FUNCTION: LEGO1 0x100a9eb0 float ViewROI::IntrinsicImportance() const @@ -78,9 +78,9 @@ void ViewROI::VTable0x1c() } // FUNCTION: LEGO1 0x100aa500 -undefined ViewROI::SetUnk101013d8(undefined p_flag) +unsigned char ViewROI::SetLightSupport(unsigned char p_lightSupport) { - undefined oldFlag = g_unk101013d8; - g_unk101013d8 = p_flag; + unsigned char oldFlag = g_lightSupport; + g_lightSupport = p_lightSupport; return oldFlag; } diff --git a/LEGO1/viewmanager/viewroi.h b/LEGO1/viewmanager/viewroi.h index 444e18f0..a6d2da11 100644 --- a/LEGO1/viewmanager/viewroi.h +++ b/LEGO1/viewmanager/viewroi.h @@ -59,7 +59,7 @@ class ViewROI : public OrientableROI { int GetUnknown0xe0() { return m_unk0xe0; } void SetUnknown0xe0(int p_unk0xe0) { m_unk0xe0 = p_unk0xe0; } - static undefined SetUnk101013d8(undefined p_flag); + static unsigned char SetLightSupport(unsigned char p_lightSupport); protected: void UpdateWorldData(const Matrix4& parent2world) override; // vtable+0x28