object rendering... such a dumb mistake lolz

This commit is contained in:
Alex Janka 2023-02-08 09:15:47 +11:00
parent 30cbe63090
commit 72bdc2212b

View file

@ -376,7 +376,7 @@ impl CPU {
let lsb = get_bit(lsbs, x_addr);
let msb = get_bit(msbs, x_addr);
let colour = bits_to_mapped_colour(lsb, msb, object.flags.palette);
let x_coord = (object.x as usize * 8) + (px_x as usize);
let x_coord = (object.x as usize) + (px_x as usize);
if x_coord < WIDTH {
self.gpu.buffer[(scanline as usize * WIDTH) + x_coord] = colour.to_rgb();
}