char c;\r
word s, o, t, w;\r
word addr = (word) l;
- byte *pal, *pal2;
+ byte *pal, *pal2, fond;
+ bitmap_t fontdata;
page_t page;\r
textInit();\r
\r
INC DI\r
DEC CX\r
JNZ L1\r
- }\r
- /*//load our palette\r
- modexLoadPalFile("data/default.pal", &pal2);\r
+ }
+
+ //load our palette\r
+ modexLoadPalFile("data/default.pal", &pal2);
+
+ fontdata.width=8;
+ fontdata.height=w;
+ fontdata.palette=pal2;
+
+ fontdata.data=malloc(256);
+
+ for(i=0; i<w; i++)
+ {\r
+ j=1<<8;\r
+ while(j)
+ {
+ fond=(byte)l[i] & j;
+ fontdata.data=&(fond);
+ printf("%02x ", *(fontdata.data));\r
+ j>>=1;\r
+ }
+ printf("\n");\r
+ }
+
+ printf("\n\nok hit a key~\n");
+ while(!getch())\r
+ {\r
+ //DrawPBuf(&page, 0, 0, p, 0);\r
+ }\r
\r
// save the palette\r
pal = modexNewPal();\r
\r
// set up the page, but with 16 pixels on all borders in offscreen mem\r
page=modexDefaultPage();\r
- page.width += 32;\r
- page.height += 32;
+ //page.width += 32;\r
+ //page.height += 32;
modexShowPage(&page);
+ modexClearRegion(&page, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);
// fade in\r
- modexFadeOn(4, pal2);*/
+ modexFadeOn(4, pal2);
//render the letter in ascii art\r
- for(i=0; i<w; i++) {\r
+ /*for(i=0; i<w; i++) {\r
j=1<<8;\r
while(j)
- {\r
- printf("%c", l[i] & j ? '*':' ');
- //====printf("%02x ", l[i] & j/* ? '*':' '*/);
- //modexClearRegion(&page, l[i] & j, l[i] & j, 1, 1, l[i] & j);\r
- j>>=1;\r
+ {
+ //printf("j=%d\n", j);\r
+ //printf("%c", l[i] & j ? '*':' ');
+ //====printf("%02x ", l[i] & j);
+ modexClearRegion(&page, 120, 120, 1, 1, l[i] & j);\r
+ j>>=1;
+ dcount++;\r
}\r
- printf("\n");\r
- }
+ //====printf("\n");
+ dcount++;\r
+ }*/
+ modexDrawSprite(&page, 0, 0, &fontdata);
+ while(!getch())\r
+ {\r
+ //DrawPBuf(&page, 0, 0, p, 0);\r
+ }
- /*// fade back to text mode\r
+ // fade back to text mode\r
modexFadeOff(4, pal2);\r
modexPalBlack();\r
modexLeave();\r
modexPalBlack();\r
- modexFadeOn(4, pal);*/
+ modexFadeOn(4, pal);
}\r