Debugger: added & used consts for video-scanner info

This commit is contained in:
tomcw 2019-09-22 15:28:10 +01:00
parent 7261c79054
commit b5b1deeead
3 changed files with 17 additions and 7 deletions

View File

@ -126,7 +126,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
W8, // FG_SOURCE_TITLE
W2, // BG_SOURCE_1 // C2 W2 for "Paper Look"
W3, // BG_SOURCE_2
W8 // FG_SOURCE
W8, // FG_SOURCE
C3, // BG_VIDEOSCANNER_TITLE
W8, // FG_VIDEOSCANNER_TITLE
R8, // FG_VIDEOSCANNER_INVISIBLE
G8, // FG_VIDEOSCANNER_VISIBLE
};

View File

@ -122,6 +122,11 @@
, BG_SOURCE_2 // even
, FG_SOURCE
, BG_VIDEOSCANNER_TITLE
, FG_VIDEOSCANNER_TITLE
, FG_VIDEOSCANNER_INVISIBLE // red
, FG_VIDEOSCANNER_VISIBLE // green
, NUM_DEBUG_COLORS
};

View File

@ -3673,7 +3673,7 @@ void DrawVideoScannerValue(int line, LPCTSTR name, int nValue, bool isVisible)
if (!((g_iWindowThis == WINDOW_CODE) || ((g_iWindowThis == WINDOW_DATA))))
return;
int nFontWidth = g_aFontConfig[FONT_INFO]._nFontWidthAvg;
const int nFontWidth = g_aFontConfig[FONT_INFO]._nFontWidthAvg;
RECT rect;
rect.top = line * g_nFontHeight;
@ -3681,8 +3681,8 @@ void DrawVideoScannerValue(int line, LPCTSTR name, int nValue, bool isVisible)
rect.left = DISPLAY_VIDEO_SCANNER_COLUMN;
rect.right = rect.left + (5 * nFontWidth);
DebuggerSetColorFG(DebuggerGetColor(FG_INFO_CHAR_HI));
DebuggerSetColorBG(DebuggerGetColor(VIDEO_INFO_BG));
DebuggerSetColorBG(DebuggerGetColor(BG_VIDEOSCANNER_TITLE));
DebuggerSetColorFG(DebuggerGetColor(FG_VIDEOSCANNER_TITLE));
PrintText(name, rect);
@ -3693,13 +3693,13 @@ void DrawVideoScannerValue(int line, LPCTSTR name, int nValue, bool isVisible)
sprintf_s(sValue, sizeof(sValue), "%03X", nValue);
// Needs to be far enough over, since 4 chars of ZeroPage symbol also calls us
int nOffset = 2;
const int nOffset = 2;
rect.left = DISPLAY_VIDEO_SCANNER_COLUMN + (nOffset * nFontWidth);
if (!isVisible)
DebuggerSetColorFG(DebuggerGetColor(FG_DISASM_BP_S_X)); // red
DebuggerSetColorFG(DebuggerGetColor(FG_VIDEOSCANNER_INVISIBLE)); // red
else
DebuggerSetColorFG(DebuggerGetColor(FG_DISASM_BRANCH)); // green
DebuggerSetColorFG(DebuggerGetColor(FG_VIDEOSCANNER_VISIBLE)); // green
PrintText(sValue, rect);
}