]> 4ch.mooo.com Git - 16.git/commitdiff
p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I...
authorsparky4 <sparky4@cock.li>
Thu, 13 Apr 2017 23:51:09 +0000 (18:51 -0500)
committersparky4 <sparky4@cock.li>
Thu, 13 Apr 2017 23:51:09 +0000 (18:51 -0500)
src/bakapi.c
src/exmmtest.c
src/lib/16_ca.h
src/lib/16_dbg.h
src/lib/16_vl.c
src/lib/16_vl.h
src/lib/bakapee.c
src/palbomb.c
src/palettec.c
src/palettel.c

index 034649c4939c5aead0b9516a726d4457297f20c4..fa03d40373e5a427343da57ad2e89888556d7d3e 100755 (executable)
@@ -32,7 +32,7 @@ void TL_VidInit(global_game_variables_t *gvar){}
 //int ch=0x0;\r
 \r
 #define SETUPPAGEBAKAPI \\r
-gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video); \\r
+gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/); \\r
 gvar.video.page[1] = modexNextPage(&gvar.video.page[0]);\r
 \r
 \r
@@ -45,7 +45,6 @@ main(int argc, char *argvar[])
        int i;\r
        word panq=1, pand=0;\r
        boolean panswitch=0;\r
-       word    showpage=0;\r
 \r
        ggvv=&gvar;\r
 \r
@@ -141,21 +140,19 @@ main(int argc, char *argvar[])
        //getch(); //____\r
        //VL_SetLineWidth (40, &gvar);\r
 \r
-       VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
+       VL_ShowPage(&gvar.video.page[0], 1, 0);\r
        {\r
                word w;\r
                for(w=0;w<64000;w++)\r
                {\r
-                       ding(&gvar.video.page[showpage], &bakapee, 2);\r
+                       ding(&gvar.video.page[0], &bakapee, 2);\r
                        ding(&gvar.video.page[1], &bakapee, 2);\r
                }\r
 #ifdef BAKAFIZZUNSIGNED\r
-               baka_FizzleFade (gvar.video.ofs.bufferofs, gvar.video.ofs.displayofs, vga_state.vga_width, vga_state.vga_height, 70, true, &gvar);\r
+               baka_FizzleFade (gvar.video.ofs.bufferofs, gvar.video.ofs.displayofs, gvar.video.page[0].width, gvar.video.page[0].height, 70, true, &gvar);\r
 #else\r
                baka_FizzleFade (&gvar.video.page[1], &gvar.video.page[0], vga_state.vga_width, vga_state.vga_height, 70, true, &gvar);\r
 #endif\r
-               //ding(&gvar.video.page[showpage], &bakapee, 9);\r
-//             modexprint(&gvar.video.page[0], gvar.video.page[0].sw/2, gvar.video.page[0].sh/2, 1, 0, 47, 0, 1, "bakapi ok");\r
        }\r
        while(!kbhit()){}\r
 \r
@@ -277,7 +274,6 @@ main(int argc, char *argvar[])
                                        printf("on.");\r
                                break;\r
                        }\r
-                       printf(" Showing page %u", showpage);\r
                        printf("\n");\r
                        printf("Incrementation of color happens at every %uth plot.\n", bakapee.bonk);\r
                        printf("Enter 1, 2, 3, 4, 5, 6, 8, or 9 to run a screensaver, or enter 0 to quit.\n");\r
@@ -312,18 +308,6 @@ pee:
                                        }\r
                                        key=0;\r
                                break;\r
-                               case 'q':\r
-                                       switch (showpage)\r
-                                       {\r
-                                               case 0:\r
-                                                       showpage=1;\r
-                                               break;\r
-                                               case 1:\r
-                                                       showpage=0;\r
-                                               break;\r
-                                       }\r
-                                       key=0;\r
-                               break;\r
                                case '8':\r
                                        c+=8;\r
                                case '1':\r
