components/prboom/wi_stuff.c
// ====================================================================
// WI_drawTime
// Purpose: Draws the level completion time or par time, or "Sucks"
//          if 1 hour or more
// Args:    x, y   -- location
//          t      -- the time value to be drawn
// Returns: void
//
// CPhipps - static
//         - largely rewritten to display hours and use slightly better algorithm
WI_drawTime
Purpose: Draws the level completion time or par time, or "Sucks"
if 1 hour or more
Args:    x, y   -- location
t      -- the time value to be drawn
Returns: void

static
largely rewritten to display hours and use slightly better algorithm
WI_drawTime Purpose : Draws the level completion time or par time or " Sucks " if 1 hour or more Args : x y -- location t -- the time value to be drawn Returns : void static largely rewritten to display hours and use slightly better algorithm
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);
}
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 ) ; }
WI_drawTime
Purpose: Draws the level completion time or par time, or "Sucks"
if 1 hour or more
Args:    x, y   -- location
t      -- the time value to be drawn
Returns: void
WI_drawTime Purpose : Draws the level completion time or par time or " Sucks " if 1 hour or more Args : x y -- location t -- the time value to be drawn Returns : void
// draw // CPhipps - patch drawing updated // "sucks" (maybe should be "addicted", even I've never had a 100 hour game ;)