boolean dbg_maptext=0;\r
byte *dbg_mapdata;\r
#endif\r
-#endif //debug\r
+#endif\r
\r
#ifdef __WATCOMC__\r
// TODO: Could we also provide a build mode to emit debug to the "Bochs E9 hack?"\r
_DEBUG(_DEBUGF_TMP);\r
va_end(va);\r
}\r
-#endif //serial\r
#endif //watcomc\r
-/*\r
-================\r
-=\r
-= ShapeTest\r
-=\r
-================\r
-*/\r
-\r
-#pragma warn -pia\r
-void ShapeTest (global_game_variables_t *gvar)\r
-{\r
-extern word NumDigi;\r
-extern word _seg *DigiList;\r
-static char buf[10];\r
-\r
- boolean done;\r
- ScanCode scan;\r
- int i,j;\r
-// dword l; word k,x;\r
- memptr addr;\r
- PageListStruct far *page;\r
-\r
-// CenterWindow(20,16);\r
-// VW_UpdateScreen();\r
- for (i = 0,done = false;!done;)\r
- {\r
-// US_ClearWindow();\r
-// sound = -1;\r
-\r
- page = &(gvar->pm.PMPages[i]);\r
-// US_Print(" Page #");\r
-// US_PrintUnsigned(i);\r
- printf(" Page #%u", i);\r
- if (i < (gvar->pm.fi.PMSpriteStart))\r
-// US_Print(" (Wall)");\r
- printf(" (Wall)");\r
-/* else if (i < (gvar->pm.fi.PMSoundStart))\r
-// US_Print(" (Sprite)");\r
- printf(" (Sprite)");\r
- else if (i == (gvar->pm.fi.ChunksInFile - 1))\r
-// US_Print(" (Sound Info)");\r
- printf(" (Sound Info)");\r
- else\r
-// US_Print(" (Sound)");\r
- printf(" (Sound)");*/\r
-\r
-// US_Print("\n XMS: ");\r
- printf("\n XMS: ");\r
- if (page->xmsPage != -1)\r
-// US_PrintUnsigned(page->xmsPage);\r
- printf("%u", page->xmsPage);\r
- else\r
-// US_Print("No");\r
- printf("No");\r
-\r
-// US_Print("\n Main: ");\r
- if (page->mainPage != -1)\r
-// US_PrintUnsigned(page->mainPage);\r
- printf("\n Main: %u", page->mainPage);\r
- else if (page->emsPage != -1)\r
- {\r
-// US_Print("EMS ");\r
-// US_PrintUnsigned(page->emsPage);\r
- printf("EMS %u", page->emsPage);\r
- }\r
- else\r
-// US_Print("No");\r
- printf("No");\r
-\r
-// US_Print("\n Last hit: ");\r
-// US_PrintUnsigned(page->lastHit);\r
- printf("\n Last hit: %u", page->lastHit);\r
-\r
-// US_Print("\n Address: ");\r
- printf("\n Address: ");\r
- addr = PM_GetPageAddress(i, gvar);\r
- sprintf(buf,"0x%04x",(word)addr);\r
-// US_Print(buf);\r
- printf("%s", buf);\r
-\r
- if (addr)\r
- {\r
-/* if (i < PMSpriteStart)\r
- {\r
- //\r
- // draw the wall\r
- //\r
- bufferofs += 32*SCREENWIDTH;\r
- postx = 128;\r
- postwidth = 1;\r
- postsource = ((long)((unsigned)addr))<<16;\r
- for (x=0;x<64;x++,postx++,postsource+=64)\r
- {\r
- wallheight[postx] = 256;\r
- FarScalePost ();\r
- }\r
- bufferofs -= 32*SCREENWIDTH;\r
- }\r
- else if (i < PMSoundStart)\r
- {\r
- //\r
- // draw the sprite\r
- //\r
- bufferofs += 32*SCREENWIDTH;\r
- SimpleScaleShape (160, i-PMSpriteStart, 64);\r
- bufferofs -= 32*SCREENWIDTH;\r
- }\r
- else if (i == ChunksInFile - 1)\r
- {\r
- US_Print("\n\n Number of sounds: ");\r
- US_PrintUnsigned(NumDigi);\r
- for (l = j = k = 0;j < NumDigi;j++)\r
- {\r
- l += DigiList[(j * 2) + 1];\r
- k += (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
- }\r
- US_Print("\n Total bytes: ");\r
- US_PrintUnsigned(l);\r
- US_Print("\n Total pages: ");\r
- US_PrintUnsigned(k);\r
- }\r
- else\r
- {\r
- byte far *dp = (byte far *)MK_FP(addr,0);\r
- for (j = 0;j < NumDigi;j++)\r
- {\r
- k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
- if\r
- (\r
- (i >= PMSoundStart + DigiList[j * 2])\r
- && (i < PMSoundStart + DigiList[j * 2] + k)\r
- )\r
- break;\r
- }\r
- if (j < NumDigi)\r
- {\r
-// sound = j;\r
- US_Print("\n Sound #");\r
- US_PrintUnsigned(j);\r
- US_Print("\n Segment #");\r
- US_PrintUnsigned(i - PMSoundStart - DigiList[j * 2]);\r
- }\r
- for (j = 0;j < page->length;j += 32)\r
- {\r
- byte v = dp[j];\r
- int v2 = (unsigned)v;\r
- v2 -= 128;\r
- v2 /= 4;\r
- if (v2 < 0)\r
- VWB_Vlin(WindowY + WindowH - 32 + v2,\r
- WindowY + WindowH - 32,\r
- WindowX + 8 + (j / 32),BLACK);\r
- else\r
- VWB_Vlin(WindowY + WindowH - 32,\r
- WindowY + WindowH - 32 + v2,\r
- WindowX + 8 + (j / 32),BLACK);\r
- }\r
- }*/\r
- printf("\naddr ok\n");\r
- }\r
-\r
-// VW_UpdateScreen();\r
-\r
-// while (!(scan = IN_GetLastScan()))\r
- scan = *IN_GetScanName(scan);\r
-// SD_Poll();\r
-\r
- IN_ClearKey(scan);\r
- switch (scan)\r
- {\r
- case sc_LeftArrow:\r
- if (i)\r
- i--;\r
- break;\r
- case sc_RightArrow:\r
- if (++i >= (gvar->pm.fi.ChunksInFile))\r
- i--;\r
- break;\r
- case sc_W: // Walls\r
- i = 0;\r
- break;\r
- case sc_S: // Sprites\r
-// i = (gvar->pm.fi.PMSpriteStart);\r
- break;\r
- case sc_D: // Digitized\r
-// i = (gvar->pm.fi.PMSoundStart);\r
- break;\r
- case sc_I: // Digitized info\r
- i = (gvar->pm.fi.ChunksInFile - 1);\r
- break;\r
- case sc_L: // Load all pages\r
- for (j = 0;j < (gvar->pm.fi.ChunksInFile);j++)\r
- PM_GetPage(j, gvar);\r
- break;\r
- case sc_P:\r
-// if (sound != -1)\r
-// SD_PlayDigitized(sound);\r
- break;\r
- case sc_Escape:\r
- done = true;\r
- break;\r
- case sc_Enter:\r
- PM_GetPage(i, gvar);\r
- break;\r
- }\r
- }\r
- //SD_StopDigitized();\r
-}\r
-#pragma warn +pia\r
+#endif\r