\r
word far* clock= (word far*) 0x046C; /* 18.2hz clock */\r
\r
-void main() {
- bitmap_t bmp;\r
+void main() {\r
int i, j;\r
word start, end;\r
page_t page, page2;\r
- float elapsed;\r
byte *pal, *pal2=NULL;\r
\r
- /* load pcx file */\r
- bmp = modexLoadPcx("ed.pcx");\r
-\r
/* load our palette */\r
modexLoadPalFile("gfx.pal", &pal2);\r
\r
modexFadeOff(1, pal);\r
modexPalBlack();\r
\r
- setvideo(1);\r
+ modexEnter();\r
modexPalBlack();\r
\r
/* set up the page, but with 16 pixels on all borders in offscreen mem */\r
modexClearRegion(&page, 48, 48, SCREEN_WIDTH-64, SCREEN_HEIGHT-64, 128);\r
modexShowPage(&page);\r
\r
- modexDrawSprite(&page, 20, 20, &bmp);\r
- //modexDrawBmp(&page, xb, yb, &bmp);\r
-\r
/* fade in */\r
modexFadeOn(1, pal2);\r
\r
\r
start = *clock;\r
- //for(i=0; i<5; i++) {\r
- while (!kbhit()){ /* Wait for a keystroke */\r
+ for(i=0; i<5; i++) {\r
/* go right */\r
for(j=0; j<32; j++) {\r
page.dx++;\r
}\r
}\r
\r
- (void) getch(); /* Clear the keyboard buffer */\r
end = *clock;\r
\r
/* fade back to text mode */\r
modexFadeOff(1, pal2);\r
modexPalBlack();\r
- setvideo(0);\r
+ modexLeave();\r
modexPalBlack();\r
modexFadeOn(1, pal);\r
}\r