@@ -335,12 +319,11 @@ pee:
                                case '9':\r
                                        key = c - '0';\r
                                        VGAmodeX(vgamodex_mode, 0, &gvar);\r
-                                       VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
                                        SETUPPAGEBAKAPI\r
                // this code is written around modex16 which so far is a better fit than using DOSLIB vga directly, so leave MXLIB code in.\r
                // we'll integrate DOSLIB vga into that part of the code instead for less disruption. -- J.C.\r
-                                       VL_ShowPage(&gvar.video.page[showpage], 0, 0);\r
-                                       break;\r
+                                       VL_ShowPage(&gvar.video.page[0], 0, 0);\r
+                               break;\r
                                case '-':\r
                                        if(bakapee.bonk>0)\r
                                                bakapee.bonk-=100;\r
@@ -352,11 +335,12 @@ pee:
                                break;\r
                                default:\r
                                        key=0;\r
+                                       clrscr();       //added to clear screen wwww\r
                                break;\r
                        }\r
-                       clrscr();       //added to clear screen wwww\r
                }\r
        }\r
+       clrscr();       //added to clear screen wwww\r
 #if 0\r
 //#else // !defined(BOINK)\r
 // FIXME: Does not compile. Do you want to remove this?\r
index 9fb1730b07e5b4ef5a927f9b6e813064f9cc3c1c..fd8497900759a37bab7f58b1d9ac996ff4234ed7 100755 (executable)
@@ -69,7 +69,7 @@
 \r
 ////////////////////////////////////////////////////////////////////////////\r
 #ifdef NOVID\r
