mirror of
https://github.com/datajerk/c2d.git
synced 2025-02-20 17:28:57 +00:00
minor not improvements
This commit is contained in:
parent
e841deb38e
commit
ae3876a8f7
BIN
bin/c2d.exe
BIN
bin/c2d.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +1,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define MASK 0x7F
|
||||
|
||||
int main()
|
||||
{
|
||||
int i, j, k, line, mask = 0x7F;
|
||||
int i, j, k, line;
|
||||
char screen[24][40];
|
||||
|
||||
// clear screen (just in case partial dump)
|
||||
@ -13,7 +15,7 @@ int main()
|
||||
for (i = 0; i < 24; i++) {
|
||||
line = 8 * (i % 3) + i / 3;
|
||||
for (j = 0; j < 40; j++)
|
||||
screen[line][j] = getchar() & mask;
|
||||
screen[line][j] = getchar() & MASK;
|
||||
if (i % 3 == 2)
|
||||
for (k = 0; k < 8; k++)
|
||||
getchar();
|
||||
|
@ -11,16 +11,19 @@ unsigned char holes[] = {
|
||||
0xc6, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define NORMAL 0x80
|
||||
#define BLINK 0x40
|
||||
|
||||
int main()
|
||||
{
|
||||
char c, highbit = 0x80;
|
||||
char c;
|
||||
int i, j, k, line = 0;
|
||||
unsigned char screen[24][40];
|
||||
|
||||
// clear screen (just in case < 40x24)
|
||||
for (i = 0; i < 24; i++)
|
||||
for (j = 0; j < 40; j++)
|
||||
screen[i][j] = ' ' | highbit;
|
||||
screen[i][j] = ' ' | NORMAL;
|
||||
|
||||
i = j = 0;
|
||||
while ((c = getchar()) != EOF) {
|
||||
@ -37,7 +40,7 @@ int main()
|
||||
if (i > 23) // ditto
|
||||
break;
|
||||
|
||||
screen[line][j++] = c | highbit;
|
||||
screen[line][j++] = c | NORMAL;
|
||||
}
|
||||
|
||||
// dump to stdout
|
||||
|
Loading…
x
Reference in New Issue
Block a user