#include <stdio.h>\r
#include <conio.h>\r
#include "lib/types.h"\r
-#include "lib/16text.h"\r
+#include "lib/16text.h"
+#include "lib/modex16.h"\r
\r
void main(int argc, char *argv[])\r
{\r
char l[16];\r
char c;\r
word s, o, t, w;\r
- word addr = (word) l;\r
+ word addr = (word) l;
+ byte *pal, *pal2;
+ page_t page;\r
textInit();\r
\r
//print the addresses of the fonts\r
DEC CX\r
JNZ L1\r
}\r
+ /* load our palette */\r
+ modexLoadPalFile("data/default.pal", &pal2);\r
\r
- //render the letter in ascii art\r
- for(i=0; i<w; i++) {\r
+ /* save the palette */\r
+ pal = modexNewPal();\r
+ modexPalSave(pal);\r
+ modexFadeOff(1, pal);\r
+ modexPalBlack();\r
+\r
+ modexEnter();\r
+ modexPalBlack();\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;
+ modexShowPage(&page);
+ /* fade in */\r
+ modexFadeOn(1, pal2);
+
+ //render the letter in ascii art\r
+ for(i=0; i<w; i++) {\r
j=1<<8;\r
while(j) {\r
//printf("%c", l[i] & j ? '*':' ');
j>>=1;\r
}\r
printf("\n");\r
- }\r
+ }
+
+ /* fade back to text mode */\r
+ modexFadeOff(1, pal2);\r
+ modexPalBlack();\r
+ modexLeave();\r
+ modexPalBlack();\r
+ modexFadeOn(1, pal);
+
}\r