// // V_DrawLoading // void V_DrawLoading(void) { int x, y; int linelen; vfont_t *font; // haleyjd 11/30/02: get palette indices from GameModeInfo int white = GameModeInfo->whiteIndex; int black = GameModeInfo->blackIndex; // haleyjd 01/29/09: not if -nodraw was used if(nodrawers) return; if(!loading_message) return; // 05/02/10: update console C_Drawer(); V_DrawBox((SCREENWIDTH/2)-50, (SCREENHEIGHT/2)-30, 100, 40); font = E_FontForName("ee_smallfont"); V_FontWriteText(font, loading_message, (SCREENWIDTH/2)-30, (SCREENHEIGHT/2)-20, &subscreen43); x = ((SCREENWIDTH/2)-45); y = (SCREENHEIGHT/2); linelen = (90*loading_amount) / loading_total; // White line if(linelen > 0) V_ColorBlockScaled(&subscreen43, (byte)white, x, y, linelen, 1); // Black line if(linelen < 90) V_ColorBlockScaled(&subscreen43, (byte)black, x + linelen, y, 90 - linelen, 1); I_FinishUpdate(); }
// // updates the screen without actually waiting for d_display // useful for functions that get input without using the gameloop // eg. serial code // void C_Update(void) { C_Drawer(); I_FinishUpdate(); }