]> 4ch.mooo.com Git - 16.git/commitdiff
branch is in the master swap branch code added to swap the files out ^^; vrstest...
authorsparky4 <sparky4@cock.li>
Sun, 21 Aug 2016 22:26:29 +0000 (17:26 -0500)
committersparky4 <sparky4@cock.li>
Sun, 21 Aug 2016 22:26:29 +0000 (17:26 -0500)
src/vrstest.c

index 75469b0d6365eba088926400b92b9b2ae23ea3cd..d0e370cfc11ed7f0b529cf26180efafd9b36d5cb 100755 (executable)
 #include "src/lib/16_ca.h"\r
 #include "src/lib/16_mm.h"\r
 \r
-\r
 global_game_variables_t gvar;\r
 \r
 void main() {\r
+       mminfo_t mm; mminfotype mmi;\r
        __segment sega;\r
        void __based(sega)* bigbuffer;\r
        int i;\r
        word start;\r
        int plane;\r
        float t1, t2;\r
+       boolean baka;\r
+       byte *pal;\r
 \r
        // DOSLIB: check our environment\r
        probe_dos();\r
@@ -49,11 +51,6 @@ void main() {
        //      the CPU to carry out tasks. --J.C.\r
        cpu_probe();\r
 \r
-       gvar.mm.mmstarted=0;\r
-\r
-       MM_Startup(&gvar.mm, &gvar.mmi);\r
-       CA_Startup(&gvar);\r
-\r
        // DOSLIB: check for VGA\r
        if (!probe_vga()) {\r
                printf("VGA probe failed\n");\r
@@ -66,12 +63,18 @@ void main() {
        }\r
 \r
        //bmp = bitmapLoadPcx("data/chikyuu.pcx");\r
-\r
        VGAmodeX(1, 1, &gvar);\r
        gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
 \r
+       mm.mmstarted=0;\r
+       MM_Startup(&mm, &mmi);\r
+       CA_Startup(&gvar);\r
+       if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &mm, &mmi)) baka=1; else baka=0;\r
+\r
        /* fix up the palette and everything */\r
        //modexPalUpdate1(bmp.palette);\r
+       //modexLoadPalFile("data/spri/chikyuu.pal", &pal);\r
+       //modexPalUpdate1(pal);\r
 \r
        /* clear and draw one sprite and one bitmap */\r
        modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1);\r
@@ -114,10 +117,10 @@ void main() {
        {\r
                //DrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
        }\r
-       MM_FreePtr(&bigbuffer, &gvar.mm);\r
-       CA_Shutdown(&gvar);\r
-       MM_Shutdown(&gvar.mm);\r
        VGAmodeX(0, 1, &gvar);\r
+       MM_FreePtr(&bigbuffer, &mm);\r
+       MM_Shutdown(&mm);\r
+       CA_Shutdown(&gvar);\r
        /*printf("\nmain=%Fp\n\n", &i);\r
        printf("bmp.data=%Fp\n", bmp.data);\r
        printf("*bmp.data=%Fp\n", *(bmp.data));\r
@@ -135,5 +138,6 @@ void main() {
        printf("VGA to VGA: %f\n", t2);\r
        printf("gvar.video.page[0].width: %u\n", gvar.video.page[0].width);\r
        printf("gvar.video.page[0].height: %u\n", gvar.video.page[0].height);\r
-       return;\r
+       if(baka) printf("\nyay!\n");\r
+       else printf("\npoo!\n");\r
 }\r