void DrawPlayBorderSides (void) { int xl,yl; xl = 160-viewwidth/2; yl = (200-STATUSLINES-viewheight)/2; VWB_Bar (0,0,xl-1,200-STATUSLINES,127); VWB_Bar (xl+viewwidth+1,0,xl-2,200-STATUSLINES,127); VWB_Vlin (yl-1,yl+viewheight,xl-1,0); VWB_Vlin (yl-1,yl+viewheight,xl+viewwidth,125); }
void DrawPlayBorder (void) { int xl,yl; VWB_Bar (0,0,320,200-STATUSLINES,127); xl = 160-viewwidth/2; yl = (200-STATUSLINES-viewheight)/2; VWB_Bar (xl,yl,viewwidth,viewheight,0); VWB_Hlin (xl-1,xl+viewwidth,yl-1,0); VWB_Hlin (xl-1,xl+viewwidth,yl+viewheight,125); VWB_Vlin (yl-1,yl+viewheight,xl-1,0); VWB_Vlin (yl-1,yl+viewheight,xl+viewwidth,125); VWB_Plot (xl-1,yl+viewheight,124); }
/* ================ = = ShapeTest = ================ */ void ShapeTest (void) { //TODO #if NOTYET extern word NumDigi; extern word *DigiList; extern int postx; extern int postwidth; extern byte *postsource; static char buf[10]; boolean done; ScanCode scan; int i,j,k,x; longword l; byte *addr; soundnames sound; // PageListStruct far *page; CenterWindow(20,16); VW_UpdateScreen(); for (i = 0,done = false; !done;) { US_ClearWindow(); sound = (soundnames) -1; // page = &PMPages[i]; US_Print(" Page #"); US_PrintUnsigned(i); if (i < PMSpriteStart) US_Print(" (Wall)"); else if (i < PMSoundStart) US_Print(" (Sprite)"); else if (i == ChunksInFile - 1) US_Print(" (Sound Info)"); else US_Print(" (Sound)"); /* US_Print("\n XMS: "); if (page->xmsPage != -1) US_PrintUnsigned(page->xmsPage); else US_Print("No"); US_Print("\n Main: "); if (page->mainPage != -1) US_PrintUnsigned(page->mainPage); else if (page->emsPage != -1) { US_Print("EMS "); US_PrintUnsigned(page->emsPage); } else US_Print("No"); US_Print("\n Last hit: "); US_PrintUnsigned(page->lastHit);*/ US_Print("\n Address: "); addr = (byte *) PM_GetPage(i); sprintf(buf,"0x%08X",(int32_t) addr); US_Print(buf); if (addr) { if (i < PMSpriteStart) { // // draw the wall // vbuf += 32*SCREENWIDTH; postx = 128; postwidth = 1; postsource = addr; for (x=0;x<64;x++,postx++,postsource+=64) { wallheight[postx] = 256; ScalePost (); } vbuf -= 32*SCREENWIDTH; } else if (i < PMSoundStart) { // // draw the sprite // vbuf += 32*SCREENWIDTH; SimpleScaleShape (160, i-PMSpriteStart, 64); vbuf -= 32*SCREENWIDTH; } else if (i == ChunksInFile - 1) { US_Print("\n\n Number of sounds: "); US_PrintUnsigned(NumDigi); for (l = j = k = 0;j < NumDigi;j++) { l += DigiList[(j * 2) + 1]; k += (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize; } US_Print("\n Total bytes: "); US_PrintUnsigned(l); US_Print("\n Total pages: "); US_PrintUnsigned(k); } else { byte *dp = addr; for (j = 0;j < NumDigi;j++) { k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize; if ((i >= PMSoundStart + DigiList[j * 2]) && (i < PMSoundStart + DigiList[j * 2] + k)) break; } if (j < NumDigi) { sound = (soundnames) j; US_Print("\n Sound #"); US_PrintUnsigned(j); US_Print("\n Segment #"); US_PrintUnsigned(i - PMSoundStart - DigiList[j * 2]); } for (j = 0;j < PageLengths[i];j += 32) { byte v = dp[j]; int v2 = (unsigned)v; v2 -= 128; v2 /= 4; if (v2 < 0) VWB_Vlin(WindowY + WindowH - 32 + v2, WindowY + WindowH - 32, WindowX + 8 + (j / 32),BLACK); else VWB_Vlin(WindowY + WindowH - 32, WindowY + WindowH - 32 + v2, WindowX + 8 + (j / 32),BLACK); } } } VW_UpdateScreen(); IN_Ack(); scan = LastScan; IN_ClearKey(scan); switch (scan) { case sc_LeftArrow: if (i) i--; break; case sc_RightArrow: if (++i >= ChunksInFile) i--; break; case sc_W: // Walls i = 0; break; case sc_S: // Sprites i = PMSpriteStart; break; case sc_D: // Digitized i = PMSoundStart; break; case sc_I: // Digitized info i = ChunksInFile - 1; break; /* case sc_L: // Load all pages for (j = 0;j < ChunksInFile;j++) PM_GetPage(j); break;*/ case sc_P: if (sound != -1) SD_PlayDigitized(sound,8,8); break; case sc_Escape: done = true; break; /* case sc_Enter: PM_GetPage(i); break;*/ } } SD_StopDigitized(); #endif }