mirror of https://github.com/OpenTTD/OpenTTD
(svn r26248) -Fix (r26223): missed compiler warning (MJP)
parent
a942619911
commit
31c6e33878
|
@ -19,10 +19,6 @@
|
||||||
/** Instantiation of the SSSE3 32bpp blitter factory. */
|
/** Instantiation of the SSSE3 32bpp blitter factory. */
|
||||||
static FBlitter_32bppSSSE3 iFBlitter_32bppSSSE3;
|
static FBlitter_32bppSSSE3 iFBlitter_32bppSSSE3;
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
|
||||||
#endif
|
|
||||||
/**
|
/**
|
||||||
* Draws a sprite to a (screen) buffer. It is templated to allow faster operation.
|
* Draws a sprite to a (screen) buffer. It is templated to allow faster operation.
|
||||||
*
|
*
|
||||||
|
@ -30,6 +26,7 @@ static FBlitter_32bppSSSE3 iFBlitter_32bppSSSE3;
|
||||||
* @param bp further blitting parameters
|
* @param bp further blitting parameters
|
||||||
* @param zoom zoom level at which we are drawing
|
* @param zoom zoom level at which we are drawing
|
||||||
*/
|
*/
|
||||||
|
IGNORE_UNINITIALIZED_WARNING_START
|
||||||
template <BlitterMode mode, Blitter_32bppSSE2::ReadMode read_mode, Blitter_32bppSSE2::BlockType bt_last>
|
template <BlitterMode mode, Blitter_32bppSSE2::ReadMode read_mode, Blitter_32bppSSE2::BlockType bt_last>
|
||||||
inline void Blitter_32bppSSSE3::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
inline void Blitter_32bppSSSE3::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +34,7 @@ inline void Blitter_32bppSSSE3::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||||
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left;
|
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left;
|
||||||
int effective_width = bp->width;
|
int effective_width = bp->width;
|
||||||
|
|
||||||
/* Find where to start reading in the source sprite */
|
/* Find where to start reading in the source sprite. */
|
||||||
const SpriteData * const sd = (const SpriteData *) bp->sprite;
|
const SpriteData * const sd = (const SpriteData *) bp->sprite;
|
||||||
const SpriteInfo * const si = &sd->infos[zoom];
|
const SpriteInfo * const si = &sd->infos[zoom];
|
||||||
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
||||||
|
@ -100,6 +97,7 @@ inline void Blitter_32bppSSSE3::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case BM_COLOUR_REMAP: {
|
case BM_COLOUR_REMAP: {
|
||||||
switch (read_mode) {
|
switch (read_mode) {
|
||||||
case RM_WITH_MARGIN: {
|
case RM_WITH_MARGIN: {
|
||||||
|
@ -229,9 +227,7 @@ bmcr_alpha_blend_single:
|
||||||
dst_line += bp->pitch;
|
dst_line += bp->pitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(__GNUC__)
|
IGNORE_UNINITIALIZED_WARNING_STOP
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a sprite to a (screen) buffer. Calls adequate templated function.
|
* Draws a sprite to a (screen) buffer. Calls adequate templated function.
|
||||||
|
|
Loading…
Reference in New Issue