components/prboom/wi_stuff.c
// ====================================================================
// WI_initAnimatedBack
// Purpose: Initialize pointers and styles for background animation
// Args:    none
// Returns: void
//
WI_initAnimatedBack
Purpose: Initialize pointers and styles for background animation
Args:    none
Returns: void
WI_initAnimatedBack Purpose : Initialize pointers and styles for background animation Args : none Returns : void
void WI_initAnimatedBack(void)
{
  int   i;
  anim_t* a;
  if (gamemode == commercial)  
    return;
  if (wbs->epsd > 2)
    return;
  for (i=0;i<NUMANIMS[wbs->epsd];i++)
  {
    a = &anims[wbs->epsd][i];
    a->ctr = -1;
    if (a->type == ANIM_ALWAYS)
      a->nexttic = bcnt + 1 + (M_Random()%a->period);
    else
      if (a->type == ANIM_RANDOM)
        a->nexttic = bcnt + 1 + a->data2+(M_Random()%a->data1);
      else
        if (a->type == ANIM_LEVEL)
          a->nexttic = bcnt + 1;
  }
}
void WI_initAnimatedBack ( void ) { int i ; anim_t * a ; if ( gamemode == commercial ) return ; if ( wbs -> epsd > 2 ) return ; for ( i = 0 ; i < NUMANIMS [ wbs -> epsd ] ; i ++ ) { a = & anims [ wbs -> epsd ] [ i ] ; a -> ctr = -1 ; if ( a -> type == ANIM_ALWAYS ) a -> nexttic = bcnt + 1 + ( M_Random ( ) % a -> period ) ; else if ( a -> type == ANIM_RANDOM ) a -> nexttic = bcnt + 1 + a -> data2 + ( M_Random ( ) % a -> data1 ) ; else if ( a -> type == ANIM_LEVEL ) a -> nexttic = bcnt + 1 ; } }
WI_initAnimatedBack
Purpose: Initialize pointers and styles for background animation
Args:    none
Returns: void
WI_initAnimatedBack Purpose : Initialize pointers and styles for background animation Args : none Returns : void
// no animation for DOOM2 // init variables // specify the next time to draw it