Use array<> for Vertex_active
This commit is contained in:
parent
d1f45f85b2
commit
8a64ea3b0e
|
@ -193,7 +193,7 @@ extern int is_free_vertex(int vi);
|
|||
// Set existing vertex vnum to value *vp.
|
||||
int med_set_vertex(int vnum,const vertex &vp);
|
||||
|
||||
extern void med_combine_duplicate_vertices(sbyte *vlp);
|
||||
void med_combine_duplicate_vertices(array<uint8_t, MAX_VERTICES> &);
|
||||
|
||||
// Attach side newside of newseg to side destside of destseg.
|
||||
// Copies *newseg into global array Segments, increments Num_segments.
|
||||
|
|
|
@ -19,7 +19,7 @@ extern int AttachSide; // Side on segment to attach
|
|||
extern int Draw_all_segments; // Set to 1 means draw_world draws all segments in Segments, else draw only connected segments
|
||||
extern segment *Markedsegp; // Marked segment, used in conjunction with *Cursegp to form joints.
|
||||
extern int Markedside; // Marked side on Markedsegp.
|
||||
extern sbyte Vertex_active[MAX_VERTICES]; // !0 means vertex is in use, 0 means not in use.
|
||||
extern array<uint8_t, MAX_VERTICES> Vertex_active; // !0 means vertex is in use, 0 means not in use.
|
||||
|
||||
// The extra group in the following arrays is used for group rotation.
|
||||
extern group GroupList[MAX_GROUPS+1];
|
||||
|
|
|
@ -42,7 +42,7 @@ int Markedside; // Marked side on Markedsegp.
|
|||
|
||||
int Draw_all_segments; // Set to 1 means draw_world draws all segments in Segments, else draw only connected segments
|
||||
|
||||
sbyte Vertex_active[MAX_VERTICES]; // !0 means vertex is in use, 0 means not in use.
|
||||
array<uint8_t, MAX_VERTICES> Vertex_active; // !0 means vertex is in use, 0 means not in use.
|
||||
|
||||
selected_segment_array_t Selected_segs; // List of segment numbers currently selected
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ static void create_group_list(const vsegptridx_t segp, group::segment_array_type
|
|||
#define MXV MAX_VERTICES
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static void duplicate_group(sbyte *vertex_ids, group::segment_array_type_t &segments)
|
||||
static void duplicate_group(array<uint8_t, MAX_VERTICES> &vertex_ids, group::segment_array_type_t &segments)
|
||||
{
|
||||
int v,new_vertex_id,sidenum;
|
||||
group::segment_array_type_t new_segments;
|
||||
|
@ -529,7 +529,7 @@ static int med_copy_group(int delta_flag, const vsegptridx_t base_seg, int base_
|
|||
int x;
|
||||
int new_current_group;
|
||||
int c;
|
||||
sbyte in_vertex_list[MAX_VERTICES];
|
||||
array<uint8_t, MAX_VERTICES> in_vertex_list;
|
||||
|
||||
if (IS_CHILD(base_seg->children[base_side])) {
|
||||
editor_status("Error -- unable to copy group, base_seg:base_side must be free.");
|
||||
|
@ -659,7 +659,8 @@ static int med_copy_group(int delta_flag, const vsegptridx_t base_seg, int base_
|
|||
static int med_move_group(int delta_flag, const vsegptridx_t base_seg, int base_side, const vsegptridx_t group_seg, int group_side, const vms_matrix &orient_matrix, int orientation)
|
||||
{
|
||||
int v,vv,c,d;
|
||||
sbyte in_vertex_list[MAX_VERTICES], out_vertex_list[MAX_VERTICES];
|
||||
array<uint8_t, MAX_VERTICES> in_vertex_list;
|
||||
sbyte out_vertex_list[MAX_VERTICES];
|
||||
int local_hvi;
|
||||
|
||||
if (IS_CHILD(base_seg->children[base_side]))
|
||||
|
|
|
@ -720,7 +720,7 @@ static void compress_segments(void)
|
|||
// Combine duplicate vertices.
|
||||
// If two vertices have the same coordinates, within some small tolerance, then assign
|
||||
// the same vertex number to the two vertices, freeing up one of the vertices.
|
||||
void med_combine_duplicate_vertices(sbyte *vlp)
|
||||
void med_combine_duplicate_vertices(array<uint8_t, MAX_VERTICES> &vlp)
|
||||
{
|
||||
int v,w;
|
||||
|
||||
|
|
Loading…
Reference in a new issue