summaryrefslogtreecommitdiff
path: root/src/blitter
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-08-08 02:28:28 +0000
committerbelugas <belugas@openttd.org>2008-08-08 02:28:28 +0000
commita2f590aeecf6a683d461ceea1fc0a22bd7a951fa (patch)
tree141bf0de96ec62e5aaf3d67c25c97fc2dfd3e854 /src/blitter
parent3c2f69bf623d4ee2de646d2bf801762d88b86858 (diff)
downloadopenttd-a2f590aeecf6a683d461ceea1fc0a22bd7a951fa.tar.xz
(svn r14016) -Codechange: Remove some magical numbers
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/32bpp_anim.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index 1c91911ff..c989f9b2e 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -161,16 +161,16 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
do {
/* Compiler assumes pointer aliasing, can't optimise this on its own */
uint m = *src_n++;
- /* Above 217 is palette animation */
+ /* Above 217 (PALETTE_ANIM_SIZE_START) is palette animation */
*anim++ = m;
- *dst++ = (m >= 217) ? this->LookupColourInPalette(m) : *src_px;
+ *dst++ = (m >= PALETTE_ANIM_SIZE_START) ? this->LookupColourInPalette(m) : *src_px;
src_px++;
} while (--n != 0);
} else {
do {
uint m = *src_n++;
*anim++ = m;
- if (m >= 217) {
+ if (m >= PALETTE_ANIM_SIZE_START) {
*dst = ComposeColourPANoCheck(this->LookupColourInPalette(m), src_px->a, *dst);
} else {
*dst = ComposeColourRGBANoCheck(src_px->r, src_px->g, src_px->b, src_px->a, *dst);
@@ -327,7 +327,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
}
/* We update the palette (or the pixels that do animation) immediatly, to avoid graphical glitches */
- this->PaletteAnimate(217, _use_dos_palette ? 38 : 28);
+ this->PaletteAnimate(PALETTE_ANIM_SIZE_START, _use_dos_palette ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN);
}
void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, int height)