This commit is contained in:
Christian Semmler 2024-01-19 09:34:57 -05:00
parent c816dd1d0c
commit 433999f80f
2 changed files with 15 additions and 10 deletions

View File

@ -3,7 +3,7 @@
#include "decomp.h" #include "decomp.h"
#include "legostate.h" #include "legostate.h"
#include "mxstillpresenter.h"; #include "mxstillpresenter.h"
// VTABLE: LEGO1 0x100d93a8 // VTABLE: LEGO1 0x100d93a8
// SIZE 0x94 // SIZE 0x94

View File

@ -219,12 +219,13 @@ void MxBitmap::BitBlt(
MxS32 p_height MxS32 p_height
) )
{ {
MxLong dstHeight = AbsFlipped(m_bmiHeader->biHeight); MxLong dstHeight = GetBmiHeightAbs();
MxLong srcHeight = AbsFlipped(p_src->m_bmiHeader->biHeight); MxLong srcHeight = p_src->GetBmiHeightAbs();
if (GetRectIntersection( if (GetRectIntersection(
p_src->m_bmiHeader->biWidth, p_src->GetBmiWidth(),
srcHeight, srcHeight,
m_bmiHeader->biWidth, GetBmiWidth(),
dstHeight, dstHeight,
&p_srcLeft, &p_srcLeft,
&p_srcTop, &p_srcTop,
@ -237,7 +238,8 @@ void MxBitmap::BitBlt(
MxU8* dstStart = GetStart(p_dstLeft, p_dstTop); MxU8* dstStart = GetStart(p_dstLeft, p_dstTop);
MxLong srcStride = p_src->GetAdjustedStride(); MxLong srcStride = p_src->GetAdjustedStride();
MxLong dstStride = GetAdjustedStride(); MxLong dstStride = GetAdjustedStride();
for (; p_height; --p_height) {
while (p_height--) {
memcpy(dstStart, srcStart, p_width); memcpy(dstStart, srcStart, p_width);
dstStart += dstStride; dstStart += dstStride;
srcStart += srcStride; srcStart += srcStride;
@ -256,12 +258,13 @@ void MxBitmap::BitBltTransparent(
MxS32 p_height MxS32 p_height
) )
{ {
MxLong dstHeight = AbsFlipped(m_bmiHeader->biHeight); MxLong dstHeight = GetBmiHeightAbs();
MxLong srcHeight = AbsFlipped(p_src->m_bmiHeader->biHeight); MxLong srcHeight = p_src->GetBmiHeightAbs();
if (GetRectIntersection( if (GetRectIntersection(
p_src->m_bmiHeader->biWidth, p_src->GetBmiWidth(),
srcHeight, srcHeight,
m_bmiHeader->biWidth, GetBmiWidth(),
dstHeight, dstHeight,
&p_srcLeft, &p_srcLeft,
&p_srcTop, &p_srcTop,
@ -274,6 +277,7 @@ void MxBitmap::BitBltTransparent(
MxU8* dstStart = GetStart(p_dstLeft, p_dstTop); MxU8* dstStart = GetStart(p_dstLeft, p_dstTop);
MxLong srcStride = p_src->GetAdjustedStride() - p_width; MxLong srcStride = p_src->GetAdjustedStride() - p_width;
MxLong dstStride = GetAdjustedStride() - p_width; MxLong dstStride = GetAdjustedStride() - p_width;
for (MxS32 h = 0; h < p_height; h++) { for (MxS32 h = 0; h < p_height; h++) {
for (MxS32 w = 0; w < p_width; w++) { for (MxS32 w = 0; w < p_width; w++) {
if (*srcStart) if (*srcStart)
@ -281,6 +285,7 @@ void MxBitmap::BitBltTransparent(
srcStart++; srcStart++;
dstStart++; dstStart++;
} }
srcStart += srcStride; srcStart += srcStride;
dstStart += dstStride; dstStart += dstStride;
} }