components/prboom/st_lib.c
//
// STlib_updateMultIcon()
//
// Draw a st_multicon_t widget, used for a multigraphic display
// like the status bar's keys. Displays each when the control
// numbers change or refresh is true
//
// Passed a st_multicon_t widget, and a refresh flag
// Returns nothing.
//
STlib_updateMultIcon()
Draw a st_multicon_t widget, used for a multigraphic display
like the status bar's keys. Displays each when the control
numbers change or refresh is true

Passed a st_multicon_t widget, and a refresh flag
Returns nothing.
STlib_updateMultIcon () Draw a st_multicon_t widget used for a multigraphic display like the status bar ' s keys . Displays each when the control numbers change or refresh is true Passed a st_multicon_t widget and a refresh flag Returns nothing .
void STlib_updateMultIcon
( st_multicon_t*  mi,
  boolean   refresh )
{
  int w;
  int h;
  int x;
  int y;
  if (*mi->on && (mi->oldinum != *mi->inum || refresh))
  {
    if (mi->oldinum != -1)
    {
      x = mi->x - mi->p[mi->oldinum].leftoffset;
      y = mi->y - mi->p[mi->oldinum].topoffset;
      w = mi->p[mi->oldinum].width;
      h = mi->p[mi->oldinum].height;
#ifdef RANGECHECK
      if (y - ST_Y < 0)
        I_Error("STlib_updateMultIcon: y - ST_Y < 0");
#endif
      V_CopyRect(x, y-ST_Y, BG, w, h, x, y, FG, VPT_STRETCH);
    }
    if (*mi->inum != -1)  
      V_DrawNumPatch(mi->x, mi->y, FG, mi->p[*mi->inum].lumpnum, CR_DEFAULT, VPT_STRETCH);
    mi->oldinum = *mi->inum;
  }
}
void STlib_updateMultIcon ( st_multicon_t * mi , boolean refresh ) { int w ; int h ; int x ; int y ; if ( * mi -> on && ( mi -> oldinum != * mi -> inum || refresh ) ) { if ( mi -> oldinum != -1 ) { x = mi -> x - mi -> p [ mi -> oldinum ] . leftoffset ; y = mi -> y - mi -> p [ mi -> oldinum ] . topoffset ; w = mi -> p [ mi -> oldinum ] . width ; h = mi -> p [ mi -> oldinum ] . height ; #ifdef RANGECHECK if ( y - ST_Y < 0 ) I_Error ( " " ) ; #endif V_CopyRect ( x , y - ST_Y , BG , w , h , x , y , FG , VPT_STRETCH ) ; } if ( * mi -> inum != -1 ) V_DrawNumPatch ( mi -> x , mi -> y , FG , mi -> p [ * mi -> inum ] . lumpnum , CR_DEFAULT , VPT_STRETCH ) ; mi -> oldinum = * mi -> inum ; } }
STlib_updateMultIcon()
Draw a st_multicon_t widget, used for a multigraphic display
like the status bar's keys.
STlib_updateMultIcon () Draw a st_multicon_t widget used for a multigraphic display like the status bar ' s keys .
// killough 2/16/98: redraw only if != -1