aboutsummaryrefslogtreecommitdiff
path: root/image/png.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'image/png.cpp')
-rw-r--r--image/png.cpp12
1 files changed, 3 insertions, 9 deletions
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()));