From ab1a875c082fd92e9914018c38b0d2dd1841f7c7 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun, 15 Oct 2023 16:21:29 -0700 Subject: [PATCH] Transition_Windows 100% --- LEGO1/mxtransitionmanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index 0c48543f..6d35e867 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -369,17 +369,18 @@ void MxTransitionManager::Transition_Windows() if (res == DD_OK) { SubmitCopyRect(&ddsd); + MxU8 *line = (MxU8 *) ddsd.lpSurface + m_animationTimer * ddsd.lPitch; + MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8; MxS32 bytesPerLine = bytesPerPixel * 640; - MxU8 *line = (MxU8 *) ddsd.lpSurface + m_animationTimer * ddsd.lPitch; memset(line, 0, bytesPerLine); for (MxS32 i = m_animationTimer + 1; i < 480 - m_animationTimer; i++) { line += ddsd.lPitch; - memset(line + m_animationTimer * bytesPerPixel, 0, bytesPerLine); - memset(line + 640 + (-1 - m_animationTimer) * bytesPerPixel, 0, bytesPerLine); + memset(line + m_animationTimer * bytesPerPixel, 0, bytesPerPixel); + memset(line + 640 + (-1 - m_animationTimer) * bytesPerPixel, 0, bytesPerPixel); } line += ddsd.lPitch;