]> 4ch.mooo.com Git - 16.git/blobdiff - src/vrstest.c
wwww
[16.git] / src / vrstest.c
index d0e2b411778f13f79905607c99ea391486b6cc56..03220799f07187d5efd484ca62581a00f260089a 100755 (executable)
  */\r
 \r
 #include "src/lib/16_head.h"\r
+#include "src/lib/16_tail.h"\r
 #include "src/lib/16_vl.h"\r
 #include "src/lib/16_sprit.h"\r
-#include "src/lib/16_tail.h"\r
 #include "src/lib/16_pm.h"\r
-#include "src/lib/16_ca.h"\r
+//#include "src/lib/16_ca.h"\r
 #include "src/lib/16_mm.h"\r
 \r
+extern boolean dbg_notest;\r
+\r
 static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
 \r
 void main() {\r
@@ -44,12 +46,13 @@ void main() {
        //vrl1_vgax_offset_t * off, *off1;\r
        struct vrs_container vrs;\r
        vrl1_vgax_offset_t **vrl_line_offsets;\r
-       uint32_t huge *vrl_headers_offsets;\r
-       uint16_t huge *vrl_id_iter;\r
+       uint32_t far *vrl_headers_offsets;\r
+       uint16_t far *vrl_id_iter;\r
        uint32_t vrl_size;\r
        int num_of_vrl;\r
-       struct vrl1_vgax_header huge *curr_vrl;\r
+       struct vrl1_vgax_header far *curr_vrl;\r
        word w=0;\r
+       dbg_notest=1;\r
 \r
        Startup16(&gvar);\r
 \r
@@ -62,7 +65,7 @@ void main() {
        vrs.buffer = bigbuffer;\r
        vrs.data_size = size - sizeof(struct vrl1_vgax_header);\r
        num_of_vrl = 0;\r
-       vrl_id_iter = (uint16_t huge *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]);\r
+       vrl_id_iter = (uint16_t far *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]);\r
        while(vrl_id_iter[num_of_vrl]){\r
                num_of_vrl++;\r
        }\r
@@ -70,10 +73,10 @@ void main() {
        // Allocate memory for vrl line offsets table\r
        vrl_line_offsets = malloc(sizeof(vrl1_vgax_offset_t *)*num_of_vrl);\r
 \r
-       vrl_headers_offsets = (uint32_t huge *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]);\r
+       vrl_headers_offsets = (uint32_t far *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]);\r
        // Calculate line offsets for each vrl\r
        for(i = 0; i < num_of_vrl; i++){\r
-               curr_vrl = (struct vrl1_vgax_header huge *)(vrs.buffer + vrl_headers_offsets[i]);\r
+               curr_vrl = (struct vrl1_vgax_header far *)(vrs.buffer + vrl_headers_offsets[i]);\r
 \r
                // Calc. vrl size as (next_offset - curr_offset)\r
                if (i != num_of_vrl - 1){\r
@@ -119,7 +122,7 @@ void main() {
        /*modexLoadPalFile("data/spri/chikyuu.pal", &pal);\r
        modexPalUpdate1(pal);*/\r
        for (i = 0; i < 5; i++){\r
-       spri.delay = 1; animate_spri(&spri); spri.x += 20; /*sleep(1);*/ }\r
+       spri.delay = 1; animate_spri(&spri, &gvar); spri.x += 20; /*sleep(1);*/ }\r
 \r
        while(!IN_KeyDown(sc_Escape))\r
        {\r