From f5e0de5bbcf223827a6ebc5f239191aff8fada09 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Mon, 19 Mar 2018 19:02:46 -0500 Subject: [PATCH] Reverting to just black/white color for now Only while I work on some other issues with disk loading --- include/apple2.hires.h | 6 +----- src/apple2.hires.c | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/apple2.hires.h b/include/apple2.hires.h index 1197463..0042bb8 100644 --- a/include/apple2.hires.h +++ b/include/apple2.hires.h @@ -4,10 +4,6 @@ #include "apple2.h" #include "vm_bits.h" -extern vm_color apple2_hires_color_h0(vm_8bit); -extern vm_color apple2_hires_color_h1(vm_8bit); -extern void apple2_hires_draw(apple2 *, size_t); -extern int apple2_hires_row(size_t); -extern int apple2_hires_col(size_t); +extern void apple2_hires_draw(apple2 *, int); #endif diff --git a/src/apple2.hires.c b/src/apple2.hires.c index 31dd160..476655b 100644 --- a/src/apple2.hires.c +++ b/src/apple2.hires.c @@ -663,14 +663,25 @@ apple2_hires_draw(apple2 *mach, int row) curr = dots[i] & 1; next = (i < 279) ? (dots[i+1] & 1) : 0; - // Do we need to emit a white color? - if (prev & curr & next) { + if (curr) { vm_screen_set_color(mach->screen, colors[HIRES_WHITE]); + } else { + vm_screen_set_color(mach->screen, colors[HIRES_BLACK]); + } + +#if 0 + // Do we need to emit a white color? + if ((prev & curr) || (curr & next)) { + vm_screen_set_color(mach->screen, colors[HIRES_WHITE]); + } + + else if (!(prev & curr) || !(curr & next)) { + vm_screen_set_color(mach->screen, colors[HIRES_BLACK]); } // We need to emit _some_ color, but not white. - else if (prev | curr | next) { - int colorindex = (i % 2 == 0) ? 1 : 0; + else /*if (prev | curr | next)*/ { + int colorindex = (i % 2 == 0) ? 0 : 1; if (!curr) { colorindex = !colorindex; @@ -686,11 +697,7 @@ apple2_hires_draw(apple2 *mach, int row) vm_screen_set_color(mach->screen, colors[colorindex]); } - - // We should emit no color (which is to say, emit black) - else { - vm_screen_set_color(mach->screen, colors[HIRES_BLACK]); - } +#endif area.xoff = i; vm_screen_draw_rect(mach->screen, &area);