]> 4ch.mooo.com Git - 16.git/commitdiff
16_ca needs huge amounts of work and I should remember what needs to be done soon...
authorsparky4 <sparky4@cock.li>
Fri, 7 Jul 2017 18:32:51 +0000 (13:32 -0500)
committersparky4 <sparky4@cock.li>
Fri, 7 Jul 2017 18:32:51 +0000 (13:32 -0500)
src/exmmtest.c
src/lib/16_mm.c

index 5adebd335c38c6cf9c8c89e8b6e193ec91f81a0c..f34cc3be33aa693bc51db15809c9af2b06c0557d 100755 (executable)
@@ -210,7 +210,7 @@ PRINTBB; KEYP
 #ifndef NOVID\r
        VGAmodeX(8, 0, &gvar); VL_LoadPalFileCore(&gvar.video.palette, &gvar);\r
        modexHiganbanaPageSetup(&gvar);\r
-//     gvar.video.page[0].dx = gvar.video.page[0].dy = 0;\r
+       gvar.video.page[0].dx = gvar.video.page[0].dy = 0;\r
 //     VL_modexPalScramble(&gvar.video.palette);\r
 //     ShapeTest_(&gvar);\r
 #endif\r
index e83003b7198587c2016a45c112b96bfc832dd9c8..7383b693c016d2d72de5441eaff123f3e2e9ed3a 100755 (executable)
@@ -1368,7 +1368,7 @@ void MM_ShowMemory (global_game_variables_t *gvar)
        mmshowmemoryinfo_t scaninfo[MAXBLOCKS];\r
        byte scratch1[4];\r
        unsigned                xpos,ypos, oldq,q,maxq;\r
-       boolean         done,restarted;\r
+       boolean         done,restarted,mmsmscaninfoxyposinew;\r
        ScanCode                scancode;\r
 #endif\r
 \r
@@ -1379,7 +1379,7 @@ void MM_ShowMemory (global_game_variables_t *gvar)
        temp = BDOFSCONV gvar->video.BOFS;\r
        gvar->video.BOFS = gvar->video.DOFS;\r
 #ifdef MMSMSCANINFO\r
-       oldq = 0; restarted = false;\r
+       oldq = 0; restarted = false; mmsmscaninfoxyposinew = false;\r
 reset:\r
        q = 0;\r
 #endif\r
@@ -1427,12 +1427,12 @@ reset:
                        y += gvar->video.page[0].dy;\r
                        x += gvar->video.page[0].dx;\r
                }\r
-//#if 0\r
+#if 0\r
                else{\r
                        scaninfo[q].y = y;\r
                        scaninfo[q].x = x;\r
                }\r
-//#endif\r
+#endif\r
 #endif\r
                VW_Hlin(x,x+end,y,color,gvar);\r
                VL_Plot(x,y,5,gvar);\r
@@ -1506,8 +1506,7 @@ reset:
 \r
        CA_CloseDebug (gvar);\r
 \r
-#if 0\r
-//def MMSMPANVID\r
+#ifdef MMSMPANVID\r
        {\r
                int dx,dy,odx,ody;\r
                odx = gvar->video.page[0].dx;\r
@@ -1545,9 +1544,7 @@ reset:
        }\r
 #endif\r
 #ifdef MMSMSCANINFO\r
-//#define MMSMSCANINFOXYPOSNEW\r
-//{\r
-       maxq = q;\r
+       maxq = q-1;\r
        if(restarted) q = oldq;\r
        else q = 0;\r
        restarted = false;\r
@@ -1596,15 +1593,16 @@ reset:
                {\r
                        y = scaninfo[q].scan->start/width;\r
                        x = scaninfo[q].scan->start%width;\r
-#ifndef MMSMSCANINFOXYPOSNEW\r
-                       y = ypos;\r
-                       x = xpos;\r
-#else\r
-                       //y = scaninfo[q].y;\r
-                       //x = scaninfo[q].x;\r
-                       y += gvar->video.page[0].dy;\r
-                       x += gvar->video.page[0].dx;\r
-#endif\r
+                       if(!mmsmscaninfoxyposinew)\r
+                       {\r
+                               y = ypos;\r
+                               x = xpos;\r
+                       }else{\r
+                               //y = scaninfo[q].y;\r
+                               //x = scaninfo[q].x;\r
+                               y += gvar->video.page[0].dy;\r
+                               x += gvar->video.page[0].dx;\r
+                       }\r
                        VW_Hlin(x,x+end,y,color,gvar);\r
                        VL_Plot(x,y,5,gvar);\r
                }\r
