components/prboom/st_stuff.c
//
// ST_loadGraphics
//
// CPhipps - Loads graphics needed for status bar if doload is true,
//  unloads them otherwise
//
ST_loadGraphics
CPhipps - Loads graphics needed for status bar if doload is true,
unloads them otherwise
ST_loadGraphics CPhipps - Loads graphics needed for status bar if doload is true unloads them otherwise
static void ST_loadGraphics(boolean doload)
{
  int  i, facenum;
  char namebuf[9];
  for (i=0;i<10;i++)
    {
      sprintf(namebuf, "STTNUM%d", i);
      R_SetPatchNum(&tallnum[i],namebuf);
      sprintf(namebuf, "STYSNUM%d", i);
      R_SetPatchNum(&shortnum[i],namebuf);
    }
  R_SetPatchNum(&tallpercent,"STTPRCNT");
  for (i=0;i<NUMCARDS+3;i++)  
    {
      sprintf(namebuf, "STKEYS%d", i);
      R_SetPatchNum(&keys[i], namebuf);
    }
  R_SetPatchNum(&stbarbg, "STBAR");
  R_SetPatchNum(&armsbg, "STARMS");
  for (i=0;i<6;i++)
    {
      sprintf(namebuf, "STGNUM%d", i+2);
      R_SetPatchNum(&arms[i][0], namebuf);
      arms[i][1] = shortnum[i+2];
    }
  R_SetPatchNum(&faceback, "STFB0");
  facenum = 0;
  for (i=0;i<ST_NUMPAINFACES;i++)
    {
      int j;
      for (j=0;j<ST_NUMSTRAIGHTFACES;j++)
        {
          sprintf(namebuf, "STFST%d%d", i, j);
          R_SetPatchNum(&faces[facenum++], namebuf);
        }
      sprintf(namebuf, "STFTR%d0", i);        
      R_SetPatchNum(&faces[facenum++], namebuf);
      sprintf(namebuf, "STFTL%d0", i);        
      R_SetPatchNum(&faces[facenum++], namebuf);
      sprintf(namebuf, "STFOUCH%d", i);       
      R_SetPatchNum(&faces[facenum++], namebuf);
      sprintf(namebuf, "STFEVL%d", i);        
      R_SetPatchNum(&faces[facenum++], namebuf);
      sprintf(namebuf, "STFKILL%d", i);       
      R_SetPatchNum(&faces[facenum++], namebuf);
    }
  R_SetPatchNum(&faces[facenum++], "STFGOD0");
  R_SetPatchNum(&faces[facenum++], "STFDEAD0");
}
static void ST_loadGraphics ( boolean doload ) { int i , facenum ; char namebuf [ 9 ] ; for ( i = 0 ; i < 10 ; i ++ ) { sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & tallnum [ i ] , namebuf ) ; sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & shortnum [ i ] , namebuf ) ; } R_SetPatchNum ( & tallpercent , " " ) ; for ( i = 0 ; i < NUMCARDS + 3 ; i ++ ) { sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & keys [ i ] , namebuf ) ; } R_SetPatchNum ( & stbarbg , " " ) ; R_SetPatchNum ( & armsbg , " " ) ; for ( i = 0 ; i < 6 ; i ++ ) { sprintf ( namebuf , " " , i + 2 ) ; R_SetPatchNum ( & arms [ i ] [ 0 ] , namebuf ) ; arms [ i ] [ 1 ] = shortnum [ i + 2 ] ; } R_SetPatchNum ( & faceback , " " ) ; facenum = 0 ; for ( i = 0 ; i < ST_NUMPAINFACES ; i ++ ) { int j ; for ( j = 0 ; j < ST_NUMSTRAIGHTFACES ; j ++ ) { sprintf ( namebuf , " " , i , j ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; } sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; sprintf ( namebuf , " " , i ) ; R_SetPatchNum ( & faces [ facenum ++ ] , namebuf ) ; } R_SetPatchNum ( & faces [ facenum ++ ] , " " ) ; R_SetPatchNum ( & faces [ facenum ++ ] , " " ) ; }
ST_loadGraphics
CPhipps - Loads graphics needed for status bar if doload is true,
unloads them otherwise
ST_loadGraphics CPhipps - Loads graphics needed for status bar if doload is true unloads them otherwise
// cph - macro that either acquires a pointer and lock for a lump, or // unlocks it. var is referenced exactly once in either case, so ++ in arg works // Load the numbers, tall and short // Load percent key. // key cards //jff 2/23/98 show both keys too //e6y: status bar background // arms background // arms ownership widgets // gray # // yellow # // face backgrounds for different color players // killough 3/7/98: add better support for spy mode by loading all // player face backgrounds and using displayplayer to choose them: // face states // turn right // turn left // ouch! // evil grin ;) // pissed off