// // Display level completion time and par, // or "sucks" message if overflow. // void WI_drawTime(int x, int y, int t) { int div; int n; if (t < 0) return; x += (num[0]->width - 11) * 4; if (t <= 61 * 59) { div = 1; do { n = (t / div) % 60; x = WI_drawNum(x, y, n, 2) - SHORT(colon->width); div *= 60; // draw if (div == 60 || t / div) V_DrawPatchWithShadow(x + 1, y + 1, FB, colon, true); } while (t / div); if (t < 60) WI_drawNum(x, y, 0, 2); } else // "sucks" V_DrawPatchWithShadow(x + 13 - SHORT(sucks->width), y + 1, FB, sucks, false); }
void WI_drawPercent (int p, int x, int y, int b = 0) { if (p < 0) return; screen->DrawPatchClean (percent, x, y); if (b == 0) WI_drawNum(p, x, y, -1); else WI_drawNum(p * 100 / b, x, y, -1); }
// // Display level completion time and par, or "sucks" message if overflow. // void WI_drawTime (int x, int y, int t) { bool sucky; if (t<0) return; sucky = t >= wbs->sucktime * 60 * 60 && wbs->sucktime > 0; int hours = t / 3600; t -= hours * 3600; int minutes = t / 60; t -= minutes * 60; int seconds = t; /* int numspacing = SHORT(num[0]->width)*2; int spacing = numspacing + SHORT(colon->width); */ x -= 34*2 + 26; if (hours) { WI_drawNum (x, y, hours, 2); WI_DrawCharPatch (colon, x + 26, y); } x += 34; if (minutes | hours) { WI_drawNum (x, y, minutes, 2); } x += 34; WI_DrawCharPatch (colon, x - 8, y); WI_drawNum (x, y, seconds, 2); if (sucky) { // "sucks" if (sucks != NULL) { screen->DrawTexture (sucks, x - sucks->GetWidth(), y - num[0]->GetHeight() - 2, DTA_Clean, true, TAG_DONE); } else { screen->SetFont (BigFont); screen->DrawText (CR_UNTRANSLATED, x - BigFont->StringWidth("SUCKS"), y - BigFont->GetHeight() - 2, "SUCKS", DTA_Clean, true, TAG_DONE); screen->SetFont (SmallFont); } } }
// // Display level completion time and par, // or "sucks" message if overflow. // void WI_drawTime ( int x, int y, int t ) { int div; int n; if (t<0) return; if (t <= 61*59) { div = 1; do { n = (t / div) % 60; x = WI_drawNum(x, y, n, 2) - SHORT(colon->width); div *= 60; // draw if (div==60 || t / div) V_DrawPatch(x, y, FB, colon); } while (t / div); } else { // "sucks" V_DrawPatch(x - SHORT(sucks->width), y, FB, sucks); } }
void WI_drawTime (int t, int x, int y) { int div; int n; if (t<0) return; if (t <= 61*59) { div = 1; do { n = (t / div) % 60; x = WI_drawNum(n, x, y, 2) - colon->width(); div *= 60; // draw if (div==60 || t / div) screen->DrawPatchClean(colon, x, y); } while (t / div); } else { // "sucks" screen->DrawPatchClean(sucks, x - sucks->width(), y); } }
static void WI_drawTime(int x, int y, int t) { int n; if (t < 0) return; if (t < 100 * 60 * 60) for (;;) { n = t % 60; t /= 60; x = WI_drawNum(x, y, n, (t || n > 9) ? 2 : 1) - V_NamePatchWidth(colon); if (t) V_DrawNamePatch(x, y, FB, colon, CR_DEFAULT, VPT_STRETCH); else break; } else V_DrawNamePatch(x - V_NamePatchWidth(sucks), y, FB, sucks, CR_DEFAULT, VPT_STRETCH); }
void WI_drawPercent(int x, int y, int p) { if (p < 0) return; V_DrawPatchWithShadow(x + 1, y + 1, FB, percent, false); WI_drawNum(x, y, p, -1); }
void WI_drawPercent(int x, int y, int p) { if(p < 0) return; WI_DrawPatch(x, y, percent.lump); WI_drawNum(x, y, p, -1); }
void WI_drawNetgameStats(void) { int i; int x; int y; int pwidth = SHORT(percent->width); WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawPatch(NG_STATSX+NG_SPACINGX-SHORT(kills->width), NG_STATSY, kills); V_DrawPatch(NG_STATSX+2*NG_SPACINGX-SHORT(items->width), NG_STATSY, items); V_DrawPatch(NG_STATSX+3*NG_SPACINGX-SHORT(secret->width), NG_STATSY, secret); if (dofrags) V_DrawPatch(NG_STATSX+4*NG_SPACINGX-SHORT(frags->width), NG_STATSY, frags); // draw stats y = NG_STATSY + SHORT(kills->height); for (i=0 ; i<MAXPLAYERS ; i++) { if (!playeringame[i]) continue; x = NG_STATSX; V_DrawPatch(x-SHORT(p[i]->width), y, p[i]); if (i == me) V_DrawPatch(x-SHORT(p[i]->width), y, star); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, cnt_kills[i]); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, cnt_items[i]); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, cnt_secret[i]); x += NG_SPACINGX; if (dofrags) WI_drawNum(x, y+10, cnt_frags[i], -1); y += WI_SPACINGY; } }
// ==================================================================== // WI_drawPercent // Purpose: Draws a percentage, really just a call to WI_drawNum // after putting a percent sign out there // Args: x, y -- location // p -- the percentage value to be drawn, no negatives // Returns: void // CPhipps - static static void WI_drawPercent(int x, int y, int p) { if (p < 0) return; // CPhipps - patch drawing updated V_DrawNamePatch(x, y, FB, percent, CR_DEFAULT, VPT_STRETCH); WI_drawNum(x, y, p, -1); }
void WI_drawNetgameStats(void) { unsigned int i, x, y; short pwidth = percent->width(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) screen->DrawPatchClean (kills, NG_STATSX+NG_SPACINGX-kills->width(), NG_STATSY); screen->DrawPatchClean (items, NG_STATSX+2*NG_SPACINGX-items->width(), NG_STATSY); screen->DrawPatchClean (scrt, NG_STATSX+3*NG_SPACINGX-scrt->width(), NG_STATSY); if (dofrags) screen->DrawPatchClean (frags, NG_STATSX+4*NG_SPACINGX-frags->width(), NG_STATSY); // draw stats y = NG_STATSY + kills->height(); for (i = 0; i < players.size(); i++) { // [RH] Quick hack: Only show the first four players. if (i >= 4) break; if (!players[i].ingame()) continue; x = NG_STATSX; // [RH] Only use one graphic for the face backgrounds V_ColorMap = translationtables + i * 256; screen->DrawTranslatedPatchClean (p, x - p->width(), y); // classic face background colour //screen->DrawTranslatedPatchClean (faceclassic[i], x-p->width(), y); if (i == me) screen->DrawPatchClean (star, x-p->width(), y); x += NG_SPACINGX; WI_drawPercent (cnt_kills_c[i], x-pwidth, y+10, wbs->maxkills); x += NG_SPACINGX; WI_drawPercent (cnt_items_c[i], x-pwidth, y+10, wbs->maxitems); x += NG_SPACINGX; WI_drawPercent (cnt_secret_c[i], x-pwidth, y+10, wbs->maxsecret); x += NG_SPACINGX; if (dofrags) WI_drawNum(cnt_frags_c[i], x, y+10, -1); y += WI_SPACINGY; } }
static void WI_drawPercent(int x, int y, int p) { if (p < 0) return; V_DrawNamePatch(x, y, FB, percent, CR_DEFAULT, VPT_STRETCH); WI_drawNum(x, y, p, -1); }
void WI_drawNetgameStats(void) { int i; int x; int y; int pwidth = SHORT(::g->percent->width); WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawPatch(NG_STATSX+NG_SPACINGX-SHORT(::g->kills->width), NG_STATSY, FB, ::g->kills); V_DrawPatch(NG_STATSX+2*NG_SPACINGX-SHORT(::g->items->width), NG_STATSY, FB, ::g->items); V_DrawPatch(NG_STATSX+3*NG_SPACINGX-SHORT(::g->secret->width), NG_STATSY, FB, ::g->secret); if (::g->dofrags) V_DrawPatch(NG_STATSX+4*NG_SPACINGX-SHORT(::g->wistuff_frags->width), NG_STATSY, FB, ::g->wistuff_frags); // draw stats y = NG_STATSY + SHORT(::g->kills->height); for (i=0 ; i<MAXPLAYERS ; i++) { if (!::g->playeringame[i]) continue; x = NG_STATSX; V_DrawPatch(x-SHORT(::g->wistuff_p[i]->width), y, FB, ::g->wistuff_p[i]); // No splitscreen on PC if (i == ::g->me /* && !gameLocal->IsSplitscreen() */ ) V_DrawPatch(x-SHORT(::g->wistuff_p[i]->width), y, FB, ::g->star); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, ::g->cnt_kills[i]); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, ::g->cnt_items[i]); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, ::g->cnt_secret[i]); x += NG_SPACINGX; if (::g->dofrags) WI_drawNum(x, y+10, ::g->cnt_frags[i], -1); y += WI_SPACINGY; } }
void WI_drawPercent ( int x, int y, int p ) { if (p < 0) return; V_DrawPatch(x, y, FB, percent); WI_drawNum(x, y, p, -1); }
void WI_drawPercent (int x, int y, int p, int b) { if (p < 0) return; if (wi_percents) { screen->DrawTexture (percent, x, y, DTA_Clean, true, TAG_DONE); if (b == 0) WI_drawNum (x, y, 100, -1, false); else WI_drawNum(x, y, p * 100 / b, -1, false); } else { int y2 = y + percent->GetHeight() - screen->Font->GetHeight (); x = WI_drawNum (x, y, b, -1, false); x -= SmallFont->StringWidth (" OF "); screen->DrawText (CR_UNTRANSLATED, x, y2, " OF", DTA_Clean, true, TAG_DONE); WI_drawNum (x, y, p, -1, false); } }
static void WI_drawTime(int x, int y, int t) { int n; if (t<0) return; if (t < 100*60*60) for(;;) { n = t % 60; t /= 60; x = WI_drawNum(x, y, n, (t || n>9) ? 2 : 1) - V_NamePatchWidth(colon); // draw if (t) // CPhipps - patch drawing updated V_DrawNamePatch(x, y, FB, colon, CR_DEFAULT, VPT_STRETCH); else break; } else // "sucks" (maybe should be "addicted", even I've never had a 100 hour game ;) V_DrawNamePatch(x - V_NamePatchWidth(sucks), y, FB, sucks, CR_DEFAULT, VPT_STRETCH); }
// ==================================================================== // WI_drawNetgameStats // Purpose: Put the coop stats on the screen // Args: none // Returns: void // // proff/nicolas 09/20/98 -- changed for hi-res // CPhipps - patch drawing updated void WI_drawNetgameStats(void) { int i; int x; int y; int pwidth = V_NamePatchWidth(percent); int fwidth = V_NamePatchWidth(facebackp); WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawNamePatch(NG_STATSX+NG_SPACINGX-V_NamePatchWidth(kills), NG_STATSY, FB, kills, CR_DEFAULT, VPT_STRETCH); V_DrawNamePatch(NG_STATSX+2*NG_SPACINGX-V_NamePatchWidth(items), NG_STATSY, FB, items, CR_DEFAULT, VPT_STRETCH); V_DrawNamePatch(NG_STATSX+3*NG_SPACINGX-V_NamePatchWidth(secret), NG_STATSY, FB, secret, CR_DEFAULT, VPT_STRETCH); if (dofrags) V_DrawNamePatch(NG_STATSX+4*NG_SPACINGX-V_NamePatchWidth(frags), NG_STATSY, FB, frags, CR_DEFAULT, VPT_STRETCH); // draw stats y = NG_STATSY + V_NamePatchHeight(kills); for (i=0 ; i<MAXPLAYERS ; i++) { //int trans = playernumtotrans[i]; if (!playeringame[i]) continue; x = NG_STATSX; V_DrawNamePatch(x-fwidth, y, FB, facebackp, i ? CR_LIMIT+i : CR_DEFAULT, VPT_STRETCH | (i ? VPT_TRANS : 0)); if (i == me) V_DrawNamePatch(x-fwidth, y, FB, star, CR_DEFAULT, VPT_STRETCH); x += NG_SPACINGX; if (cnt_kills) WI_drawPercent(x-pwidth, y+10, cnt_kills[i]); x += NG_SPACINGX; if (cnt_items) WI_drawPercent(x-pwidth, y+10, cnt_items[i]); x += NG_SPACINGX; if (cnt_secret) WI_drawPercent(x-pwidth, y+10, cnt_secret[i]); x += NG_SPACINGX; if (dofrags && cnt_frags) WI_drawNum(x, y+10, cnt_frags[i], -1); y += WI_SPACINGY; } if (y <= SP_TIMEY) // cph - show times in coop on the entering screen WI_drawTimeStats(plrs[me].stime / TICRATE, wbs->totaltimes / TICRATE, wbs->partime / TICRATE); }
// ==================================================================== // WI_drawDeathmatchStats // Purpose: Draw the stats on the screen in a matrix // Args: none // Returns: void // // proff/nicolas 09/20/98 -- changed for hi-res // CPhipps - patch drawing updated void WI_drawDeathmatchStats(void) { int i; int j; int x; int y; int w; int lh; // line height int halfface = V_NamePatchWidth(facebackp)/2; lh = WI_SPACINGY; WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawNamePatch(DM_TOTALSX-V_NamePatchWidth(total)/2, DM_MATRIXY-WI_SPACINGY+10, FB, total, CR_DEFAULT, VPT_STRETCH); V_DrawNamePatch(DM_KILLERSX, DM_KILLERSY, FB, killers, CR_DEFAULT, VPT_STRETCH); V_DrawNamePatch(DM_VICTIMSX, DM_VICTIMSY, FB, victims, CR_DEFAULT, VPT_STRETCH); // draw P? x = DM_MATRIXX + DM_SPACINGX; y = DM_MATRIXY; for (i=0 ; i<MAXPLAYERS ; i++) { if (playeringame[i]) { //int trans = playernumtotrans[i]; V_DrawNamePatch(x-halfface, DM_MATRIXY - WI_SPACINGY, FB, facebackp, i ? CR_LIMIT+i : CR_DEFAULT, VPT_STRETCH | (i ? VPT_TRANS : 0)); V_DrawNamePatch(DM_MATRIXX-halfface, y, FB, facebackp, i ? CR_LIMIT+i : CR_DEFAULT, VPT_STRETCH | (i ? VPT_TRANS : 0)); if (i == me) { V_DrawNamePatch(x-halfface, DM_MATRIXY - WI_SPACINGY, FB, bstar, CR_DEFAULT, VPT_STRETCH); V_DrawNamePatch(DM_MATRIXX-halfface, y, FB, star, CR_DEFAULT, VPT_STRETCH); } } x += DM_SPACINGX; y += WI_SPACINGY; } // draw stats y = DM_MATRIXY+10; w = num[0].width; for (i=0 ; i<MAXPLAYERS ; i++) { x = DM_MATRIXX + DM_SPACINGX; if (playeringame[i]) { for (j=0 ; j<MAXPLAYERS ; j++) { if (playeringame[j]) WI_drawNum(x+w, y, dm_frags[i][j], 2); x += DM_SPACINGX; } WI_drawNum(DM_TOTALSX+w, y, dm_totals[i], 2); } y += WI_SPACINGY; } }
void WI_drawDeathmatchStats(void) { int i; int j; int x; int y; int w; int lh; // line height lh = WI_SPACINGY; WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawPatch(DM_TOTALSX-SHORT(::g->total->width)/2, DM_MATRIXY-WI_SPACINGY+10, FB, ::g->total); V_DrawPatch(DM_KILLERSX, DM_KILLERSY, FB, ::g->killers); V_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, FB, ::g->victims); // draw P? x = DM_MATRIXX + DM_SPACINGX; y = DM_MATRIXY; for (i=0 ; i<MAXPLAYERS ; i++) { if (::g->playeringame[i]) { V_DrawPatch(x-SHORT(::g->wistuff_p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, FB, ::g->wistuff_p[i]); V_DrawPatch(DM_MATRIXX-SHORT(::g->wistuff_p[i]->width)/2, y, FB, ::g->wistuff_p[i]); // No splitscreen on PC currently if (i == ::g->me /* && !gameLocal->IsSplitscreen() */ ) { V_DrawPatch(x-SHORT(::g->wistuff_p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, FB, ::g->bstar); V_DrawPatch(DM_MATRIXX-SHORT(::g->wistuff_p[i]->width)/2, y, FB, ::g->star); } } else { //V_DrawPatch(x-SHORT(::g->wistuff_bp[i]->width)/2, // DM_MATRIXY - WI_SPACINGY, FB, ::g->wistuff_bp[i]); //V_DrawPatch(DM_MATRIXX-SHORT(::g->wistuff_bp[i]->width)/2, // y, FB, ::g->wistuff_bp[i]); } x += DM_SPACINGX; y += WI_SPACINGY; } // draw stats y = DM_MATRIXY+10; w = SHORT(::g->num[0]->width); for (i=0 ; i<MAXPLAYERS ; i++) { x = DM_MATRIXX + DM_SPACINGX; if (::g->playeringame[i]) { for (j=0 ; j<MAXPLAYERS ; j++) { if (::g->playeringame[j]) WI_drawNum(x+w, y, ::g->dm_frags[i][j], 2); x += DM_SPACINGX; } WI_drawNum(DM_TOTALSX+w, y, ::g->dm_totals[i], 2); } y += WI_SPACINGY; } }
void WI_drawNetgameStats () { int i, x, y; int pwidth = percent->GetWidth(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); if (gameinfo.gametype == GAME_Doom) { // draw stat titles (top line) screen->DrawTexture (kills, NG_STATSX+NG_SPACINGX-kills->GetWidth(), NG_STATSY, DTA_Clean, true, TAG_DONE); screen->DrawTexture (items, NG_STATSX+2*NG_SPACINGX-items->GetWidth(), NG_STATSY, DTA_Clean, true, TAG_DONE); screen->DrawTexture (secret, NG_STATSX+3*NG_SPACINGX-secret->GetWidth(), NG_STATSY, DTA_Clean, true, TAG_DONE); if (dofrags) screen->DrawTexture (frags, NG_STATSX+4*NG_SPACINGX-frags->GetWidth(), NG_STATSY, DTA_Clean, true, TAG_DONE); // draw stats y = NG_STATSY + kills->GetHeight(); for (i = 0; i < MAXPLAYERS; i++) { if (y >= 200-WI_SPACINGY) break; if (!playeringame[i]) continue; x = NG_STATSX; // [RH] Only use one graphic for the face backgrounds screen->DrawTexture (p, x - p->GetWidth(), y, DTA_Translation, translationtables[TRANSLATION_Players] + i*256, DTA_Clean, true, TAG_DONE); if (i == me) screen->DrawTexture (star, x - p->GetWidth(), y, DTA_Translation, translationtables[TRANSLATION_Players] + i*256, DTA_Clean, true, TAG_DONE); x += NG_SPACINGX; WI_drawPercent (x-pwidth, y+10, cnt_kills[i], wbs->maxkills); x += NG_SPACINGX; WI_drawPercent (x-pwidth, y+10, cnt_items[i], wbs->maxitems); x += NG_SPACINGX; WI_drawPercent (x-pwidth, y+10, cnt_secret[i], wbs->maxsecret); x += NG_SPACINGX; if (dofrags) WI_drawNum(x, y+10, cnt_frags[i], -1, false); y += WI_SPACINGY; } } else { screen->SetFont (BigFont); screen->DrawText (CR_UNTRANSLATED, 95, 35, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); screen->DrawText (CR_UNTRANSLATED, 155, 35, "BONUS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); screen->DrawText (CR_UNTRANSLATED, 232, 35, "SECRET", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); WI_drawLF (); y = 50; for (i = 0; i < MAXPLAYERS; i++) { if (y >= 200-WI_SPACINGY) break; if (!playeringame[i]) continue; screen->DrawTexture (star, 25, y, DTA_Translation, translationtables[TRANSLATION_Players] + i*256, DTA_Clean, true, TAG_DONE); WI_drawPercent (127, y+10, cnt_kills[i], wbs->maxkills); if (ng_state >= 4) { WI_drawPercent (202, y+10, cnt_items[i], wbs->maxitems); if (ng_state >= 6) { WI_drawPercent (279, y+10, cnt_secret[i], wbs->maxsecret); } } y += 37; } } }
void WI_drawStats (void) { // line height int lh; lh = (3*num[0]->GetHeight())/2; // draw animated background WI_drawAnimatedBack(); WI_drawLF(); if (gameinfo.gametype == GAME_Doom) { screen->DrawTexture (kills, SP_STATSX, SP_STATSY, DTA_Clean, true, TAG_DONE); WI_drawPercent (320 - SP_STATSX, SP_STATSY, cnt_kills[0], wbs->maxkills); screen->DrawTexture (items, SP_STATSX, SP_STATSY+lh, DTA_Clean, true, TAG_DONE); WI_drawPercent (320 - SP_STATSX, SP_STATSY+lh, cnt_items[0], wbs->maxitems); screen->DrawTexture (sp_secret, SP_STATSX, SP_STATSY+2*lh, DTA_Clean, true, TAG_DONE); WI_drawPercent(320 - SP_STATSX, SP_STATSY+2*lh, cnt_secret[0], wbs->maxsecret); screen->DrawTexture (timepic, SP_TIMEX, SP_TIMEY, DTA_Clean, true, TAG_DONE); WI_drawTime (160 - SP_TIMEX, SP_TIMEY, cnt_time); if (wbs->partime) { screen->DrawTexture (par, 160 + SP_TIMEX, SP_TIMEY, DTA_Clean, true, TAG_DONE); WI_drawTime (320 - SP_TIMEX, SP_TIMEY, cnt_par); } } else { screen->SetFont (BigFont); screen->DrawText (CR_UNTRANSLATED, 50, 65, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); screen->DrawText (CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); screen->DrawText (CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); if (sp_state >= 2) { WI_drawNum (200, 65, cnt_kills[0], 3, false); screen->DrawTexture (slash, 237, 65, DTA_ShadowAlpha, FRACUNIT/2, DTA_Clean, true, TAG_DONE); WI_drawNum (248, 65, wbs->maxkills, 3, false); } if (sp_state >= 4) { WI_drawNum (200, 90, cnt_items[0], 3, false); screen->DrawTexture (slash, 237, 90, DTA_ShadowAlpha, FRACUNIT/2, DTA_Clean, true, TAG_DONE); WI_drawNum (248, 90, wbs->maxitems, 3, false); } if (sp_state >= 6) { WI_drawNum (200, 115, cnt_secret[0], 3, false); screen->DrawTexture (slash, 237, 115, DTA_ShadowAlpha, FRACUNIT/2, DTA_Clean, true, TAG_DONE); WI_drawNum (248, 115, wbs->maxsecret, 3, false); } if (sp_state >= 8) { screen->DrawText (CR_UNTRANSLATED, 85, 160, "TIME", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); WI_drawTime (249, 160, cnt_time); } screen->SetFont (SmallFont); } }
void WI_drawNetgameStats(void) { int i; int x; int y; int pwidth = SHORT(percent.width); WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) WI_DrawPatch(NG_STATSX + NG_SPACINGX - SHORT(kills.width), NG_STATSY, kills.lump); WI_DrawPatch(NG_STATSX + 2 * NG_SPACINGX - SHORT(items.width), NG_STATSY, items.lump); WI_DrawPatch(NG_STATSX + 3 * NG_SPACINGX - SHORT(secret.width), NG_STATSY, secret.lump); if(dofrags) WI_DrawPatch(NG_STATSX + 4 * NG_SPACINGX - SHORT(frags.width), NG_STATSY, frags.lump); // draw stats y = NG_STATSY + SHORT(kills.height); for(i = 0; i < NUM_TEAMS; i++) { if(!teaminfo[i].members) continue; x = NG_STATSX; WI_DrawPatch(x - SHORT(p[i].width), y, p[i].lump); // If more than 1 member, show the member count. if(teaminfo[i].members > 1) { char tmp[40]; sprintf(tmp, "%i", teaminfo[i].members); M_WriteText2(x - p[i].width + 1, y + p[i].height - 8, tmp, hu_font_a, 1, 1, 1); } if(i == myteam) WI_DrawPatch(x - SHORT(p[i].width), y, star.lump); x += NG_SPACINGX; WI_drawPercent(x - pwidth, y + 10, cnt_kills[i]); x += NG_SPACINGX; WI_drawPercent(x - pwidth, y + 10, cnt_items[i]); x += NG_SPACINGX; WI_drawPercent(x - pwidth, y + 10, cnt_secret[i]); x += NG_SPACINGX; if(dofrags) WI_drawNum(x, y + 10, cnt_frags[i], -1); y += WI_SPACINGY; } }
void WI_drawDeathmatchStats(void) { int i; int j; int x; int y; int w; int lh; // line height lh = WI_SPACINGY; WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) V_DrawPatch(DM_TOTALSX-SHORT(total->width)/2, DM_MATRIXY-WI_SPACINGY+10, FB, total); V_DrawPatch(DM_KILLERSX, DM_KILLERSY, FB, killers); V_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, FB, victims); // draw P? x = DM_MATRIXX + DM_SPACINGX; y = DM_MATRIXY; for (i=0 ; i<MAXPLAYERS ; i++) { if (playeringame[i]) { V_DrawPatch(x-SHORT(p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, FB, p[i]); V_DrawPatch(DM_MATRIXX-SHORT(p[i]->width)/2, y, FB, p[i]); if (i == me) { V_DrawPatch(x-SHORT(p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, FB, bstar); V_DrawPatch(DM_MATRIXX-SHORT(p[i]->width)/2, y, FB, star); } } else { // V_DrawPatch(x-SHORT(bp[i]->width)/2, // DM_MATRIXY - WI_SPACINGY, FB, bp[i]); // V_DrawPatch(DM_MATRIXX-SHORT(bp[i]->width)/2, // y, FB, bp[i]); } x += DM_SPACINGX; y += WI_SPACINGY; } // draw stats y = DM_MATRIXY+10; w = SHORT(num[0]->width); for (i=0 ; i<MAXPLAYERS ; i++) { x = DM_MATRIXX + DM_SPACINGX; if (playeringame[i]) { for (j=0 ; j<MAXPLAYERS ; j++) { if (playeringame[j]) WI_drawNum(x+w, y, dm_frags[i][j], 2); x += DM_SPACINGX; } WI_drawNum(DM_TOTALSX+w, y, dm_totals[i], 2); } y += WI_SPACINGY; } }
void WI_drawDeathmatchStats(void) { int i; int j; int x; int y; int w; int lh; // line height lh = WI_SPACINGY; WI_slamBackground(); // draw animated background WI_drawAnimatedBack(); WI_drawLF(); // draw stat titles (top line) WI_DrawPatch(DM_TOTALSX - SHORT(total.width) / 2, DM_MATRIXY - WI_SPACINGY + 10, total.lump); WI_DrawPatch(DM_KILLERSX, DM_KILLERSY, killers.lump); WI_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, victims.lump); // draw P? x = DM_MATRIXX + DM_SPACINGX; y = DM_MATRIXY; for(i = 0; i < NUM_TEAMS; i++) { if(teaminfo[i].members) { WI_DrawPatch(x - SHORT(p[i].width) / 2, DM_MATRIXY - WI_SPACINGY, p[i].lump); WI_DrawPatch(DM_MATRIXX - SHORT(p[i].width) / 2, y, p[i].lump); if(i == myteam) { WI_DrawPatch(x - SHORT(p[i].width) / 2, DM_MATRIXY - WI_SPACINGY, bstar.lump); WI_DrawPatch(DM_MATRIXX - SHORT(p[i].width) / 2, y, star.lump); } // If more than 1 member, show the member count. if(teaminfo[i].members > 1) { char tmp[20]; sprintf(tmp, "%i", teaminfo[i].members); M_WriteText2(x - p[i].width / 2 + 1, DM_MATRIXY - WI_SPACINGY + p[i].height - 8, tmp, hu_font_a, 1, 1, 1); M_WriteText2(DM_MATRIXX - p[i].width / 2 + 1, y + p[i].height - 8, tmp, hu_font_a, 1, 1, 1); } } else { WI_DrawPatch(x - SHORT(bp[i].width) / 2, DM_MATRIXY - WI_SPACINGY, bp[i].lump); WI_DrawPatch(DM_MATRIXX - SHORT(bp[i].width) / 2, y, bp[i].lump); } x += DM_SPACINGX; y += WI_SPACINGY; } // draw stats y = DM_MATRIXY + 10; w = SHORT(num[0].width); for(i = 0; i < NUM_TEAMS; i++) { x = DM_MATRIXX + DM_SPACINGX; if(teaminfo[i].members) { for(j = 0; j < NUM_TEAMS; j++) { if(teaminfo[j].members) WI_drawNum(x + w, y, dm_frags[i][j], 2); x += DM_SPACINGX; } WI_drawNum(DM_TOTALSX + w, y, dm_totals[i], 2); } y += WI_SPACINGY; } }