Lines Matching refs:segnum
116 void get_side_verts(short *vertlist,int segnum,int sidenum) in get_side_verts() argument
120 short *vp = Segments[segnum].verts; in get_side_verts()
139 void create_all_vertex_lists(int *num_faces, int *vertices, int segnum, int sidenum) in create_all_vertex_lists() argument
141 side *sidep = &Segments[segnum].sides[sidenum]; in create_all_vertex_lists()
144 Assert((segnum <= Highest_segment_index) && (segnum >= 0)); in create_all_vertex_lists()
186 …Error("Illegal side type (1), type = %i, segment # = %i, side # = %i\n", sidep->type, segnum, side… in create_all_vertex_lists()
199 void create_all_vertnum_lists(int *num_faces, int *vertnums, int segnum, int sidenum) in create_all_vertnum_lists() argument
201 side *sidep = &Segments[segnum].sides[sidenum]; in create_all_vertnum_lists()
203 Assert((segnum <= Highest_segment_index) && (segnum >= 0)); in create_all_vertnum_lists()
244 …Error("Illegal side type (2), type = %i, segment # = %i, side # = %i\n", sidep->type, segnum, side… in create_all_vertnum_lists()
252 void create_abs_vertex_lists(int *num_faces, int *vertices, int segnum, int sidenum) in create_abs_vertex_lists() argument
254 short *vp = Segments[segnum].verts; in create_abs_vertex_lists()
255 side *sidep = &Segments[segnum].sides[sidenum]; in create_abs_vertex_lists()
258 Assert((segnum <= Highest_segment_index) && (segnum >= 0)); in create_abs_vertex_lists()
299 …Error("Illegal side type (3), type = %i, segment # = %i, side # = %i\n", sidep->type, segnum, side… in create_abs_vertex_lists()
308 segmasks get_seg_masks(vms_vector *checkp,int segnum,fix rad) in get_seg_masks() argument
316 if (segnum==-1) in get_seg_masks()
319 Assert((segnum <= Highest_segment_index) && (segnum >= 0)); in get_seg_masks()
321 seg = &Segments[segnum]; in get_seg_masks()
337 create_abs_vertex_lists( &num_faces, vertex_list, segnum, sn); in get_seg_masks()
454 ubyte get_side_dists(vms_vector *checkp,int segnum,fix *side_dists) in get_side_dists() argument
462 Assert((segnum <= Highest_segment_index) && (segnum >= 0)); in get_side_dists()
464 if (segnum==-1) in get_side_dists()
467 seg = &Segments[segnum]; in get_side_dists()
485 create_abs_vertex_lists( &num_faces, vertex_list, segnum, sn); in get_side_dists()
598 int check_norms(int segnum,int sidenum,int facenum,int csegnum,int csidenum,int cfacenum) in check_norms() argument
602 n0 = &Segments[segnum].sides[sidenum].normals[facenum]; in check_norms()
609 segnum,sidenum,facenum,csegnum,csidenum,cfacenum, in check_norms()
620 int segnum,sidenum; in check_segment_connections() local
623 for (segnum=0;segnum<=Highest_segment_index;segnum++) { in check_segment_connections()
626 seg = &Segments[segnum]; in check_segment_connections()
637 create_abs_vertex_lists( &num_faces, vertex_list, segnum, sidenum); in check_segment_connections()
646 …mprintf((0,"Could not find connected side for seg %x back to seg %x, side %d\n",csegnum,segnum,sid… in check_segment_connections()
656 …mprintf((0,"Seg %x, side %d: num_faces (%d) mismatch with seg %x, side %d (%d)\n",segnum,sidenum,n… in check_segment_connections()
673 segnum,sidenum,csegnum,csidenum, in check_segment_connections()
679 errors |= check_norms(segnum,sidenum,0,csegnum,csidenum,0); in check_segment_connections()
694 segnum,sidenum,csegnum,csidenum, in check_segment_connections()
700 errors |= check_norms(segnum,sidenum,0,csegnum,csidenum,0); in check_segment_connections()
701 errors |= check_norms(segnum,sidenum,1,csegnum,csidenum,1); in check_segment_connections()
715 segnum,sidenum,csegnum,csidenum, in check_segment_connections()
721 errors |= check_norms(segnum,sidenum,0,csegnum,csidenum,1); in check_segment_connections()
722 errors |= check_norms(segnum,sidenum,1,csegnum,csidenum,0); in check_segment_connections()
805 int find_point_seg(vms_vector *p,int segnum) in find_point_seg() argument
810 Assert((segnum <= Highest_segment_index) && (segnum >= -1)); in find_point_seg()
812 if (segnum != -1) { in find_point_seg()
813 newseg = trace_segs(p,segnum); in find_point_seg()
1085 point_segs[num_points].segnum = this_seg; in find_connected_distance()
1096 point_segs[num_points].segnum = seg0; in find_connected_distance()
1155 spp->xo = (objp->pos.x - Vertices[Segments[objp->segnum].verts[0]].x) >> RELPOS_PRECISION; in create_shortpos()
1156 spp->yo = (objp->pos.y - Vertices[Segments[objp->segnum].verts[0]].y) >> RELPOS_PRECISION; in create_shortpos()
1157 spp->zo = (objp->pos.z - Vertices[Segments[objp->segnum].verts[0]].z) >> RELPOS_PRECISION; in create_shortpos()
1159 spp->segment = objp->segnum; in create_shortpos()
1195 int segnum; in extract_shortpos() local
1220 segnum = spp->segment; in extract_shortpos()
1222 Assert((segnum >= 0) && (segnum <= Highest_segment_index)); in extract_shortpos()
1224 objp->pos.x = (spp->xo << RELPOS_PRECISION) + Vertices[Segments[segnum].verts[0]].x; in extract_shortpos()
1225 objp->pos.y = (spp->yo << RELPOS_PRECISION) + Vertices[Segments[segnum].verts[0]].y; in extract_shortpos()
1226 objp->pos.z = (spp->zo << RELPOS_PRECISION) + Vertices[Segments[segnum].verts[0]].z; in extract_shortpos()
1232 obj_relink(objp-Objects, segnum); in extract_shortpos()
1584 short segnum; member
1608 ncache[i].segnum = -1; in ncache_flush()
1615 int find_ncache_element( int segnum, int sidenum, int face_flags ) in find_ncache_element() argument
1626 i = ((segnum<<2) ^ sidenum) & CACHE_MASK; in find_ncache_element()
1628 if ((ncache[i].segnum == segnum) && ((ncache[i].sidenum&0xf)==sidenum) ) { in find_ncache_element()
1637 uncached_get_side_normal( &Segments[segnum], sidenum, 1, &ncache[i].normals[1] ); in find_ncache_element()
1639 uncached_get_side_normal( &Segments[segnum], sidenum, 0, &ncache[i].normals[0] ); in find_ncache_element()
1649 uncached_get_side_normal( &Segments[segnum], sidenum, 0, &ncache[i].normals[0] ); in find_ncache_element()
1652 uncached_get_side_normal( &Segments[segnum], sidenum, 1, &ncache[i].normals[1] ); in find_ncache_element()
1655 …uncached_get_side_normals(&Segments[segnum], sidenum, &ncache[i].normals[0], &ncache[i].normals[1]… in find_ncache_element()
1658 ncache[i].segnum = segnum; in find_ncache_element()
1813 if (Segments[s].segnum != -1) in validate_segment_all()
1821 if (Segments[s].segnum != -1) { in validate_segment_all()
1826 Segments[s].segnum = -1; in validate_segment_all()
1846 void pick_random_point_in_seg(vms_vector *new_pos, int segnum) in pick_random_point_in_seg() argument
1851 compute_segment_center(new_pos, &Segments[segnum]); in pick_random_point_in_seg()
1853 vm_vec_sub(&vec2, &Vertices[Segments[segnum].verts[vnum]], new_pos); in pick_random_point_in_seg()
1923 int i,segnum=segp-Segments,sidenum; in apply_light_to_segment() local
1926 if (changed_segs[i] == segnum) in apply_light_to_segment()
1941 segment2 *seg2p = &Segment2s[segnum]; in apply_light_to_segment()
1953 changed_segs[n_changed_segs++] = segnum; in apply_light_to_segment()
1969 void change_segment_light(int segnum,int sidenum,int dir) in change_segment_light() argument
1971 segment *segp = &Segments[segnum]; in change_segment_light()
2001 void change_light(int segnum, int sidenum, int dir) in change_light() argument
2006 if ((Dl_indices[i].segnum == segnum) && (Dl_indices[i].sidenum == sidenum)) { in change_light()
2014 Assert((dlp->segnum >= 0) && (dlp->segnum <= Highest_segment_index)); in change_light()
2016 new_l = (Segments[dlp->segnum].sides[dlp->sidenum].uvls[k].l += dl); in change_light()
2018 Segments[dlp->segnum].sides[dlp->sidenum].uvls[k].l = 0; in change_light()
2026 change_segment_light(segnum,sidenum,dir); in change_light()
2032 int subtract_light(int segnum, int sidenum) in subtract_light() argument
2034 if (Light_subtracted[segnum] & (1 << sidenum)) { in subtract_light()
2039 Light_subtracted[segnum] |= (1 << sidenum); in subtract_light()
2040 change_light(segnum, sidenum, -1); in subtract_light()
2048 int add_light(int segnum, int sidenum) in add_light() argument
2050 if (!(Light_subtracted[segnum] & (1 << sidenum))) { in add_light()
2055 Light_subtracted[segnum] &= ~(1 << sidenum); in add_light()
2056 change_light(segnum, sidenum, 1); in add_light()
2133 void ambient_mark_bfs(int segnum, byte *marked_segs, int depth) in ambient_mark_bfs() argument
2140 marked_segs[segnum] = 1; in ambient_mark_bfs()
2143 int child = Segments[segnum].children[i]; in ambient_mark_bfs()
2145 …if (IS_CHILD(child) && (WALL_IS_DOORWAY(&Segments[segnum],i) & WID_RENDPAST_FLAG) && !marked_segs[… in ambient_mark_bfs()