From a4a4f2665d38bea29c746838a0572f30be8e4f62 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 12 Sep 2017 14:56:08 -0700 Subject: [PATCH] Compile fix --- project/include/math/color/RGBA.h | 6 ++-- project/include/system/Endian.h | 4 +-- project/src/graphics/utils/ImageDataUtil.cpp | 38 ++++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/project/include/math/color/RGBA.h b/project/include/math/color/RGBA.h index 3c3fb46fa..eb0cece75 100644 --- a/project/include/math/color/RGBA.h +++ b/project/include/math/color/RGBA.h @@ -117,7 +117,7 @@ namespace lime { case BGRA32: - if (endian == LITTLE_ENDIAN) + if (endian == LIME_LITTLE_ENDIAN) Set (data[offset + 1], data[offset + 2], data[offset + 3], data[offset]); else Set (data[offset + 2], data[offset + 1], data[offset], data[offset + 3]); @@ -125,7 +125,7 @@ namespace lime { case RGBA32: - if (endian == LITTLE_ENDIAN) + if (endian == LIME_LITTLE_ENDIAN) Set (data[offset + 3], data[offset + 2], data[offset + 1], data[offset]); else Set (data[offset], data[offset + 1], data[offset + 2], data[offset + 3]); @@ -133,7 +133,7 @@ namespace lime { case ARGB32: - if (endian == LITTLE_ENDIAN) + if (endian == LIME_LITTLE_ENDIAN) Set (data[offset + 2], data[offset + 1], data[offset], data[offset + 3]); else Set (data[offset + 1], data[offset + 2], data[offset + 3], data[offset]); diff --git a/project/include/system/Endian.h b/project/include/system/Endian.h index 48d2b5f79..7a879f2a6 100644 --- a/project/include/system/Endian.h +++ b/project/include/system/Endian.h @@ -7,8 +7,8 @@ namespace lime { enum Endian { - LITTLE_ENDIAN, - BIG_ENDIAN + LIME_LITTLE_ENDIAN, + LIME_BIG_ENDIAN }; diff --git a/project/src/graphics/utils/ImageDataUtil.cpp b/project/src/graphics/utils/ImageDataUtil.cpp index 3bd348247..86b88c3a8 100644 --- a/project/src/graphics/utils/ImageDataUtil.cpp +++ b/project/src/graphics/utils/ImageDataUtil.cpp @@ -37,7 +37,7 @@ namespace lime { offset = row + (x * 4); - pixel.ReadUInt8 (data, offset, format, premultiplied, BIG_ENDIAN); + pixel.ReadUInt8 (data, offset, format, premultiplied, LIME_BIG_ENDIAN); pixel.Set (redTable[pixel.r], greenTable[pixel.g], blueTable[pixel.b], alphaTable[pixel.a]); pixel.WriteUInt8 (data, offset, format, premultiplied); @@ -73,8 +73,8 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - srcPixel.ReadUInt8 (srcData, srcPosition, srcFormat, srcPremultiplied, BIG_ENDIAN); - destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, BIG_ENDIAN); + srcPixel.ReadUInt8 (srcData, srcPosition, srcFormat, srcPremultiplied, LIME_BIG_ENDIAN); + destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, LIME_BIG_ENDIAN); switch (srcChannel) { @@ -143,8 +143,8 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, BIG_ENDIAN); - destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, BIG_ENDIAN); + sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, LIME_BIG_ENDIAN); + destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, LIME_BIG_ENDIAN); sourceAlpha = sourcePixel.a / 255.0; destAlpha = destPixel.a / 255.0; @@ -193,7 +193,7 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, BIG_ENDIAN); + sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, LIME_BIG_ENDIAN); sourcePixel.WriteUInt8 (destData, destPosition, destFormat, destPremultiplied); sourcePosition += 4; @@ -226,9 +226,9 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, BIG_ENDIAN); - destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, BIG_ENDIAN); - alphaPixel.ReadUInt8 (alphaData, alphaPosition, alphaFormat, false, BIG_ENDIAN); + sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, LIME_BIG_ENDIAN); + destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, LIME_BIG_ENDIAN); + alphaPixel.ReadUInt8 (alphaData, alphaPosition, alphaFormat, false, LIME_BIG_ENDIAN); sourceAlpha = (alphaPixel.a / 255.0) * (sourcePixel.a / 255.0); @@ -265,8 +265,8 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, BIG_ENDIAN); - alphaPixel.ReadUInt8 (alphaData, alphaPosition, alphaFormat, false, BIG_ENDIAN); + sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, LIME_BIG_ENDIAN); + alphaPixel.ReadUInt8 (alphaData, alphaPosition, alphaFormat, false, LIME_BIG_ENDIAN); sourcePixel.a = int (0.5 + (sourcePixel.a * (alphaPixel.a / 255.0))); sourcePixel.WriteUInt8 (destData, destPosition, destFormat, destPremultiplied); @@ -336,7 +336,7 @@ namespace lime { if (premultiplied) fillColor.MultiplyAlpha (); RGBA hitColor; - hitColor.ReadUInt8 (data, ((y + image->offsetY) * (image->buffer->width * 4)) + ((x + image->offsetX) * 4), format, premultiplied, BIG_ENDIAN); + hitColor.ReadUInt8 (data, ((y + image->offsetY) * (image->buffer->width * 4)) + ((x + image->offsetX) * 4), format, premultiplied, LIME_BIG_ENDIAN); if (!image->buffer->transparent) { @@ -379,7 +379,7 @@ namespace lime { } nextPointOffset = (nextPointY * image->width + nextPointX) * 4; - readColor.ReadUInt8 (data, nextPointOffset, format, premultiplied, BIG_ENDIAN); + readColor.ReadUInt8 (data, nextPointOffset, format, premultiplied, LIME_BIG_ENDIAN); if (readColor == hitColor) { @@ -418,7 +418,7 @@ namespace lime { for (int x = 0; x < dataView.width; x++) { - pixel.ReadUInt8 (data, position, sourceFormat, premultiplied, BIG_ENDIAN); + pixel.ReadUInt8 (data, position, sourceFormat, premultiplied, LIME_BIG_ENDIAN); pixel.WriteUInt8 (destData, destPosition, format, false); position += 4; @@ -454,8 +454,8 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, BIG_ENDIAN); - destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, BIG_ENDIAN); + sourcePixel.ReadUInt8 (sourceData, sourcePosition, sourceFormat, sourcePremultiplied, LIME_BIG_ENDIAN); + destPixel.ReadUInt8 (destData, destPosition, destFormat, destPremultiplied, LIME_BIG_ENDIAN); destPixel.r = int (((sourcePixel.r * redMultiplier) + (destPixel.r * (256 - redMultiplier))) / 256); destPixel.g = int (((sourcePixel.g * greenMultiplier) + (destPixel.g * (256 - greenMultiplier))) / 256); @@ -483,7 +483,7 @@ namespace lime { for (int i = 0; i < length; i++) { - pixel.ReadUInt8 (data, i * 4, format, false, BIG_ENDIAN); + pixel.ReadUInt8 (data, i * 4, format, false, LIME_BIG_ENDIAN); pixel.WriteUInt8 (data, i * 4, format, true); } @@ -750,7 +750,7 @@ namespace lime { for (int x = 0; x < destView.width; x++) { - srcPixel.ReadUInt8 (srcData, srcPosition, srcFormat, srcPremultiplied, BIG_ENDIAN); + srcPixel.ReadUInt8 (srcData, srcPosition, srcFormat, srcPremultiplied, LIME_BIG_ENDIAN); pixelMask = srcPixel.Get () & mask; @@ -799,7 +799,7 @@ namespace lime { for (int i = 0; i < length; i++) { - pixel.ReadUInt8 (data, i * 4, format, true, BIG_ENDIAN); + pixel.ReadUInt8 (data, i * 4, format, true, LIME_BIG_ENDIAN); pixel.WriteUInt8 (data, i * 4, format, false); }