From 5859134e1c81d15e49cab4c1971ed2bce5781845 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 5 May 2009 00:00:53 +0000 Subject: Better ASCII chart. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1509 --- textscreen/txt_desktop.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'textscreen/txt_desktop.c') diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c index 4b90ed66..99a5062d 100644 --- a/textscreen/txt_desktop.c +++ b/textscreen/txt_desktop.c @@ -158,10 +158,13 @@ void TXT_ExitMainLoop(void) void TXT_DrawASCIITable(void) { + unsigned char *screendata; char buf[10]; int x, y; int n; + screendata = TXT_GetScreenData(); + TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_BGColor(TXT_COLOR_BLACK, 0); @@ -172,11 +175,15 @@ void TXT_DrawASCIITable(void) n = y * 16 + x; TXT_GotoXY(x * 5, y); - sprintf(buf, "%02x %c ", n, n); + sprintf(buf, "%02x ", n); TXT_Puts(buf); + + // Write the character directly to the screen memory buffer: + + screendata[(y * TXT_SCREEN_W + x * 5 + 3) * 2] = n; } } - + TXT_UpdateScreen(); } -- cgit v1.2.3