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
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
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
\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
}\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
{\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
{\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
{\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
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
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
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
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