diff options
author | Simon Howard | 2006-09-24 13:06:32 +0000 |
---|---|---|
committer | Simon Howard | 2006-09-24 13:06:32 +0000 |
commit | 681c7bee784556181a0e1507fcac553041f5de04 (patch) | |
tree | c26ca0b5eef7285d311d5dd8a9129acd5bd9cb54 | |
parent | ae660b7198deccb4b7348d743fda65e221c4df61 (diff) | |
download | chocolate-doom-681c7bee784556181a0e1507fcac553041f5de04.tar.gz chocolate-doom-681c7bee784556181a0e1507fcac553041f5de04.tar.bz2 chocolate-doom-681c7bee784556181a0e1507fcac553041f5de04.zip |
Debug code for drawing an ASCII chart.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 658
-rw-r--r-- | textscreen/txt_desktop.c | 25 |
1 files changed, 25 insertions, 0 deletions
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); } } |