2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-07-25 09:07:40 +01:00
< meta name = "generator" content = "ZealOS V0.10" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
body {background-color:#000000;}
.cF0{color:#ffffff;background-color:#000000;}
.cF1{color:#3465a4;background-color:#000000;}
.cF2{color:#4e9a06;background-color:#000000;}
.cF3{color:#06989a;background-color:#000000;}
.cF4{color:#a24444;background-color:#000000;}
.cF5{color:#75507b;background-color:#000000;}
.cF6{color:#ce982f;background-color:#000000;}
.cF7{color:#bcc0b9;background-color:#000000;}
.cF8{color:#555753;background-color:#000000;}
.cF9{color:#729fcf;background-color:#000000;}
.cFA{color:#82bc49;background-color:#000000;}
.cFB{color:#34e2e2;background-color:#000000;}
.cFC{color:#ac3535;background-color:#000000;}
.cFD{color:#ad7fa8;background-color:#000000;}
.cFE{color:#fce94f;background-color:#000000;}
.cFF{color:#000000;background-color:#000000;}
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Graphics/Mesh" < / span > < span class = cF0 >
< a name = "l2" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > MESH_WORKSPACE_SIZE< / span > < span class = cF0 > < / span > < span class = cFE > 4000< / span > < span class = cF0 >
< a name = "l3" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l4" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > < / span > < span class = cFE > 1< / span > < span class = cF0 >
< a name = "l5" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > VF_COPIED< / span > < span class = cF0 > < / span > < span class = cFE > 2< / span > < span class = cF0 >
< a name = "l6" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > VF_IGNORE< / span > < span class = cF0 > < / span > < span class = cFE > 4< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l7" > < / a >
< a name = "l8" > < / a > < / span > < span class = cF1 > class< / span > < span class = cF0 > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 >
< a name = "l9" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l10" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *next, *last, *copy;
2021-07-03 05:07:57 +01:00
< a name = "l11" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l12" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF1 > start< / span > < span class = cF0 > ;
< a name = "l13" > < / a > < / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > p; < / span > < span class = cF2 > //World coordinates of the point.< / span > < span class = cF0 >
< a name = "l14" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF1 > end< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l15" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l16" > < / a > < / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > p0,
< a name = "l17" > < / a > pt; < / span > < span class = cF2 > //Transformed coordinates.< / span > < span class = cF0 > < / span > < span class = cF2 > (Screen)< / span > < span class = cF0 >
< a name = "l18" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > num, flags;
2021-07-03 05:07:57 +01:00
< a name = "l19" > < / a > };
< a name = "l20" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l21" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > < / span > < span class = cFE > 1< / span > < span class = cF0 >
< a name = "l22" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > TF_COPIED< / span > < span class = cF0 > < / span > < span class = cFE > 2< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l23" > < / a >
< a name = "l24" > < / a > < / span > < span class = cF1 > class< / span > < span class = cF0 > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 >
< a name = "l25" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l26" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *next, *last;
2021-07-03 05:07:57 +01:00
< a name = "l27" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l28" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF1 > start< / span > < span class = cF0 > ;
< a name = "l29" > < / a > < / span > < span class = cF9 > CMeshTri< / span > < span class = cF0 > mt;
< a name = "l30" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF1 > end< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l31" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l32" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > cpu_num, flags; < / span > < span class = cF2 > //Draw different tris with different cores.< / span > < span class = cF0 >
< a name = "l33" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *t[< / span > < span class = cFE > 3< / span > < span class = cF0 > ];
2021-07-03 05:07:57 +01:00
< a name = "l34" > < / a > };
< a name = "l35" > < / a >
< a name = "l36" > < / a > < / span > < span class = cF1 > class< / span > < span class = cF0 > < / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 >
< a name = "l37" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l38" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > mouse_z, thickness; < / span > < span class = cF2 > //Mouse Z-coordinate< / span > < span class = cF0 >
< a name = "l39" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > ed_mode, cx, cy;
< a name = "l40" > < / a > < / span > < span class = cF9 > CColorROPU32< / span > < span class = cF0 > cur_color;
< a name = "l41" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > grid_on, flip_y, sel_rect, vertex_on, closed, pad[< / span > < span class = cFE > 3< / span > < span class = cF0 > ];
< a name = "l42" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > mp_not_done_flags; < / span > < span class = cF2 > //Used for multiprocessing signaling.< / span > < span class = cF0 >
< a name = "l43" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > view_scale;
< a name = "l44" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc;
< a name = "l45" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > *depth_buf;
< a name = "l46" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *w2s, *s2w; < / span > < span class = cF2 > //Screen-to-world and world-to-screen transform matrices.< / span > < span class = cF0 >
< a name = "l47" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > vertex_count, tri_count; < / span > < span class = cF2 > //Set by MeshSize< / span > < span class = cF0 >
< a name = "l48" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > vertex_head, *cur_vertex, *chain_pred;
< a name = "l49" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > tri_head, *cur_tri;
< a name = "l50" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > x1, y1, x2, y2, cur_snap;
2021-07-03 05:07:57 +01:00
< a name = "l51" > < / a > };
< a name = "l52" > < / a >
< a name = "l53" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshVertexNew< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y, < / span > < span class = cF9 > I64< / span > < span class = cF0 > z)
< a name = "l54" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l55" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l56" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l57" > < / a > tmpv-> p.x = x;
< a name = "l58" > < / a > tmpv-> p.y = y;
< a name = "l59" > < / a > tmpv-> p.z = z;
< a name = "l60" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpv, e-> vertex_head.last);
2021-07-03 05:07:57 +01:00
< a name = "l61" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l62" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > tmpv;
2021-07-03 05:07:57 +01:00
< a name = "l63" > < / a > }
< a name = "l64" > < / a >
< a name = "l65" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CColorROPU32< / span > < span class = cF0 > color, < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *v1, < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *v2, < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *v3)
< a name = "l66" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l67" > < / a > < / span > < span class = cF1 > static< / span > < span class = cF0 > < / span > < span class = cF9 > I64< / span > < span class = cF0 > cpu_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l68" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l69" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l70" > < / a > tmpt-> cpu_num = cpu_num++ % < / span > < span class = cFB > mp_count< / span > < span class = cF0 > ;
< a name = "l71" > < / a > tmpt-> mt.color = color;
< a name = "l72" > < / a > tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ] = v1;
< a name = "l73" > < / a > tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] = v2;
< a name = "l74" > < / a > tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ] = v3;
< a name = "l75" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpt, e-> tri_head.last);
2021-07-03 05:07:57 +01:00
< a name = "l76" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l77" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > tmpt;
2021-07-03 05:07:57 +01:00
< a name = "l78" > < / a > }
< a name = "l79" > < / a >
< a name = "l80" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y)
< a name = "l81" > < / a > {< / span > < span class = cF2 > //Screen coordinates< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l82" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *res = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > , *tmpv = e-> vertex_head.next;
< a name = "l83" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > dd, dz, best_dd = < / span > < span class = cF3 > I64_MAX< / span > < span class = cF0 > , best_dz = < / span > < span class = cF3 > I64_MAX< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l84" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l85" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l86" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l87" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > tmpv-> flags & < / span > < span class = cF3 > VF_IGNORE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l88" > < / a > {
< a name = "l89" > < / a > dd = < / span > < span class = cF5 > SqrI64< / span > < span class = cF0 > (x - tmpv-> pt.x) + < / span > < span class = cF5 > SqrI64< / span > < span class = cF0 > (y - tmpv-> pt.y);
< a name = "l90" > < / a > dz = < / span > < span class = cF5 > AbsI64< / span > < span class = cF0 > (e-> mouse_z - tmpv-> p.z);
< a name = "l91" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dd < best_dd || dd == best_dd & & dz < best_dz)
< a name = "l92" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l93" > < / a > res = tmpv;
< a name = "l94" > < / a > best_dd = dd;
< a name = "l95" > < / a > best_dz = dz;
< a name = "l96" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l97" > < / a > }
< a name = "l98" > < / a > tmpv = tmpv-> next;
< a name = "l99" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l100" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l101" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l102" > < / a > }
< a name = "l103" > < / a >
< a name = "l104" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshVertexFindNum< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *haystack_e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > needle_num)
< a name = "l105" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l106" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = haystack_e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l107" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l108" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & haystack_e-> vertex_head)
< a name = "l109" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l110" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> num == needle_num)
< a name = "l111" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > tmpv;
< a name = "l112" > < / a > tmpv = tmpv-> next;
< a name = "l113" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l114" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l115" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l116" > < / a > }
< a name = "l117" > < / a >
< a name = "l118" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshTriDel< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt)
< a name = "l119" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l120" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt)
< a name = "l121" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l122" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt == e-> cur_tri)
< a name = "l123" > < / a > e-> cur_tri = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l124" > < / a > < / span > < span class = cF5 > QueueRemove< / span > < span class = cF0 > (tmpt);
< a name = "l125" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpt);
< a name = "l126" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l127" > < / a > }
< a name = "l128" > < / a >
< a name = "l129" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshVertexDel< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv)
< a name = "l130" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l131" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i;
< a name = "l132" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt, *tmpt1;
2021-07-03 05:07:57 +01:00
< a name = "l133" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l134" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv)
< a name = "l135" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l136" > < / a > tmpt = e-> tri_head.next;
< a name = "l137" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l138" > < / a > {
< a name = "l139" > < / a > tmpt1 = tmpt-> next;
< a name = "l140" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 3< / span > < span class = cF0 > ; i++)
< a name = "l141" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> t[i] == tmpv)
< a name = "l142" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l143" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i < < / span > < span class = cFE > 3< / span > < span class = cF0 > )
< a name = "l144" > < / a > < / span > < span class = cF5 > MeshTriDel< / span > < span class = cF0 > (e, tmpt);
< a name = "l145" > < / a > tmpt = tmpt1;
< a name = "l146" > < / a > }
< a name = "l147" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv == e-> cur_vertex)
< a name = "l148" > < / a > e-> cur_vertex = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l149" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv == e-> chain_pred)
< a name = "l150" > < / a > e-> chain_pred = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l151" > < / a > < / span > < span class = cF5 > QueueRemove< / span > < span class = cF0 > (tmpv);
< a name = "l152" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (tmpv);
< a name = "l153" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l154" > < / a > }
< a name = "l155" > < / a >
< a name = "l156" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshFence< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l157" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l158" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv, *tmpv1, *tmpv_last = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > , *tmpv1_last = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ,
< a name = "l159" > < / a > *< / span > < span class = cF1 > start< / span > < span class = cF0 > = e-> chain_pred-> next, *< / span > < span class = cF1 > end< / span > < span class = cF0 > = e-> vertex_head.last;
2021-07-03 05:07:57 +01:00
< a name = "l160" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l161" > < / a > tmpv = < / span > < span class = cF1 > start< / span > < span class = cF0 > ;
< a name = "l162" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l163" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l164" > < / a > tmpv1 = < / span > < span class = cF5 > MeshVertexNew< / span > < span class = cF0 > (e, tmpv-> p.x, tmpv-> p.y, tmpv-> p.z + e-> thickness);
< a name = "l165" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv_last)
< a name = "l166" > < / a > {
< a name = "l167" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, tmpv_last, tmpv, tmpv1);
< a name = "l168" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, tmpv1, tmpv1_last, tmpv_last);
< a name = "l169" > < / a > }
< a name = "l170" > < / a > tmpv_last = tmpv;
< a name = "l171" > < / a > tmpv1_last = tmpv1;
< a name = "l172" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv == < / span > < span class = cF1 > end< / span > < span class = cF0 > )
< a name = "l173" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l174" > < / a > tmpv = tmpv-> next;
< a name = "l175" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l176" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> closed & & tmpv_last)
< a name = "l177" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l178" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, tmpv_last, < / span > < span class = cF1 > start< / span > < span class = cF0 > , < / span > < span class = cF1 > end< / span > < span class = cF0 > -> next);
< a name = "l179" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, < / span > < span class = cF1 > end< / span > < span class = cF0 > -> next, tmpv1_last, tmpv_last);
< a name = "l180" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l181" > < / a > }
< a name = "l182" > < / a >
< a name = "l183" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshPolygon< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF1 > start< / span > < span class = cF0 > , < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF1 > end< / span > < span class = cF0 > , < / span > < span class = cF1 > Bool< / span > < span class = cF0 > rev)
< a name = "l184" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l185" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv, *tmpv1;
2021-07-03 05:07:57 +01:00
< a name = "l186" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l187" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF1 > start< / span > < span class = cF0 > != < / span > < span class = cF1 > end< / span > < span class = cF0 > )
< a name = "l188" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l189" > < / a > tmpv = < / span > < span class = cF1 > start< / span > < span class = cF0 > ;
< a name = "l190" > < / a > tmpv1 = tmpv-> next;
< a name = "l191" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv1 != < / span > < span class = cF1 > end< / span > < span class = cF0 > )
< a name = "l192" > < / a > {
< a name = "l193" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (rev)
< a name = "l194" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, tmpv1, tmpv, < / span > < span class = cF1 > end< / span > < span class = cF0 > );
< a name = "l195" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l196" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, e-> cur_color, tmpv, tmpv1, < / span > < span class = cF1 > end< / span > < span class = cF0 > );
< a name = "l197" > < / a > tmpv = tmpv-> next;
< a name = "l198" > < / a > tmpv1 = tmpv1-> next;
< a name = "l199" > < / a > }
< a name = "l200" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l201" > < / a > }
< a name = "l202" > < / a >
< a name = "l203" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshPrism< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l204" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l205" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *< / span > < span class = cF1 > start< / span > < span class = cF0 > = e-> chain_pred-> next, *< / span > < span class = cF1 > end< / span > < span class = cF0 > = e-> vertex_head.last;
2021-07-03 05:07:57 +01:00
< a name = "l206" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l207" > < / a > < / span > < span class = cF5 > MeshFence< / span > < span class = cF0 > (e);
< a name = "l208" > < / a > < / span > < span class = cF5 > MeshPolygon< / span > < span class = cF0 > (e, < / span > < span class = cF1 > start< / span > < span class = cF0 > , < / span > < span class = cF1 > end< / span > < span class = cF0 > , < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l209" > < / a > < / span > < span class = cF5 > MeshPolygon< / span > < span class = cF0 > (e, < / span > < span class = cF1 > end< / span > < span class = cF0 > -> next, e-> vertex_head.last, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l210" > < / a > }
< a name = "l211" > < / a >
< a name = "l212" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > val)
< a name = "l213" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l214" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l215" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l216" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l217" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l218" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (val)
< a name = "l219" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l220" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l221" > < / a > tmpv-> flags & = ~< / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l222" > < / a > tmpv = tmpv-> next;
< a name = "l223" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l224" > < / a > }
< a name = "l225" > < / a >
< a name = "l226" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > val)
< a name = "l227" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l228" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l229" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l230" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l231" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l232" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (val)
< a name = "l233" > < / a > tmpt-> flags |= < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l234" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l235" > < / a > tmpt-> flags & = ~< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l236" > < / a > tmpt = tmpt-> next;
< a name = "l237" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l238" > < / a > }
< a name = "l239" > < / a >
< a name = "l240" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshVertexIgnoreSet< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > val)
< a name = "l241" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l242" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l243" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l244" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l245" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l246" > < / a > tmpv-> flags & = ~< / span > < span class = cF3 > VF_IGNORE< / span > < span class = cF0 > ;
< a name = "l247" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > & & val)
< a name = "l248" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_IGNORE< / span > < span class = cF0 > ;
< a name = "l249" > < / a > tmpv = tmpv-> next;
< a name = "l250" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l251" > < / a > }
< a name = "l252" > < / a >
< a name = "l253" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l254" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l255" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l256" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l257" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l258" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l259" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& tmpv-> p0, & tmpv-> p, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l260" > < / a > tmpv = tmpv-> next;
< a name = "l261" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l262" > < / a > }
< a name = "l263" > < / a >
< a name = "l264" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > dx, < / span > < span class = cF9 > I64< / span > < span class = cF0 > dy, < / span > < span class = cF9 > I64< / span > < span class = cF0 > dz)
< a name = "l265" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l266" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l267" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l268" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l269" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l270" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l271" > < / a > {
< a name = "l272" > < / a > tmpv-> p.x = tmpv-> p0.x + dx;
< a name = "l273" > < / a > tmpv-> p.y = tmpv-> p0.y + dy;
< a name = "l274" > < / a > tmpv-> p.z = tmpv-> p0.z + dz;
< a name = "l275" > < / a > }
< a name = "l276" > < / a > tmpv = tmpv-> next;
< a name = "l277" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l278" > < / a > }
< a name = "l279" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l280" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > SEL_MESH_EQU< / span > < span class = cF0 > < / span > < span class = cFE > 0< / span > < span class = cF0 >
< a name = "l281" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > SEL_MESH_OR< / span > < span class = cF0 > < / span > < span class = cFE > 1< / span > < span class = cF0 >
< a name = "l282" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > < / span > < span class = cF3 > SEL_MESH_AND< / span > < span class = cF0 > < / span > < span class = cFE > 2< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l283" > < / a >
< a name = "l284" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshVertexSelRect< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > sel_mode, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x1, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x2, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y1, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y2)
< a name = "l285" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l286" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l287" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l288" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (x1 > x2)
< a name = "l289" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& x1, & x2);
< a name = "l290" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (y1 > y2)
< a name = "l291" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& y1, & y2);
< a name = "l292" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l293" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l294" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (x1 < = tmpv-> pt.x < = x2 & & y1 < = tmpv-> pt.y < = y2)
< a name = "l295" > < / a > {
< a name = "l296" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sel_mode == < / span > < span class = cF3 > SEL_MESH_AND< / span > < span class = cF0 > )
< a name = "l297" > < / a > tmpv-> flags & = ~< / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l298" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l299" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l300" > < / a > }
< a name = "l301" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sel_mode == < / span > < span class = cF3 > SEL_MESH_EQU< / span > < span class = cF0 > )
< a name = "l302" > < / a > tmpv-> flags & = ~< / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l303" > < / a > tmpv = tmpv-> next;
< a name = "l304" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l305" > < / a > }
< a name = "l306" > < / a >
< a name = "l307" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshTriSelRect< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > sel_mode, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x1, < / span > < span class = cF9 > I64< / span > < span class = cF0 > x2, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y1, < / span > < span class = cF9 > I64< / span > < span class = cF0 > y2)
< a name = "l308" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l309" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l310" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l311" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (x1 > x2)
< a name = "l312" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& x1, & x2);
< a name = "l313" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (y1 > y2)
< a name = "l314" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& y1, & y2);
< a name = "l315" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l316" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l317" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (x1 < = tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l318" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt.y < = y2 & &
< a name = "l319" > < / a > x1 < = tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l320" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt.y < = y2 & &
< a name = "l321" > < / a > x1 < = tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l322" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt.y < = y2)
< a name = "l323" > < / a > {
< a name = "l324" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sel_mode == < / span > < span class = cF3 > SEL_MESH_AND< / span > < span class = cF0 > )
< a name = "l325" > < / a > tmpt-> flags & = ~< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l326" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l327" > < / a > tmpt-> flags |= < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l328" > < / a > }
< a name = "l329" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l330" > < / a > {
< a name = "l331" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sel_mode == < / span > < span class = cF3 > SEL_MESH_EQU< / span > < span class = cF0 > )
< a name = "l332" > < / a > tmpt-> flags & = ~< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l333" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (sel_mode == < / span > < span class = cF3 > SEL_MESH_AND< / span > < span class = cF0 > )
< a name = "l334" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l335" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > ( x1 < = tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l336" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt.y < = y2 ||
< a name = "l337" > < / a > x1 < = tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l338" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt.y < = y2 ||
< a name = "l339" > < / a > x1 < = tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt.x < = x2 & &
< a name = "l340" > < / a > y1 < = tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt.y < = y2)
< a name = "l341" > < / a > tmpt-> flags & = ~< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l342" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l343" > < / a > }
< a name = "l344" > < / a > tmpt = tmpt-> next;
< a name = "l345" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l346" > < / a > }
< a name = "l347" > < / a >
< a name = "l348" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > < / span > < span class = cF5 > MeshSelCount< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l349" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l350" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > res = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l351" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
< a name = "l352" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l353" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l354" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l355" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l356" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l357" > < / a > res++;
< a name = "l358" > < / a > tmpv = tmpv-> next;
< a name = "l359" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l360" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l361" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l362" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > )
< a name = "l363" > < / a > res++;
< a name = "l364" > < / a > tmpt = tmpt-> next;
< a name = "l365" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l366" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l367" > < / a > }
< a name = "l368" > < / a >
< a name = "l369" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshSwapAxes< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > o1, < / span > < span class = cF9 > I64< / span > < span class = cF0 > o2)
< a name = "l370" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l371" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unsel;
< a name = "l372" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l373" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l374" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l375" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l376" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l377" > < / a > unsel = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l378" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l379" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l380" > < / a > unsel = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l381" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l382" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l383" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l384" > < / a > < / span > < span class = cF5 > SwapU32< / span > < span class = cF0 > (< / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpv-> p< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + o1, < / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpv-> p< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + o2);
< a name = "l385" > < / a > tmpv = tmpv-> next;
< a name = "l386" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l387" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unsel)
< a name = "l388" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l389" > < / a > }
< a name = "l390" > < / a >
< a name = "l391" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshInvertAxis< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > o)
< a name = "l392" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l393" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unsel;
< a name = "l394" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l395" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l396" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l397" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l398" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l399" > < / a > unsel = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l400" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l401" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l402" > < / a > unsel = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l403" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l404" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l405" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l406" > < / a > *(< / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpv-> p< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + o)(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *) = -*(< / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpv-> p< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + o)(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *);
< a name = "l407" > < / a > tmpv = tmpv-> next;
< a name = "l408" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l409" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unsel)
< a name = "l410" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l411" > < / a > }
< a name = "l412" > < / a >
< a name = "l413" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshTransformSel< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l414" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l415" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unsel;
< a name = "l416" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > r[< / span > < span class = cFE > 16< / span > < span class = cF0 > ], x, y, z;
< a name = "l417" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l418" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l419" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > PopUpTransform< / span > < span class = cF7 > (< / span > < span class = cF0 > r< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l420" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l421" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l422" > < / a > {
< a name = "l423" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l424" > < / a > unsel = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l425" > < / a > }
< a name = "l426" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l427" > < / a > unsel = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l428" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l429" > < / a > {
< a name = "l430" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l431" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l432" > < / a > x = tmpv-> p.x;
< a name = "l433" > < / a > y = tmpv-> p.y;
< a name = "l434" > < / a > z = tmpv-> p.z;
< a name = "l435" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (r, & x, & y, & z);
< a name = "l436" > < / a > tmpv-> p.x = x;
< a name = "l437" > < / a > tmpv-> p.y = y;
< a name = "l438" > < / a > tmpv-> p.z = z;
< a name = "l439" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l440" > < / a > tmpv = tmpv-> next;
< a name = "l441" > < / a > }
< a name = "l442" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unsel)
< a name = "l443" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l444" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l445" > < / a > }
< a name = "l446" > < / a >
< a name = "l447" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshColorTris< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l448" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l449" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unsel;
< a name = "l450" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l451" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l452" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l453" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l454" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l455" > < / a > unsel = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l456" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l457" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l458" > < / a > unsel = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l459" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l460" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l461" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > )
< a name = "l462" > < / a > tmpt-> mt.color = e-> cur_color;
< a name = "l463" > < / a > tmpt = tmpt-> next;
< a name = "l464" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l465" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unsel)
< a name = "l466" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l467" > < / a > }
< a name = "l468" > < / a >
< a name = "l469" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshRevTris< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l470" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l471" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unsel;
< a name = "l472" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l473" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l474" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l475" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l476" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l477" > < / a > unsel = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l478" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l479" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l480" > < / a > unsel = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l481" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l482" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l483" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > )
< a name = "l484" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ], & tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]);
< a name = "l485" > < / a > tmpt = tmpt-> next;
< a name = "l486" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l487" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unsel)
< a name = "l488" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l489" > < / a > }
< a name = "l490" > < / a >
< a name = "l491" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshRecalcCxCy< / span > < span class = cF0 > (< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task, < / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l492" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l493" > < / a > e-> cx = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (task-> pix_width / < / span > < span class = cFE > 2< / span > < span class = cF0 > - task-> horz_scroll.pos, e-> cur_snap);
< a name = "l494" > < / a > e-> cy = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (task-> pix_height / < / span > < span class = cFE > 2< / span > < span class = cF0 > - task-> vert_scroll.pos, e-> cur_snap);
2021-07-03 05:07:57 +01:00
< a name = "l495" > < / a > }
< a name = "l496" > < / a >
< a name = "l497" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshCurSnap< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l498" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l499" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > x1, y1, z1, x2, y2, z2;
2021-07-03 05:07:57 +01:00
< a name = "l500" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l501" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> w2s)
< a name = "l502" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l503" > < / a > x1 = e-> cur_snap < < < / span > < span class = cFE > 16< / span > < span class = cF0 > ;
< a name = "l504" > < / a > y1 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l505" > < / a > z1 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l506" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> w2s, & x1, & y1, & z1);
< a name = "l507" > < / a > x2 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l508" > < / a > y2 = e-> cur_snap < < < / span > < span class = cFE > 16< / span > < span class = cF0 > ;
< a name = "l509" > < / a > z2 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l510" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> w2s, & x2, & y2, & z2);
< a name = "l511" > < / a > < / span > < span class = cFB > mouse_grid< / span > < span class = cF0 > .x = < / span > < span class = cF5 > Max< / span > < span class = cF0 > (< / span > < span class = cFE > 1< / span > < span class = cF0 > , < / span > < span class = cF5 > MaxI64< / span > < span class = cF7 > (< / span > < span class = cF0 > x1, x2< / span > < span class = cF7 > )< / span > < span class = cF0 > > > < / span > < span class = cFE > 16< / span > < span class = cF0 > );
< a name = "l512" > < / a > < / span > < span class = cFB > mouse_grid< / span > < span class = cF0 > .y = < / span > < span class = cF5 > Max< / span > < span class = cF0 > (< / span > < span class = cFE > 1< / span > < span class = cF0 > , < / span > < span class = cF5 > MaxI64< / span > < span class = cF7 > (< / span > < span class = cF0 > y1, y2< / span > < span class = cF7 > )< / span > < span class = cF0 > > > < / span > < span class = cFE > 16< / span > < span class = cF0 > );
< a name = "l513" > < / a > < / span > < span class = cFB > mouse_grid< / span > < span class = cF0 > .z = < / span > < span class = cF5 > Min< / span > < span class = cF0 > (< / span > < span class = cFB > mouse_grid< / span > < span class = cF0 > .x, < / span > < span class = cFB > mouse_grid< / span > < span class = cF0 > .y);
< a name = "l514" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l515" > < / a > }
< a name = "l516" > < / a >
< a name = "l517" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshScaleZoom< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > F64< / span > < span class = cF0 > scale)
< a name = "l518" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l519" > < / a > < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task = < / span > < span class = cF5 > Fs< / span > < span class = cF0 > ;
< a name = "l520" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > x = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.x - task-> pix_left - task-> scroll_x - task-> pix_width / < / span > < span class = cFE > 2< / span > < span class = cF0 > ,
< a name = "l521" > < / a > y = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.y - task-> pix_top - task-> scroll_y - task-> pix_height / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l522" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l523" > < / a > task-> horz_scroll.pos *= scale;
< a name = "l524" > < / a > task-> vert_scroll.pos *= scale;
< a name = "l525" > < / a > task-> horz_scroll.pos += scale * x - x;
< a name = "l526" > < / a > task-> vert_scroll.pos += scale * y - y;
< a name = "l527" > < / a > e-> view_scale *= scale;
< a name = "l528" > < / a > < / span > < span class = cF5 > MeshRecalcCxCy< / span > < span class = cF0 > (task, e);
< a name = "l529" > < / a > < / span > < span class = cF5 > MeshCurSnap< / span > < span class = cF0 > (e);
2021-07-03 05:07:57 +01:00
< a name = "l530" > < / a > }
< a name = "l531" > < / a >
< a name = "l532" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MPDrawIt< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l533" > < / a > {< / span > < span class = cF2 > //Multiprocessing draw it, called by each core.< / span > < span class = cF0 >
< a name = "l534" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l535" > < / a > < / span > < span class = cF2 > //Makes a copy of e-> dc so we can change dc-> color member and stuff.< / span > < span class = cF0 >
< a name = "l536" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc = < / span > < span class = cF5 > DCAlias< / span > < span class = cF0 > (e-> dc, e-> dc-> win_task);
< a name = "l537" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
< a name = "l538" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, *old_r = dc-> r;
2021-07-03 05:07:57 +01:00
< a name = "l539" > < / a >
2021-07-26 20:29:49 +01:00
< a name = "l540" > < / a > < / span > < span class = cF2 > //< / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/GrDC.CC.html#l182" > < span class = cF4 > DCAlias< / span > < / a > < span class = cF2 > () allocs a new identity rotation matrix.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l541" > < / a > < / span > < span class = cF2 > //We want e-> dc's rotation matrix.< / span > < span class = cF0 >
< a name = "l542" > < / a > dc-> r = e-> dc-> r;
< a name = "l543" > < / a > dc-> depth_buf = e-> depth_buf;
< a name = "l544" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& dc-> ls, & e-> dc-> ls, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l545" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l546" > < / a > < / span > < span class = cF2 > //... and translation (shift) vals.< / span > < span class = cF0 >
< a name = "l547" > < / a > dc-> x = e-> dc-> x;
< a name = "l548" > < / a > dc-> y = e-> dc-> y;
< a name = "l549" > < / a > dc-> z = e-> dc-> z;
< a name = "l550" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l551" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l552" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> grid_on)
2021-07-03 05:07:57 +01:00
< a name = "l553" > < / a > < / span > < span class = cF2 > //Draw grid with different cores.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l554" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = -< / span > < span class = cFE > 500< / span > < span class = cF0 > + < / span > < span class = cFE > 25< / span > < span class = cF0 > * < / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num; i < = < / span > < span class = cFE > 500< / span > < span class = cF0 > ; i += < / span > < span class = cFE > 25< / span > < span class = cF0 > * < / span > < span class = cFB > mp_count< / span > < span class = cF0 > )
< a name = "l555" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l556" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i)
< a name = "l557" > < / a > {
< a name = "l558" > < / a > dc-> color = < / span > < span class = cF3 > DKGRAY< / span > < span class = cF0 > ;
< a name = "l559" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, i, -< / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , i, < / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l560" > < / a > dc-> color = < / span > < span class = cF3 > LTGRAY< / span > < span class = cF0 > ;
< a name = "l561" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, -< / span > < span class = cFE > 500< / span > < span class = cF0 > , i, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 500< / span > < span class = cF0 > , i, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l562" > < / a > }
< a name = "l563" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l564" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num)
< a name = "l565" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l566" > < / a > dc-> color = < / span > < span class = cF3 > RED< / span > < span class = cF0 > ; < / span > < span class = cF2 > //Y-Axis red< / span > < span class = cF0 >
< a name = "l567" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l568" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > ; < / span > < span class = cF2 > //Y-Axis red< / span > < span class = cF0 >
< a name = "l569" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , -< / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l570" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l571" > < / a > dc-> color = < / span > < span class = cF3 > YELLOW< / span > < span class = cF0 > ; < / span > < span class = cF2 > //X-Axis yellow< / span > < span class = cF0 >
< a name = "l572" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l573" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > YELLOW< / span > < span class = cF0 > ; < / span > < span class = cF2 > //X-Axis yellow< / span > < span class = cF0 >
< a name = "l574" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, -< / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l575" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l576" > < / a > dc-> color = < / span > < span class = cF3 > GREEN< / span > < span class = cF0 > ; < / span > < span class = cF2 > //Z-Axis green< / span > < span class = cF0 >
< a name = "l577" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 500< / span > < span class = cF0 > );
< a name = "l578" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > GREEN< / span > < span class = cF0 > ; < / span > < span class = cF2 > //Z-Axis green< / span > < span class = cF0 >
< a name = "l579" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , -< / span > < span class = cFE > 500< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l580" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l581" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l582" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l583" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l584" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> cpu_num == < / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num)
< a name = "l585" > < / a > {
< a name = "l586" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > )
< a name = "l587" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l588" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF0 > )
< a name = "l589" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > ;
< a name = "l590" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l591" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ;
< a name = "l592" > < / a > < / span > < span class = cF5 > GrFillTri0< / span > < span class = cF0 > (dc, & tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt, & tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt, & tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt);
< a name = "l593" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l594" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l595" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l596" > < / a > (*dc-> lighting)(dc, & tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt, & tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt,
< a name = "l597" > < / a > & tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt, tmpt-> mt.color);
< a name = "l598" > < / a > < / span > < span class = cF5 > GrFillTri0< / span > < span class = cF0 > (dc, & tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> pt, & tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> pt, & tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> pt);
< a name = "l599" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l600" > < / a > }
< a name = "l601" > < / a > tmpt = tmpt-> next;
< a name = "l602" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l603" > < / a > dc-> r = old_r;
2021-07-03 05:07:57 +01:00
< a name = "l604" > < / a >
2021-07-26 20:29:49 +01:00
< a name = "l605" > < / a > < / span > < span class = cF2 > //e-> dc's depth buf was copied but we don't want it freed during < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/GrDC.CC.html#l230" > < span class = cF4 > DCDel< / span > < / a > < span class = cF2 > ().< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l606" > < / a > dc-> depth_buf = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l607" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l608" > < / a > < / span > < span class = cF5 > DCDel< / span > < span class = cF0 > (dc);
< a name = "l609" > < / a > < / span > < span class = cF5 > LBtr< / span > < span class = cF0 > (& e-> mp_not_done_flags, < / span > < span class = cF5 > Gs< / span > < span class = cF0 > -> num);
2021-07-03 05:07:57 +01:00
< a name = "l610" > < / a > }
< a name = "l611" > < / a >
< a name = "l612" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshW2S< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task)
< a name = "l613" > < / a > {< / span > < span class = cF2 > //World to screen coordinate transform matrix.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l614" > < / a > < / span > < span class = cF9 > CCtrl< / span > < span class = cF0 > *c = < / span > < span class = cF5 > CtrlFindUnique< / span > < span class = cF0 > (task, < / span > < span class = cF3 > CTRLT_VIEWING_ANGLES< / span > < span class = cF0 > );
< a name = "l615" > < / a > < / span > < span class = cF9 > CViewAngles< / span > < span class = cF0 > *s = c-> state;
< a name = "l616" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *r = < / span > < span class = cF5 > Mat4x4IdentNew< / span > < span class = cF0 > (task);
2021-07-03 05:07:57 +01:00
< a name = "l617" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l618" > < / a > < / span > < span class = cF5 > Mat4x4Scale< / span > < span class = cF0 > (r, e-> view_scale);
< a name = "l619" > < / a > < / span > < span class = cF5 > Mat4x4RotZ< / span > < span class = cF0 > (r, s-> az);
< a name = "l620" > < / a > < / span > < span class = cF5 > Mat4x4RotY< / span > < span class = cF0 > (r, s-> ay);
< a name = "l621" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> flip_y)
< a name = "l622" > < / a > < / span > < span class = cF5 > Mat4x4RotX< / span > < span class = cF0 > (r, s-> ax);
< a name = "l623" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l624" > < / a > < / span > < span class = cF5 > Mat4x4RotX< / span > < span class = cF0 > (r, s-> ax + < / span > < span class = cF3 > pi< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l625" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l626" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > r;
2021-07-03 05:07:57 +01:00
< a name = "l627" > < / a > }
< a name = "l628" > < / a >
< a name = "l629" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshS2W< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task)
< a name = "l630" > < / a > {< / span > < span class = cF2 > //Screen to world coordinate transform matrix.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l631" > < / a > < / span > < span class = cF9 > CCtrl< / span > < span class = cF0 > *c = < / span > < span class = cF5 > CtrlFindUnique< / span > < span class = cF0 > (task, < / span > < span class = cF3 > CTRLT_VIEWING_ANGLES< / span > < span class = cF0 > );
< a name = "l632" > < / a > < / span > < span class = cF9 > CViewAngles< / span > < span class = cF0 > *s = c-> state;
< a name = "l633" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *r = < / span > < span class = cF5 > Mat4x4IdentNew< / span > < span class = cF0 > (task);
2021-07-03 05:07:57 +01:00
< a name = "l634" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l635" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> flip_y)
< a name = "l636" > < / a > < / span > < span class = cF5 > Mat4x4RotX< / span > < span class = cF0 > (r, -s-> ax);
< a name = "l637" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l638" > < / a > < / span > < span class = cF5 > Mat4x4RotX< / span > < span class = cF0 > (r, -< / span > < span class = cF7 > (< / span > < span class = cF0 > s-> ax + < / span > < span class = cF3 > pi< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l639" > < / a > < / span > < span class = cF5 > Mat4x4RotY< / span > < span class = cF0 > (r, -s-> ay);
< a name = "l640" > < / a > < / span > < span class = cF5 > Mat4x4RotZ< / span > < span class = cF0 > (r, -s-> az);
< a name = "l641" > < / a > < / span > < span class = cF5 > Mat4x4Scale< / span > < span class = cF0 > (r, < / span > < span class = cFE > 1< / span > < span class = cF0 > / e-> view_scale);
2021-07-03 05:07:57 +01:00
< a name = "l642" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l643" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > r;
2021-07-03 05:07:57 +01:00
< a name = "l644" > < / a > }
< a name = "l645" > < / a >
< a name = "l646" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshSetW2S< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task)
< a name = "l647" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l648" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (e-> w2s);
< a name = "l649" > < / a > e-> w2s = < / span > < span class = cF5 > MeshW2S< / span > < span class = cF0 > (e, task);
< a name = "l650" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (e-> s2w);
< a name = "l651" > < / a > e-> s2w = < / span > < span class = cF5 > MeshS2W< / span > < span class = cF0 > (e, task);
2021-07-26 20:29:49 +01:00
< a name = "l652" > < / a > < / span > < span class = cF2 > //returned matrix is assigned to dc-> r and will be freed by < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/GrDC.CC.html#l230" > < span class = cF4 > DCDel< / span > < / a > < span class = cF2 > ().< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l653" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l654" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF5 > Mat4x4New< / span > < span class = cF0 > (e-> w2s, task);
2021-07-03 05:07:57 +01:00
< a name = "l655" > < / a > }
< a name = "l656" > < / a >
< a name = "l657" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_x, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_y, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_z)
< a name = "l658" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l659" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > x_shadow, y_shadow, z_shadow,
< a name = "l660" > < / a > xc = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.x - task-> pix_left - task-> scroll_x - e-> cx,
< a name = "l661" > < / a > yc = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.y - task-> pix_top - task-> scroll_y - e-> cy,
< a name = "l662" > < / a > zc = < / span > < span class = cFE > 0< / span > < span class = cF0 > , x = < / span > < span class = cFE > 0< / span > < span class = cF0 > , y = < / span > < span class = cFE > 0< / span > < span class = cF0 > , z = e-> mouse_z, i, x2, y2, z2;
2021-07-03 05:07:57 +01:00
< a name = "l663" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l664" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> w2s, & x, & y, & z); < / span > < span class = cF2 > //screen of Z vect< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l665" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l666" > < / a > < / span > < span class = cF2 > //Converges onto a solution for zc, an unknown.< / span > < span class = cF0 >
< a name = "l667" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 128< / span > < span class = cF0 > ; i++)
< a name = "l668" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l669" > < / a > x_shadow = xc - x; < / span > < span class = cF2 > //Shadow of mouse cursor on xy plane< / span > < span class = cF0 >
< a name = "l670" > < / a > y_shadow = yc - y;
< a name = "l671" > < / a > z_shadow = zc - z;
< a name = "l672" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> s2w, & x_shadow, & y_shadow, & z_shadow);
< a name = "l673" > < / a > x2 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l674" > < / a > y2 = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l675" > < / a > z2 = -z_shadow;
< a name = "l676" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> w2s, & x2, & y2, & z2);
< a name = "l677" > < / a > zc += < / span > < span class = cF5 > Round< / span > < span class = cF0 > (< / span > < span class = cF5 > Sqrt< / span > < span class = cF7 > (< / span > < span class = cF0 > x2 * x2 + y2 * y2 + z2 * z2< / span > < span class = cF7 > )< / span > < span class = cF0 > ) * < / span > < span class = cF5 > SignI64< / span > < span class = cF0 > (z2);
< a name = "l678" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l679" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l680" > < / a > x = xc - x;
< a name = "l681" > < / a > y = yc - y;
< a name = "l682" > < / a > z = zc - z;
< a name = "l683" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (e-> s2w, & x, & y, & z);
< a name = "l684" > < / a > x = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (x, e-> cur_snap);
< a name = "l685" > < / a > y = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (y, e-> cur_snap);
< a name = "l686" > < / a > z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (e-> mouse_z, e-> cur_snap);
< a name = "l687" > < / a > *_x = x;
< a name = "l688" > < / a > *_y = y;
< a name = "l689" > < / a > *_z = z;
2021-07-03 05:07:57 +01:00
< a name = "l690" > < / a > }
< a name = "l691" > < / a >
< a name = "l692" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > ;
2021-07-04 23:11:34 +01:00
< a name = "l693" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l694" > < / a >
< a name = "l695" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipInit< / span > < span class = cF0 > ()
< a name = "l696" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l697" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > );
< a name = "l698" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l699" > < / a > }
< a name = "l700" > < / a >
< a name = "l701" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipReset< / span > < span class = cF0 > ()
< a name = "l702" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l703" > < / a > < / span > < span class = cF5 > QueueDel< / span > < span class = cF0 > (& < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > , < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l704" > < / a > < / span > < span class = cF5 > QueueDel< / span > < span class = cF0 > (& < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > , < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l705" > < / a > < / span > < span class = cF5 > MeshClipInit< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l706" > < / a > }
< a name = "l707" > < / a >
< a name = "l708" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipCopy< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l709" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l710" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next, *tmpv2;
< a name = "l711" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next, *tmpt2;
2021-07-03 05:07:57 +01:00
< a name = "l712" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l713" > < / a > < / span > < span class = cF5 > MeshClipReset< / span > < span class = cF0 > ;
< a name = "l714" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l715" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l716" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l717" > < / a > {
2021-07-06 21:15:26 +01:00
< a name = "l718" > < / a > tmpv-> copy = tmpv2 = < / span > < span class = cF5 > SysCAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-04 23:11:34 +01:00
< a name = "l719" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& tmpv2-> p, & tmpv-> p, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l720" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpv2, < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > .last);
< a name = "l721" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_COPIED< / span > < span class = cF0 > ;
< a name = "l722" > < / a > tmpv-> flags & = ~< / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l723" > < / a > }
< a name = "l724" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l725" > < / a > {
< a name = "l726" > < / a > tmpv-> copy = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l727" > < / a > tmpv-> flags & = ~(< / span > < span class = cF3 > VF_COPIED< / span > < span class = cF0 > | < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > );
< a name = "l728" > < / a > }
< a name = "l729" > < / a > tmpv = tmpv-> next;
< a name = "l730" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l731" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l732" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l733" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > & & tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> copy & & tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> copy & & tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> copy)
< a name = "l734" > < / a > {
2021-07-06 21:15:26 +01:00
< a name = "l735" > < / a > tmpt2 = < / span > < span class = cF5 > SysCAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-04 23:11:34 +01:00
< a name = "l736" > < / a > tmpt2-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ] = tmpt-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> copy;
< a name = "l737" > < / a > tmpt2-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] = tmpt-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> copy;
< a name = "l738" > < / a > tmpt2-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ] = tmpt-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> copy;
< a name = "l739" > < / a > tmpt2-> mt.color = tmpt-> mt.color;
< a name = "l740" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpt2, < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > .last);
< a name = "l741" > < / a > tmpt-> flags |= < / span > < span class = cF3 > TF_COPIED< / span > < span class = cF0 > ;
< a name = "l742" > < / a > tmpt-> flags & = ~< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l743" > < / a > }
< a name = "l744" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l745" > < / a > tmpt-> flags & = ~(< / span > < span class = cF3 > TF_COPIED< / span > < span class = cF0 > |< / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > );
< a name = "l746" > < / a > tmpt = tmpt-> next;
< a name = "l747" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l748" > < / a > }
< a name = "l749" > < / a >
< a name = "l750" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipCut< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l751" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l752" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next, *tmpv1;
< a name = "l753" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next, *tmpt1;
2021-07-03 05:07:57 +01:00
< a name = "l754" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l755" > < / a > < / span > < span class = cF5 > MeshClipCopy< / span > < span class = cF0 > (e);
< a name = "l756" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l757" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l758" > < / a > tmpt1 = tmpt-> next;
< a name = "l759" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_COPIED< / span > < span class = cF0 > )
< a name = "l760" > < / a > < / span > < span class = cF5 > MeshTriDel< / span > < span class = cF0 > (e, tmpt);
< a name = "l761" > < / a > tmpt = tmpt1;
< a name = "l762" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l763" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l764" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l765" > < / a > tmpv1 = tmpv-> next;
< a name = "l766" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_COPIED< / span > < span class = cF0 > )
< a name = "l767" > < / a > < / span > < span class = cF5 > MeshVertexDel< / span > < span class = cF0 > (e, tmpv);
< a name = "l768" > < / a > tmpv = tmpv1;
< a name = "l769" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l770" > < / a > }
< a name = "l771" > < / a >
< a name = "l772" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipDel< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l773" > < / a > {< / span > < span class = cF2 > //Technically not clip< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l774" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next, *tmpv1;
< a name = "l775" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next, *tmpt1;
2021-07-03 05:07:57 +01:00
< a name = "l776" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l777" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l778" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l779" > < / a > tmpt1 = tmpt-> next;
< a name = "l780" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpt-> flags & < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > )
< a name = "l781" > < / a > < / span > < span class = cF5 > MeshTriDel< / span > < span class = cF0 > (e, tmpt);
< a name = "l782" > < / a > tmpt = tmpt1;
< a name = "l783" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l784" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l785" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l786" > < / a > tmpv1 = tmpv-> next;
< a name = "l787" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l788" > < / a > < / span > < span class = cF5 > MeshVertexDel< / span > < span class = cF0 > (e, tmpv);
< a name = "l789" > < / a > tmpv = tmpv1;
< a name = "l790" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l791" > < / a > }
< a name = "l792" > < / a >
< a name = "l793" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshClipPaste< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l794" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l795" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv2 = < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > .next, *tmpv;
< a name = "l796" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt2 = < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > .next, *tmpt;
2021-07-03 05:07:57 +01:00
< a name = "l797" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l798" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l799" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l800" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv2 != & < / span > < span class = cFB > sys_clip_vertex_head< / span > < span class = cF0 > )
< a name = "l801" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l802" > < / a > tmpv2-> copy = tmpv = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l803" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& tmpv-> p, & tmpv2-> p, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l804" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpv, e-> vertex_head.last);
< a name = "l805" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l806" > < / a > tmpv2 = tmpv2-> next;
< a name = "l807" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l808" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l809" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt2 != & < / span > < span class = cFB > sys_clip_tri_head< / span > < span class = cF0 > )
< a name = "l810" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l811" > < / a > tmpt = < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, tmpt2-> mt.color, tmpt2-> t[< / span > < span class = cFE > 0< / span > < span class = cF0 > ]-> copy, tmpt2-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]-> copy, tmpt2-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]-> copy);
< a name = "l812" > < / a > tmpt-> flags |= < / span > < span class = cF3 > TF_SEL< / span > < span class = cF0 > ;
< a name = "l813" > < / a > tmpt2 = tmpt2-> next;
< a name = "l814" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l815" > < / a > }
< a name = "l816" > < / a >
< a name = "l817" > < / a > < / span > < span class = cF5 > MeshClipInit< / span > < span class = cF0 > ;
< a name = "l818" > < / a >
< a name = "l819" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > DrawIt< / span > < span class = cF0 > (< / span > < span class = cF9 > CTask< / span > < span class = cF0 > *task, < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc)
< a name = "l820" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l821" > < / a > < / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e = < / span > < span class = cF5 > FramePtr< / span > < span class = cF0 > (< / span > < span class = cF6 > " CMeshFrame" < / span > < span class = cF0 > , task);
< a name = "l822" > < / a > < / span > < span class = cF9 > CCtrl< / span > < span class = cF0 > *c = < / span > < span class = cF5 > CtrlFindUnique< / span > < span class = cF0 > (task, < / span > < span class = cF3 > CTRLT_VIEWING_ANGLES< / span > < span class = cF0 > );
< a name = "l823" > < / a > < / span > < span class = cF1 > F64< / span > < span class = cF0 > d;
< a name = "l824" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, x, y, z;
< a name = "l825" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv;
2021-07-03 05:07:57 +01:00
< a name = "l826" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l827" > < / a > task-> horz_scroll.min = -(< / span > < span class = cF3 > MESH_WORKSPACE_SIZE< / span > < span class = cF0 > - task-> pix_width) / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l828" > < / a > task-> horz_scroll.max = (< / span > < span class = cF3 > MESH_WORKSPACE_SIZE< / span > < span class = cF0 > - task-> pix_width) / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l829" > < / a > task-> vert_scroll.min = -(< / span > < span class = cF3 > MESH_WORKSPACE_SIZE< / span > < span class = cF0 > - task-> pix_height) / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l830" > < / a > task-> vert_scroll.max = (< / span > < span class = cF3 > MESH_WORKSPACE_SIZE< / span > < span class = cF0 > - task-> pix_height) / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l831" > < / a > < / span > < span class = cF5 > TaskDerivedValsUpdate< / span > < span class = cF0 > (task);
< a name = "l832" > < / a > < / span > < span class = cF5 > MeshRecalcCxCy< / span > < span class = cF0 > (task, e);
2021-07-03 05:07:57 +01:00
< a name = "l833" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l834" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l835" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l836" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (dc-> r); < / span > < span class = cF2 > //Set rotmat doesn't free old dc-> r matrix.< / span > < span class = cF0 >
< a name = "l837" > < / a > < / span > < span class = cF5 > DCMat4x4Set< / span > < span class = cF0 > (dc, < / span > < span class = cF5 > MeshSetW2S< / span > < span class = cF7 > (< / span > < span class = cF0 > e, task< / span > < span class = cF7 > )< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l838" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l839" > < / a > dc-> x = e-> cx;
< a name = "l840" > < / a > dc-> y = e-> cy;
2021-07-03 05:07:57 +01:00
< a name = "l841" > < / a > < / span > < span class = cF2 > //z-vals less than zero are in front of screen and not drawn.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l842" > < / a > < / span > < span class = cF2 > //we want to shift all Z-vals into a drawable range.< / span > < span class = cF0 >
< a name = "l843" > < / a > < / span > < span class = cF2 > //GR_Z_ALL is set to half of the Z-range which is an I32.< / span > < span class = cF0 >
< a name = "l844" > < / a > dc-> z = < / span > < span class = cF3 > GR_Z_ALL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l845" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l846" > < / a > < / span > < span class = cF2 > //Light source set to mouse.< / span > < span class = cF0 >
< a name = "l847" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (e, task, & x, & y, & z);
< a name = "l848" > < / a > dc-> ls.x = x;
< a name = "l849" > < / a > dc-> ls.y = y;
< a name = "l850" > < / a > dc-> ls.z = z;
< a name = "l851" > < / a > d = < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > / < / span > < span class = cF5 > D3I32Norm< / span > < span class = cF0 > (& dc-> ls); < / span > < span class = cF2 > //Light source normalized to 65536.< / span > < span class = cF0 >
< a name = "l852" > < / a > dc-> ls.x *= d;
< a name = "l853" > < / a > dc-> ls.y *= d;
< a name = "l854" > < / a > dc-> ls.z *= d;
2021-07-03 05:07:57 +01:00
< a name = "l855" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l856" > < / a > < / span > < span class = cF5 > DCDepthBufAlloc< / span > < span class = cF0 > (dc);
2021-07-03 05:07:57 +01:00
< a name = "l857" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l858" > < / a > tmpv = e-> vertex_head.next;
< a name = "l859" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l860" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l861" > < / a > x = tmpv-> p.x;
< a name = "l862" > < / a > y = tmpv-> p.y;
< a name = "l863" > < / a > z = tmpv-> p.z;
< a name = "l864" > < / a > (*dc-> transform)(dc, & x, & y, & z);
< a name = "l865" > < / a > tmpv-> pt.x = x;
< a name = "l866" > < / a > tmpv-> pt.y = y;
< a name = "l867" > < / a > tmpv-> pt.z = z;
< a name = "l868" > < / a > tmpv = tmpv-> next;
< a name = "l869" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l870" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l871" > < / a > e-> mp_not_done_flags = < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cFB > mp_count< / span > < span class = cF0 > - < / span > < span class = cFE > 1< / span > < span class = cF0 > ; < / span > < span class = cF2 > //Issue jobs to all cores.< / span > < span class = cF0 >
< a name = "l872" > < / a > e-> dc = dc;
< a name = "l873" > < / a > e-> depth_buf = dc-> depth_buf;
< a name = "l874" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFB > mp_count< / span > < span class = cF0 > ; i++)
< a name = "l875" > < / a > < / span > < span class = cF5 > JobQueue< / span > < span class = cF0 > (& < / span > < span class = cF5 > MPDrawIt< / span > < span class = cF0 > , e, i);
2021-07-03 05:07:57 +01:00
< a name = "l876" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l877" > < / a > tmpv = e-> vertex_head.next;
< a name = "l878" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l879" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l880" > < / a > x = tmpv-> pt.x;
< a name = "l881" > < / a > y = tmpv-> pt.y;
< a name = "l882" > < / a > z = tmpv-> pt.z;
< a name = "l883" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> vertex_on)
< a name = "l884" > < / a > {
< a name = "l885" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF7 > (< / span > < span class = cFE > 10< / span > < span class = cF7 > )< / span > < span class = cF0 > ) < / span > < span class = cF2 > //This blinks at 10 Hz.< / span > < span class = cF0 >
< a name = "l886" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > BLACK< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ;
< a name = "l887" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l888" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > BLACK< / span > < span class = cF0 > ;
< a name = "l889" > < / a > < / span > < span class = cF5 > GrLine< / span > < span class = cF0 > (dc, x - < / span > < span class = cFE > 3< / span > < span class = cF0 > , y - < / span > < span class = cFE > 3< / span > < span class = cF0 > , x + < / span > < span class = cFE > 3< / span > < span class = cF0 > , y + < / span > < span class = cFE > 3< / span > < span class = cF0 > );
< a name = "l890" > < / a > < / span > < span class = cF5 > GrLine< / span > < span class = cF0 > (dc, x - < / span > < span class = cFE > 3< / span > < span class = cF0 > , y + < / span > < span class = cFE > 3< / span > < span class = cF0 > , x + < / span > < span class = cFE > 3< / span > < span class = cF0 > , y - < / span > < span class = cFE > 3< / span > < span class = cF0 > );
< a name = "l891" > < / a > }
< a name = "l892" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv-> flags & < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > )
< a name = "l893" > < / a > {
< a name = "l894" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l895" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l896" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF7 > (< / span > < span class = cFE > 10< / span > < span class = cF7 > )< / span > < span class = cF0 > ) < / span > < span class = cF2 > //This blinks at 10 Hz.< / span > < span class = cF0 >
< a name = "l897" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + e-> cur_color.c0.color < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + e-> cur_color.c0.color ^ < / span > < span class = cFE > 8< / span > < span class = cF0 > ;
< a name = "l898" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l899" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + (e-> cur_color.c0.color ^ < / span > < span class = cFE > 8< / span > < span class = cF0 > ) < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + e-> cur_color.c0.color;
< a name = "l900" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l901" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l902" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l903" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF0 > )
< a name = "l904" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ;
< a name = "l905" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l906" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > ;
< a name = "l907" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l908" > < / a > < / span > < span class = cF5 > GrCircle< / span > < span class = cF0 > (dc, x, y, < / span > < span class = cFE > 3< / span > < span class = cF0 > );
< a name = "l909" > < / a > }
< a name = "l910" > < / a > tmpv = tmpv-> next;
< a name = "l911" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l912" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l913" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > CtrlInside< / span > < span class = cF7 > (< / span > < span class = cF0 > c, < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x, < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y< / span > < span class = cF7 > )< / span > < span class = cF0 > || < / span > < span class = cFB > winmgr< / span > < span class = cF0 > .show_menu)
< a name = "l914" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l915" > < / a > < / span > < span class = cF5 > GridInit< / span > < span class = cF0 > ;
< a name = "l916" > < / a > task-> win_inhibit = < / span > < span class = cF3 > WIF_SELF_DOC< / span > < span class = cF0 > ;
< a name = "l917" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l918" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l919" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l920" > < / a > < / span > < span class = cF5 > MeshCurSnap< / span > < span class = cF0 > (e);
< a name = "l921" > < / a > task-> win_inhibit = < / span > < span class = cF3 > WIG_TASK_DEFAULT< / span > < span class = cF0 > |
< a name = "l922" > < / a > < / span > < span class = cF3 > WIF_SELF_DOC< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_FOCUS< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_BORDER< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_CTRLS< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_FOCUS_TASK_MENU< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_GRAB_SCROLL< / span > < span class = cF0 > ;
< a name = "l923" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l924" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l925" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (e, task, & x, & y, & z);
< a name = "l926" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (z < < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l927" > < / a > dc-> color = < / span > < span class = cF3 > ROP_XOR< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > ^ < / span > < span class = cF3 > TRANSPARENT< / span > < span class = cF0 > ;
< a name = "l928" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l929" > < / a > dc-> color = < / span > < span class = cF3 > ROP_XOR< / span > < span class = cF0 > + < / span > < span class = cF3 > TRANSPARENT< / span > < span class = cF0 > ;
< a name = "l930" > < / a > < / span > < span class = cF5 > GrPrint< / span > < span class = cF0 > (dc, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF6 > " %6.3f%% (%d,%d,%d)" < / span > < span class = cF0 > , e-> view_scale * < / span > < span class = cFE > 100< / span > < span class = cF0 > , x, y, z);
< a name = "l931" > < / a > dc-> thick = < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l932" > < / a > dc-> color & = < / span > < span class = cFE > 0xF< / span > < span class = cF0 > ;
< a name = "l933" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF7 > (< / span > < span class = cFE > 10< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l934" > < / a > dc-> color ^= < / span > < span class = cFE > 0xF< / span > < span class = cF0 > ;
< a name = "l935" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, x, y, z, x, y, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l936" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l937" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e-> sel_rect)
< a name = "l938" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l939" > < / a > dc-> flags & = ~< / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l940" > < / a > dc-> thick = < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l941" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Blink< / span > < span class = cF0 > )
< a name = "l942" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ;
< a name = "l943" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l944" > < / a > dc-> color = < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > + < / span > < span class = cF3 > WHITE< / span > < span class = cF0 > < < < / span > < span class = cFE > 16< / span > < span class = cF0 > + < / span > < span class = cF3 > RED< / span > < span class = cF0 > ;
< a name = "l945" > < / a > < / span > < span class = cF5 > GrBorder< / span > < span class = cF0 > (dc, e-> x1, e-> y1, e-> x2, e-> y2);
< a name = "l946" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l947" > < / a > < / span > < span class = cF2 > //Wait for all cores to complete.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l948" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (e-> mp_not_done_flags)
< a name = "l949" > < / a > < / span > < span class = cF5 > Yield< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l950" > < / a > }
< a name = "l951" > < / a >
< a name = "l952" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshInit< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > flip_y)
< a name = "l953" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l954" > < / a > < / span > < span class = cF5 > MemSet< / span > < span class = cF0 > (e, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l955" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& e-> vertex_head);
< a name = "l956" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& e-> tri_head);
< a name = "l957" > < / a > e-> ed_mode = < / span > < span class = cF6 > 'v'< / span > < span class = cF0 > ;
< a name = "l958" > < / a > e-> grid_on = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l959" > < / a > e-> vertex_on = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l960" > < / a > e-> mouse_z = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l961" > < / a > e-> thickness = < / span > < span class = cFE > 25< / span > < span class = cF0 > ;
< a name = "l962" > < / a > e-> closed = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l963" > < / a > e-> view_scale = < / span > < span class = cFE > 1< / span > < span class = cF0 > .< / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l964" > < / a > e-> w2s = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l965" > < / a > e-> s2w = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l966" > < / a > e-> cur_color = < / span > < span class = cF3 > RED< / span > < span class = cF0 > ;
< a name = "l967" > < / a > e-> cur_snap = < / span > < span class = cFE > 5< / span > < span class = cF0 > ;
< a name = "l968" > < / a > e-> flip_y = flip_y;
< a name = "l969" > < / a > e-> sel_rect = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l970" > < / a > e-> cur_tri = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l971" > < / a > e-> cur_vertex = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l972" > < / a > e-> chain_pred = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l973" > < / a > }
< a name = "l974" > < / a >
< a name = "l975" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshLoad< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *src)
< a name = "l976" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l977" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, j, x, y, z;
< a name = "l978" > < / a > < / span > < span class = cF9 > CColorROPU32< / span > < span class = cF0 > color;
< a name = "l979" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv, *va[< / span > < span class = cFE > 3< / span > < span class = cF0 > ];
2021-07-03 05:07:57 +01:00
< a name = "l980" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l981" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& e-> vertex_head);
< a name = "l982" > < / a > < / span > < span class = cF5 > QueueInit< / span > < span class = cF0 > (& e-> tri_head);
2021-07-03 05:07:57 +01:00
< a name = "l983" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l984" > < / a > e-> vertex_count = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l985" > < / a > e-> tri_count = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l986" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < e-> vertex_count; i++)
< a name = "l987" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l988" > < / a > x = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l989" > < / a > y = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l990" > < / a > z = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l991" > < / a > tmpv = < / span > < span class = cF5 > MeshVertexNew< / span > < span class = cF0 > (e, x, y, z);
< a name = "l992" > < / a > tmpv-> num = i;
< a name = "l993" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l994" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < e-> tri_count; i++)
< a name = "l995" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l996" > < / a > color = *src(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++;
< a name = "l997" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (j = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; j < < / span > < span class = cFE > 3< / span > < span class = cF0 > ; j++)
< a name = "l998" > < / a > va[j] = < / span > < span class = cF5 > MeshVertexFindNum< / span > < span class = cF0 > (e, *src< / span > < span class = cF7 > (< / span > < span class = cF9 > I32< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > ++);
< a name = "l999" > < / a > < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (e, color, va[< / span > < span class = cFE > 0< / span > < span class = cF0 > ], va[< / span > < span class = cFE > 1< / span > < span class = cF0 > ], va[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]);
< a name = "l1000" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1001" > < / a > }
< a name = "l1002" > < / a >
< a name = "l1003" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > < / span > < span class = cF5 > MeshSize< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l1004" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l1005" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i;
< a name = "l1006" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
< a name = "l1007" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l1008" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1009" > < / a > e-> vertex_count = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1010" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l1011" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1012" > < / a > tmpv-> num = e-> vertex_count++;
< a name = "l1013" > < / a > tmpv = tmpv-> next;
< a name = "l1014" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1015" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1016" > < / a > e-> tri_count = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1017" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l1018" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1019" > < / a > e-> tri_count++;
< a name = "l1020" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 3< / span > < span class = cF0 > ; i++)
< a name = "l1021" > < / a > tmpt-> mt.nums[i] = tmpt-> t[i]-> num;
< a name = "l1022" > < / a > tmpt = tmpt-> next;
< a name = "l1023" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1024" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF1 > sizeof< / span > < span class = cF0 > (< / span > < span class = cF9 > I32< / span > < span class = cF0 > ) * < / span > < span class = cFE > 2< / span > < span class = cF0 > + (< / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF7 > )< / span > < span class = cF0 > - < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF7 > )< / span > < span class = cF0 > ) * e-> vertex_count +
< a name = "l1025" > < / a > (< / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF7 > )< / span > < span class = cF0 > - < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF7 > )< / span > < span class = cF0 > ) * e-> tri_count;
2021-07-03 05:07:57 +01:00
< a name = "l1026" > < / a > }
< a name = "l1027" > < / a >
< a name = "l1028" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > *< / span > < span class = cF5 > MeshSave< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_size=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l1029" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l1030" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > size = < / span > < span class = cF5 > MeshSize< / span > < span class = cF0 > (e);
< a name = "l1031" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *res = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (size), *dst = res;
< a name = "l1032" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *tmpv = e-> vertex_head.next;
< a name = "l1033" > < / a > < / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > *tmpt = e-> tri_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l1034" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1035" > < / a > *dst(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++ = e-> vertex_count;
< a name = "l1036" > < / a > *dst(< / span > < span class = cF9 > I32< / span > < span class = cF0 > *)++ = e-> tri_count;
2021-07-03 05:07:57 +01:00
< a name = "l1037" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1038" > < / a > e-> vertex_count = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1039" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpv != & e-> vertex_head)
< a name = "l1040" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1041" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (dst, & tmpv-> < / span > < span class = cF1 > start< / span > < span class = cF0 > , < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF7 > )< / span > < span class = cF0 >
< a name = "l1042" > < / a > -< / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1043" > < / a > dst += < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF0 > ) - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > );
< a name = "l1044" > < / a > tmpv = tmpv-> next;
< a name = "l1045" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1046" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1047" > < / a > e-> tri_count = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1048" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpt != & e-> tri_head)
< a name = "l1049" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1050" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (dst, & tmpt-> < / span > < span class = cF1 > start< / span > < span class = cF0 > , < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF7 > )< / span > < span class = cF0 > - < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1051" > < / a > dst += < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > end< / span > < span class = cF0 > ) - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshEdTri< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > );
< a name = "l1052" > < / a > tmpt = tmpt-> next;
< a name = "l1053" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1054" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (_size)
< a name = "l1055" > < / a > *_size = size;
2021-07-03 05:07:57 +01:00
< a name = "l1056" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1057" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l1058" > < / a > }
< a name = "l1059" > < / a >
< a name = "l1060" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshCleanUp< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l1061" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l1062" > < / a > < / span > < span class = cF5 > QueueDel< / span > < span class = cF0 > (& e-> vertex_head, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l1063" > < / a > < / span > < span class = cF5 > QueueDel< / span > < span class = cF0 > (& e-> tri_head, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l1064" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (e-> w2s);
< a name = "l1065" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (e-> s2w);
2021-07-03 05:07:57 +01:00
< a name = "l1066" > < / a > }
< a name = "l1067" > < / a >
< a name = "l1068" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > MeshUpdateMenu< / span > < span class = cF0 > (< / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > *e)
< a name = "l1069" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l1070" > < / a > < / span > < span class = cF9 > CMenuEntry< / span > < span class = cF0 > *tmpse;
2021-07-03 05:07:57 +01:00
< a name = "l1071" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1072" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " View/Grid" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1073" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> grid_on);
2021-07-03 05:07:57 +01:00
< a name = "l1074" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1075" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " View/Vertex" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1076" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> vertex_on);
2021-07-03 05:07:57 +01:00
< a name = "l1077" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1078" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/PlaceVertex" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1079" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'v'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1080" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1081" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/MoveVertex" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1082" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'm'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1083" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1084" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/MoveVertexZ" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1085" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'M'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1086" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1087" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/Triangle" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1088" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 't'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1089" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1090" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/Polygon" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1091" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1092" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1093" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/Fence" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1094" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1095" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1096" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " Mode/Prism" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1097" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> ed_mode == < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1098" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1099" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpse = < / span > < span class = cF5 > MenuEntryFind< / span > < span class = cF7 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> cur_menu, < / span > < span class = cF6 > " View/FlipY" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1100" > < / a > tmpse-> checked = < / span > < span class = cF5 > ToBool< / span > < span class = cF0 > (e-> flip_y);
2021-07-03 05:07:57 +01:00
< a name = "l1101" > < / a > }
< a name = "l1102" > < / a >
< a name = "l1103" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > *< / span > < span class = cF5 > SpriteMeshEd< / span > < span class = cF0 > (< / span > < span class = cF9 > I32< / span > < span class = cF0 > *head=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_size=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > Bool< / span > < span class = cF0 > flip_y=< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > )
< a name = "l1104" > < / a > {< / span > < span class = cF2 > /*Format for mesh:< / span > < span class = cF0 >
< a name = "l1105" > < / a > < / span > < span class = cF2 > {< / span > < span class = cF0 >
< a name = "l1106" > < / a > < / span > < span class = cF2 > I32 vertex_count;< / span > < span class = cF0 >
< a name = "l1107" > < / a > < / span > < span class = cF2 > I32 tri_count;< / span > < span class = cF0 >
< a name = "l1108" > < / a > < / span > < span class = cF2 > CD3I32 vertices[];< / span > < span class = cF0 >
< a name = "l1109" > < / a > < / span > < span class = cF2 > CMeshTri tris[];< / span > < span class = cF0 >
< a name = "l1110" > < / a > < / span > < span class = cF2 > }< / span > < span class = cF0 >
< a name = "l1111" > < / a >
< a name = "l1112" > < / a > < / span > < span class = cF2 > If head points to a mesh, it will load it.< / span > < span class = cF0 >
< a name = "l1113" > < / a >
< a name = "l1114" > < / a > < / span > < span class = cF2 > Returns a newly malloced mesh or NULL.< / span > < span class = cF0 >
< a name = "l1115" > < / a >
2021-07-26 20:29:49 +01:00
< a name = "l1116" > < / a > < / span > < span class = cF2 > See < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/Demo/Graphics/SpritePlot3D.CC.html#l1" > < span class = cF4 > ::/Demo/Graphics/SpritePlot3D.CC< / span > < / a > < span class = cF2 > .< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1117" > < / a > < / span > < span class = cF2 > */< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l1118" > < / a > < / span > < span class = cF9 > CCtrl< / span > < span class = cF0 > *c = < / span > < span class = cF5 > CtrlFindUnique< / span > < span class = cF0 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > , < / span > < span class = cF3 > CTRLT_VIEWING_ANGLES< / span > < span class = cF0 > );
< a name = "l1119" > < / a > < / span > < span class = cF9 > CViewAngles< / span > < span class = cF0 > *s, *old_s;
< a name = "l1120" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, message_code, sel_mode, arg1, arg2, make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > , x, y, z;
< a name = "l1121" > < / a > < / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > p0a, p0b;
< a name = "l1122" > < / a > < / span > < span class = cF9 > CMeshEdVertex< / span > < span class = cF0 > *va[< / span > < span class = cFE > 3< / span > < span class = cF0 > ], *tmpv;
< a name = "l1123" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > adjusting_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , moving, save_and_exit, adjusting_camera_xy = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , adjusting_camera_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1124" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1125" > < / a > < / span > < span class = cF9 > CMeshFrame< / span > < span class = cF0 > e;
2021-07-03 05:07:57 +01:00
< a name = "l1126" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1127" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (c)
< a name = "l1128" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1129" > < / a > old_s = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CViewAngles< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1130" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (old_s, c-> state, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CViewAngles< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1131" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1132" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1133" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1134" > < / a > c = < / span > < span class = cF5 > ViewAnglesNew< / span > < span class = cF0 > ;
< a name = "l1135" > < / a > old_s = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l1136" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1137" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1138" > < / a > s = c-> state;
< a name = "l1139" > < / a > s-> sx = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1140" > < / a > s-> sy = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1141" > < / a > s-> sz = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1142" > < / a > s-> cx = < / span > < span class = cF3 > YELLOW< / span > < span class = cF0 > ;
< a name = "l1143" > < / a > s-> cy = < / span > < span class = cF3 > RED< / span > < span class = cF0 > ;
< a name = "l1144" > < / a > s-> cz = < / span > < span class = cF3 > GREEN< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1145" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1146" > < / a > < / span > < span class = cF5 > MenuPush< / span > < span class = cF0 > (
< a name = "l1147" > < / a > < / span > < span class = cF6 > " File {" < / span > < span class = cF0 >
< a name = "l1148" > < / a > < / span > < span class = cF6 > " Abort(,CH_SHIFT_ESC);" < / span > < span class = cF0 >
< a name = "l1149" > < / a > < / span > < span class = cF6 > " Exit(,CH_ESC);" < / span > < span class = cF0 >
< a name = "l1150" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 >
< a name = "l1151" > < / a > < / span > < span class = cF6 > " Edit {" < / span > < span class = cF0 >
< a name = "l1152" > < / a > < / span > < span class = cF6 > " Delete(,,SC_DELETE);" < / span > < span class = cF0 >
< a name = "l1153" > < / a > < / span > < span class = cF6 > " DelLast(,CH_BACKSPACE);" < / span > < span class = cF0 >
< a name = "l1154" > < / a > < / span > < span class = cF6 > " Cut(,CH_CTRLX);" < / span > < span class = cF0 >
< a name = "l1155" > < / a > < / span > < span class = cF6 > " Copy(,CH_CTRLC);" < / span > < span class = cF0 >
< a name = "l1156" > < / a > < / span > < span class = cF6 > " Paste(,CH_CTRLV);" < / span > < span class = cF0 >
< a name = "l1157" > < / a > < / span > < span class = cF6 > " SelectAll(,'A');" < / span > < span class = cF0 >
< a name = "l1158" > < / a > < / span > < span class = cF6 > " UnSelectAll(,'U');" < / span > < span class = cF0 >
< a name = "l1159" > < / a > < / span > < span class = cF6 > " SelectRect(,'a');" < / span > < span class = cF0 >
< a name = "l1160" > < / a > < / span > < span class = cF6 > " UnSelectRect(,'u');" < / span > < span class = cF0 >
< a name = "l1161" > < / a > < / span > < span class = cF6 > " OrSelectRect(,'o');" < / span > < span class = cF0 >
< a name = "l1162" > < / a > < / span > < span class = cF6 > " JumpToZ(,'j');" < / span > < span class = cF0 >
< a name = "l1163" > < / a > < / span > < span class = cF6 > " ResetColor(,'C');" < / span > < span class = cF0 >
< a name = "l1164" > < / a > < / span > < span class = cF6 > " ReverseTri(,'r');" < / span > < span class = cF0 >
< a name = "l1165" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 >
< a name = "l1166" > < / a > < / span > < span class = cF6 > " Mode {" < / span > < span class = cF0 >
< a name = "l1167" > < / a > < / span > < span class = cF6 > " PlaceVertex(,'v');" < / span > < span class = cF0 >
< a name = "l1168" > < / a > < / span > < span class = cF6 > " MoveVertex(,'m');" < / span > < span class = cF0 >
< a name = "l1169" > < / a > < / span > < span class = cF6 > " MoveVertexZ(,'M');" < / span > < span class = cF0 >
< a name = "l1170" > < / a > < / span > < span class = cF6 > " Triangle(,'t');" < / span > < span class = cF0 >
< a name = "l1171" > < / a > < / span > < span class = cF6 > " Polygon(,'n');" < / span > < span class = cF0 >
< a name = "l1172" > < / a > < / span > < span class = cF6 > " Fence(,'f');" < / span > < span class = cF0 >
< a name = "l1173" > < / a > < / span > < span class = cF6 > " Prism(,'p');" < / span > < span class = cF0 >
< a name = "l1174" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 >
< a name = "l1175" > < / a > < / span > < span class = cF6 > " Settings {" < / span > < span class = cF0 >
< a name = "l1176" > < / a > < / span > < span class = cF6 > " Color(,'c');" < / span > < span class = cF0 >
< a name = "l1177" > < / a > < / span > < span class = cF6 > " Snap(,'s');" < / span > < span class = cF0 >
< a name = "l1178" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 >
< a name = "l1179" > < / a > < / span > < span class = cF6 > " View {" < / span > < span class = cF0 >
< a name = "l1180" > < / a > < / span > < span class = cF6 > " ZoomIn(,'z');" < / span > < span class = cF0 >
< a name = "l1181" > < / a > < / span > < span class = cF6 > " ZoomOut(,'Z');" < / span > < span class = cF0 >
< a name = "l1182" > < / a > < / span > < span class = cF6 > " NullAngles(,'N');" < / span > < span class = cF0 >
< a name = "l1183" > < / a > < / span > < span class = cF6 > " FlipY(,'y');" < / span > < span class = cF0 >
< a name = "l1184" > < / a > < / span > < span class = cF6 > " Grid(,'g');" < / span > < span class = cF0 >
< a name = "l1185" > < / a > < / span > < span class = cF6 > " Vertex(,'V');" < / span > < span class = cF0 >
< a name = "l1186" > < / a > < / span > < span class = cF6 > " ToggleBorder(,CH_CTRLB);" < / span > < span class = cF0 >
< a name = "l1187" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 >
< a name = "l1188" > < / a > < / span > < span class = cF6 > " Transforms {" < / span > < span class = cF0 >
< a name = "l1189" > < / a > < / span > < span class = cF6 > " Transform(,'T');" < / span > < span class = cF0 >
< a name = "l1190" > < / a > < / span > < span class = cF6 > " SwapXY(,'1');" < / span > < span class = cF0 >
< a name = "l1191" > < / a > < / span > < span class = cF6 > " SwapXZ(,'2');" < / span > < span class = cF0 >
< a name = "l1192" > < / a > < / span > < span class = cF6 > " SwapYZ(,'3');" < / span > < span class = cF0 >
< a name = "l1193" > < / a > < / span > < span class = cF6 > " InvertX(,'4');" < / span > < span class = cF0 >
< a name = "l1194" > < / a > < / span > < span class = cF6 > " InvertY(,'5');" < / span > < span class = cF0 >
< a name = "l1195" > < / a > < / span > < span class = cF6 > " InvertZ(,'6');" < / span > < span class = cF0 >
< a name = "l1196" > < / a > < / span > < span class = cF6 > " ReverseTri(,'R');" < / span > < span class = cF0 >
< a name = "l1197" > < / a > < / span > < span class = cF6 > " }" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1198" > < / a >
2021-07-26 20:29:49 +01:00
< a name = "l1199" > < / a > < / span > < span class = cF5 > SettingsPush< / span > < span class = cF0 > ; < / span > < span class = cF2 > //See < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/TaskSettings.CC.html#l3" > < span class = cF4 > SettingsPush< / span > < / a > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l1200" > < / a > < / span > < span class = cF5 > AutoComplete< / span > < span class = cF0 > ;
< a name = "l1201" > < / a > < / span > < span class = cF5 > RegOneTimePopUp< / span > < span class = cF0 > (< / span > < span class = cF3 > ARf_MESH_ED< / span > < span class = cF0 > ,
< a name = "l1202" > < / a > < / span > < span class = cF6 > " $GREEN$Right Mouse$FG$: Hold and move to shift cursor z\n" < / span > < span class = cF0 >
< a name = "l1203" > < / a > < / span > < span class = cF6 > " $GREEN$Shift + Right Mouse$FG$: Hold and move to rotate camera XY\n" < / span > < span class = cF0 >
< a name = "l1204" > < / a > < / span > < span class = cF6 > " $GREEN$Alt + Right Mouse$FG$: Hold and move to rotate camera Z\n" < / span > < span class = cF0 >
< a name = "l1205" > < / a > < / span > < span class = cF6 > " $GREEN$'j'$FG$: Jump cursor Z to nearest vertex's Z\n" < / span > < span class = cF0 >
< a name = "l1206" > < / a > < / span > < span class = cF6 > " $GREEN$'v'$FG$: Place Vertex Mode\n" < / span > < span class = cF0 >
< a name = "l1207" > < / a > < / span > < span class = cF6 > " $GREEN$'m'$FG$: Move Vertex Mode\n" < / span > < span class = cF0 >
< a name = "l1208" > < / a > < / span > < span class = cF6 > " $GREEN$'M'$FG$: Move Vertex Z\n" < / span > < span class = cF0 >
< a name = "l1209" > < / a > < / span > < span class = cF6 > " $GREEN$'t'$FG$: Form Triangle Mode\n" < / span > < span class = cF0 >
< a name = "l1210" > < / a > < / span > < span class = cF6 > " $GREEN$'n'$FG$: Polygon Mode\n" < / span > < span class = cF0 >
< a name = "l1211" > < / a > < / span > < span class = cF6 > " $GREEN$'f'$FG$: Fence Mode\n" < / span > < span class = cF0 >
< a name = "l1212" > < / a > < / span > < span class = cF6 > " $GREEN$'p'$FG$: Prism Mode\n" < / span > < span class = cF0 >
< a name = "l1213" > < / a > < / span > < span class = cF6 > " $GREEN$'c'$FG$: Set color\n" < / span > < span class = cF0 >
< a name = "l1214" > < / a > < / span > < span class = cF6 > " $GREEN$'s'$FG$: Set snap\n" < / span > < span class = cF0 >
< a name = "l1215" > < / a > < / span > < span class = cF6 > " \nSee menu at top of screen for more.\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1216" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1217" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> win_inhibit = < / span > < span class = cF3 > WIG_TASK_DEFAULT< / span > < span class = cF0 > |
< a name = "l1218" > < / a > < / span > < span class = cF3 > WIF_SELF_DOC< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_FOCUS< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_BORDER< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_CTRLS< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_FOCUS_TASK_MENU< / span > < span class = cF0 > - < / span > < span class = cF3 > WIF_SELF_GRAB_SCROLL< / span > < span class = cF0 > ;
< a name = "l1219" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> horz_scroll.pos = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1220" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> vert_scroll.pos = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1221" > < / a > < / span > < span class = cF5 > MeshInit< / span > < span class = cF0 > (& e, flip_y);
< a name = "l1222" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (head)
< a name = "l1223" > < / a > < / span > < span class = cF5 > MeshLoad< / span > < span class = cF0 > (& e, head);
< a name = "l1224" > < / a > < / span > < span class = cF5 > FramePtrAdd< / span > < span class = cF0 > (< / span > < span class = cF6 > " CMeshFrame" < / span > < span class = cF0 > , & e);
< a name = "l1225" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> draw_it = & < / span > < span class = cF5 > DrawIt< / span > < span class = cF0 > ;
< a name = "l1226" > < / a > < / span > < span class = cF5 > MeshCurSnap< / span > < span class = cF0 > (& e);
< a name = "l1227" > < / a > < / span > < span class = cF5 > MeshRecalcCxCy< / span > < span class = cF0 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & e);
2021-07-03 05:07:57 +01:00
< a name = "l1228" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1229" > < / a > < / span > < span class = cF1 > try< / span > < span class = cF0 >
< a name = "l1230" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF2 > //In case of < CTRL-ALT-c> < / span > < span class = cF0 >
< a name = "l1231" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l1232" > < / a > {
< a name = "l1233" > < / a > < / span > < span class = cF5 > MeshUpdateMenu< / span > < span class = cF0 > (& e);
< a name = "l1234" > < / a > message_code = < / span > < span class = cF5 > MessageGet< / span > < span class = cF0 > (& arg1, & arg2, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > | < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > | < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > |
< a name = "l1235" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > | < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > | < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1236" > < / a > me_restart:
2021-07-04 23:11:34 +01:00
< a name = "l1237" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (message_code)
< a name = "l1238" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1239" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > :
< a name = "l1240" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (arg1)
< a name = "l1241" > < / a > {
< a name = "l1242" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cFE > 0< / span > < span class = cF0 > :
< a name = "l1243" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (arg2.u8[< / span > < span class = cFE > 0< / span > < span class = cF0 > ])
< a name = "l1244" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1245" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SC_DELETE< / span > < span class = cF0 > :
< a name = "l1246" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg2 & < / span > < span class = cF3 > SCF_SHIFT< / span > < span class = cF0 > )
< a name = "l1247" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_clip_cut;
< a name = "l1248" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1249" > < / a > {
< a name = "l1250" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > & e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1251" > < / a > < / span > < span class = cF5 > MeshClipDel< / span > < span class = cF0 > (& e);
< a name = "l1252" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode != < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1253" > < / a > < / span > < span class = cF5 > MeshVertexDel< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF7 > (< / span > < span class = cF0 > & e,
< a name = "l1254" > < / a > < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_left - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> scroll_x,
< a name = "l1255" > < / a > < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_top - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> scroll_y< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1256" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1257" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1258" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1259" > < / a > }
< a name = "l1260" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1261" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1262" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SC_INS< / span > < span class = cF0 > :
< a name = "l1263" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg2 & < / span > < span class = cF3 > SCF_CTRL< / span > < span class = cF0 > )
< a name = "l1264" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_clip_copy;
< a name = "l1265" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg2 & < / span > < span class = cF3 > SCF_SHIFT< / span > < span class = cF0 > )
< a name = "l1266" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_clip_paste;
< a name = "l1267" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1268" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1269" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1270" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_BACKSPACE< / span > < span class = cF0 > :
< a name = "l1271" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (e.ed_mode)
< a name = "l1272" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1273" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > :
< a name = "l1274" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > :
< a name = "l1275" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > :
< a name = "l1276" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'v'< / span > < span class = cF0 > :
< a name = "l1277" > < / a > < / span > < span class = cF5 > MeshVertexDel< / span > < span class = cF0 > (& e, e.cur_vertex);
< a name = "l1278" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1279" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1280" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 't'< / span > < span class = cF0 > :
< a name = "l1281" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (make_tri_vertex_num)
< a name = "l1282" > < / a > {
< a name = "l1283" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1284" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1285" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1286" > < / a > }
< a name = "l1287" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1288" > < / a > < / span > < span class = cF5 > MeshTriDel< / span > < span class = cF0 > (& e, e.cur_tri);
< a name = "l1289" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1290" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1291" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1292" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1293" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > :
< a name = "l1294" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > :
< a name = "l1295" > < / a > e.thickness = < / span > < span class = cF5 > PopUpI64Get< / span > < span class = cF0 > (< / span > < span class = cF6 > " Thickness (%d):" < / span > < span class = cF0 > , e.thickness);
< a name = "l1296" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > :
< a name = "l1297" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg1 == < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > || arg1 == < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > )
< a name = "l1298" > < / a > e.closed = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1299" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1300" > < / a > e.closed = < / span > < span class = cF5 > PopUpNoYes< / span > < span class = cF0 > (< / span > < span class = cF6 > " Closed?\n" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l1301" > < / a > me_chain:
2021-07-04 23:11:34 +01:00
< a name = "l1302" > < / a > e.chain_pred = e.vertex_head.last;
< a name = "l1303" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 't'< / span > < span class = cF0 > :
< a name = "l1304" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1305" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1306" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'v'< / span > < span class = cF0 > :
< a name = "l1307" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'm'< / span > < span class = cF0 > :
< a name = "l1308" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'M'< / span > < span class = cF0 > :
< a name = "l1309" > < / a > adjusting_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1310" > < / a > moving = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1311" > < / a > e.ed_mode = arg1;
< a name = "l1312" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1313" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > ;
< a name = "l1314" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1315" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1316" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'T'< / span > < span class = cF0 > :
< a name = "l1317" > < / a > < / span > < span class = cF5 > MeshTransformSel< / span > < span class = cF0 > (& e);
< a name = "l1318" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1319" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1320" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'A'< / span > < span class = cF0 > :
< a name = "l1321" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l1322" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode != < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1323" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l1324" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1325" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1326" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1327" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1328" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1329" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'U'< / span > < span class = cF0 > :
< a name = "l1330" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1331" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1332" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1333" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1334" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1335" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'a'< / span > < span class = cF0 > :
< a name = "l1336" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'u'< / span > < span class = cF0 > :
< a name = "l1337" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'o'< / span > < span class = cF0 > :
< a name = "l1338" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg1 == < / span > < span class = cF6 > 'a'< / span > < span class = cF0 > )
< a name = "l1339" > < / a > sel_mode = < / span > < span class = cF3 > SEL_MESH_EQU< / span > < span class = cF0 > ;
< a name = "l1340" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (arg1 == < / span > < span class = cF6 > 'u'< / span > < span class = cF0 > )
< a name = "l1341" > < / a > sel_mode = < / span > < span class = cF3 > SEL_MESH_AND< / span > < span class = cF0 > ;
< a name = "l1342" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1343" > < / a > sel_mode = < / span > < span class = cF3 > SEL_MESH_OR< / span > < span class = cF0 > ;
< a name = "l1344" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF7 > (< / span > < span class = cF0 > message_code = < / span > < span class = cF5 > MessageGet< / span > < span class = cF0 > (& arg1, & arg2, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > |
< a name = "l1345" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > |
< a name = "l1346" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > |
< a name = "l1347" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > |
< a name = "l1348" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > )< / span > < span class = cF7 > )< / span > < span class = cF0 > != < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > )
< a name = "l1349" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1350" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1351" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1352" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_restart;
< a name = "l1353" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1354" > < / a > e.x1 = arg1;
< a name = "l1355" > < / a > e.y1 = arg2;
< a name = "l1356" > < / a > e.x2 = arg1;
< a name = "l1357" > < / a > e.y2 = arg2;
< a name = "l1358" > < / a > e.sel_rect = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1359" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > )
< a name = "l1360" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1361" > < / a > message_code = < / span > < span class = cF5 > MessageGet< / span > < span class = cF0 > (& arg1, & arg2, < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > |
< a name = "l1362" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_KEY_DOWN< / span > < span class = cF0 > |
< a name = "l1363" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > |
< a name = "l1364" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > |
< a name = "l1365" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > |
< a name = "l1366" > < / a > < / span > < span class = cFE > 1< / span > < span class = cF0 > < < < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > );
< a name = "l1367" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (message_code == < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > )
< a name = "l1368" > < / a > {
< a name = "l1369" > < / a > e.x2 = arg1;
< a name = "l1370" > < / a > e.y2 = arg2;
< a name = "l1371" > < / a > }
< a name = "l1372" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (message_code == < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > )
< a name = "l1373" > < / a > {
< a name = "l1374" > < / a > e.x2 = arg1;
< a name = "l1375" > < / a > e.y2 = arg2;
< a name = "l1376" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1377" > < / a > }
< a name = "l1378" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1379" > < / a > {
< a name = "l1380" > < / a > e.sel_rect = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1381" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1382" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1383" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_restart;
< a name = "l1384" > < / a > }
< a name = "l1385" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1386" > < / a > e.sel_rect = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1387" > < / a > < / span > < span class = cF5 > MeshTriSelRect< / span > < span class = cF0 > (& e, sel_mode, e.x1, e.x2, e.y1, e.y2);
< a name = "l1388" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode != < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1389" > < / a > < / span > < span class = cF5 > MeshVertexSelRect< / span > < span class = cF0 > (& e, sel_mode, e.x1, e.x2, e.y1, e.y2);
< a name = "l1390" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1391" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1392" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1393" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1394" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1395" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_CTRLB< / span > < span class = cF0 > :
< a name = "l1396" > < / a > < / span > < span class = cF5 > WinBorder< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cF0 > & < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> display_flags, < / span > < span class = cF3 > DISPLAYf_NO_BORDER< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1397" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1398" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1399" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_CTRLC< / span > < span class = cF0 > :
2021-07-03 05:07:57 +01:00
< a name = "l1400" > < / a > me_clip_copy:
2021-07-04 23:11:34 +01:00
< a name = "l1401" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1402" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1403" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1404" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1405" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1406" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1407" > < / a > < / span > < span class = cF5 > MeshClipCopy< / span > < span class = cF0 > (& e);
< a name = "l1408" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1409" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1410" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_CTRLV< / span > < span class = cF0 > :
2021-07-03 05:07:57 +01:00
< a name = "l1411" > < / a > me_clip_paste:
2021-07-04 23:11:34 +01:00
< a name = "l1412" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1413" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1414" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1415" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1416" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1417" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1418" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1419" > < / a > < / span > < span class = cF5 > MeshClipPaste< / span > < span class = cF0 > (& e);
< a name = "l1420" > < / a > e.ed_mode = < / span > < span class = cF6 > 'm'< / span > < span class = cF0 > ;
< a name = "l1421" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1422" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1423" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1424" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_CTRLX< / span > < span class = cF0 > :
2021-07-03 05:07:57 +01:00
< a name = "l1425" > < / a > me_clip_cut:
2021-07-04 23:11:34 +01:00
< a name = "l1426" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 't'< / span > < span class = cF0 > )
< a name = "l1427" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1428" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1429" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1430" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1431" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1432" > < / a > < / span > < span class = cF5 > MeshClipCut< / span > < span class = cF0 > (& e);
< a name = "l1433" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1434" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1435" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_SHIFT_ESC< / span > < span class = cF0 > :
< a name = "l1436" > < / a > save_and_exit = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1437" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_done;
2021-07-03 05:07:57 +01:00
< a name = "l1438" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1439" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > CH_ESC< / span > < span class = cF0 > :
< a name = "l1440" > < / a > save_and_exit = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1441" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_done;
2021-07-03 05:07:57 +01:00
< a name = "l1442" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1443" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'z'< / span > < span class = cF0 > :
< a name = "l1444" > < / a > < / span > < span class = cF5 > MeshScaleZoom< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 1< / span > < span class = cF0 > .< / span > < span class = cFE > 5< / span > < span class = cF0 > );
< a name = "l1445" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1446" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1447" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'Z'< / span > < span class = cF0 > :
< a name = "l1448" > < / a > < / span > < span class = cF5 > MeshScaleZoom< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 1< / span > < span class = cF0 > / < / span > < span class = cFE > 1< / span > < span class = cF0 > .< / span > < span class = cFE > 5< / span > < span class = cF0 > );
< a name = "l1449" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1450" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1451" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'c'< / span > < span class = cF0 > :
< a name = "l1452" > < / a > e.cur_color = < / span > < span class = cF5 > PopUpColorLighting< / span > < span class = cF0 > ;
< a name = "l1453" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1454" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1455" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 's'< / span > < span class = cF0 > :
< a name = "l1456" > < / a > i = < / span > < span class = cF5 > PopUpRangeI64< / span > < span class = cF0 > (< / span > < span class = cFE > 1< / span > < span class = cF0 > , < / span > < span class = cFE > 25< / span > < span class = cF0 > , < / span > < span class = cFE > 1< / span > < span class = cF0 > , < / span > < span class = cF6 > " New Snap\n" < / span > < span class = cF0 > );
< a name = "l1457" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i > = < / span > < span class = cFE > 1< / span > < span class = cF0 > )
< a name = "l1458" > < / a > e.cur_snap = i;
< a name = "l1459" > < / a > < / span > < span class = cF5 > MeshCurSnap< / span > < span class = cF0 > (& e);
< a name = "l1460" > < / a > < / span > < span class = cF5 > MeshRecalcCxCy< / span > < span class = cF0 > (< / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & e);
< a name = "l1461" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1462" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1463" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'g'< / span > < span class = cF0 > :
< a name = "l1464" > < / a > e.grid_on = !e.grid_on;
< a name = "l1465" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1466" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1467" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'V'< / span > < span class = cF0 > :
< a name = "l1468" > < / a > e.vertex_on = !e.vertex_on;
< a name = "l1469" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1470" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1471" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'N'< / span > < span class = cF0 > :
< a name = "l1472" > < / a > s-> sx = s-> sy = s-> sz = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1473" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1474" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1475" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'y'< / span > < span class = cF0 > :
< a name = "l1476" > < / a > e.flip_y = !e.flip_y;
< a name = "l1477" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1478" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1479" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'j'< / span > < span class = cF0 > :
< a name = "l1480" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1481" > < / a > < / span > < span class = cF5 > MeshVertexIgnoreSet< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l1482" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv = < / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF7 > (< / span > < span class = cF0 > & e,
< a name = "l1483" > < / a > < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.x - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_left - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> scroll_x,
< a name = "l1484" > < / a > < / span > < span class = cFB > mouse< / span > < span class = cF0 > .pos.y - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> pix_top - < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> scroll_y< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1485" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1486" > < / a > < / span > < span class = cF5 > Noise< / span > < span class = cF0 > (< / span > < span class = cFE > 25< / span > < span class = cF0 > , < / span > < span class = cFE > 86< / span > < span class = cF0 > , < / span > < span class = cFE > 110< / span > < span class = cF0 > );
< a name = "l1487" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (tmpv-> p.z, e.cur_snap);
< a name = "l1488" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1489" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1490" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1491" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1492" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1493" > < / a > e.mouse_z = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1494" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1495" > < / a > < / span > < span class = cF5 > MeshVertexIgnoreSet< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1496" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1497" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1498" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1499" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_z)
< a name = "l1500" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , z - p0a.z);
< a name = "l1501" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1502" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, x - p0a.x, y - p0a.y, z - p0a.z);
< a name = "l1503" > < / a > p0a.x = x;
< a name = "l1504" > < / a > p0a.y = y;
< a name = "l1505" > < / a > p0a.z = z;
< a name = "l1506" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1507" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1508" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1509" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1510" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '1'< / span > < span class = cF0 > :
< a name = "l1511" > < / a > < / span > < span class = cF5 > MeshSwapAxes< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .x< / span > < span class = cF7 > )< / span > < span class = cF0 > , < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .y< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1512" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1513" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1514" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '2'< / span > < span class = cF0 > :
< a name = "l1515" > < / a > < / span > < span class = cF5 > MeshSwapAxes< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .x< / span > < span class = cF7 > )< / span > < span class = cF0 > , < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .z< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1516" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1517" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1518" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '3'< / span > < span class = cF0 > :
< a name = "l1519" > < / a > < / span > < span class = cF5 > MeshSwapAxes< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .y< / span > < span class = cF7 > )< / span > < span class = cF0 > , < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .z< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1520" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1521" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1522" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '4'< / span > < span class = cF0 > :
< a name = "l1523" > < / a > < / span > < span class = cF5 > MeshInvertAxis< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .x< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1524" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1525" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1526" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '5'< / span > < span class = cF0 > :
< a name = "l1527" > < / a > < / span > < span class = cF5 > MeshInvertAxis< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .y< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1528" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1529" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1530" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '6'< / span > < span class = cF0 > :
< a name = "l1531" > < / a > < / span > < span class = cF5 > MeshInvertAxis< / span > < span class = cF0 > (& e, < / span > < span class = cF1 > offset< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > .z< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1532" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1533" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1534" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'r'< / span > < span class = cF0 > :
< a name = "l1535" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.cur_tri)
< a name = "l1536" > < / a > < / span > < span class = cF5 > SwapI64< / span > < span class = cF0 > (& e.cur_tri-> t[< / span > < span class = cFE > 1< / span > < span class = cF0 > ], & e.cur_tri-> t[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]);
< a name = "l1537" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1538" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1539" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'C'< / span > < span class = cF0 > :
< a name = "l1540" > < / a > < / span > < span class = cF5 > MeshColorTris< / span > < span class = cF0 > (& e);
< a name = "l1541" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1542" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1543" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'R'< / span > < span class = cF0 > :
< a name = "l1544" > < / a > < / span > < span class = cF5 > MeshRevTris< / span > < span class = cF0 > (& e);
< a name = "l1545" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1546" > < / a > }
< a name = "l1547" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1548" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1549" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_L_DOWN< / span > < span class = cF0 > :
< a name = "l1550" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (e.ed_mode)
< a name = "l1551" > < / a > {
< a name = "l1552" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'm'< / span > < span class = cF0 > :
< a name = "l1553" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!moving)
< a name = "l1554" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1555" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > & e< / span > < span class = cF7 > )< / span > < span class = cF0 > & & < / span > < span class = cF7 > (< / span > < span class = cF0 > tmpv = < / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF0 > (& e, arg1, arg2)< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1556" > < / a > {
< a name = "l1557" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l1558" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (tmpv-> p.z, e.cur_snap);
< a name = "l1559" > < / a > }
< a name = "l1560" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > & e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1561" > < / a > {
< a name = "l1562" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1563" > < / a > p0a.x = x;
< a name = "l1564" > < / a > p0a.y = y;
< a name = "l1565" > < / a > p0a.z = z;
< a name = "l1566" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1567" > < / a > moving = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1568" > < / a > }
< a name = "l1569" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1570" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1571" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1572" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'M'< / span > < span class = cF0 > :
< a name = "l1573" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!adjusting_z & & !moving)
< a name = "l1574" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1575" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > & e< / span > < span class = cF7 > )< / span > < span class = cF0 > & & < / span > < span class = cF7 > (< / span > < span class = cF0 > tmpv = < / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF0 > (& e, arg1, arg2)< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1576" > < / a > {
< a name = "l1577" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l1578" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (tmpv-> p.z, e.cur_snap);
< a name = "l1579" > < / a > }
< a name = "l1580" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > MeshSelCount< / span > < span class = cF7 > (< / span > < span class = cF0 > & e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1581" > < / a > {
< a name = "l1582" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1583" > < / a > p0a.x = x;
< a name = "l1584" > < / a > p0a.y = y;
< a name = "l1585" > < / a > p0a.z = z;
< a name = "l1586" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1587" > < / a > moving = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1588" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1589" > < / a > p0b.x = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x;
< a name = "l1590" > < / a > p0b.y = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y;
< a name = "l1591" > < / a > p0b.z = e.mouse_z;
< a name = "l1592" > < / a > adjusting_z = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1593" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > (< / span > < span class = cF5 > ClampI64< / span > < span class = cF7 > (< / span > < span class = cF5 > Freq2Ona< / span > < span class = cF0 > (< / span > < span class = cFE > 3< / span > < span class = cF0 > * e.mouse_z + < / span > < span class = cFE > 1500< / span > < span class = cF0 > ), < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF3 > I8_MAX< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1594" > < / a > }
< a name = "l1595" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1596" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1597" > < / a > }
2021-07-03 05:07:57 +01:00
< a name = "l1598" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1599" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1600" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_L_UP< / span > < span class = cF0 > :
< a name = "l1601" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (e.ed_mode)
< a name = "l1602" > < / a > {
< a name = "l1603" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > :
< a name = "l1604" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > :
< a name = "l1605" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > :
< a name = "l1606" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'v'< / span > < span class = cF0 > :
< a name = "l1607" > < / a > < / span > < span class = cF5 > Noise< / span > < span class = cF0 > (< / span > < span class = cFE > 25< / span > < span class = cF0 > , < / span > < span class = cFE > 86< / span > < span class = cF0 > , < / span > < span class = cFE > 110< / span > < span class = cF0 > );
< a name = "l1608" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1609" > < / a > e.cur_vertex = < / span > < span class = cF5 > MeshVertexNew< / span > < span class = cF0 > (& e, x, y, z);
< a name = "l1610" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1611" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1612" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'm'< / span > < span class = cF0 > :
< a name = "l1613" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'M'< / span > < span class = cF0 > :
< a name = "l1614" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1615" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1616" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_z)
< a name = "l1617" > < / a > {
< a name = "l1618" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (< / span > < span class = cF5 > Sign< / span > < span class = cF7 > (< / span > < span class = cF0 > p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y< / span > < span class = cF7 > )< / span > < span class = cF0 > *
< a name = "l1619" > < / a > < / span > < span class = cF5 > Sqrt< / span > < span class = cF7 > (< / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.x - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x) +
< a name = "l1620" > < / a > < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y)< / span > < span class = cF7 > )< / span > < span class = cF0 > + p0b.z, e.cur_snap);
< a name = "l1621" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > ;
< a name = "l1622" > < / a > adjusting_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1623" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1624" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , z - p0a.z);
< a name = "l1625" > < / a > }
< a name = "l1626" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1627" > < / a > {
< a name = "l1628" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1629" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, x - p0a.x, y - p0a.y, z - p0a.z);
< a name = "l1630" > < / a > }
< a name = "l1631" > < / a > < / span > < span class = cF5 > MeshTriSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1632" > < / a > < / span > < span class = cF5 > MeshVertexSelAll< / span > < span class = cF0 > (& e, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1633" > < / a > moving = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1634" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1635" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1636" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1637" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 't'< / span > < span class = cF0 > :
< a name = "l1638" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpv = < / span > < span class = cF5 > MeshVertexFindScrPt< / span > < span class = cF7 > (< / span > < span class = cF0 > & e, arg1, arg2< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l1639" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1640" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < make_tri_vertex_num; i++)
< a name = "l1641" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (va[i] == tmpv)
< a name = "l1642" > < / a > {
< a name = "l1643" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1644" > < / a > < / span > < span class = cF5 > Beep< / span > < span class = cF0 > ;
< a name = "l1645" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1646" > < / a > }
< a name = "l1647" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i == make_tri_vertex_num)
< a name = "l1648" > < / a > {
< a name = "l1649" > < / a > < / span > < span class = cF5 > Noise< / span > < span class = cF0 > (< / span > < span class = cFE > 25< / span > < span class = cF0 > , < / span > < span class = cFE > 86< / span > < span class = cF0 > , < / span > < span class = cFE > 110< / span > < span class = cF0 > );
< a name = "l1650" > < / a > va[make_tri_vertex_num++] = tmpv;
< a name = "l1651" > < / a > tmpv-> flags |= < / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l1652" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (make_tri_vertex_num == < / span > < span class = cFE > 3< / span > < span class = cF0 > )
< a name = "l1653" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1654" > < / a > e.cur_tri = < / span > < span class = cF5 > MeshTriNew< / span > < span class = cF0 > (& e, e.cur_color, va[< / span > < span class = cFE > 0< / span > < span class = cF0 > ], va[< / span > < span class = cFE > 1< / span > < span class = cF0 > ], va[< / span > < span class = cFE > 2< / span > < span class = cF0 > ]);
< a name = "l1655" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < make_tri_vertex_num; i++)
< a name = "l1656" > < / a > va[i]-> flags & = ~< / span > < span class = cF3 > VF_SEL< / span > < span class = cF0 > ;
< a name = "l1657" > < / a > make_tri_vertex_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1658" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1659" > < / a > }
< a name = "l1660" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1661" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1662" > < / a > }
< a name = "l1663" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1664" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1665" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_R_DOWN< / span > < span class = cF0 > :
< a name = "l1666" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cFB > kbd< / span > < span class = cF0 > .down_bitmap, < / span > < span class = cF3 > SC_SHIFT< / span > < span class = cF7 > )< / span > < span class = cF0 > ) adjusting_camera_xy = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1667" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cFB > kbd< / span > < span class = cF0 > .down_bitmap, < / span > < span class = cF3 > SC_ALT< / span > < span class = cF7 > )< / span > < span class = cF0 > ) adjusting_camera_z = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1668" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1669" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!adjusting_z & & e.ed_mode != < / span > < span class = cF6 > 'M'< / span > < span class = cF0 > & &
< a name = "l1670" > < / a > < / span > < span class = cF7 > (< / span > < span class = cF0 > e.chain_pred == e.vertex_head.last || e.ed_mode != < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > & & e.ed_mode != < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > & & e.ed_mode != < / span > < span class = cF6 > 'p'< / span > < span class = cF7 > )< / span > < span class = cF0 > & &
< a name = "l1671" > < / a > !adjusting_camera_xy & & !adjusting_camera_z)
< a name = "l1672" > < / a > {
< a name = "l1673" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1674" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1675" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1676" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, x - p0a.x, y - p0a.y, z - p0a.z);
< a name = "l1677" > < / a > p0a.x = x;
< a name = "l1678" > < / a > p0a.y = y;
< a name = "l1679" > < / a > p0a.z = z;
< a name = "l1680" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1681" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1682" > < / a > p0b.x = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x;
< a name = "l1683" > < / a > p0b.y = < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y;
< a name = "l1684" > < / a > p0b.z = e.mouse_z;
< a name = "l1685" > < / a > adjusting_z = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l1686" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > (< / span > < span class = cF5 > ClampI64< / span > < span class = cF7 > (< / span > < span class = cF5 > Freq2Ona< / span > < span class = cF0 > (< / span > < span class = cFE > 3< / span > < span class = cF0 > * e.mouse_z + < / span > < span class = cFE > 1500< / span > < span class = cF0 > ), < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF3 > I8_MAX< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1687" > < / a > }
< a name = "l1688" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1689" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1690" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_R_UP< / span > < span class = cF0 > :
< a name = "l1691" > < / a > adjusting_camera_xy = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1692" > < / a > adjusting_camera_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1693" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_z)
< a name = "l1694" > < / a > {
< a name = "l1695" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (< / span > < span class = cF5 > Sign< / span > < span class = cF7 > (< / span > < span class = cF0 > p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y< / span > < span class = cF7 > )< / span > < span class = cF0 > *
< a name = "l1696" > < / a > < / span > < span class = cF5 > Sqrt< / span > < span class = cF7 > (< / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.x - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x) +
< a name = "l1697" > < / a > < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y)< / span > < span class = cF7 > )< / span > < span class = cF0 > + p0b.z, e.cur_snap);
< a name = "l1698" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > ;
< a name = "l1699" > < / a > adjusting_z = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l1700" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1701" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1702" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1703" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , z - p0a.z);
< a name = "l1704" > < / a > p0a.x = x;
< a name = "l1705" > < / a > p0a.y = y;
< a name = "l1706" > < / a > p0a.z = z;
< a name = "l1707" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1708" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1709" > < / a > }
< a name = "l1710" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 'n'< / span > < span class = cF0 > )
< a name = "l1711" > < / a > {
< a name = "l1712" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.chain_pred & & e.chain_pred != e.vertex_head.last)
< a name = "l1713" > < / a > < / span > < span class = cF5 > MeshPolygon< / span > < span class = cF0 > (& e, e.chain_pred-> next, e.vertex_head.last, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l1714" > < / a > arg1 = e.ed_mode;
< a name = "l1715" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_chain;
< a name = "l1716" > < / a > }
< a name = "l1717" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 'f'< / span > < span class = cF0 > )
< a name = "l1718" > < / a > {
< a name = "l1719" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.chain_pred & & e.chain_pred != e.vertex_head.last)
< a name = "l1720" > < / a > < / span > < span class = cF5 > MeshFence< / span > < span class = cF0 > (& e);
< a name = "l1721" > < / a > arg1 = e.ed_mode;
< a name = "l1722" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_chain;
< a name = "l1723" > < / a > }
< a name = "l1724" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.ed_mode == < / span > < span class = cF6 > 'p'< / span > < span class = cF0 > )
< a name = "l1725" > < / a > {
< a name = "l1726" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (e.chain_pred & & e.chain_pred != e.vertex_head.last)
< a name = "l1727" > < / a > < / span > < span class = cF5 > MeshPrism< / span > < span class = cF0 > (& e);
< a name = "l1728" > < / a > arg1 = e.ed_mode;
< a name = "l1729" > < / a > < / span > < span class = cF1 > goto< / span > < span class = cF0 > me_chain;
< a name = "l1730" > < / a > }
< a name = "l1731" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1732" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1733" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > MESSAGE_MS_MOVE< / span > < span class = cF0 > :
< a name = "l1734" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_camera_xy)
< a name = "l1735" > < / a > {
< a name = "l1736" > < / a > < / span > < span class = cF2 > // In the editor, X and Y of mouse rotate around Y and X 3D axes.< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1737" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1738" > < / a > s-> sx += < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y - < / span > < span class = cFB > mouse_last< / span > < span class = cF0 > .presnap.y;
< a name = "l1739" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sx < < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l1740" > < / a > s-> sx = < / span > < span class = cFE > 360< / span > < span class = cF0 > ; < / span > < span class = cF2 > // VIEWANGLES_RANGE< / span > < span class = cF0 >
< a name = "l1741" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sx > < / span > < span class = cFE > 360< / span > < span class = cF0 > )
< a name = "l1742" > < / a > s-> sx = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1743" > < / a > s-> sy -= < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x - < / span > < span class = cFB > mouse_last< / span > < span class = cF0 > .presnap.x;
< a name = "l1744" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sy < < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l1745" > < / a > s-> sy = < / span > < span class = cFE > 360< / span > < span class = cF0 > ; < / span > < span class = cF2 > // VIEWANGLES_RANGE< / span > < span class = cF0 >
< a name = "l1746" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sy > < / span > < span class = cFE > 360< / span > < span class = cF0 > )
< a name = "l1747" > < / a > s-> sy = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1748" > < / a > }
< a name = "l1749" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_camera_z)
< a name = "l1750" > < / a > {
< a name = "l1751" > < / a > < / span > < span class = cF2 > // In the editor, X and Y of mouse rotates around Z 3D axis.< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l1752" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1753" > < / a > s-> sz += < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x - < / span > < span class = cFB > mouse_last< / span > < span class = cF0 > .presnap.x;
< a name = "l1754" > < / a > s-> sz += < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y - < / span > < span class = cFB > mouse_last< / span > < span class = cF0 > .presnap.y;
< a name = "l1755" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sz < < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l1756" > < / a > s-> sz = < / span > < span class = cFE > 360< / span > < span class = cF0 > ; < / span > < span class = cF2 > // VIEWANGLES_RANGE< / span > < span class = cF0 >
< a name = "l1757" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (s-> sz > < / span > < span class = cFE > 360< / span > < span class = cF0 > )
< a name = "l1758" > < / a > s-> sz = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l1759" > < / a > }
2021-07-03 05:07:57 +01:00
< a name = "l1760" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1761" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_camera_xy || adjusting_camera_z)
< a name = "l1762" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1763" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1764" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_z)
< a name = "l1765" > < / a > {
< a name = "l1766" > < / a > e.mouse_z = < / span > < span class = cF5 > RoundI64< / span > < span class = cF0 > (< / span > < span class = cF5 > Sign< / span > < span class = cF7 > (< / span > < span class = cF0 > p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y< / span > < span class = cF7 > )< / span > < span class = cF0 > *
< a name = "l1767" > < / a > < / span > < span class = cF5 > Sqrt< / span > < span class = cF7 > (< / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.x - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.x) +
< a name = "l1768" > < / a > < / span > < span class = cF5 > Sqr< / span > < span class = cF0 > (p0b.y - < / span > < span class = cFB > mouse< / span > < span class = cF0 > .presnap.y)< / span > < span class = cF7 > )< / span > < span class = cF0 > + p0b.z, e.cur_snap);
< a name = "l1769" > < / a > < / span > < span class = cF5 > Sound< / span > < span class = cF0 > (< / span > < span class = cF5 > ClampI64< / span > < span class = cF7 > (< / span > < span class = cF5 > Freq2Ona< / span > < span class = cF0 > (< / span > < span class = cFE > 3< / span > < span class = cF0 > * e.mouse_z + < / span > < span class = cFE > 1500< / span > < span class = cF0 > ), < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cF3 > I8_MAX< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1770" > < / a > }
< a name = "l1771" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (moving)
< a name = "l1772" > < / a > {
< a name = "l1773" > < / a > < / span > < span class = cF5 > MeshCursorW< / span > < span class = cF0 > (& e, < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , & x, & y, & z);
< a name = "l1774" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (adjusting_z)
< a name = "l1775" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, < / span > < span class = cFE > 0< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > , z - p0a.z);
< a name = "l1776" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1777" > < / a > < / span > < span class = cF5 > MeshP0Offset< / span > < span class = cF0 > (& e, x - p0a.x, y - p0a.y, z - p0a.z);
< a name = "l1778" > < / a > p0a.x = x;
< a name = "l1779" > < / a > p0a.y = y;
< a name = "l1780" > < / a > p0a.z = z;
< a name = "l1781" > < / a > < / span > < span class = cF5 > MeshP0Capture< / span > < span class = cF0 > (& e);
< a name = "l1782" > < / a > }
< a name = "l1783" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l1784" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1785" > < / a > }
2021-07-03 05:07:57 +01:00
< a name = "l1786" > < / a > me_done:
2021-07-04 23:11:34 +01:00
< a name = "l1787" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1788" > < / a > < / span > < span class = cF1 > catch< / span > < span class = cF0 >
< a name = "l1789" > < / a > < / span > < span class = cF5 > Fs< / span > < span class = cF0 > -> catch_except = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1790" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1791" > < / a > < / span > < span class = cF5 > SettingsPop< / span > < span class = cF0 > ;
< a name = "l1792" > < / a > < / span > < span class = cF5 > MenuPop< / span > < span class = cF0 > ;
< a name = "l1793" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (save_and_exit)
< a name = "l1794" > < / a > head = < / span > < span class = cF5 > MeshSave< / span > < span class = cF0 > (& e, _size);
< a name = "l1795" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1796" > < / a > head = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l1797" > < / a > < / span > < span class = cF5 > MeshCleanUp< / span > < span class = cF0 > (& e);
< a name = "l1798" > < / a > < / span > < span class = cF5 > FramePtrDel< / span > < span class = cF0 > (< / span > < span class = cF6 > " CMeshFrame" < / span > < span class = cF0 > );
< a name = "l1799" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_s)
< a name = "l1800" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l1801" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (c-> state, old_s, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CViewAngles< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l1802" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (old_s);
< a name = "l1803" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l1804" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l1805" > < / a > < / span > < span class = cF5 > ViewAnglesDel< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l1806" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l1807" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > head;
2021-07-03 05:07:57 +01:00
< a name = "l1808" > < / a > }
< / span > < / pre > < / body >
< / html >