mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-06-07 11:35:05 +02:00
Compare commits
2 commits
c2cc3e48f2
...
fa9c225c99
Author | SHA1 | Date | |
---|---|---|---|
|
fa9c225c99 | ||
|
0950c9d29f |
1 changed files with 24 additions and 19 deletions
|
@ -15,12 +15,17 @@ void gint_dhline(int x1, int x2, int y, int color)
|
||||||
int offset = DWIDTH * y;
|
int offset = DWIDTH * y;
|
||||||
|
|
||||||
/* Use longwords to do the copy, but first paint the endpoints to heed
|
/* Use longwords to do the copy, but first paint the endpoints to heed
|
||||||
for odd x1 and x2. Checking the parity may be a waste of time. */
|
for odd x1 and x2. Checking the parity may be a waste of time for
|
||||||
|
"real" color, but must be checked when C_INVERT in involved to
|
||||||
|
avoid "cancelling" invert effect with potential overdraw of the
|
||||||
|
next operation. */
|
||||||
if (color != C_INVERT) {
|
if (color != C_INVERT) {
|
||||||
gint_vram[offset + x1] = color;
|
gint_vram[offset + x1] = color;
|
||||||
gint_vram[offset + x2] = color;
|
gint_vram[offset + x2] = color;
|
||||||
} else {
|
} else {
|
||||||
|
if (x1 & 1)
|
||||||
gint_vram[offset + x1] ^= 0xffff;
|
gint_vram[offset + x1] ^= 0xffff;
|
||||||
|
if (x2 & 1)
|
||||||
gint_vram[offset + x2] ^= 0xffff;
|
gint_vram[offset + x2] ^= 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue