| @@ -326,8 +326,6 @@ static inline void render_bg_scanline_area( | |||||
| static void render_bg_scanline(const nes_ppu* ppu, int scanline, | static void render_bg_scanline(const nes_ppu* ppu, int scanline, | ||||
| uint8_t* dst) { | uint8_t* dst) { | ||||
| // TODO: Handle column 0 flag | |||||
| int page = (ppu->control & ppu_Control_Nametable_Mask); | int page = (ppu->control & ppu_Control_Nametable_Mask); | ||||
| int x = ppu->scroll_x; | int x = ppu->scroll_x; | ||||
| int y = ppu->scroll_y + scanline; | int y = ppu->scroll_y + scanline; | ||||
| @@ -338,8 +336,16 @@ static void render_bg_scanline(const nes_ppu* ppu, int scanline, | |||||
| } | } | ||||
| int w = (nes_ppu_render_w - x); | int w = (nes_ppu_render_w - x); | ||||
| if (!(ppu->mask & ppu_Mask_Left_Back)) { | |||||
| // Handle column 0 flag - need to fill with transparency | |||||
| memset(dst, 0xFFU, 8); | |||||
| w -= 8; | |||||
| x += 8; | |||||
| dst += 8; | |||||
| } | |||||
| render_bg_scanline_area(ppu, page, dst, x, y, w); | render_bg_scanline_area(ppu, page, dst, x, y, w); | ||||
| render_bg_scanline_area(ppu, page ^ 1, dst + w, 0, y, x); | |||||
| render_bg_scanline_area(ppu, page ^ 1, dst + w, 0, y, | |||||
| nes_ppu_render_w - w); | |||||
| } | } | ||||
| /* | /* | ||||