summaryrefslogtreecommitdiff
path: root/src/blitter
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-22 23:15:27 +0000
committersmatz <smatz@openttd.org>2009-06-22 23:15:27 +0000
commitd703f0c3b527f1c1f324875762293929c6fbb932 (patch)
treeff1d89bd4abc675ae5dfe258ec16363ac529b920 /src/blitter
parent4f0e62deb63afa2019c0e2d1d2ea4ca552743998 (diff)
downloadopenttd-d703f0c3b527f1c1f324875762293929c6fbb932.tar.xz
(svn r16628) -Codechange: remove one gcc2 hack
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/32bpp_anim.cpp4
-rw-r--r--src/blitter/32bpp_base.hpp2
-rw-r--r--src/blitter/32bpp_optimized.cpp6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index 8dbcb0043..1c72a1382 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -97,7 +97,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
uint m = *src_n;
/* In case the m-channel is zero, do not remap this pixel in any way */
if (m == 0) {
- *dst = *src_px;
+ *dst = src_px->data;
*anim = 0;
} else {
uint r = remap[m];
@@ -161,7 +161,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
uint m = *src_n++;
/* Above 217 (PALETTE_ANIM_SIZE_START) is palette animation */
*anim++ = m;
- *dst++ = (m >= PALETTE_ANIM_SIZE_START) ? this->LookupColourInPalette(m) : *src_px;
+ *dst++ = (m >= PALETTE_ANIM_SIZE_START) ? this->LookupColourInPalette(m) : src_px->data;
src_px++;
} while (--n != 0);
} else {
diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp
index 2b21d4607..236b902ef 100644
--- a/src/blitter/32bpp_base.hpp
+++ b/src/blitter/32bpp_base.hpp
@@ -41,7 +41,7 @@ public:
*/
static inline uint32 LookupColourInPalette(uint index)
{
- return _cur_palette[index];
+ return _cur_palette[index].data;
}
/**
diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp
index ae360c99b..d4827e788 100644
--- a/src/blitter/32bpp_optimized.cpp
+++ b/src/blitter/32bpp_optimized.cpp
@@ -110,7 +110,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
uint m = *src_n;
/* In case the m-channel is zero, do not remap this pixel in any way */
if (m == 0) {
- *dst = *src_px;
+ *dst = src_px->data;
} else {
uint r = remap[m];
if (r != 0) *dst = this->LookupColourInPalette(r);
@@ -162,7 +162,9 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
/* faster than memcpy(), n is usually low */
src_n += n;
do {
- *dst++ = *src_px++;
+ *dst = src_px->data;
+ dst++;
+ src_px++;
} while (--n != 0);
} else {
src_n += n;