]> 4ch.mooo.com Git - 16.git/blobdiff - 16/modex16/test.c
i did a butt load of tweaking to the paltest code and i did verious fixes here and...
[16.git] / 16 / modex16 / test.c
old mode 100644 (file)
new mode 100755 (executable)
index 3590964..c5b9d7d
@@ -3,17 +3,12 @@
 \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
@@ -23,7 +18,7 @@ void main() {
     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
@@ -40,16 +35,12 @@ void main() {
     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
@@ -73,13 +64,12 @@ void main() {
        }\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