diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-02-21 20:43:22 +0000 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-02-21 20:43:22 +0000 |
commit | e890e8177d4b95793f9d18073ccc39cd31c456a5 (patch) | |
tree | 3aec25f8ab5e6a0cc8386f977706466601de2c8c | |
parent | fca3078db2ccba41e2c435d6b66375b54877e699 (diff) | |
download | fbtest-e890e8177d4b95793f9d18073ccc39cd31c456a5.tar.gz |
Fix brown paper bag bug in Atari interleaved bitplanes code
-rw-r--r-- | drawops/iplan2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drawops/iplan2.c b/drawops/iplan2.c index e02006e..90dcb39 100644 --- a/drawops/iplan2.c +++ b/drawops/iplan2.c @@ -32,7 +32,7 @@ static int iplan2_init(void) static void iplan2_setpixel(u32 x, u32 y, pixel_t pixel) { - u16 *p = (u16 *)(screen+y*next_line+fb_var.bits_per_pixel*(x & -16)); + u16 *p = (u16 *)(screen+y*next_line+fb_var.bits_per_pixel*(x/16*2)); u16 mask = 0x8000 >> (x & 15); int i = fb_var.bits_per_pixel; while (1) { @@ -49,7 +49,7 @@ static void iplan2_setpixel(u32 x, u32 y, pixel_t pixel) static pixel_t iplan2_getpixel(u32 x, u32 y) { pixel_t pixel = 0, bit = 1; - u16 *p = (u16 *)(screen+y*next_line+fb_var.bits_per_pixel*(x & -16)); + u16 *p = (u16 *)(screen+y*next_line+fb_var.bits_per_pixel*(x/16*2)); u16 mask = 0x8000 >> (x & 15); int i = fb_var.bits_per_pixel; while (1) { |