예제 #1
0
파일: st_lib.c 프로젝트: Manuel-K/doomretro
void STlib_updatePercent(st_percent_t *per, int refresh)
{
    if (refresh && *per->n.on)
        V_DrawPatch(per->n.x, per->n.y, FG, per->p);

    STlib_updateNum(&per->n);
}
예제 #2
0
void STlib_updatePercent(st_percent_t * per, int refresh)
{
	if(refresh && *per->n.on)
		WI_DrawPatch(per->n.x, per->n.y, per->p->lump);

	STlib_updateNum(&per->n, refresh);
}
예제 #3
0
void
STlib_updatePercent
( st_percent_t* 		per,
  bool					refresh )
{
	if (refresh && *per->n.on) {
		STlib_scalePatch (per->n.x, per->n.y, per->p);
	}

	STlib_updateNum(&per->n, refresh);
}
예제 #4
0
void ST_drawWidgets(boolean refresh)
{
  int  i;

  //used by w_arms[] widgets
  st_armson = st_statusbaron && 1;// && !deathmatch;

  // used by w_frags widget
  //st_fragson = deathmatch && st_statusbaron; 

  STlib_updateNum(&w_ready, refresh);

  for (i=0;i<4;i++)
  {
    STlib_updateNum(&w_ammo[i], refresh);
    STlib_updateNum(&w_maxammo[i], refresh);
  }

  STlib_updatePercent(&w_health, refresh);
  STlib_updatePercent(&w_armor, refresh);

  STlib_updateBinIcon(&w_armsbg, refresh);


  STlib_updateBinIcon(&w_arms_0, refresh);
  STlib_updateBinIcon(&w_arms_1, refresh);
  STlib_updateBinIcon(&w_arms_2, refresh);
  STlib_updateBinIcon(&w_arms_3, refresh);
  STlib_updateBinIcon(&w_arms_4, refresh);
  STlib_updateBinIcon(&w_arms_5, refresh);

  //I_Error("STlib4...");

  STlib_updateMultIcon(&w_faces, refresh);

  STlib_updateMultIcon(&w_keyboxes_0, refresh);
  STlib_updateMultIcon(&w_keyboxes_1, refresh);
  STlib_updateMultIcon(&w_keyboxes_2, refresh);

}
예제 #5
0
//
// 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
//
void STlib_updatePercent(st_percent_t *per, byte *outrng, int alpha)
{
   if(*per->n.on) // killough 2/21/98: fix percents not updated
   {
      byte *tlate = NULL;

      // jff 2/18/98 allow use of faster draw routine from config
      // also support gray-only percents
      if(!sts_always_red)
         tlate = sts_pct_always_gray ? cr_gray : outrng;

      V_DrawPatchTL(per->n.x, per->n.y, &subscreen43, per->p, tlate, alpha);
   }
   
   STlib_updateNum(&per->n, outrng, alpha);
}
예제 #6
0
void STlib_updatePercent
( st_percent_t*   per,
  int cm,
  int refresh )
{
  if (*per->n.on && (refresh || (per->n.oldnum != *per->n.num))) {
    // killough 2/21/98: fix percents not updated;
    /* CPhipps - make %'s only be updated if number changed */
    // CPhipps - patch drawing updated
    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_ALIGN_BOTTOM);
  }

  STlib_updateNum(&per->n, cm, refresh);
}
예제 #7
0
void STlib_updatePercent
( st_percent_t*   per,
  const byte *outrng,
  int refresh )
{
  if (*per->n.on && (refresh || (per->n.oldnum != *per->n.num))) { 
    // killough 2/21/98: fix percents not updated;
    /* CPhipps - make %'s only be updated if number changed */
    // CPhipps - patch drawing updated
    V_DrawMemPatch(per->n.x, per->n.y, FG, per->p, 
		   sts_pct_always_gray ? cr_gray : outrng, 
		   sts_always_red ? VPT_NONE : VPT_TRANS);
  }

  STlib_updateNum(&per->n, outrng, refresh);
}
예제 #8
0
파일: st_lib.c 프로젝트: fragglet/mbf
//
// 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
//
void STlib_updatePercent
( st_percent_t*   per,
  char *outrng,             //jff 2/16/98 add color translation to digit output
  int refresh )
{
  if (refresh || *per->n.on) // killough 2/21/98: fix percents not updated;
    {
      if (!sts_always_red)     // also support gray-only percents
	V_DrawPatchTranslated
	  (
	   per->n.x,
	   per->n.y,
	   FG,
	   per->p,
	   sts_pct_always_gray ? cr_gray : outrng,
	   0
	   );
      else   //jff 2/18/98 allow use of faster draw routine from config
	V_DrawPatch(per->n.x, per->n.y, FG, per->p);
    }
  
  STlib_updateNum(&per->n, outrng, refresh);
}