components/prboom/wi_stuff.c
// ====================================================================
// WI_initDeathmatchStats
// Purpose: Set up to display DM stats at end of level.  Calculate
//          frags for all players.
// Args:    none
// Returns: void
//
WI_initDeathmatchStats
Purpose: Set up to display DM stats at end of level.  Calculate
frags for all players.
Args:    none
Returns: void
WI_initDeathmatchStats Purpose : Set up to display DM stats at end of level . Calculate frags for all players . Args : none Returns : void
void WI_initDeathmatchStats(void)
{
  int   i; 
  dm_frags  = calloc(MAXPLAYERS, sizeof(*dm_frags));
  dm_totals = calloc(MAXPLAYERS, sizeof(*dm_totals));
  state = StatCount;  
  acceleratestage = 0;
  dm_state = 1;  
  cnt_pause = TICRATE;
  for (i=0 ; i<MAXPLAYERS ; i++)
  {
    if (playeringame[i])
    {
      dm_frags[i] = calloc(MAXPLAYERS, sizeof(**dm_frags)); 
      dm_totals[i] = 0;
    }
  }
  WI_initAnimatedBack();
}
void WI_initDeathmatchStats ( void ) { int i ; dm_frags = calloc ( MAXPLAYERS , sizeof ( * dm_frags ) ) ; dm_totals = calloc ( MAXPLAYERS , sizeof ( * dm_totals ) ) ; state = StatCount ; acceleratestage = 0 ; dm_state = 1 ; cnt_pause = TICRATE ; for ( i = 0 ; i < MAXPLAYERS ; i ++ ) { if ( playeringame [ i ] ) { dm_frags [ i ] = calloc ( MAXPLAYERS , sizeof ( * * dm_frags ) ) ; dm_totals [ i ] = 0 ; } } WI_initAnimatedBack ( ) ; }
WI_initDeathmatchStats
Purpose: Set up to display DM stats at end of level.
WI_initDeathmatchStats Purpose : Set up to display DM stats at end of level .
// looping variables // CPhipps - allocate data structures needed // We're doing stats // count how many times we've done a complete stat // CPhipps - allocate frags line // set all counts to zero