mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-22 20:05:40 +01:00
While this probably doesn't make a huge difference for the custom transparent remap code path, the alias is there so use it.
This commit is contained in:
parent
fdf6cbf848
commit
a2a7ecf88e
@ -218,7 +218,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
|||||||
if (src_px->a != 0) {
|
if (src_px->a != 0) {
|
||||||
src_px += n;
|
src_px += n;
|
||||||
do {
|
do {
|
||||||
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
|
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
|
||||||
*anim = 0;
|
*anim = 0;
|
||||||
anim++;
|
anim++;
|
||||||
dst++;
|
dst++;
|
||||||
|
@ -322,7 +322,7 @@ bmcr_alpha_blend_single:
|
|||||||
/* Apply custom transparency remap. */
|
/* Apply custom transparency remap. */
|
||||||
for (uint x = (uint) bp->width; x > 0; x--) {
|
for (uint x = (uint) bp->width; x > 0; x--) {
|
||||||
if (src->a != 0) {
|
if (src->a != 0) {
|
||||||
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
|
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
|
||||||
*anim = 0;
|
*anim = 0;
|
||||||
}
|
}
|
||||||
src_mv++;
|
src_mv++;
|
||||||
|
@ -209,7 +209,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
|
|||||||
if (src_px->a != 0) {
|
if (src_px->a != 0) {
|
||||||
src_px += n;
|
src_px += n;
|
||||||
do {
|
do {
|
||||||
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
|
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
|
||||||
dst++;
|
dst++;
|
||||||
} while (--n != 0);
|
} while (--n != 0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -396,7 +396,7 @@ bmcr_alpha_blend_single:
|
|||||||
/* Apply custom transparency remap. */
|
/* Apply custom transparency remap. */
|
||||||
for (uint x = (uint) bp->width; x > 0; x--) {
|
for (uint x = (uint) bp->width; x > 0; x--) {
|
||||||
if (src->a != 0) {
|
if (src->a != 0) {
|
||||||
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
|
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
|
||||||
}
|
}
|
||||||
src_mv++;
|
src_mv++;
|
||||||
dst++;
|
dst++;
|
||||||
|
@ -267,9 +267,9 @@ inline void Blitter_40bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
|||||||
src_px += n;
|
src_px += n;
|
||||||
do {
|
do {
|
||||||
if (*anim != 0) {
|
if (*anim != 0) {
|
||||||
*anim = bp->remap[*anim];
|
*anim = remap[*anim];
|
||||||
} else {
|
} else {
|
||||||
*dst = this->LookupColourInPalette(bp->remap[GetNearestColourIndex(*dst)]);
|
*dst = this->LookupColourInPalette(remap[GetNearestColourIndex(*dst)]);
|
||||||
*anim = 0;
|
*anim = 0;
|
||||||
}
|
}
|
||||||
anim++;
|
anim++;
|
||||||
|
Loading…
Reference in New Issue
Block a user