diff options
author | Jonathan G Rennison <j.g.rennison@gmail.com> | 2018-05-23 09:55:04 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2018-05-23 09:55:04 +0100 |
commit | 17257b9620a78dc115fadbcfa9a891e5392f09ab (patch) | |
tree | 78ba69e935bebbdc3b4ad9996cdc0059e576bf8f /src/blitter/32bpp_anim_sse4.cpp | |
parent | 306b999cf41307377bebe916048bdfb6fdf8e648 (diff) | |
download | openttd-17257b9620a78dc115fadbcfa9a891e5392f09ab.tar.xz |
Add: 32bpp SSE2 blitter palette animator (#6795)
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter.
See issue #6469.
Diffstat (limited to 'src/blitter/32bpp_anim_sse4.cpp')
-rw-r--r-- | src/blitter/32bpp_anim_sse4.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/blitter/32bpp_anim_sse4.cpp b/src/blitter/32bpp_anim_sse4.cpp index 987cb0c6a..219fb466b 100644 --- a/src/blitter/32bpp_anim_sse4.cpp +++ b/src/blitter/32bpp_anim_sse4.cpp @@ -35,8 +35,7 @@ inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomL { const byte * const remap = bp->remap; Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left; - assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below. - uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left; + uint16 *anim_line = this->anim_buf + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left; int effective_width = bp->width; /* Find where to start reading in the source sprite. */ |