From: sparky4 Date: Mon, 13 Jul 2015 16:41:14 +0000 (-0500) Subject: ok it works~ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=53d15c0cbdab9c174d3f3fc191dceb8c1bea3d7a;p=16.git ok it works~ modified: fonttes0.exe modified: fonttest.exe modified: src/fonttes0.c modified: src/fonttest.c --- diff --git a/fonttes0.exe b/fonttes0.exe index 63752af3..3c83acb2 100644 Binary files a/fonttes0.exe and b/fonttes0.exe differ diff --git a/fonttest.exe b/fonttest.exe index 4f3558b0..2cc9c1d7 100644 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/src/fonttes0.c b/src/fonttes0.c index 3c57bb18..740aa7d1 100644 --- a/src/fonttes0.c +++ b/src/fonttes0.c @@ -30,7 +30,7 @@ void main(int argc, char near *argv[]) int i, xp; int j; char l[16]; - char c; + char c,ct; word s, o, t, w; word addr = (word) l; //byte *pal, *pal2, fond; @@ -44,37 +44,46 @@ void main(int argc, char near *argv[]) printf("%d: %x:%x\n", i, romFonts[i].seg, romFonts[i].off); } - printf("*argv[1]=%d\n", *argv[1]); +// printf("*argv[1]=%d\n", *argv[1]); + + printf("Font type: "); + gets(&ct); - printf("Character: "); - scanf("%c", &c); + printf("Character: "); + gets(&c); - if(*argv[1]!=1) - switch(*argv[1]) + if(ct!=1) + switch(ct) { - case 48: + case 48: + printf("type 0\n"); t=0; w=14; break; - case 49: + case 49: + printf("type 1\n"); t=1; w=8; break; - case 50: + case 50: + printf("type 2\n"); t=2; w=8; break; - case 51: + case 51: + printf("type 3\n"); t=3; w=16; break; - default: + default: + printf("type 3\n"); t=3; w=16; break; } else - { + { + printf("type 3\n"); t=3; w=16; } diff --git a/src/fonttest.c b/src/fonttest.c index 2370806c..58dbce85 100644 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -29,7 +29,7 @@ void main(int argc, char near *argv[]) int i; int j; char l[16]; - char c; + char c,ct; word s, o, t, w; word addr = (word) l; textInit(); @@ -40,37 +40,46 @@ void main(int argc, char near *argv[]) printf("%d: %x:%x\n", i, romFonts[i].seg, romFonts[i].off); } - printf("*argv[1]=%d\n", *argv[1]); +// printf("*argv[1]=%d\n", *argv[1]); + + printf("Font type: "); + gets(&ct); - printf("Character: "); - scanf("%c", &c); + printf("Character: "); + gets(&c); - if(*argv[1]!=1) - switch(*argv[1]) + if(ct!=1) + switch(ct) { - case 48: + case 48: + printf("type 0\n"); t=0; w=14; break; - case 49: + case 49: + printf("type 1\n"); t=1; w=8; break; - case 50: + case 50: + printf("type 2\n"); t=2; w=8; break; - case 51: + case 51: + printf("type 3\n"); t=3; w=16; break; - default: + default: + printf("type 3\n"); t=3; w=16; break; } else - { + { + printf("type 3\n"); t=3; w=16; }