diff --git a/project/src/renderer/software/BitmapFill.h b/project/src/renderer/software/BitmapFill.h index ad10b76a5a..1c2497829b 100644 --- a/project/src/renderer/software/BitmapFill.h +++ b/project/src/renderer/software/BitmapFill.h @@ -208,7 +208,12 @@ class BitmapFillerBase : public Filler } } - mMapper.Translate(0.5,0.5); + if (mBitmap->smooth) + { + // map from pixel centers? this breaks nearest-neighbor mapping badly. + // not sure if mBitmap->smooth is the right thing to switch this on/off. + mMapper.Translate(0.5,0.5); + } if (!mPerspective || inComponents<3) { diff --git a/project/src/renderer/software/TileRenderer.cpp b/project/src/renderer/software/TileRenderer.cpp index 6c6c098bfc..7b2ce87ed8 100644 --- a/project/src/renderer/software/TileRenderer.cpp +++ b/project/src/renderer/software/TileRenderer.cpp @@ -238,8 +238,8 @@ class TileRenderer : public Renderer SpanRect *span = new SpanRect(alpha_rect,aa); for(int i=0;i<4;i++) span->Line00( - Fixed10( p[i].x + 0.5 , p[i].y + 0.5 ), - Fixed10( p[(i+1)&3].x + 0.5 , p[(i+1)&3].y + 0.5 ) ); + Fixed10( p[i].x , p[i].y ), + Fixed10( p[(i+1)&3].x , p[(i+1)&3].y ) ); AlphaMask *alpha = span->CreateMask(inState.mTransform,tile_alpha); delete span;