components/prboom/p_spec.c
// Hash the sector tags across the sectors and linedefs.
Hash the sector tags across the sectors and linedefs.
Hash the sector tags across the sectors and linedefs .
static void P_InitTagLists(void)
{
  register int i;
  for (i=numsectors; --i>=0; )        
    sectors[i].firsttag = -1;
  for (i=numsectors; --i>=0; )        
    {                                 
      int j = (unsigned) sectors[i].tag % (unsigned) numsectors; 
      sectors[i].nexttag = sectors[j].firsttag;   
      sectors[j].firsttag = i;
    }
  for (i=numlines; --i>=0; )        
    lines[i].firsttag = -1;
  for (i=numlines; --i>=0; )        
    {                               
      int j = (unsigned) lines[i].tag % (unsigned) numlines; 
      lines[i].nexttag = lines[j].firsttag;   
      lines[j].firsttag = i;
    }
}
static void P_InitTagLists ( void ) { register int i ; for ( i = numsectors ; -- i >= 0 ; ) sectors [ i ] . firsttag = -1 ; for ( i = numsectors ; -- i >= 0 ; ) { int j = ( unsigned ) sectors [ i ] . tag % ( unsigned ) numsectors ; sectors [ i ] . nexttag = sectors [ j ] . firsttag ; sectors [ j ] . firsttag = i ; } for ( i = numlines ; -- i >= 0 ; ) lines [ i ] . firsttag = -1 ; for ( i = numlines ; -- i >= 0 ; ) { int j = ( unsigned ) lines [ i ] . tag % ( unsigned ) numlines ; lines [ i ] . nexttag = lines [ j ] . firsttag ; lines [ j ] . firsttag = i ; } }
Hash the sector tags across the sectors and linedefs.
Hash the sector tags across the sectors and linedefs .
// Initially make all slots empty. // Proceed from last to first sector // so that lower sectors appear first // Hash func // Prepend sector to chain // killough 4/17/98: same thing, only for linedefs // Initially make all slots empty. // Proceed from last to first linedef // so that lower linedefs appear first // Hash func // Prepend linedef to chain