void IN_DrawCoopStats(void) { int i; int x; int ypos; static int sounds; IN_DrTextB(DEH_String("KILLS"), 95, 35); IN_DrTextB(DEH_String("BONUS"), 155, 35); IN_DrTextB(DEH_String("SECRET"), 232, 35); x = 160 - MN_TextBWidth(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] + 7) / 2; IN_DrTextB(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] + 7, x, 3); x = 160 - MN_TextAWidth(DEH_String("FINISHED")) / 2; MN_DrTextA(DEH_String("FINISHED"), x, 25); ypos = 50; for (i = 0; i < MAXPLAYERS; i++) { if (playeringame[i]) { V_DrawShadowedPatch(25, ypos, W_CacheLumpNum(patchFaceOkayBase + i, PU_CACHE)); if (intertime < 40) { sounds = 0; ypos += 37; continue; } else if (intertime >= 40 && sounds < 1) { S_StartSound(NULL, sfx_dorcls); sounds++; } IN_DrawNumber(killPercent[i], 85, ypos + 10, 3); V_DrawShadowedPatch(121, ypos + 10, FontBPercent); IN_DrawNumber(bonusPercent[i], 160, ypos + 10, 3); V_DrawShadowedPatch(196, ypos + 10, FontBPercent); IN_DrawNumber(secretPercent[i], 237, ypos + 10, 3); V_DrawShadowedPatch(273, ypos + 10, FontBPercent); ypos += 37; } } }
void IN_DrTextB(char *text, int x, int y) { char c; patch_t *p; while((c = *text++) != 0) { if(c < 33) { x += 8; } else { p = W_CacheLumpNum(FontBLump+c-33, PU_CACHE); V_DrawShadowedPatch(x, y, p); x += p->width-1; } } }
void IN_DrawNumber(int val, int x, int y, int digits) { patch_t *patch; int xpos; int oldval; int realdigits; boolean neg; oldval = val; xpos = x; neg = false; realdigits = 1; if(val < 0) { //...this should reflect negative frags val = -val; neg = true; if(val > 99) { val = 99; } } if(val > 9) { realdigits++; if(digits < realdigits) { realdigits = digits; val = 9; } } if(val > 99) { realdigits++; if(digits < realdigits) { realdigits = digits; val = 99; } } if(val > 999) { realdigits++; if(digits < realdigits) { realdigits = digits; val = 999; } } if(digits == 4) { patch = FontBNumbers[val/1000]; V_DrawShadowedPatch(xpos+6-patch->width/2-12, y, patch); } if(digits > 2) { if(realdigits > 2) { patch = FontBNumbers[val/100]; V_DrawShadowedPatch(xpos+6-patch->width/2, y, patch); } xpos += 12; } val = val%100; if(digits > 1) { if(val > 9) { patch = FontBNumbers[val/10]; V_DrawShadowedPatch(xpos+6-patch->width/2, y, patch); } else if(digits == 2 || oldval > 99) { V_DrawShadowedPatch(xpos, y, FontBNumbers[0]); } xpos += 12; } val = val%10; patch = FontBNumbers[val]; V_DrawShadowedPatch(xpos+6-patch->width/2, y, patch); if(neg) { patch = FontBNegative; V_DrawShadowedPatch(xpos+6-patch->width/2-12*(realdigits), y, patch); } }
void IN_DrawDMStats(void) { int i; int j; int ypos; int xpos; int kpos; int x; static int sounds; xpos = 90; ypos = 55; IN_DrTextB("TOTAL", 265, 30); MN_DrTextA("VICTIMS", 140, 8); for(i=0; i<7; i++) { MN_DrTextA(KillersText[i], 10, 80+9*i); } if(intertime < 20) { for(i=0; i<MAXPLAYERS; i++) { if(playeringame[i]) { V_DrawShadowedPatch(40, ((ypos<<FRACBITS)+dSlideY[i]*intertime) >>FRACBITS, W_CacheLumpNum(patchFaceOkayBase+i, PU_CACHE)); V_DrawShadowedPatch(((xpos<<FRACBITS)+dSlideX[i]*intertime) >>FRACBITS, 18, W_CacheLumpNum(patchFaceDeadBase+i, PU_CACHE)); } } sounds = 0; return; } if(intertime >= 20 && sounds < 1) { S_StartSound(NULL, sfx_dorcls); sounds++; } if(intertime >= 100 && slaughterboy && sounds < 2) { S_StartSound(NULL, sfx_wpnup); sounds++; } for(i=0; i<MAXPLAYERS; i++) { if(playeringame[i]) { if(intertime < 100 || i == consoleplayer) { V_DrawShadowedPatch(40, ypos, W_CacheLumpNum(patchFaceOkayBase+i, PU_CACHE)); V_DrawShadowedPatch(xpos, 18, W_CacheLumpNum(patchFaceDeadBase+i, PU_CACHE)); } else { V_DrawFuzzPatch(40, ypos, W_CacheLumpNum(patchFaceOkayBase+i, PU_CACHE)); V_DrawFuzzPatch(xpos, 18, W_CacheLumpNum(patchFaceDeadBase+i, PU_CACHE)); } kpos = 86; for(j=0; j<MAXPLAYERS; j++) { if(playeringame[j]) { IN_DrawNumber(players[i].frags[j], kpos, ypos+10, 3); kpos += 43; } } if(slaughterboy&(1<<i)) { if(!(intertime&16)) { IN_DrawNumber(totalFrags[i], 263, ypos+10, 3); } } else { IN_DrawNumber(totalFrags[i], 263, ypos+10, 3); } ypos += 36; xpos += 43; } } }
void IN_DrawSingleStats(void) { int x; static int sounds; IN_DrTextB("KILLS", 50, 65); IN_DrTextB("ITEMS", 50, 90); IN_DrTextB("SECRETS", 50, 115); x = 160-MN_TextBWidth(LevelNames[(gameepisode-1)*9+prevmap-1]+7)/2; IN_DrTextB(LevelNames[(gameepisode-1)*9+prevmap-1]+7, x, 3); x = 160-MN_TextAWidth("FINISHED")/2; MN_DrTextA("FINISHED", x, 25); if(intertime < 30) { sounds = 0; return; } if(sounds < 1 && intertime >= 30) { S_StartSound(NULL, sfx_dorcls); sounds++; } IN_DrawNumber(players[consoleplayer].killcount, 200, 65, 3); V_DrawShadowedPatch(237, 65, FontBSlash); IN_DrawNumber(totalkills, 248, 65, 3); if(intertime < 60) { return; } if(sounds < 2 && intertime >= 60) { S_StartSound(NULL, sfx_dorcls); sounds++; } IN_DrawNumber(players[consoleplayer].itemcount, 200, 90, 3); V_DrawShadowedPatch(237, 90, FontBSlash); IN_DrawNumber(totalitems, 248, 90, 3); if(intertime < 90) { return; } if(sounds < 3 && intertime >= 90) { S_StartSound(NULL, sfx_dorcls); sounds++; } IN_DrawNumber(players[consoleplayer].secretcount, 200, 115, 3); V_DrawShadowedPatch(237, 115, FontBSlash); IN_DrawNumber(totalsecret, 248, 115, 3); if(intertime < 150) { return; } if(sounds < 4 && intertime >= 150) { S_StartSound(NULL, sfx_dorcls); sounds++; } if(!ExtendedWAD || gameepisode < 4) { IN_DrTextB("TIME", 85, 160); IN_DrawTime(155, 160, hours, minutes, seconds); } else { x = 160-MN_TextAWidth("NOW ENTERING:")/2; MN_DrTextA("NOW ENTERING:", x, 160); x = 160-MN_TextBWidth(LevelNames[(gameepisode-1)*9+gamemap-1]+7)/2; IN_DrTextB(LevelNames[(gameepisode-1)*9+gamemap-1]+7, x, 170); skipintermission = false; } }