diff --git a/CONFIG/detectdx5.cpp b/CONFIG/detectdx5.cpp index 16b68987..559a37ad 100644 --- a/CONFIG/detectdx5.cpp +++ b/CONFIG/detectdx5.cpp @@ -120,7 +120,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found) surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS; surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - if (FAILED(ddraw2->SetCooperativeLevel(NULL, DISCL_BACKGROUND))) { + if (FAILED(ddraw2->SetCooperativeLevel(NULL, DDSCL_NORMAL))) { ddraw2->Release(); FreeLibrary(ddraw_module); *p_version = 0; diff --git a/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp b/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp index 73566e64..771fc3ab 100644 --- a/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp +++ b/LEGO1/lego/legoomni/src/common/legotextureinfo.cpp @@ -112,7 +112,7 @@ LegoTextureInfo* LegoTextureInfo::Create(const char* p_name, LegoTexture* p_text entries[i].peBlue = image->GetPalette()->colors[i].b; } else { - entries[i].peFlags = 0x80; + entries[i].peFlags = D3DPAL_RESERVED; } } @@ -193,7 +193,7 @@ LegoResult LegoTextureInfo::FUN_10066010(const LegoU8* p_bits) memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - if (m_surface->Lock(NULL, &desc, 0, NULL) == DD_OK) { + if (m_surface->Lock(NULL, &desc, DDLOCK_SURFACEMEMORYPTR, NULL) == DD_OK) { MxU8* surface = (MxU8*) desc.lpSurface; const LegoU8* bits = p_bits; diff --git a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp index 1d2f9459..69154d65 100644 --- a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp @@ -293,10 +293,10 @@ void MxTransitionManager::MosaicTransition() memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - HRESULT res = m_ddSurface->Lock(NULL, &ddsd, 1, NULL); + HRESULT res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); if (res == DDERR_SURFACELOST) { m_ddSurface->Restore(); - res = m_ddSurface->Lock(NULL, &ddsd, 1, NULL); + res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); } if (res == DD_OK) { diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index 373e6ed0..4779e53d 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -659,7 +659,7 @@ void LegoVideoManager::SetSkyColor(float p_red, float p_green, float p_blue) colorStrucure.peRed = (p_red * 255.0f); colorStrucure.peGreen = (p_green * 255.0f); colorStrucure.peBlue = (p_blue * 255.0f); - colorStrucure.peFlags = -124; + colorStrucure.peFlags = D3DPAL_RESERVED | PC_NOCOLLAPSE; m_videoParam.GetPalette()->SetSkyColor(&colorStrucure); m_videoParam.GetPalette()->SetOverrideSkyColor(TRUE); m_3dManager->GetLego3DView()->GetView()->SetBackgroundColor(p_red, p_green, p_blue); diff --git a/LEGO1/mxdirectx/mxdirectdraw.cpp b/LEGO1/mxdirectx/mxdirectdraw.cpp index d39d0e22..6a2fa968 100644 --- a/LEGO1/mxdirectx/mxdirectdraw.cpp +++ b/LEGO1/mxdirectx/mxdirectdraw.cpp @@ -165,19 +165,19 @@ BOOL MxDirectDraw::SetPaletteEntries(const PALETTEENTRY* pPaletteEntries, int pa } for (i = 0; i < 10; i++) { - m_paletteEntries[i].peFlags = 0x80; + m_paletteEntries[i].peFlags = D3DPAL_RESERVED; } for (; i < 142; i++) { - m_paletteEntries[i].peFlags = 0x44; + m_paletteEntries[i].peFlags = D3DPAL_READONLY | PC_NOCOLLAPSE; } for (; i < 246; i++) { - m_paletteEntries[i].peFlags = 0x84; + m_paletteEntries[i].peFlags = D3DPAL_RESERVED | PC_NOCOLLAPSE; } for (; i < 256; i++) { - m_paletteEntries[i].peFlags = 0x80; + m_paletteEntries[i].peFlags = D3DPAL_RESERVED; } if (paletteEntryCount != 0) { @@ -562,10 +562,10 @@ void MxDirectDraw::FUN_1009e020() memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - result = m_pBackBuffer->Lock(NULL, &ddsd, 1, NULL); + result = m_pBackBuffer->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); if (result == DDERR_SURFACELOST) { m_pBackBuffer->Restore(); - result = m_pBackBuffer->Lock(NULL, &ddsd, 1, NULL); + result = m_pBackBuffer->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); } if (result != DD_OK) { diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index 911c4bb0..01aa103e 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -1082,7 +1082,7 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CopySurface(LPDIRECTDRAWSURFACE p_src) RECT rect = {0, 0, (LONG) ddsd.dwWidth, (LONG) ddsd.dwHeight}; - if (newSurface->BltFast(0, 0, p_src, &rect, 16) != DD_OK) { + if (newSurface->BltFast(0, 0, p_src, &rect, DDBLTFAST_WAIT) != DD_OK) { newSurface->Release(); return NULL; }