mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-26 09:41:15 +00:00
Merge pull request #1 from disinvite/windows2
This commit is contained in:
commit
488ed18d9d
@ -369,23 +369,21 @@ void MxTransitionManager::Transition_Windows()
|
|||||||
if (res == DD_OK) {
|
if (res == DD_OK) {
|
||||||
SubmitCopyRect(&ddsd);
|
SubmitCopyRect(&ddsd);
|
||||||
|
|
||||||
MxS32 widthInPixels = ddsd.lPitch / 8;
|
MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8;
|
||||||
|
MxS32 bytesPerLine = bytesPerPixel * 640;
|
||||||
|
|
||||||
MxU8 *line = (MxU8 *) ddsd.lpSurface + m_animationTimer * ddsd.lPitch;
|
MxU8 *line = (MxU8 *) ddsd.lpSurface + m_animationTimer * ddsd.lPitch;
|
||||||
memset(line, 0, widthInPixels * 640);
|
memset(line, 0, bytesPerLine);
|
||||||
|
|
||||||
MxS32 count = m_animationTimer + 1;
|
for (MxS32 i = m_animationTimer + 1; i < 480 - m_animationTimer; i++) {
|
||||||
while (count < 480 - m_animationTimer) {
|
|
||||||
line += ddsd.lPitch;
|
line += ddsd.lPitch;
|
||||||
|
|
||||||
memset(line + m_animationTimer * widthInPixels, 0, ddsd.lPitch / 8);
|
memset(line + m_animationTimer * bytesPerPixel, 0, bytesPerLine);
|
||||||
memset(line + (640 - 1 - m_animationTimer) * widthInPixels, 0, ddsd.lPitch / 8);
|
memset(line + 640 + (-1 - m_animationTimer) * bytesPerPixel, 0, bytesPerLine);
|
||||||
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
line += ddsd.lPitch;
|
line += ddsd.lPitch;
|
||||||
memset(line, 0, widthInPixels * 640);
|
memset(line, 0, bytesPerLine);
|
||||||
|
|
||||||
SetupCopyRect(&ddsd);
|
SetupCopyRect(&ddsd);
|
||||||
m_ddSurface->Unlock(ddsd.lpSurface);
|
m_ddSurface->Unlock(ddsd.lpSurface);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user