Skip to content

Commit

Permalink
GRAPHICS: Replace PNG_HEADER macro with MKTAG
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzie committed Apr 14, 2011
1 parent f035c26 commit 2ac86f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions graphics/png.cpp
Expand Up @@ -99,8 +99,6 @@ enum PNGFilters {
kFilterPaeth = 4
};

#define PNG_HEADER(a, b, c, d) CONSTANT_LE_32(d | (c << 8) | (b << 16) | (a << 24))

PNG::PNG() : _compressedBuffer(0), _compressedBufferSize(0),
_unfilteredSurface(0), _transparentColorSpecified(false) {
}
Expand Down Expand Up @@ -200,11 +198,11 @@ bool PNG::read(Common::SeekableReadStream *str) {
_stream = str;

// First, check the PNG signature
if (_stream->readUint32BE() != PNG_HEADER(0x89, 0x50, 0x4e, 0x47)) {
if (_stream->readUint32BE() != MKTAG(0x89, 0x50, 0x4e, 0x47)) {
delete _stream;
return false;
}
if (_stream->readUint32BE() != PNG_HEADER(0x0d, 0x0a, 0x1a, 0x0a)) {
if (_stream->readUint32BE() != MKTAG(0x0d, 0x0a, 0x1a, 0x0a)) {
delete _stream;
return false;
}
Expand Down

0 comments on commit 2ac86f8

Please sign in to comment.