@@ -1612,7 +1610,6 @@ reset:
                {\r
                        printf("%s", scratch1);\r
                        printf("%s", AAGREY); printf("_");\r
-//                     if(scaninfo[q].scan->length<64000)\r
                        for(w=(scaninfo[q].scan->start)/80;w<=end/80;w++)\r
                        {\r
                                //strcat(scratch1, "+");\r
@@ -1639,7 +1636,7 @@ reset:
                {\r
                        //if (scan->next && scan->next->start > end+1) free\r
                        xpos = gvar->video.page[0].dx;\r
-                       ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
+                       ypos = gvar->video.page[0].dy;\r
                }\r
                else\r
                {\r
@@ -1654,6 +1651,11 @@ reset:
                IN_ClearKey(scancode);\r
                switch (scancode)\r
                {\r
+                       case sc_Enter:\r
+                               if(!mmsmscaninfoxyposinew) mmsmscaninfoxyposinew = true;\r
+                               else mmsmscaninfoxyposinew = false;\r
+                               //mmsmscaninfoxyposinew!=mmsmscaninfoxyposinew;\r
+                       break;\r
                        case sc_LeftArrow:\r
                                if(q>0) q--;\r
                                else    q = maxq;\r
@@ -1671,9 +1673,6 @@ reset:
                                else q = 0;\r
                        break;\r
                        case sc_Space:\r
-//                             scan = gvar->mm.mmhead;\r
-//                             x = gvar->video.page[0].dx;\r
-//                             y = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
                                oldq = q;\r
                                restarted = true;\r
                                modexClearRegion(&gvar->video.page[0], 0, 0, gvar->video.page[0].width, gvar->video.page[0].height, 8);\r
@@ -1684,8 +1683,6 @@ reset:
                        break;\r
                }\r
        }\r
-//}\r
-//     MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar);\r
 #else\r
        if(gvar->video.VL_Started) IN_Ack(gvar);\r
 #endif\r
@@ -1693,135 +1690,9 @@ reset:
        gvar->video.BOFS = (byte __far *)temp;\r
 }\r
 \r
-#if 0\r
-//def MMSMSCANINFO\r
-void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar)\r
-       {\r
-               byte scratch1[4];\r
-               unsigned                maxq = q;\r
-               boolean                 done;\r
-               ScanCode                scancode;\r
-               int xpos,ypos;\r
-               word ccolor = 3;\r
-               IN_Ack(gvar);\r
-//             VL_ClearVideo (8);\r
-               for (q = 0,done = false;!done;)\r
-               {\r
-                       if(scaninfo[q].scan->attributes & PURGEBITS)\r
-                       {\r
-                               ccolor = 6;             // dark purple = purgable\r
-                               strcpy(scratch1, AAMAGENTA);            // dark purple = purgable\r
-                               //printf("%s", AAMAGENTA);\r
-                       }else{\r
-                               ccolor = 2;             // medium blue = non purgable\r
-                               strcpy(scratch1, AABLUE);               // medium blue = non purgable\r
-                               //printf("%s", AABLUE);\r
-                       }\r
-                       if(scaninfo[q].scan->attributes & LOCKBIT)\r
-                       {\r
-                               ccolor = 1;             // red = locked\r
-                               strcpy(scratch1, AARED);                // red = locked\r
-                               //printf("%s", AARED);\r
-                       }\r
-                       end = scaninfo[q].scan->length-1;\r
-//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
-#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
-#ifdef __WATCOMC__\r
-                       if(gvar->video.VL_Started)\r
-                       {\r
-                               VL_ShowPage(&gvar->video.page[0], 1, 0);\r
-                               modexClearRegion(&gvar->video.page[0], 0, 0, gvar->video.page[0].width, gvar->video.page[0].height, 8);\r
-                       }else\r
-#endif\r
-                               clrscr();\r
-                       sprintf(global_temp_status_text, "block #%04u", q); MMSMPRINTMEMINFO\r
-//                     sprintf(global_temp_status_text, "%Fp", scaninfo[q].scan->useptr); MMSMPRINTMEMINFO\r
-                       sprintf(global_temp_status_text, "start:  %04x", (unsigned)scaninfo[q].scan->start); MMSMPRINTMEMINFO\r
-                       sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[q].scan->useptr); MMSMPRINTMEMINFO\r
-                       sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[q].scan->length); MMSMPRINTMEMINFO\r
-                       if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1)\r
-                       {\r
-                               sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[q].scan->next->start-scaninfo[q].scan->start)); MMSMPRINTMEMINFO\r
-                       }\r
-                       if(gvar->video.VL_Started)\r
-                       {\r
-                               y = ypos;//scaninfo[q].scan->start/width;\r
-                               x = xpos;//scaninfo[q].scan->start%width;\r
-                               VW_Hlin(x,x+end,y,ccolor,gvar);\r
-                               VL_Plot(x,y,5,gvar);\r
-                       }\r
-                       else\r
-                       {\r
-                               printf("%s", scratch1);\r
-                               printf("%s", AAGREY); printf("_");\r
-                               if(scaninfo[q].scan->length<64000)\r
-                               for(w=(scaninfo[q].scan->start)/80;w<=end/80;w++)\r
-                               {\r
-                                       //strcat(scratch1, "+");\r
-                                       printf("+");\r
-                               }\r
-                       }\r
-\r
-\r
-                               if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) if(!gvar->video.VL_Started)\r
-                               {\r
-                                       //strcat(scratch1, AARESET);\r
-                                       printf("%s", AARESET);\r
-                                       //strcat(scratch1,AAGREEN);\r
-                                       printf("%s", AAGREEN);\r
-                                       for(w=(end+1)/80;w<=((scaninfo[q].scan->next->start-scaninfo[q].scan->start)/80);w++)\r
-                                       {\r
-                                               //strcat(scratch1,"0");\r
-                                               printf("0");\r
-                                       }\r
-                               }else VW_Hlin(x+end+1,x+(scaninfo[q].scan->next->start-scaninfo[q].scan->start),y,3,gvar);      // black = free//now green\r
-\r
-\r
-                       if(gvar->video.VL_Started)\r
-                       {\r
-                               //if (scan->next && scan->next->start > end+1) free\r
-                               xpos = gvar->video.page[0].dx;\r
-                               ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4\r
-                       }\r
-                       else\r
-                       {\r
-                               //printf("%s\n", scratch1);\r
-                               printf("%s", AARESET);\r
-                               printf("\n");\r
-                       }\r
-//0000printf("%s", AABLACK); fprintf(stdout, "q=%u     maxq=%u\n", q, maxq); printf("%s", AARESET);\r
-//fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax\r
-                       while (!(scancode = gvar->in.inst->LastScan)){}\r
-\r
-                       IN_ClearKey(scancode);\r
-                       switch (scancode)\r
-                       {\r
-                               case sc_LeftArrow:\r
-                                       if(q>0) q--;\r
-                                       else    q = maxq;\r
-                               break;\r
-                               case sc_RightArrow:\r
-                                       if(q<maxq) q++;\r
-                                       else q = 0;\r
-                               break;\r
-                               case sc_UpArrow:\r
-                                       if(q>10) q-=10;\r
-                                       else    q = maxq;\r
-                               break;\r
-                               case sc_DownArrow:\r
-                                       if(q<maxq+10) q+=10;\r
-                                       else q = 0;\r
-                               break;\r
-                               case sc_Escape:\r
-                                       done = true;\r
-                               break;\r
-                       }\r
-               }\r
-       }\r
-#endif\r
-\r
 //==========================================================================\r
 \r
+\r
 /*\r
 =====================\r
 =\r