...
|
...
|
@@ -64,11 +64,10 @@ static void
|
64
|
64
|
screen_2bpp(Uint8 *layer, Uint8 *addr, Uint16 x1, Uint16 y1, Uint16 color, int fx, int fy)
|
65
|
65
|
{
|
66
|
66
|
int row, w = uxn_screen.width, h = uxn_screen.height, opaque = (color % 5);
|
67
|
|
- Uint8 *ch1 = addr, *ch2 = ch1 + 8;
|
68
|
67
|
Uint16 y, ymod = (fy < 0 ? 7 : 0), ymax = y1 + ymod + fy * 8;
|
69
|
68
|
Uint16 x, xmod = (fx > 0 ? 7 : 0), xmax = x1 + xmod - fx * 8;
|
70
|
69
|
for(y = y1 + ymod; y != ymax; y += fy) {
|
71
|
|
- int c = *ch1++ | (*ch2++ << 8);
|
|
70
|
+ int c = *addr++ | (*(addr + 7) << 8);
|
72
|
71
|
if(y < h)
|
73
|
72
|
for(x = x1 + xmod, row = y * w; x != xmax; x -= fx, c >>= 1) {
|
74
|
73
|
Uint8 ch = (c & 1) | ((c >> 7) & 2);
|
...
|
...
|
@@ -82,11 +81,10 @@ static void
|
82
|
81
|
screen_1bpp(Uint8 *layer, Uint8 *addr, Uint16 x1, Uint16 y1, Uint16 color, int fx, int fy)
|
83
|
82
|
{
|
84
|
83
|
int row, w = uxn_screen.width, h = uxn_screen.height, opaque = (color % 5);
|
85
|
|
- Uint8 *ch1 = addr;
|
86
|
84
|
Uint16 y, ymod = (fy < 0 ? 7 : 0), ymax = y1 + ymod + fy * 8;
|
87
|
85
|
Uint16 x, xmod = (fx > 0 ? 7 : 0), xmax = x1 + xmod - fx * 8;
|
88
|
86
|
for(y = y1 + ymod; y != ymax; y += fy) {
|
89
|
|
- int c = *ch1++;
|
|
87
|
+ int c = *addr++;
|
90
|
88
|
if(y < h)
|
91
|
89
|
for(x = x1 + xmod, row = y * w; x != xmax; x -= fx, c >>= 1) {
|
92
|
90
|
Uint8 ch = c & 1;
|