aboutsummaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
Diffstat (limited to 'image')
-rw-r--r--image/bmp.cpp15
-rw-r--r--image/bmp.h5
-rw-r--r--image/png.cpp12
-rw-r--r--image/png.h5
4 files changed, 9 insertions, 28 deletions
diff --git a/image/bmp.cpp b/image/bmp.cpp
index bd3381d26c..6d69094eeb 100644
--- a/image/bmp.cpp
+++ b/image/bmp.cpp
@@ -132,7 +132,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
return true;
}
-bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp) {
+bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input) {
#ifdef SCUMM_LITTLE_ENDIAN
const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 16, 8, 0, 0);
#else
@@ -170,16 +170,9 @@ bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input, const bo
out.writeUint32LE(0);
- if (bottomUp) {
- for (uint y = 0; y < surface->h; ++y) {
- out.write((const void *)surface->getBasePtr(0, y), dstPitch);
- out.write(&padding, extraDataLength);
- }
- } else {
- for (uint y = surface->h; y-- > 0;) {
- out.write((const void *)surface->getBasePtr(0, y), dstPitch);
- out.write(&padding, extraDataLength);
- }
+ for (uint y = surface->h; y-- > 0;) {
+ out.write((const void *)surface->getBasePtr(0, y), dstPitch);
+ out.write(&padding, extraDataLength);
}
// free tmp surface
diff --git a/image/bmp.h b/image/bmp.h
index a23f1e0978..2b7d6fb83f 100644
--- a/image/bmp.h
+++ b/image/bmp.h
@@ -69,11 +69,8 @@ private:
/**
* Outputs an uncompressed BMP stream of the given input surface.
- *
- * @param bottomUp Flip the vertical axis so pixel data is drawn from the
- * bottom up, instead of from the top down.
*/
-bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp = false);
+bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input);
} // End of namespace Image
diff --git a/image/png.cpp b/image/png.cpp
index 9532840f2f..1072d41a18 100644
--- a/image/png.cpp
+++ b/image/png.cpp
@@ -255,7 +255,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {
#endif
}
-bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp) {
+bool writePNG(Common::WriteStream &out, const Graphics::Surface &input) {
#ifdef USE_PNG
#ifdef SCUMM_LITTLE_ENDIAN
const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 0, 8, 16, 0);
@@ -300,14 +300,8 @@ bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bo
Common::Array<const uint8 *> rows;
rows.reserve(surface->h);
- if (bottomUp) {
- for (uint y = surface->h; y-- > 0;) {
- rows.push_back((const uint8 *)surface->getBasePtr(0, y));
- }
- } else {
- for (uint y = 0; y < surface->h; ++y) {
- rows.push_back((const uint8 *)surface->getBasePtr(0, y));
- }
+ for (uint y = 0; y < surface->h; ++y) {
+ rows.push_back((const uint8 *)surface->getBasePtr(0, y));
}
png_set_rows(pngPtr, infoPtr, const_cast<uint8 **>(&rows.front()));
diff --git a/image/png.h b/image/png.h
index f983da467e..1402976963 100644
--- a/image/png.h
+++ b/image/png.h
@@ -78,11 +78,8 @@ private:
/**
* Outputs a compressed PNG stream of the given input surface.
- *
- * @param bottomUp Flip the vertical axis so pixel data is drawn from the
- * bottom up, instead of from the top down.
*/
-bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp = false);
+bool writePNG(Common::WriteStream &out, const Graphics::Surface &input);
} // End of namespace Image