components/prboom/p_spec.c
//
// Add_Scroller()
//
// Add a generalized scroller to the thinker list.
//
// type: the enumerated type of scrolling: floor, ceiling, floor carrier,
//   wall, floor carrier & scroller
//
// (dx,dy): the direction and speed of the scrolling or its acceleration
//
// control: the sector whose heights control this scroller's effect
//   remotely, or -1 if no control sector
//
// affectee: the index of the affected object (sector or sidedef)
//
// accel: non-zero if this is an accelerative effect
//
Add_Scroller()
Add a generalized scroller to the thinker list.

the enumerated type of scrolling: floor, ceiling, floor carrier,
wall, floor carrier & scroller

(dx,dy): the direction and speed of the scrolling or its acceleration

the sector whose heights control this scroller's effect
remotely, or -1 if no control sector

the index of the affected object (sector or sidedef)

non-zero if this is an accelerative effect
Add_Scroller () Add a generalized scroller to the thinker list . the enumerated type of scrolling : floor ceiling floor carrier wall floor carrier & scroller ( dx dy ) : the direction and speed of the scrolling or its acceleration the sector whose heights control this scroller ' s effect remotely or - 1 if no control sector the index of the affected object ( sector or sidedef ) non - zero if this is an accelerative effect
static void Add_Scroller(int type, fixed_t dx, fixed_t dy,
                         int control, int affectee, int accel)
{
  scroll_t *s = Z_Malloc(sizeof *s, PU_LEVSPEC, 0);
  s->thinker.function = T_Scroll;
  s->type = type;
  s->dx = dx;
  s->dy = dy;
  s->accel = accel;
  s->vdx = s->vdy = 0;
  if ((s->control = control) != -1)
    s->last_height =
      sectors[control].floorheight + sectors[control].ceilingheight;
  s->affectee = affectee;
  P_AddThinker(&s->thinker);
}
static void Add_Scroller ( int type , fixed_t dx , fixed_t dy , int control , int affectee , int accel ) { scroll_t * s = Z_Malloc ( sizeof * s , PU_LEVSPEC , 0 ) ; s -> thinker . function = T_Scroll ; s -> type = type ; s -> dx = dx ; s -> dy = dy ; s -> accel = accel ; s -> vdx = s -> vdy = 0 ; if ( ( s -> control = control ) != -1 ) s -> last_height = sectors [ control ] . floorheight + sectors [ control ] . ceilingheight ; s -> affectee = affectee ; P_AddThinker ( & s -> thinker ) ; }
Add_Scroller()
Add a generalized scroller to the thinker list.
Add_Scroller () Add a generalized scroller to the thinker list .