mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
improve match
This commit is contained in:
parent
6e15e9f524
commit
f309699f57
@ -899,15 +899,9 @@ BOOL MxDirectDraw::GetDDSurfaceDesc(LPDDSURFACEDESC lpDDSurfDesc, LPDIRECTDRAWSU
|
|||||||
// OFFSET: LEGO1 0x1009D9D0
|
// OFFSET: LEGO1 0x1009D9D0
|
||||||
BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp)
|
BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
Mode mode = { width, height, bpp };
|
Mode mode = { width, height, bpp };
|
||||||
|
int i;
|
||||||
|
|
||||||
if (m_pCurrentDeviceModesList->count <= 0)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: find way to mach original
|
|
||||||
for (i = 0; i < m_pCurrentDeviceModesList->count; i++)
|
for (i = 0; i < m_pCurrentDeviceModesList->count; i++)
|
||||||
{
|
{
|
||||||
if (m_pCurrentDeviceModesList->m_mode_ARRAY[i] == mode)
|
if (m_pCurrentDeviceModesList->m_mode_ARRAY[i] == mode)
|
||||||
@ -1102,9 +1096,6 @@ BOOL MxDirectDraw::SetPaletteEntries(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (paletteEntryCount != 0)
|
if (paletteEntryCount != 0)
|
||||||
{
|
|
||||||
// actually both of this 'if' statements is not needed(may be it created from for some how)
|
|
||||||
if (paletteEntryCount > 10)
|
|
||||||
{
|
{
|
||||||
for (i = 10; (i < paletteEntryCount) && (i < 246); i++)
|
for (i = 10; (i < paletteEntryCount) && (i < 246); i++)
|
||||||
{
|
{
|
||||||
@ -1113,7 +1104,6 @@ BOOL MxDirectDraw::SetPaletteEntries(
|
|||||||
m_paletteEntries[i].peBlue = pPaletteEntries[i].peBlue;
|
m_paletteEntries[i].peBlue = pPaletteEntries[i].peBlue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (m_pPalette != NULL)
|
if (m_pPalette != NULL)
|
||||||
{
|
{
|
||||||
@ -1188,8 +1178,11 @@ void MxDirectDraw::unk1()
|
|||||||
HRESULT result;
|
HRESULT result;
|
||||||
byte* line;
|
byte* line;
|
||||||
DDSURFACEDESC ddsd;
|
DDSURFACEDESC ddsd;
|
||||||
|
int i;
|
||||||
|
unsigned int j;
|
||||||
|
int count = m_bFlipSurfaces ? 2 : 1;
|
||||||
|
|
||||||
for (int i = 0; i < m_bFlipSurfaces ? 2 : 1; i++)
|
for (i = 0; count > i; i++)
|
||||||
{
|
{
|
||||||
memset(&ddsd, 0, sizeof(ddsd));
|
memset(&ddsd, 0, sizeof(ddsd));
|
||||||
ddsd.dwSize = sizeof(ddsd);
|
ddsd.dwSize = sizeof(ddsd);
|
||||||
@ -1209,7 +1202,7 @@ void MxDirectDraw::unk1()
|
|||||||
|
|
||||||
// clear backBuffer
|
// clear backBuffer
|
||||||
line = (byte*)ddsd.lpSurface;
|
line = (byte*)ddsd.lpSurface;
|
||||||
for (unsigned int j = 0; j < ddsd.dwHeight; i++)
|
for (j = ddsd.dwHeight - 1; j ; j--)
|
||||||
{
|
{
|
||||||
memset(line, 0, ddsd.dwWidth);
|
memset(line, 0, ddsd.dwWidth);
|
||||||
line += ddsd.lPitch;
|
line += ddsd.lPitch;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user