summaryrefslogtreecommitdiff
path: root/src/blitter
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-05-04 17:12:37 +0000
committerfrosch <frosch@openttd.org>2011-05-04 17:12:37 +0000
commitbbcd2bab5dabc8eb12c1349aac1c3dfa7a6a036d (patch)
tree5d948cd0e875f2e29ecabecb143749b8c6b40ed9 /src/blitter
parentc7a9c7dc927d60df77fe7824ed03f29bd1b29067 (diff)
downloadopenttd-bbcd2bab5dabc8eb12c1349aac1c3dfa7a6a036d.tar.xz
(svn r22419) -Change: Always use the DOS palette for drawing.
-Remove: the '-i' option for palette selection.
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/32bpp_anim.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index 6549ca842..23dbc35c6 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -165,16 +165,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 (PALETTE_ANIM_SIZE_START) is palette animation */
+ /* Above PALETTE_ANIM_START is palette animation */
*anim++ = m;
- *dst++ = (m >= PALETTE_ANIM_SIZE_START) ? this->LookupColourInPalette(m) : src_px->data;
+ *dst++ = (m >= PALETTE_ANIM_START) ? this->LookupColourInPalette(m) : src_px->data;
src_px++;
} while (--n != 0);
} else {
do {
uint m = *src_n++;
*anim++ = m;
- if (m >= PALETTE_ANIM_SIZE_START) {
+ if (m >= PALETTE_ANIM_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);
@@ -299,8 +299,6 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
uint32 *usrc = (uint32 *)src;
uint8 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
- int count = (_use_palette == PAL_DOS) ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN;
-
for (; height > 0; height--) {
/* We need to keep those for palette animation. */
uint32 *dst_pal = dst;
@@ -323,7 +321,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
* palette animation, much cheaper though slightly nastier. */
for (int i = 0; i < width; i++) {
uint colour = *anim_pal;
- if (IsInsideBS(colour, PALETTE_ANIM_SIZE_START, count)) {
+ if (IsInsideBS(colour, PALETTE_ANIM_START, PALETTE_ANIM_SIZE)) {
/* Update this pixel */
*dst_pal = LookupColourInPalette(colour);
}