summaryrefslogtreecommitdiff
path: root/src/gfx.c
diff options
context:
space:
mode:
authortwinaphex2015-11-10 04:30:51 +0100
committertwinaphex2015-11-10 04:30:51 +0100
commit741516b02c03c7af9fe2ec303edf0ccaccfd39a8 (patch)
tree99bc8929fa5340664e042fbcfb19b7d6d61f008c /src/gfx.c
parentbed2a54f68865abcd6630b5514dce9ba06d9e4b0 (diff)
downloadsnes9x2002-741516b02c03c7af9fe2ec303edf0ccaccfd39a8.tar.gz
snes9x2002-741516b02c03c7af9fe2ec303edf0ccaccfd39a8.tar.bz2
snes9x2002-741516b02c03c7af9fe2ec303edf0ccaccfd39a8.zip
Use MSB_FIRST
Diffstat (limited to 'src/gfx.c')
-rw-r--r--src/gfx.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/gfx.c b/src/gfx.c
index b37dd24..5f27b25 100644
--- a/src/gfx.c
+++ b/src/gfx.c
@@ -259,24 +259,7 @@ bool8_32 S9xGraphicsInit()
register uint32 h = 0;
register uint32 l = 0;
-#if defined(LSB_FIRST)
- if (i & 8)
- h |= PixelOdd;
- if (i & 4)
- h |= PixelOdd << 8;
- if (i & 2)
- h |= PixelOdd << 16;
- if (i & 1)
- h |= PixelOdd << 24;
- if (i & 8)
- l |= PixelOdd;
- if (i & 4)
- l |= PixelOdd << 8;
- if (i & 2)
- l |= PixelOdd << 16;
- if (i & 1)
- l |= PixelOdd << 24;
-#else
+#if defined(MSB_FIRST)
if (i & 8)
h |= (PixelOdd << 24);
if (i & 4)
@@ -293,30 +276,30 @@ bool8_32 S9xGraphicsInit()
l |= (PixelOdd << 8);
if (i & 1)
l |= PixelOdd;
-#endif
-
- odd_high[bitshift][i] = h;
- odd_low[bitshift][i] = l;
- h = l = 0;
-
-#if defined(LSB_FIRST)
+#else
if (i & 8)
- h |= PixelEven;
+ h |= PixelOdd;
if (i & 4)
- h |= PixelEven << 8;
+ h |= PixelOdd << 8;
if (i & 2)
- h |= PixelEven << 16;
+ h |= PixelOdd << 16;
if (i & 1)
- h |= PixelEven << 24;
+ h |= PixelOdd << 24;
if (i & 8)
- l |= PixelEven;
+ l |= PixelOdd;
if (i & 4)
- l |= PixelEven << 8;
+ l |= PixelOdd << 8;
if (i & 2)
- l |= PixelEven << 16;
+ l |= PixelOdd << 16;
if (i & 1)
- l |= PixelEven << 24;
-#else
+ l |= PixelOdd << 24;
+#endif
+
+ odd_high[bitshift][i] = h;
+ odd_low[bitshift][i] = l;
+ h = l = 0;
+
+#if defined(MSB_FIRST)
if (i & 8)
h |= (PixelEven << 24);
if (i & 4)
@@ -333,6 +316,23 @@ bool8_32 S9xGraphicsInit()
l |= (PixelEven << 8);
if (i & 1)
l |= PixelEven;
+#else
+ if (i & 8)
+ h |= PixelEven;
+ if (i & 4)
+ h |= PixelEven << 8;
+ if (i & 2)
+ h |= PixelEven << 16;
+ if (i & 1)
+ h |= PixelEven << 24;
+ if (i & 8)
+ l |= PixelEven;
+ if (i & 4)
+ l |= PixelEven << 8;
+ if (i & 2)
+ l |= PixelEven << 16;
+ if (i & 1)
+ l |= PixelEven << 24;
#endif
even_high[bitshift][i] = h;