shithub: choc

Download patch

ref: 681c7bee784556181a0e1507fcac553041f5de04
parent: ae660b7198deccb4b7348d743fda65e221c4df61
author: Simon Howard <[email protected]>
date: Sun Sep 24 09:06:32 EDT 2006

Debug code for drawing an ASCII chart.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 658

--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -153,6 +153,30 @@
     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 @@
         }
         
         TXT_DrawDesktop();
+//        TXT_DrawASCIITable();
         TXT_Sleep(0);
     }
 }