-//void VL_Startup (global_game_variables_t *gvar){}\r
+void VL_Startup (global_game_variables_t *gvar){}\r
 void VL_Shutdown (global_game_variables_t *gvar){}\r
 void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv)\r
 {\r
index 7c6cf37fa79193910e184b4a54c4aa60d3e1ca24..bd762016703d70179be9fd93338d0d0198f64d36 100755 (executable)
@@ -27,7 +27,7 @@
 \r
 //===========================================================================\r
 \r
-#define NOMAPS\r
+//#define NOMAPS\r
 #define NOGRAPHICS\r
 #define NOAUDIO\r
 \r
index e545bdcdd3eb0879458d817704dd7c938a3db0a5..ede5c359cede94c1f74d7eacdfee64483387cebf 100755 (executable)
@@ -10,7 +10,7 @@
 #define __DEBUG_InputMgr__\r
 #define __DEBUG_MAP__\r
 //#define __DEBUG_2__\r
-#define __DEBUG_CA__\r
+//#define __DEBUG_CA__\r
 //#define __DEBUG_PM__\r
 //#define __DEBUG_MM__\r
 //#define __DEBUG_RF__\r
index 7d8a0b258b928acce07db96f797ae80a812f341a..88a153cb8bc2e7bb26ed365904bff0a2b3be664e 100755 (executable)
@@ -282,7 +282,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
        switch(vq)\r
        {\r
                case 1:\r
-               case 8: //320x240 no buffer\r
+//             case 8: //320x240 no buffer\r
                        //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);\r
                        /*for(i=0; i<CRTParmCount; i++) {\r
                                outpw(CRTC_INDEX, ModeX_320x240regs[i]);\r
@@ -320,15 +320,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
                case 2: // TODO: 160x120 according to ModeX_160x120regs\r
                        return;\r
                case 3: // TODO: 160x120 according to ModeX_320x200regs\r
-                       gv->video.page[0].sw = vga_state.vga_width = 300; // VGA lib currently does not update this\r
-                       gv->video.page[0].sh = vga_state.vga_height = 200; // VGA lib currently does not update this\r
-                       // virtual width and height. match screen, at first //\r
-                       gv->video.page[0].height = gv->video.page[0].sh;\r
-                       gv->video.page[0].width = gv->video.page[0].sw;\r
-\r
-                       cm.offset = (vga_state.vga_width / (4 * 2)); // 320 wide (40 x 4 pixel groups x 2)\r
-                       //return;\r
-               break;\r
+                       return;\r
                case 4: // TODO: 160x120 according to ModeX_192x144regs\r
                        return;\r
                case 5: // TODO: 160x120 according to ModeX_256x192regs\r
@@ -362,7 +354,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv)
 //     VL_SetLineWidth (cm.offset, gv);\r
        gv->video.ofs.displayofs = 0;\r
        gv->video.ofs.bufferofs = gv->video.page[0].width*gv->video.page[0].height;//gvar->video.page[0].pagesize;\r
-       gv->video.curr_mode=vq;\r
+//     gv->video.curr_mode=vq;\r
        gv->video.VL_Started=1;\r
 }\r
 \r
@@ -372,7 +364,6 @@ void modexLeave(void)
        VL_vgaSetMode(TEXT_MODE);\r
 }\r
 \r
-#if 0\r
 page_t\r
 modexDefaultPage(page_t *p)\r
 {\r
@@ -399,15 +390,9 @@ modexDefaultPage(page_t *p)
        page.pi=page.width*4;\r
        page.id = 0;\r
 \r
-       if(ggvv->video.curr_mode = 1)\r
-       {\r
-               page.width += TILEWHD;\r
-               page.height += TILEWHD;\r
-       }\r
-\r
        return page;\r
 }\r
-#endif\r
+#if 0\r
 page_t\r
 modexDefaultPage(page_t *p, video_t *v)\r
 {\r
@@ -439,7 +424,7 @@ modexDefaultPage(page_t *p, video_t *v)
 \r
        return page;\r
 }\r
-\r
+#endif\r
 /* returns the next page in contiguous memory\r
  * the next page will be the same size as p, by default\r
  */\r
@@ -528,7 +513,7 @@ void modexHiganbanaPageSetup(video_t *video)
 {\r
        video->vmem_remain=65535U;\r
        video->num_of_pages=0;\r
-       (video->page[0]) = modexDefaultPage(&(video->page[0]), video);  video->num_of_pages++;  //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
+       (video->page[0]) = modexDefaultPage(&(video->page[0])/*, video*/);      video->num_of_pages++;  //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD);\r
        (video->page[1]) = modexNextPage(&(video->page[0]));    video->num_of_pages++;\r
 //0000 (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), (video->page[0]).width, TILEWH*4);              video->num_of_pages++;\r
 //0000 (video->page[3]) = (video->page[2]);            video->num_of_pages++;\r
index 85a3bd7159332d0843335ab1062432b5841be765..a4337fea6539d6a7995c35ef0830821e35ec6c10 100755 (executable)
@@ -168,12 +168,12 @@ void      VL_Startup (global_game_variables_t *gvar),
        VL_DePlaneVGA (),\r
        VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv),\r
        modexEnter(sword vq, boolean cmem, global_game_variables_t *gv);\r
-void VL_vgaSetMode(byte mode);\r
+//void VL_vgaSetMode(byte mode);\r
 byte VL_vgaGetMode(void);\r
 extern void TL_VidInit(global_game_variables_t *gvar);\r
 void modexLeave(void);\r
 void modexsetBaseXMode();\r
-page_t modexDefaultPage(page_t *p, video_t *v);\r
+page_t modexDefaultPage(page_t *p/*, video_t *v*/);\r
 page_t modexNextPage(page_t *p);\r
 page_t modexNextPageFlexibleSize(page_t *p, word x, word y);\r
 void modexCalcVmemRemain(video_t *video);\r
index 39eb569e66d2fab90566e464d83275ba03d1232b..d9fd1e5c3226e0237dfbec27b0cb4eba6a9b07e9 100755 (executable)
@@ -69,7 +69,7 @@ boolean baka_FizzleFade (unsigned source, unsigned dest, unsigned width, unsigne
        pagedelta = dest-source;\r
        rndval = 1;     esorig = 0; q = 16;\r
        x = y = 0;\r
-       pixperframe = 64000/(dword)frames;\r
+       pixperframe = /*64000*/76800/(dword)frames;\r
 \r
 //     IN_StartAck ();\r
 \r
@@ -87,8 +87,6 @@ boolean baka_FizzleFade (unsigned source, unsigned dest, unsigned width, unsigne
        frame=0;\r
        do      // while (1)\r
        {\r
-sprintf(global_temp_status_text, "%u", frame);\r
-modexprint(&(gvar->video.page[0]), PIXPOSX, PIXPOSY, 1, 0, 47, 0, 1, global_temp_status_text);\r
                if (abortable && kbhit())//IN_CheckAck () )\r
                        return true;\r
 \r
@@ -135,6 +133,7 @@ noxor:
                        if ((x>width || y>height) && (x<width*2 && y<height*2))\r
                                continue;\r
                        //drawofs = source+(gvar->video.ofs.ylookup[y]) + (x>>2);\r
+                       //drawofs = source+((y+1)*gvar->video.page[0].stridew) + (x>>2);\r
                        drawofs = source+(y*gvar->video.page[0].stridew) + (x>>2);\r
 /*\r
 sprintf(global_temp_status_text, "draw - %Fp", drawofs);\r
@@ -150,14 +149,10 @@ modexprint(&(gvar->video.page[0]), PIXPOSX, q+PIXPOSY, 1, 0, 47, 0, 1, global_te
                        //\r
                        // copy one pixel\r
                        //\r
-//*\r
                        mask = x&3;\r
                        VGAREADMAP(mask);\r
                        mask = maskb[mask];\r
                        VGAMAPMASK(mask);\r
-//*/\r
-//                     modexputPixel(&(gvar->video.page[0]), x, y, rand());\r
-//                     VL_Plot (x, y, 15, &(gvar->video.ofs));\r
 \r
                        __asm {\r
                                mov     di,[drawofs]\r
index 61f55918d302a72d1bd040fa5ddc2c2f13019d7d..643d714849f0eb7ff90fda80a539e9188fda300c 100755 (executable)
@@ -26,7 +26,7 @@ void main(int argc, char *argv[]) {
 \r
        TL_VidInit(&gvar);      VGAmodeX(1, 0, &gvar);\r
 \r
-       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);\r
+       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);\r
        VL_ShowPage(&gvar.video.page[0], 1, 0);\r
        modexpdump(&gvar.video.page[0]);\r
        while(!kbhit()){ VL_modexPalScramble(&gvar.video.palette); }\r
index 9e6bc2b60062aaf3b8d060fe758e0e250b67bb17..6607aebb39931e17a182b646cbc5381dba490186 100755 (executable)
@@ -26,7 +26,7 @@ void main(int argc, char *argv[]) {
 \r
        TL_VidInit(&gvar);      VGAmodeX(1, 0, &gvar);\r
        modexSavePalFile(bakapee, &gvar.video.palette);\r
-       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);// modexFadeOn(4, &gvar.video.palette);\r
+       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);// modexFadeOn(4, &gvar.video.palette);\r
        VL_ShowPage(&gvar.video.page[0], 1, 0);\r
        modexpdump(&gvar.video.page[0]);\r
        while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r
index 303dbf9d845867bf0f825c26a193551f411129ce..7ef2c526a831775cfd621cfc855659ce41c6482f 100755 (executable)
@@ -27,7 +27,7 @@ void main(int argc, char *argv[])
 \r
        TL_VidInit(&gvar);      VGAmodeX(1, 0, &gvar);\r
        VL_LoadPalFile(bakapee, &gvar.video.palette, &gvar);            //modexLoadPalFile(bakapee, &(gvar.video.palette));\r
-       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0], &gvar.video);// modexFadeOn(4, &gvar.video.palette);\r
+       gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]/*, &gvar.video*/);// modexFadeOn(4, &gvar.video.palette);\r
        VL_ShowPage(&gvar.video.page[0], 1, 0);\r
        modexpdump(&gvar.video.page[0]);\r
        while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ }\r