Correct check for lighting support (#1486)

This commit is contained in:
Anders Jenbo
2025-05-15 01:39:55 +02:00
committed by GitHub
parent 88651404cb
commit fce97ea06f
4 changed files with 7 additions and 7 deletions

View File

@@ -218,7 +218,7 @@ void IsleApp::SetupVideoFlags(
m_videoParam.Flags().SetFullScreen(fullScreen); m_videoParam.Flags().SetFullScreen(fullScreen);
m_videoParam.Flags().SetFlipSurfaces(flipSurfaces); m_videoParam.Flags().SetFlipSurfaces(flipSurfaces);
m_videoParam.Flags().SetBackBuffers(!backBuffers); m_videoParam.Flags().SetBackBuffers(!backBuffers);
m_videoParam.Flags().SetF2bit0(!param_6); m_videoParam.Flags().SetLacksLightSupport(!param_6);
m_videoParam.Flags().SetF1bit7(param_7); m_videoParam.Flags().SetF1bit7(param_7);
m_videoParam.Flags().SetWideViewAngle(wideViewAngle); m_videoParam.Flags().SetWideViewAngle(wideViewAngle);
m_videoParam.Flags().SetF2bit1(1); m_videoParam.Flags().SetF2bit1(1);

View File

@@ -1303,7 +1303,7 @@ void LegoBackgroundColor::ToggleSkyColor()
// FUNCTION: BETA10 0x10086984 // FUNCTION: BETA10 0x10086984
void LegoBackgroundColor::SetLightColor(float p_r, float p_g, float p_b) void LegoBackgroundColor::SetLightColor(float p_r, float p_g, float p_b)
{ {
if (!VideoManager()->GetVideoParam().Flags().GetF2bit0()) { if (!VideoManager()->GetVideoParam().Flags().GetLacksLightSupport()) {
// TODO: Computed constants based on what? // TODO: Computed constants based on what?
p_r *= 1. / 0.23; p_r *= 1. / 0.23;
p_g *= 1. / 0.63; p_g *= 1. / 0.63;

View File

@@ -126,13 +126,13 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM
m_direct3d->SetDevice(deviceEnumerate, driver, device); m_direct3d->SetDevice(deviceEnumerate, driver, device);
if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) { if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) {
p_videoParam.Flags().SetF2bit0(TRUE); p_videoParam.Flags().SetLacksLightSupport(TRUE);
} }
else { else {
p_videoParam.Flags().SetF2bit0(FALSE); p_videoParam.Flags().SetLacksLightSupport(FALSE);
} }
ViewROI::SetUnk101013d8(p_videoParam.Flags().GetF2bit0() == FALSE); ViewROI::SetUnk101013d8(p_videoParam.Flags().GetLacksLightSupport() == FALSE);
if (!m_direct3d->Create( if (!m_direct3d->Create(
hwnd, hwnd,

View File

@@ -31,7 +31,7 @@ public:
void SetF1bit7(MxBool p_e) { m_flags1.m_bit7 = p_e; } void SetF1bit7(MxBool p_e) { m_flags1.m_bit7 = p_e; }
// FUNCTION: BETA10 0x100d81b0 // FUNCTION: BETA10 0x100d81b0
void SetF2bit0(MxBool p_e) { m_flags2.m_bit0 = p_e; } void SetLacksLightSupport(MxBool p_e) { m_flags2.m_bit0 = p_e; }
// inlined in ISLE // inlined in ISLE
void SetF2bit1(MxBool p_e) { m_flags2.m_bit1 = p_e; } void SetF2bit1(MxBool p_e) { m_flags2.m_bit1 = p_e; }
@@ -55,7 +55,7 @@ public:
MxBool GetWideViewAngle() { return m_flags1.m_bit6; } MxBool GetWideViewAngle() { return m_flags1.m_bit6; }
// FUNCTION: BETA10 0x100886b0 // FUNCTION: BETA10 0x100886b0
MxBool GetF2bit0() { return m_flags2.m_bit0; } MxBool GetLacksLightSupport() { return m_flags2.m_bit0; }
// FUNCTION: BETA10 0x10142050 // FUNCTION: BETA10 0x10142050
MxBool GetF2bit1() { return m_flags2.m_bit1; } MxBool GetF2bit1() { return m_flags2.m_bit1; }