components/prboom/p_ceilng.c
//
// P_AddActiveCeiling()
//
// Adds a ceiling to the head of the list of active ceilings
//
// Passed the ceiling motion structure
// Returns nothing
//
P_AddActiveCeiling()
Adds a ceiling to the head of the list of active ceilings

Passed the ceiling motion structure
Returns nothing
P_AddActiveCeiling () Adds a ceiling to the head of the list of active ceilings Passed the ceiling motion structure Returns nothing
void P_AddActiveCeiling(ceiling_t* ceiling)
{
  ceilinglist_t *list = malloc(sizeof *list);
  list->ceiling = ceiling;
  ceiling->list = list;
  if ((list->next = activeceilings))
    list->next->prev = &list->next;
  list->prev = &activeceilings;
  activeceilings = list;
}
void P_AddActiveCeiling ( ceiling_t * ceiling ) { ceilinglist_t * list = malloc ( sizeof * list ) ; list -> ceiling = ceiling ; ceiling -> list = list ; if ( ( list -> next = activeceilings ) ) list -> next -> prev = & list -> next ; list -> prev = & activeceilings ; activeceilings = list ; }
P_AddActiveCeiling()
Adds a ceiling to the head of the list of active ceilings
P_AddActiveCeiling () Adds a ceiling to the head of the list of active ceilings