mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-29 09:13:01 +00:00
Removed extra variable
This commit is contained in:
parent
6ba21f8470
commit
163d48ec34
1 changed files with 4 additions and 6 deletions
|
@ -271,7 +271,6 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
|
||||||
Uint8 twobpp = !!(ctrl & 0x80);
|
Uint8 twobpp = !!(ctrl & 0x80);
|
||||||
Uint8 color = ctrl & 0xf;
|
Uint8 color = ctrl & 0xf;
|
||||||
Uint8 *layer = ctrl & 0x40 ? uxn_screen.fg : uxn_screen.bg;
|
Uint8 *layer = ctrl & 0x40 ? uxn_screen.fg : uxn_screen.bg;
|
||||||
Uint16 addr = rA;
|
|
||||||
int fx = ctrl & 0x10 ? -1 : 1;
|
int fx = ctrl & 0x10 ? -1 : 1;
|
||||||
int fy = ctrl & 0x20 ? -1 : 1;
|
int fy = ctrl & 0x20 ? -1 : 1;
|
||||||
dx = (move & 0x1) << 3, dxy = dx * fy;
|
dx = (move & 0x1) << 3, dxy = dx * fy;
|
||||||
|
@ -279,19 +278,18 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
|
||||||
addr_incr = (move & 0x4) << (1 + twobpp);
|
addr_incr = (move & 0x4) << (1 + twobpp);
|
||||||
if(twobpp) {
|
if(twobpp) {
|
||||||
for(i = 0; i <= length; i++) {
|
for(i = 0; i <= length; i++) {
|
||||||
screen_2bpp(layer, &ram[addr], rX + dyx * i, rY + dxy * i, color, fx, fy);
|
screen_2bpp(layer, &ram[rA], rX + dyx * i, rY + dxy * i, color, fx, fy);
|
||||||
addr += addr_incr;
|
rA += addr_incr;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(i = 0; i <= length; i++) {
|
for(i = 0; i <= length; i++) {
|
||||||
screen_1bpp(layer, &ram[addr], rX + dyx * i, rY + dxy * i, color, fx, fy);
|
screen_1bpp(layer, &ram[rA], rX + dyx * i, rY + dxy * i, color, fx, fy);
|
||||||
addr += addr_incr;
|
rA += addr_incr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
screen_change(rX, rY, rX + dyx * length + 8, rY + dxy * length + 8);
|
screen_change(rX, rY, rX + dyx * length + 8, rY + dxy * length + 8);
|
||||||
if(move & 0x1) rX += dx * fx;
|
if(move & 0x1) rX += dx * fx;
|
||||||
if(move & 0x2) rY += dy * fy;
|
if(move & 0x2) rY += dy * fy;
|
||||||
if(move & 0x4) rA = addr; /* auto addr+length */
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue