aboutsummaryrefslogtreecommitdiff
path: root/source/gfx.c
diff options
context:
space:
mode:
authortwinaphex2014-12-15 00:59:52 +0100
committertwinaphex2014-12-15 00:59:52 +0100
commit6b8c7d2376bb04578dec209eeafc037c33a32d45 (patch)
tree01e95a3b8e66ea12004d20a667f3f3eff45b5107 /source/gfx.c
parentb27c451831082179cc9bc3c1b3424ebb0f66dd74 (diff)
downloadsnes9x2005-6b8c7d2376bb04578dec209eeafc037c33a32d45.tar.gz
snes9x2005-6b8c7d2376bb04578dec209eeafc037c33a32d45.tar.bz2
snes9x2005-6b8c7d2376bb04578dec209eeafc037c33a32d45.zip
Use MSB_FIRST instead of LSB_FIRST
Diffstat (limited to 'source/gfx.c')
-rw-r--r--source/gfx.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/source/gfx.c b/source/gfx.c
index 6c86ba5..2cd7584 100644
--- a/source/gfx.c
+++ b/source/gfx.c
@@ -268,24 +268,7 @@ bool S9xInitGFX()
register uint32_t h = 0;
register uint32_t 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)
@@ -302,30 +285,30 @@ bool S9xInitGFX()
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)
@@ -342,6 +325,23 @@ bool S9xInitGFX()
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;