diff --git a/Base/include/Image.h b/Base/include/Image.h index f7b97fc..1cddb8b 100644 --- a/Base/include/Image.h +++ b/Base/include/Image.h @@ -87,8 +87,8 @@ namespace FasTC { template void ConvertTo(Image &other) const { - for(uint32 j = 0; j < other.GetWidth(); j++) { - for(uint32 i = 0; i < other.GetHeight(); i++) { + for(uint32 j = 0; j < other.GetHeight(); j++) { + for(uint32 i = 0; i < other.GetWidth(); i++) { other(i, j).Unpack((*this)(i, j).Pack()); } } diff --git a/ETCEncoder/src/Decompressor.cpp b/ETCEncoder/src/Decompressor.cpp index f99fede..92c8b93 100644 --- a/ETCEncoder/src/Decompressor.cpp +++ b/ETCEncoder/src/Decompressor.cpp @@ -60,8 +60,8 @@ namespace ETCC { uint32 blocksX = cj.Width() / 4; uint32 blocksY = cj.Height() / 4; - for(uint32 j = 0; j < blocksX; j++) { - for(uint32 i = 0; i < blocksY; i++) { + for(uint32 j = 0; j < blocksY; j++) { + for(uint32 i = 0; i < blocksX; i++) { uint32 pixels[16]; uint32 blockIdx = j*blocksX + i; rg_etc1::unpack_etc1_block(cj.InBuf() + blockIdx * 8, pixels); diff --git a/IO/src/ImageLoaderKTX.cpp b/IO/src/ImageLoaderKTX.cpp index 55de436..d1f1bd0 100644 --- a/IO/src/ImageLoaderKTX.cpp +++ b/IO/src/ImageLoaderKTX.cpp @@ -103,6 +103,7 @@ class IntLoader { class BigEndianIntLoader : public IntLoader { public: + BigEndianIntLoader() { } virtual uint32 ReadInt(const uint8 *data) const { uint32 ret = 0; ret |= data[0]; @@ -117,10 +118,11 @@ static const BigEndianIntLoader gBEldr; class LittleEndianIntLoader : public IntLoader { public: + LittleEndianIntLoader() { } virtual uint32 ReadInt(const uint8 *data) const { uint32 ret = 0; ret |= data[3]; - for(uint32 i = 3; i >= 0; i--) { + for(int32 i = 3; i >= 0; i--) { ret <<= 8; ret |= data[i]; }