IEC graph: vertical black line at update position

This commit is contained in:
penfold42 2018-08-03 23:18:44 +10:00
parent 48eaa18163
commit 457293c091

View file

@ -441,9 +441,9 @@ void UpdateScreen()
u32 textColour = COLOUR_BLACK; u32 textColour = COLOUR_BLACK;
u32 bgColour = COLOUR_WHITE; u32 bgColour = COLOUR_WHITE;
RGBA atnColour = COLOUR_YELLOW;
RGBA dataColour = COLOUR_GREEN; RGBA dataColour = COLOUR_GREEN;
RGBA clockColour = COLOUR_CYAN; RGBA clockColour = COLOUR_CYAN;
RGBA atnColour = COLOUR_YELLOW;
RGBA BkColour = FileBrowser::Colour(VIC2_COLOUR_INDEX_BLUE); RGBA BkColour = FileBrowser::Colour(VIC2_COLOUR_INDEX_BLUE);
int height = screen.ScaleY(60); int height = screen.ScaleY(60);
@ -487,6 +487,9 @@ void UpdateScreen()
//refreshUartStatusDisplay = true; //refreshUartStatusDisplay = true;
} }
if (options.GraphIEC())
screen.DrawLineV(graphX, top3, bottom, BkColour);
value = IEC_Bus::GetPI_Atn(); value = IEC_Bus::GetPI_Atn();
if (options.GraphIEC()) if (options.GraphIEC())
{ {
@ -497,7 +500,6 @@ void UpdateScreen()
} }
else else
{ {
screen.DrawLineV(graphX, top3, bottom, BkColour);
if (value) screen.PlotPixel(graphX, top3, atnColour); if (value) screen.PlotPixel(graphX, top3, atnColour);
else screen.PlotPixel(graphX, bottom, atnColour); else screen.PlotPixel(graphX, bottom, atnColour);
} }
@ -520,7 +522,6 @@ void UpdateScreen()
} }
else else
{ {
screen.DrawLineV(graphX, top2, bottom, BkColour);
if (value) screen.PlotPixel(graphX, top2, dataColour); if (value) screen.PlotPixel(graphX, top2, dataColour);
else screen.PlotPixel(graphX, bottom, dataColour); else screen.PlotPixel(graphX, bottom, dataColour);
} }
@ -543,7 +544,6 @@ void UpdateScreen()
} }
else else
{ {
screen.DrawLineV(graphX, top, bottom, BkColour);
if (value) screen.PlotPixel(graphX, top, clockColour); if (value) screen.PlotPixel(graphX, top, clockColour);
else screen.PlotPixel(graphX, bottom, clockColour); else screen.PlotPixel(graphX, bottom, clockColour);
} }
@ -557,6 +557,9 @@ void UpdateScreen()
} }
if (graphX++ > screenWidthM1) graphX = 0; if (graphX++ > screenWidthM1) graphX = 0;
// black vertical line ahead of graph
if (options.GraphIEC())
screen.DrawLineV(graphX, top3, bottom, COLOUR_BLACK);
u32 track = pi1541.drive.Track(); u32 track = pi1541.drive.Track();
if (track != oldTrack) if (track != oldTrack)