1
0
Fork 0

Compare commits

..

No commits in common. "a2a7ecf88eb74c89f905f3035a1a6ae59f718ed8" and "9ce1626bb48b58f40c12ea8ed9af715d3206b876" have entirely different histories.

8 changed files with 12 additions and 30 deletions

View File

@ -218,7 +218,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
if (src_px->a != 0) {
src_px += n;
do {
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
*anim = 0;
anim++;
dst++;

View File

@ -322,7 +322,7 @@ bmcr_alpha_blend_single:
/* Apply custom transparency remap. */
for (uint x = (uint) bp->width; x > 0; x--) {
if (src->a != 0) {
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
*anim = 0;
}
src_mv++;

View File

@ -209,7 +209,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
if (src_px->a != 0) {
src_px += n;
do {
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
dst++;
} while (--n != 0);
} else {

View File

@ -396,7 +396,7 @@ bmcr_alpha_blend_single:
/* Apply custom transparency remap. */
for (uint x = (uint) bp->width; x > 0; x--) {
if (src->a != 0) {
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
}
src_mv++;
dst++;

View File

@ -267,9 +267,9 @@ inline void Blitter_40bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
src_px += n;
do {
if (*anim != 0) {
*anim = remap[*anim];
*anim = bp->remap[*anim];
} else {
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
*anim = 0;
}
anim++;

View File

@ -899,19 +899,8 @@ struct ScriptDebugWindow : public Window {
ScriptLogTypes::LogData &log = this->GetLogData();
if (log.empty()) return;
Rect fr = r.Shrink(WidgetDimensions::scaled.framerect);
/* Setup a clipping rectangle... */
DrawPixelInfo tmp_dpi;
if (!FillDrawPixelInfo(&tmp_dpi, fr)) return;
/* ...but keep coordinates relative to the window. */
tmp_dpi.left += fr.left;
tmp_dpi.top += fr.top;
AutoRestoreBackup dpi_backup(_cur_dpi, &tmp_dpi);
fr.left -= this->hscroll->GetPosition();
Rect br = r.Shrink(WidgetDimensions::scaled.bevel);
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect);
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && (size_t)i < log.size(); i++) {
const ScriptLogTypes::LogLine &line = log[i];
@ -927,13 +916,12 @@ struct ScriptDebugWindow : public Window {
/* Check if the current line should be highlighted */
if (i == this->highlight_row) {
fr.bottom = fr.top + this->resize.step_height - 1;
GfxFillRect(fr, PC_BLACK);
GfxFillRect(br.left, tr.top, br.right, tr.top + this->resize.step_height - 1, PC_BLACK);
if (colour == TC_BLACK) colour = TC_WHITE; // Make black text readable by inverting it to white.
}
DrawString(fr, line.text, colour, SA_LEFT | SA_FORCE);
fr.top += this->resize.step_height;
DrawString(-this->hscroll->GetPosition(), tr.right, tr.top, line.text, colour, SA_LEFT | SA_FORCE);
tr.top += this->resize.step_height;
}
}

View File

@ -397,12 +397,6 @@ static bool ResizeSprites(SpriteLoader::SpriteCollection &sprite, uint8_t sprite
if (!HasBit(sprite_avail, zoom)) ResizeSpriteOut(sprite, zoom);
}
/* Upscale to desired sprite_min_zoom if provided sprite only had zoomed in versions. */
if (first_avail < _settings_client.gui.sprite_zoom_min) {
if (_settings_client.gui.sprite_zoom_min >= ZOOM_LVL_OUT_4X) ResizeSpriteIn(sprite, ZOOM_LVL_OUT_4X, ZOOM_LVL_OUT_2X);
if (_settings_client.gui.sprite_zoom_min >= ZOOM_LVL_OUT_2X) ResizeSpriteIn(sprite, ZOOM_LVL_OUT_2X, ZOOM_LVL_NORMAL);
}
return true;
}

View File

@ -657,7 +657,7 @@ enum WindowClass {
/**
* Script debug window; %Window numbers:
* - Ascending value = #ScriptDebugWidgets
* - 0 = #ScriptDebugWidgets
*/
WC_SCRIPT_DEBUG,