wwww
Revisión | cd333501526a8f715f3e00ac825db3188e226ba6 (tree) |
---|---|
Tiempo | 2016-08-22 07:26:29 |
Autor | sparky4 <sparky4@cock...> |
Commiter | sparky4 |
branch is in the master swap branch code added to swap the files out ; vrstest.c is added for actual testing~ also i improved vrstest~
@@ -28,16 +28,18 @@ | ||
28 | 28 | #include "src/lib/16_ca.h" |
29 | 29 | #include "src/lib/16_mm.h" |
30 | 30 | |
31 | - | |
32 | 31 | global_game_variables_t gvar; |
33 | 32 | |
34 | 33 | void main() { |
34 | + mminfo_t mm; mminfotype mmi; | |
35 | 35 | __segment sega; |
36 | 36 | void __based(sega)* bigbuffer; |
37 | 37 | int i; |
38 | 38 | word start; |
39 | 39 | int plane; |
40 | 40 | float t1, t2; |
41 | + boolean baka; | |
42 | + byte *pal; | |
41 | 43 | |
42 | 44 | // DOSLIB: check our environment |
43 | 45 | probe_dos(); |
@@ -49,11 +51,6 @@ void main() { | ||
49 | 51 | // the CPU to carry out tasks. --J.C. |
50 | 52 | cpu_probe(); |
51 | 53 | |
52 | - gvar.mm.mmstarted=0; | |
53 | - | |
54 | - MM_Startup(&gvar.mm, &gvar.mmi); | |
55 | - CA_Startup(&gvar); | |
56 | - | |
57 | 54 | // DOSLIB: check for VGA |
58 | 55 | if (!probe_vga()) { |
59 | 56 | printf("VGA probe failed\n"); |
@@ -66,12 +63,18 @@ void main() { | ||
66 | 63 | } |
67 | 64 | |
68 | 65 | //bmp = bitmapLoadPcx("data/chikyuu.pcx"); |
69 | - | |
70 | 66 | VGAmodeX(1, 1, &gvar); |
71 | 67 | gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); |
72 | 68 | |
69 | + mm.mmstarted=0; | |
70 | + MM_Startup(&mm, &mmi); | |
71 | + CA_Startup(&gvar); | |
72 | + if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &mm, &mmi)) baka=1; else baka=0; | |
73 | + | |
73 | 74 | /* fix up the palette and everything */ |
74 | 75 | //modexPalUpdate1(bmp.palette); |
76 | + //modexLoadPalFile("data/spri/chikyuu.pal", &pal); | |
77 | + //modexPalUpdate1(pal); | |
75 | 78 | |
76 | 79 | /* clear and draw one sprite and one bitmap */ |
77 | 80 | modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1); |
@@ -114,10 +117,10 @@ void main() { | ||
114 | 117 | { |
115 | 118 | //DrawPBuf(&gvar.video.page[0], 0, 0, p, 0); |
116 | 119 | } |
117 | - MM_FreePtr(&bigbuffer, &gvar.mm); | |
118 | - CA_Shutdown(&gvar); | |
119 | - MM_Shutdown(&gvar.mm); | |
120 | 120 | VGAmodeX(0, 1, &gvar); |
121 | + MM_FreePtr(&bigbuffer, &mm); | |
122 | + MM_Shutdown(&mm); | |
123 | + CA_Shutdown(&gvar); | |
121 | 124 | /*printf("\nmain=%Fp\n\n", &i); |
122 | 125 | printf("bmp.data=%Fp\n", bmp.data); |
123 | 126 | printf("*bmp.data=%Fp\n", *(bmp.data)); |
@@ -135,5 +138,6 @@ void main() { | ||
135 | 138 | printf("VGA to VGA: %f\n", t2); |
136 | 139 | printf("gvar.video.page[0].width: %u\n", gvar.video.page[0].width); |
137 | 140 | printf("gvar.video.page[0].height: %u\n", gvar.video.page[0].height); |
138 | - return; | |
141 | + if(baka) printf("\nyay!\n"); | |
142 | + else printf("\npoo!\n"); | |
139 | 143 | } |