X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fmodex16%2Ftest.c;h=c5b9d7dca08bc89f46b38e32ad279cc8a102d6ee;hb=b8c9d5fcb2b66420bc673f54b14cc5d0ea5283ed;hp=35909646be44c02ffc0cfe4d7282ffb31368780b;hpb=952bc98c5a1d6b2ea62aca99e4cf066daa8459f9;p=16.git diff --git a/16/modex16/test.c b/16/modex16/test.c old mode 100644 new mode 100755 index 35909646..c5b9d7dc --- a/16/modex16/test.c +++ b/16/modex16/test.c @@ -3,17 +3,12 @@ word far* clock= (word far*) 0x046C; /* 18.2hz clock */ -void main() { - bitmap_t bmp; +void main() { int i, j; word start, end; page_t page, page2; - float elapsed; byte *pal, *pal2=NULL; - /* load pcx file */ - bmp = modexLoadPcx("ed.pcx"); - /* load our palette */ modexLoadPalFile("gfx.pal", &pal2); @@ -23,7 +18,7 @@ void main() { modexFadeOff(1, pal); modexPalBlack(); - setvideo(1); + modexEnter(); modexPalBlack(); /* set up the page, but with 16 pixels on all borders in offscreen mem */ @@ -40,16 +35,12 @@ void main() { modexClearRegion(&page, 48, 48, SCREEN_WIDTH-64, SCREEN_HEIGHT-64, 128); modexShowPage(&page); - modexDrawSprite(&page, 20, 20, &bmp); - //modexDrawBmp(&page, xb, yb, &bmp); - /* fade in */ modexFadeOn(1, pal2); start = *clock; - //for(i=0; i<5; i++) { - while (!kbhit()){ /* Wait for a keystroke */ + for(i=0; i<5; i++) { /* go right */ for(j=0; j<32; j++) { page.dx++; @@ -73,13 +64,12 @@ void main() { } } - (void) getch(); /* Clear the keyboard buffer */ end = *clock; /* fade back to text mode */ modexFadeOff(1, pal2); modexPalBlack(); - setvideo(0); + modexLeave(); modexPalBlack(); modexFadeOn(1, pal); }