-#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