DM: Improve upon blitShrink
This commit is contained in:
parent
65e4098080
commit
9cd5732b03
1 changed files with 5 additions and 4 deletions
|
@ -1035,7 +1035,8 @@ void DisplayMan::f110_drawDoorButton(int16 doorButtonOrdinal, int16 viewDoorButt
|
|||
byte *bitmapNative = f489_getNativeBitmapOrGraphic(nativeBitmapIndex);
|
||||
f129_blitToBitmapShrinkWithPalChange(bitmapNative, f492_getDerivedBitmap(doorButtonOrdinal),
|
||||
coordSetBlueGoat[4] << 1, coordSetBlueGoat[5],
|
||||
coordSetRedEagle[1] - coordSetRedEagle[0] + 1,
|
||||
// modified code line
|
||||
coordSetRedEagle[4] << 1,
|
||||
coordSetRedEagle[5],
|
||||
(viewDoorButtonIndex == k2_viewDoorButton_D2C) ? g199_PalChangesDoorButtonAndWallOrn_D2 : g198_PalChangesDoorButtonAndWallOrn_D3);
|
||||
|
||||
|
@ -2644,15 +2645,15 @@ T0107031:
|
|||
void DisplayMan::f129_blitToBitmapShrinkWithPalChange(byte *srcBitmap, byte *destBitmap,
|
||||
int16 srcPixelWidth, int16 srcHeight,
|
||||
int16 destPixelWidth, int16 destHeight, byte *palChange) {
|
||||
if (destPixelWidth % 8)
|
||||
destPixelWidth = (destPixelWidth / 8) * 8 + 8;
|
||||
|
||||
const uint32 SCALE_THRESHOLD = 32768;
|
||||
uint32 scaleX = (SCALE_THRESHOLD * srcPixelWidth) / destPixelWidth;
|
||||
uint32 scaleY = (SCALE_THRESHOLD * srcHeight) / destHeight;
|
||||
|
||||
warning(false, "MISSING CODE: No palette change takes place in f129_blitToBitmapShrinkWithPalChange");
|
||||
|
||||
if (destPixelWidth % 2)
|
||||
destPixelWidth++;
|
||||
|
||||
// Loop through drawing output lines
|
||||
for (uint32 destY = 0, scaleYCtr = 0; destY < (uint32)destHeight; ++destY, scaleYCtr += scaleY) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue