void I_EnableLoadingDisk(void) { patch_t *disk; byte *tmpbuf; char *disk_name; int y; char buf[20]; SDL_VideoDriverName(buf, 15); if (!strcmp(buf, "Quartz")) { // MacOS Quartz gives us pageflipped graphics that screw up the // display when we use the loading disk. Disable it. // This is a gross hack. return; } if (M_CheckParm("-cdrom") > 0) disk_name = DEH_String("STCDROM"); else disk_name = DEH_String("STDISK"); disk = W_CacheLumpName(disk_name, PU_STATIC); // Draw the patch into a temporary buffer tmpbuf = Z_Malloc(SCREENWIDTH * (disk->height + 1), PU_STATIC, NULL); V_UseBuffer(tmpbuf); // Draw the disk to the screen: V_DrawPatch(0, 0, disk); disk_image = Z_Malloc(LOADING_DISK_W * LOADING_DISK_H, PU_STATIC, NULL); saved_background = Z_Malloc(LOADING_DISK_W * LOADING_DISK_H, PU_STATIC, NULL); for (y=0; y<LOADING_DISK_H; ++y) { memcpy(disk_image + LOADING_DISK_W * y, tmpbuf + SCREENWIDTH * y, LOADING_DISK_W); } // All done - free the screen buffer and restore the normal // video buffer. W_ReleaseLumpName(disk_name); V_RestoreBuffer(); Z_Free(tmpbuf); }
// // Main Console functions // // ticker, responder, drawer, init etc. // void C_InitBackdrop(void) { patch_t *patch; switch(gamemode) { case retail: case registered: lumpname = "PFUB1"; break; case shareware: lumpname = "WIMAP0"; break; case commercial: lumpname = "INTERPIC"; break; default: lumpname = "TITLEPIC"; break; } // allow for custom console background graphic if(W_CheckNumForName("CONSOLE") >= 0) lumpname = "CONSOLE"; backdrop_lumpnum = W_GetNumForName(lumpname); if(backdrop) Z_Free(backdrop); backdrop = Z_Malloc(SCREENWIDTH * SCREENHEIGHT, PU_STATIC, 0); // draw the console background image to the newly allocated video buffer patch = W_CacheLumpName(lumpname, PU_CACHE); // fill the video buffer with the newly allocated screen V_UseBuffer(backdrop); V_DrawPatch(0, 0, patch); // restore the backup up video buffer V_RestoreBuffer(); }
void ST_refreshBackground(void) { if (st_statusbaron) { V_UseBuffer(st_backing_screen); V_DrawPatch(ST_X, 0, sbar); if (netgame) V_DrawPatch(ST_FX, 0, faceback); V_RestoreBuffer(); V_CopyRect(ST_X, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, ST_X, ST_Y); } }
void ST_refreshBackground(void) { if (screenblocks >= CRISPY_HUD && !automapactive) return; if (st_statusbaron) { V_UseBuffer(st_backing_screen); V_DrawPatch(ST_X, 0, sbar); if (netgame) V_DrawPatch(ST_FX, 0, faceback); V_RestoreBuffer(); V_CopyRect(ST_X, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, ST_X, ST_Y); } }
void ST_refreshBackground(void) { if (st_statusbaron) { V_UseBuffer(st_backing_screen); if(fsize != 4207819 && fsize != 4274218 && fsize != 10396254) // HACK: NOT FOR SHARE 1.0 & 1.1 && REG 1.1 V_DrawPatch(ST_X, 0, sbar); else // HACK: IF SHAREWARE 1.0 OR 1.1 { V_DrawPatch(0, 0, sbar_left_oldwad); V_DrawPatch(104, 0, sbar_right_oldwad); } if (netgame) V_DrawPatch(ST_FX, 0, faceback); V_RestoreBuffer(); V_CopyRect(ST_X, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, ST_X, ST_Y); } }