diff options
author | Simon Howard | 2009-05-05 00:00:53 +0000 |
---|---|---|
committer | Simon Howard | 2009-05-05 00:00:53 +0000 |
commit | 5859134e1c81d15e49cab4c1971ed2bce5781845 (patch) | |
tree | d4fe2af70933d744f201c7f33accfe2cc9b577f5 /textscreen | |
parent | 3b2481de03e50f07ba89d5e6284a58c09582a1e1 (diff) | |
download | chocolate-doom-5859134e1c81d15e49cab4c1971ed2bce5781845.tar.gz chocolate-doom-5859134e1c81d15e49cab4c1971ed2bce5781845.tar.bz2 chocolate-doom-5859134e1c81d15e49cab4c1971ed2bce5781845.zip |
Better ASCII chart.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1509
Diffstat (limited to 'textscreen')
-rw-r--r-- | textscreen/txt_desktop.c | 11 |
1 files changed, 9 insertions, 2 deletions
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(); } |