From 681c7bee784556181a0e1507fcac553041f5de04 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 24 Sep 2006 13:06:32 +0000 Subject: Debug code for drawing an ASCII chart. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 658 --- textscreen/txt_desktop.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c index 085712fe..78c9944e 100644 --- a/textscreen/txt_desktop.c +++ b/textscreen/txt_desktop.c @@ -153,6 +153,30 @@ void TXT_ExitMainLoop(void) main_loop_running = 0; } +void TXT_DrawASCIITable(void) +{ + char buf[10]; + int x, y; + int n; + + TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); + TXT_BGColor(TXT_COLOR_BLACK, 0); + + for (y=0; y<16; ++y) + { + for (x=0; x<16; ++x) + { + n = y * 16 + x; + + TXT_GotoXY(x * 5, y); + sprintf(buf, "%02x %c ", n, n); + TXT_Puts(buf); + } + } + + TXT_UpdateScreen(); +} + void TXT_GUIMainLoop(void) { main_loop_running = 1; @@ -169,6 +193,7 @@ void TXT_GUIMainLoop(void) } TXT_DrawDesktop(); +// TXT_DrawASCIITable(); TXT_Sleep(0); } } -- cgit v1.2.3