components/prboom/st_lib.c
/*
 * STlib_updatePercent()
 *
 * Draws a number/percent conditionally based on the widget's enable
 *
 * Passed a precent widget, the output color range, and a refresh flag
 * Returns nothing
 *
 * jff 2/16/98 add color translation to digit output
 * cphipps - const for pointer to the colour translation table
 */
STlib_updatePercent()
Draws a number/percent conditionally based on the widget's enable

Passed a precent widget, the output color range, and a refresh flag
Returns nothing

jff 2/16/98 add color translation to digit output
cphipps - const for pointer to the colour translation table
STlib_updatePercent () Draws a number / percent conditionally based on the widget ' s enable Passed a precent widget the output color range and a refresh flag Returns nothing jff 2 / 16 / 98 add color translation to digit output cphipps - const for pointer to the colour translation table
void STlib_updatePercent
( st_percent_t*   per,
  int cm,
  int refresh )
{
  if (*per->n.on && (refresh || (per->n.oldnum != *per->n.num))) {
    V_DrawNumPatch(per->n.x, per->n.y, FG, per->p->lumpnum,
       sts_pct_always_gray ? CR_GRAY : cm,
       (sts_always_red ? VPT_NONE : VPT_TRANS) | VPT_STRETCH);
  }
  STlib_updateNum(&per->n, cm, refresh);
}
void STlib_updatePercent ( st_percent_t * per , int cm , int refresh ) { if ( * per -> n . on && ( refresh || ( per -> n . oldnum != * per -> n . num ) ) ) { V_DrawNumPatch ( per -> n . x , per -> n . y , FG , per -> p -> lumpnum , sts_pct_always_gray ? CR_GRAY : cm , ( sts_always_red ? VPT_NONE : VPT_TRANS ) | VPT_STRETCH ) ; } STlib_updateNum ( & per -> n , cm , refresh ) ; }
STlib_updatePercent()
 Draws a number/percent conditionally based on the widget's enable
STlib_updatePercent () Draws a number / percent conditionally based on the widget ' s enable
// killough 2/21/98: fix percents not updated; /* CPhipps - make %'s only be updated if number changed */ // CPhipps - patch drawing updated