2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-10-27 08:28:16 +01:00
< meta name = "generator" content = "ZealOS V1.04" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
< / 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/Sprite;Sprites" < / span > < span class = cF0 >
< a name = "l2" > < / a > < / span > < span class = cF2 > /*< / span > < span class = cF4 >
Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-07 02:35:32 +01:00
< a name = "l3" > < / a > < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/Gr.HH.html#l157" > < span class = cF4 > CSprite< / span > < / a > < span class = cF2 > s are stored as a sequence of variable length< / span > < span class = cF0 >
< a name = "l4" > < / a > < / span > < span class = cF2 > operations with a 1-byte < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/Gr.HH.html#l128" > < span class = cF4 > type< / span > < / a > < span class = cF2 > leading< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l5" > < / a > < / span > < span class = cF2 > each operation. They are stored, one after another,< / span > < span class = cF0 >
2021-07-26 20:29:49 +01:00
< a name = "l6" > < / a > < / span > < span class = cF2 > in a chunk of memory terminated by a < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/Gr.HH.html#l120" > < span class = cF4 > zero< / span > < / a > < span class = cF2 > .< / span > < span class = cF4 >
< a name = "l7" > < / a > < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/GrSpritePlot.CC.html#l18" > < span class = cF4 > Sprite3< / span > < / a > < span class = cF2 > () shows how the < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/Gr.HH.html#l157" > < span class = cF4 > CSprite< / span > < / a > < span class = cF2 > unions are used.< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l8" > < / a > < / span > < span class = cF4 >
2021-07-26 20:29:49 +01:00
< a name = "l9" > < / a > < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/SpriteNew.CC.html#l44" > < span class = cF4 > SpriteElemSize< / span > < / a > < span class = cF2 > () will return the size of a single< / span > < span class = cF0 >
< a name = "l10" > < / a > < / span > < span class = cF2 > element, while < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/SpriteNew.CC.html#l87" > < span class = cF4 > SpriteSize< / span > < / a > < span class = cF2 > () will return the size< / span > < span class = cF0 >
< a name = "l11" > < / a > < / span > < span class = cF2 > of an entire list. Look at < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/SpriteNew.CC.html#l6" > < span class = cF4 > sprite_elem_base_sizes< / span > < / a > < span class = cF2 > .< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l12" > < / a >
< a name = "l13" > < / a > < / span > < span class = cF2 > See < / span > < span class = cF9 > < u > ::/Apps/GrModels< / u > < / span > < span class = cF2 > for an example of< / span > < span class = cF0 >
2021-07-26 20:29:49 +01:00
< a name = "l14" > < / a > < / span > < span class = cF2 > making CSprite by hand. It uses < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/Gr/Gr.HH.html#l144" > < span class = cF4 > SPT_MESH< / span > < / a > < span class = cF2 > ,< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l15" > < / a > < / span > < span class = cF2 > one of the most complicated.< / span > < span class = cF0 >
< a name = "l16" > < / a > < / span > < span class = cF2 > */< / span > < span class = cF0 >
< a name = "l17" > < / a >
< a name = "l18" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > just_one_elem=< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > )
< a name = "l19" > < / a > {< / span > < span class = cF2 > //Plot a sprite into a CDC.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l20" > < / a > < / span > < span class = cF9 > CSprite< / span > < span class = cF0 > *tmpg = elems - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CSprite< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > );
< a name = "l21" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, j, k, x1, y1, z1, x2, y2, *old_r, *r2, old_flags = dc-> flags, old_pen_width = dc-> thick;
< a name = "l22" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > *ptr;
< a name = "l23" > < / a > < / span > < span class = cF9 > CColorROPU32< / span > < span class = cF0 > old_color = dc-> color;
< a name = "l24" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *img;
< a name = "l25" > < / a > < / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > *p, *p2;
< a name = "l26" > < / a > < / span > < span class = cF9 > CGrSym< / span > < span class = cF0 > old_sym;
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 = cF5 > MemCopy< / span > < span class = cF0 > (& old_sym, & dc-> sym, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CGrSym< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l29" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> flags & < / span > < span class = cF3 > DCF_LOCATE_NEAREST< / span > < span class = cF0 > )
< a name = "l30" > < / a > dc-> nearest_dist = < / span > < span class = cF3 > I64_MAX< / span > < span class = cF0 > ;
< a name = "l31" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpg-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > )
< a name = "l32" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l33" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (tmpg-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > )
< a name = "l34" > < / a > {
< a name = "l35" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_COLOR< / span > < span class = cF0 > :
< a name = "l36" > < / a > dc-> color = dc-> color & ~(< / span > < span class = cF3 > COLORROP_COLORS_MASK< / span > < span class = cF0 > | < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > ) | tmpg-> c.color;
< a name = "l37" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l38" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l39" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_DITHER_COLOR< / span > < span class = cF0 > :
< a name = "l40" > < / a > dc-> color = dc-> color & ~< / span > < span class = cF3 > COLORROP_COLORS_MASK< / span > < span class = cF0 > |
< a name = "l41" > < / a > tmpg-> d.dither_color.u8[< / span > < span class = cFE > 0< / span > < span class = cF0 > ] | tmpg-> d.dither_color.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] < < < / span > < span class = cF3 > COLORROP_BITS< / span > < span class = cF0 > | < / span > < span class = cF3 > ROPF_DITHER< / span > < span class = cF0 > ;
< a name = "l42" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l43" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l44" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_THICK< / span > < span class = cF0 > :
< a name = "l45" > < / a > dc-> thick = tmpg-> t.thick;
< a name = "l46" > < / a > < / span > < span class = cF5 > DCThickScale< / span > < span class = cF0 > (dc);
< a name = "l47" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l48" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l49" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TRANSFORM_ON< / span > < span class = cF0 > :
< a name = "l50" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l51" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l52" > < / a > x -= dc-> x;
< a name = "l53" > < / a > y -= dc-> y;
< a name = "l54" > < / a > z -= dc-> z;
< a name = "l55" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l56" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l57" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l58" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l59" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TRANSFORM_OFF< / span > < span class = cF0 > :
< a name = "l60" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > )
< a name = "l61" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l62" > < / a > x += dc-> x;
< a name = "l63" > < / a > y += dc-> y;
< a name = "l64" > < / a > z += dc-> z;
< a name = "l65" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l66" > < / a > dc-> flags & = ~< / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l67" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l68" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l69" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_PT< / span > < span class = cF0 > :
< a name = "l70" > < / a > < / span > < span class = cF5 > GrPlot3< / span > < span class = cF0 > (dc, tmpg-> p.x1 + x, tmpg-> p.y1 + y, z);
< a name = "l71" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l72" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l73" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT< / span > < span class = cF0 > :
< a name = "l74" > < / a > < / span > < span class = cF5 > GrPrint3< / span > < span class = cF0 > (dc, tmpg-> ps.x1 + x, tmpg-> ps.y1 + y, z, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , tmpg-> ps.st);
< a name = "l75" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
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 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT_BOX< / span > < span class = cF0 > :
< a name = "l78" > < / a > < / span > < span class = cF5 > GrTextBox3< / span > < span class = cF0 > (dc, tmpg-> ps.x1 + x, tmpg-> ps.y1 + y, z, tmpg-> ps.st);
< a name = "l79" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l80" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l81" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT_DIAMOND< / span > < span class = cF0 > :
< a name = "l82" > < / a > < / span > < span class = cF5 > GrTextDiamond3< / span > < span class = cF0 > (dc, tmpg-> ps.x1 + x, tmpg-> ps.y1 + y, z, tmpg-> ps.st);
< a name = "l83" > < / a > < / span > < span class = cF1 > break< / 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 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_FLOOD_FILL< / span > < span class = cF0 > :
< a name = "l86" > < / a > < / span > < span class = cF5 > GrFloodFill3< / span > < span class = cF0 > (dc, tmpg-> p.x1 + x, tmpg-> p.y1 + y, z, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l87" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l88" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l89" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_FLOOD_FILL_NOT< / span > < span class = cF0 > :
< a name = "l90" > < / a > i = dc-> color;
< a name = "l91" > < / a > dc-> color = dc-> color.c0;
< a name = "l92" > < / a > < / span > < span class = cF5 > GrFloodFill3< / span > < span class = cF0 > (dc, tmpg-> p.x1 + x, tmpg-> p.y1 + y, z, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l93" > < / a > dc-> color = i;
< a name = "l94" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l95" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l96" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_SHIFT< / span > < span class = cF0 > :
< a name = "l97" > < / a > x += tmpg-> p.x1;
< a name = "l98" > < / a > y += tmpg-> p.y1;
< a name = "l99" > < / a > < / span > < span class = cF1 > break< / 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 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_LINE< / span > < span class = cF0 > :
< a name = "l102" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, tmpg-> pp.x1 + x, tmpg-> pp.y1 + y, z, tmpg-> pp.x2 + x, tmpg-> pp.y2 + y, z);
< a name = "l103" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l104" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l105" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ARROW< / span > < span class = cF0 > :
< a name = "l106" > < / a > < / span > < span class = cF5 > GrArrow3< / span > < span class = cF0 > (dc, tmpg-> pp.x1 + x, tmpg-> pp.y1 + y, z, tmpg-> pp.x2 + x, tmpg-> pp.y2 + y, z);
< a name = "l107" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l108" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l109" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_PLANAR_SYMMETRY< / span > < span class = cF0 > :
< a name = "l110" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > DCSymmetry3Set< / span > < span class = cF7 > (< / span > < span class = cF0 > dc, tmpg-> pp.x1 + x, tmpg-> pp.y1 + y, z,
< a name = "l111" > < / a > tmpg-> pp.x2 + x, tmpg-> pp.y2 + y, z,
< a name = "l112" > < / a > tmpg-> pp.x2 + x, tmpg-> pp.y2 + y, z + < / span > < span class = cFE > 1< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l113" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_SYMMETRY< / span > < span class = cF0 > ;
< a name = "l114" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l115" > < / a > dc-> flags & = ~< / span > < span class = cF3 > DCF_SYMMETRY< / span > < span class = cF0 > ;
< a name = "l116" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l117" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l118" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BITMAP< / span > < span class = cF0 > :
< a name = "l119" > < / a > img = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CDC< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l120" > < / a > img-> width = tmpg-> pwhu.width;
< a name = "l121" > < / a > img-> width_internal = (tmpg-> pwhu.width + < / span > < span class = cFE > 7< / span > < span class = cF0 > ) & ~< / span > < span class = cFE > 7< / span > < span class = cF0 > ;
< a name = "l122" > < / a > img-> height = tmpg-> pwhu.height;
< a name = "l123" > < / a > img-> body = & tmpg-> pwhu.u;
< a name = "l124" > < / a > img-> dc_signature = < / span > < span class = cF3 > DCS_SIGNATURE_VAL< / span > < span class = cF0 > ;
< a name = "l125" > < / a > < / span > < span class = cF5 > GrBlot3< / span > < span class = cF0 > (dc, tmpg-> pwhu.x1 + x, tmpg-> pwhu.y1 + y, z, img);
< a name = "l126" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (img);
< a name = "l127" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l128" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l129" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_RECT< / span > < span class = cF0 > :
< a name = "l130" > < / a > < / span > < span class = cF5 > GrRect3< / span > < span class = cF0 > (dc, tmpg-> pp.x1 + x, tmpg-> pp.y1 + y, z, tmpg-> pp.x2 - tmpg-> pp.x1, tmpg-> pp.y2 - tmpg-> pp.y1);
< a name = "l131" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l132" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l133" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ROTATED_RECT< / span > < span class = cF0 > :
< a name = "l134" > < / a > x1 = tmpg-> ppa.x1 + x;
< a name = "l135" > < / a > y1 = tmpg-> ppa.y1 + y;
< a name = "l136" > < / a > z1 = z;
< a name = "l137" > < / a > < / span > < span class = cF5 > Mat4x4MulXYZ< / span > < span class = cF0 > (dc-> r, & x1, & y1, & z1);
< a name = "l138" > < / a > old_r = dc-> r;
< a name = "l139" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l140" > < / a > r2 = < / span > < span class = cF5 > Mat4x4IdentNew< / span > < span class = cF0 > ;
< a name = "l141" > < / a > < / span > < span class = cF5 > Mat4x4RotZ< / span > < span class = cF0 > (r2, -tmpg-> ppa.angle);
< a name = "l142" > < / a > < / span > < span class = cF5 > Mat4x4TranslationEqu< / span > < span class = cF0 > (r2, x1, y1, z1);
< a name = "l143" > < / a > < / span > < span class = cF5 > DCMat4x4Set< / span > < span class = cF0 > (dc, < / span > < span class = cF5 > Mat4x4MulMat4x4New< / span > < span class = cF7 > (< / span > < span class = cF0 > old_r, r2< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l144" > < / a > < / span > < span class = cF5 > GrRect3< / 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 > , tmpg-> ppa.x2 - tmpg-> ppa.x1, tmpg-> ppa.y2 - tmpg-> ppa.y1);
< a name = "l145" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (dc-> r);
< a name = "l146" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (r2);
< a name = "l147" > < / a > < / span > < span class = cF5 > DCMat4x4Set< / span > < span class = cF0 > (dc, old_r);
< a name = "l148" > < / a > dc-> flags = dc-> flags & ~< / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > | old_flags;
< a name = "l149" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l150" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l151" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_CIRCLE< / span > < span class = cF0 > :
< a name = "l152" > < / a > < / span > < span class = cF5 > GrCircle3< / span > < span class = cF0 > (dc, tmpg-> pr.x1 + x, tmpg-> pr.y1 + y, z, tmpg-> pr.radius);
< a name = "l153" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l154" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l155" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ELLIPSE< / span > < span class = cF0 > :
< a name = "l156" > < / a > < / span > < span class = cF5 > GrEllipse3< / span > < span class = cF0 > (dc,
< a name = "l157" > < / a > tmpg-> pwha.x1 + x, tmpg-> pwha.y1 + y, z, tmpg-> pwha.width, tmpg-> pwha.height, tmpg-> pwha.angle);
< a name = "l158" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l159" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l160" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYGON< / span > < span class = cF0 > :
< a name = "l161" > < / a > < / span > < span class = cF5 > GrRegPoly3< / span > < span class = cF0 > (dc, tmpg-> pwhas.x1 + x, tmpg-> pwhas.y1 + y, z,
< a name = "l162" > < / a > tmpg-> pwhas.width, tmpg-> pwhas.height, tmpg-> pwhas.sides, tmpg-> pwhas.angle);
< a name = "l163" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l164" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l165" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYLINE< / span > < span class = cF0 > :
< a name = "l166" > < / a > ptr = & tmpg-> nu.u;
< a name = "l167" > < / a > x1 = ptr[< / span > < span class = cFE > 0< / span > < span class = cF0 > ];
< a name = "l168" > < / a > y1 = ptr[< / span > < span class = cFE > 1< / span > < span class = cF0 > ];
< a name = "l169" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 1< / span > < span class = cF0 > ; i < tmpg-> nu.num; i++)
< a name = "l170" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l171" > < / a > x2 = ptr[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > ];
< a name = "l172" > < / a > y2 = ptr[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > ];
< a name = "l173" > < / a > < / span > < span class = cF5 > GrLine3< / span > < span class = cF0 > (dc, x1 + x, y1 + y, z, x2 + x, y2 + y, z);
< a name = "l174" > < / a > x1 = x2;
< a name = "l175" > < / a > y1 = y2;
< a name = "l176" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l177" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l178" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l179" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYPT< / span > < span class = cF0 > :
< a name = "l180" > < / a > x1 = tmpg-> npu.x;
< a name = "l181" > < / a > y1 = tmpg-> npu.y;
< a name = "l182" > < / a > ptr = & tmpg-> npu.u;
< a name = "l183" > < / a > k = tmpg-> npu.num * < / span > < span class = cFE > 3< / span > < span class = cF0 > ;
< a name = "l184" > < / a > < / span > < span class = cF5 > GrPlot3< / span > < span class = cF0 > (dc, x1 + x, y1 + y, z);
< a name = "l185" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < k; i += < / span > < span class = cFE > 3< / span > < span class = cF0 > ) < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l186" > < / a > j = < / span > < span class = cF5 > BFieldExtU32< / span > < span class = cF0 > (ptr, i, < / span > < span class = cFE > 3< / span > < span class = cF0 > );
< a name = "l187" > < / a > x1 += < / span > < span class = cFB > gr_x_offsets< / span > < span class = cF0 > [j];
< a name = "l188" > < / a > y1 += < / span > < span class = cFB > gr_y_offsets< / span > < span class = cF0 > [j];
< a name = "l189" > < / a > < / span > < span class = cF5 > GrPlot3< / span > < span class = cF0 > (dc, x1 + x, y1 + y, z);
< a name = "l190" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l191" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l192" > < / a > < / span > < span class = cF1 > start< / span > < span class = cF0 > :
< a name = "l193" > < / a > p2 = p = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (tmpg-> nu.num * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l194" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (p, & tmpg-> nu.u, tmpg-> nu.num * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l195" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg-> nu.num; i++, p2++)
< a name = "l196" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l197" > < / a > p2-> x += x;
< a name = "l198" > < / a > p2-> y += y;
< a name = "l199" > < / a > p2-> z += z;
< a name = "l200" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l201" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE2< / span > < span class = cF0 > :
< a name = "l202" > < / a > < / span > < span class = cF5 > Gr2BSpline3< / span > < span class = cF0 > (dc, p, tmpg-> nu.num, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l203" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l204" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l205" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE3< / span > < span class = cF0 > :
< a name = "l206" > < / a > < / span > < span class = cF5 > Gr3BSpline3< / span > < span class = cF0 > (dc, p, tmpg-> nu.num, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > );
< a name = "l207" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l208" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l209" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE2_CLOSED< / span > < span class = cF0 > :
< a name = "l210" > < / a > < / span > < span class = cF5 > Gr2BSpline3< / span > < span class = cF0 > (dc, p, tmpg-> nu.num, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l211" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l212" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l213" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE3_CLOSED< / span > < span class = cF0 > :
< a name = "l214" > < / a > < / span > < span class = cF5 > Gr3BSpline3< / span > < span class = cF0 > (dc, p, tmpg-> nu.num, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
< a name = "l215" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l216" > < / a > < / span > < span class = cF1 > end< / span > < span class = cF0 > :
< a name = "l217" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (p);
< a name = "l218" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l219" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l220" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_MESH< / span > < span class = cF0 > :
< a name = "l221" > < / a > p2 = p = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (tmpg-> mu.vertex_count * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l222" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (p, & tmpg-> mu.u, tmpg-> mu.vertex_count * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l223" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg-> mu.vertex_count; i++, p2++)
< a name = "l224" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l225" > < / a > p2-> x += x;
< a name = "l226" > < / a > p2-> y += y;
< a name = "l227" > < / a > p2-> z += z;
< a name = "l228" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l229" > < / a > < / span > < span class = cF5 > Gr3Mesh< / span > < span class = cF0 > (dc, tmpg-> mu.vertex_count, p, tmpg-> mu.tri_count,
< a name = "l230" > < / a > < / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpg-> mu.u< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > * tmpg-> mu.vertex_count);
< a name = "l231" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (p);
< a name = "l232" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l233" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l234" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_SHIFTABLE_MESH< / span > < span class = cF0 > :
< a name = "l235" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > )
< a name = "l236" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l237" > < / a > dc-> x += tmpg-> pmu.x;
< a name = "l238" > < / a > dc-> y += tmpg-> pmu.y;
< a name = "l239" > < / a > dc-> z += tmpg-> pmu.z;
< a name = "l240" > < / a > x1 = x;
< a name = "l241" > < / a > y1 = y;
< a name = "l242" > < / a > z1 = z;
< a name = "l243" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l244" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l245" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l246" > < / a > x1 = tmpg-> pmu.x + x;
< a name = "l247" > < / a > y1 = tmpg-> pmu.y + y;
< a name = "l248" > < / a > z1 = tmpg-> pmu.z + z;
< a name = "l249" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l250" > < / a > p2 = p = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (tmpg-> pmu.vertex_count * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l251" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (p, & tmpg-> pmu.u, tmpg-> pmu.vertex_count * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l252" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg-> pmu.vertex_count; i++, p2++)
< a name = "l253" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l254" > < / a > p2-> x += x1;
< a name = "l255" > < / a > p2-> y += y1;
< a name = "l256" > < / a > p2-> z += z1;
< a name = "l257" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l258" > < / a > < / span > < span class = cF5 > Gr3Mesh< / span > < span class = cF0 > (dc, tmpg-> pmu.vertex_count, p, tmpg-> pmu.tri_count,
< a name = "l259" > < / a > < / span > < span class = cF7 > (< / span > < span class = cF0 > & tmpg-> pmu.u< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF7 > )< / span > < span class = cF0 > + < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CD3I32< / span > < span class = cF7 > )< / span > < span class = cF0 > * tmpg-> pmu.vertex_count);
< a name = "l260" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (p);
< a name = "l261" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > )
< a name = "l262" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l263" > < / a > dc-> x -= tmpg-> pmu.x;
< a name = "l264" > < / a > dc-> y -= tmpg-> pmu.y;
< a name = "l265" > < / a > dc-> z -= tmpg-> pmu.z;
< a name = "l266" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l267" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l268" > < / a > }
< a name = "l269" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (just_one_elem)
< a name = "l270" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l271" > < / a > tmpg(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *) += < / span > < span class = cF5 > SpriteElemSize< / span > < span class = cF0 > (tmpg);
< a name = "l272" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l273" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& dc-> sym, & old_sym, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CGrSym< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l274" > < / a > dc-> color = old_color;
< a name = "l275" > < / a > dc-> thick = old_pen_width;
< a name = "l276" > < / a > dc-> flags = dc-> flags & ~(< / span > < span class = cF3 > DCF_SYMMETRY< / span > < span class = cF0 > | < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ) | old_flags & (< / span > < span class = cF3 > DCF_SYMMETRY< / span > < span class = cF0 > | < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l277" > < / a > }
< a name = "l278" > < / a >
< a name = "l279" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3B< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems)
< a name = "l280" > < / a > {< / span > < span class = cF2 > //Plot a sprite into a CDC, post transform xyz translation.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l281" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > old_x = dc-> x, old_y = dc-> y, old_z = dc-> z, old_flags = dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l282" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l283" > < / a > dc-> x = x;
< a name = "l284" > < / a > dc-> y = y;
< a name = "l285" > < / a > dc-> z = z;
< a name = "l286" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l287" > < / a > < / span > < span class = cF5 > Sprite3< / 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 > , elems);
< a name = "l288" > < / a > dc-> x = old_x;
< a name = "l289" > < / a > dc-> y = old_y;
< a name = "l290" > < / a > dc-> z = old_z;
< a name = "l291" > < / a > dc-> flags = dc-> flags & ~< / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > | old_flags;
2021-07-03 05:07:57 +01:00
< a name = "l292" > < / a > }
< a name = "l293" > < / a >
< a name = "l294" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3Mat4x4B< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *m)
< a name = "l295" > < / a > {< / span > < span class = cF2 > //Plot rotated by matrix.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l296" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > r[< / span > < span class = cFE > 16< / span > < span class = cF0 > ], *old_r = dc-> r, new_m[< / span > < span class = cFE > 16< / span > < span class = cF0 > ], old_flags = dc-> flags & < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l297" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l298" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (new_m, m, < / span > < span class = cFE > 16< / span > < span class = cF0 > * < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > I64< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l299" > < / a > dc-> flags |= < / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > ;
< a name = "l300" > < / a > < / span > < span class = cF5 > Mat4x4TranslationAdd< / span > < span class = cF0 > (new_m, x, y, z);
< a name = "l301" > < / a > dc-> r=< / span > < span class = cF5 > Mat4x4MulMat4x4Equ< / span > < span class = cF0 > (r, old_r, new_m);
< a name = "l302" > < / a > < / span > < span class = cF5 > Sprite3< / 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 > , elems);
< a name = "l303" > < / a > dc-> r = old_r;
< a name = "l304" > < / a > dc-> flags = dc-> flags & ~< / span > < span class = cF3 > DCF_TRANSFORMATION< / span > < span class = cF0 > | old_flags;
2021-07-03 05:07:57 +01:00
< a name = "l305" > < / a > }
< a name = "l306" > < / a >
< a name = "l307" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3XB< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > F64< / span > < span class = cF0 > phi=< / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l308" > < / a > {< / span > < span class = cF2 > //Plot rotated around X axis.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l309" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > r[< / span > < span class = cFE > 16< / span > < span class = cF0 > ];
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 = cF5 > Mat4x4IdentEqu< / span > < span class = cF0 > (r);
< a name = "l312" > < / a > < / span > < span class = cF5 > Mat4x4RotX< / span > < span class = cF0 > (r, phi);
< a name = "l313" > < / a > < / span > < span class = cF5 > Sprite3Mat4x4B< / span > < span class = cF0 > (dc, x, y, z, elems, r);
2021-07-03 05:07:57 +01:00
< a name = "l314" > < / a > }
< a name = "l315" > < / a >
< a name = "l316" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3YB< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > F64< / span > < span class = cF0 > omega=< / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l317" > < / a > {< / span > < span class = cF2 > //Plot rotated around Y axis.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l318" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > r[< / span > < span class = cFE > 16< / span > < span class = cF0 > ];
2021-07-03 05:07:57 +01:00
< a name = "l319" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l320" > < / a > < / span > < span class = cF5 > Mat4x4IdentEqu< / span > < span class = cF0 > (r);
< a name = "l321" > < / a > < / span > < span class = cF5 > Mat4x4RotY< / span > < span class = cF0 > (r, omega);
< a name = "l322" > < / a > < / span > < span class = cF5 > Sprite3Mat4x4B< / span > < span class = cF0 > (dc, x, y, z, elems, r);
2021-07-03 05:07:57 +01:00
< a name = "l323" > < / a > }
< a name = "l324" > < / a >
< a name = "l325" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > Sprite3ZB< / span > < span class = cF0 > (< / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc=< / span > < span class = cFB > gr< / span > < span class = cF0 > .dc, < / 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, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > F64< / span > < span class = cF0 > theta=< / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l326" > < / a > {< / span > < span class = cF2 > //Plot rotated around Z axis.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l327" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > r[< / span > < span class = cFE > 16< / span > < span class = cF0 > ];
2021-07-03 05:07:57 +01:00
< a name = "l328" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l329" > < / a > < / span > < span class = cF5 > Mat4x4IdentEqu< / span > < span class = cF0 > (r);
< a name = "l330" > < / a > < / span > < span class = cF5 > Mat4x4RotZ< / span > < span class = cF0 > (r, theta);
< a name = "l331" > < / a > < / span > < span class = cF5 > Sprite3Mat4x4B< / span > < span class = cF0 > (dc, x, y, z, elems, r);
2021-07-03 05:07:57 +01:00
< a name = "l332" > < / a > }
< a name = "l333" > < / a >
< a name = "l334" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > SpriteExtents< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *min_x=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > *max_x=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > *min_y=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > *max_y=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l335" > < / a > {< / span > < span class = cF2 > //Ignores flood fills.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l336" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *dc = < / span > < span class = cF5 > DCNew< / span > < span class = cF0 > (< / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > , < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > , < / span > < span class = cF5 > Fs< / span > < span class = cF0 > , < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l337" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l338" > < / a > < / span > < span class = cF5 > DCExtentsInit< / span > < span class = cF0 > (dc);
< a name = "l339" > < / a > < / span > < span class = cF5 > Sprite3< / span > < span class = cF0 > (dc, < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > , elems);
< a name = "l340" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> min_x < = dc-> max_x)
< a name = "l341" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l342" > < / a > dc-> min_x -= < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l343" > < / a > dc-> max_x -= < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l344" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l345" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (dc-> min_y < = dc-> max_y)
< a name = "l346" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l347" > < / a > dc-> min_y -= < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l348" > < / a > dc-> max_y -= < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > / < / span > < span class = cFE > 2< / span > < span class = cF0 > ;
< a name = "l349" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l350" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (min_x)
< a name = "l351" > < / a > *min_x = dc-> min_x;
< a name = "l352" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (max_x)
< a name = "l353" > < / a > *max_x = dc-> max_x;
< a name = "l354" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (min_y)
< a name = "l355" > < / a > *min_y = dc-> min_y;
< a name = "l356" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (max_y)
< a name = "l357" > < / a > *max_y = dc-> max_y;
< a name = "l358" > < / a > < / span > < span class = cF5 > DCDel< / span > < span class = cF0 > (dc);
2021-07-03 05:07:57 +01:00
< a name = "l359" > < / a > }
< a name = "l360" > < / a >
< a name = "l361" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *< / span > < span class = cF5 > Sprite2DC< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems)
< a name = "l362" > < / a > {< / span > < span class = cF2 > //Convert sprite to device context.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l363" > < / a > < / span > < span class = cF9 > CDC< / span > < span class = cF0 > *res;
< a name = "l364" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > min_x, max_x, min_y, max_y;
2021-07-03 05:07:57 +01:00
< a name = "l365" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l366" > < / a > < / span > < span class = cF5 > SpriteExtents< / span > < span class = cF0 > (elems, & min_x, & max_x, & min_y, & max_y);
< a name = "l367" > < / a > res = < / span > < span class = cF5 > DCNew< / span > < span class = cF0 > (max_x - min_x + < / span > < span class = cFE > 1< / span > < span class = cF0 > , max_y - min_y + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l368" > < / a > < / span > < span class = cF5 > Sprite3< / span > < span class = cF0 > (res, -min_x, -min_y, < / span > < span class = cFE > 0< / span > < span class = cF0 > , elems);
2021-07-03 05:07:57 +01:00
< a name = "l369" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l370" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l371" > < / a > }
< a name = "l372" > < / a >
< a name = "l373" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *< / span > < span class = cF5 > SpriteInterpolate< / span > < span class = cF0 > (< / span > < span class = cF1 > F64< / span > < span class = cF0 > t, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems0, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems1)
< a name = "l374" > < / a > {< / span > < span class = cF2 > //The two CSprite should be ident except for points shifted around.< / span > < span class = cF0 >
< a name = "l375" > < / a > < / span > < span class = cF2 > //t ranges from 0.0 to 1.0.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l376" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, t1 = < / span > < span class = cF3 > GR_SCALE< / span > < span class = cF0 > * t, t0 = < / span > < span class = cF3 > GR_SCALE< / span > < span class = cF0 > - t1;
< a name = "l377" > < / a > < / span > < span class = cF9 > I32< / span > < span class = cF0 > *ptr0, *ptr1, *ptrr;
< a name = "l378" > < / a > < / span > < span class = cF9 > CD3I32< / span > < span class = cF0 > *p0, *p1, *pr;
< a name = "l379" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *res;
< a name = "l380" > < / a > < / span > < span class = cF9 > CSprite< / span > < span class = cF0 > *tmpg0 = elems0 - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CSprite< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > ), *tmpg1 = elems1 - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CSprite< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > ), *tmpgr;
2021-07-03 05:07:57 +01:00
< a name = "l381" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l382" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (t < < / span > < span class = cFE > 0< / span > < span class = cF0 > .< / span > < span class = cFE > 5< / span > < span class = cF0 > )
< a name = "l383" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l384" > < / a > i = < / span > < span class = cF5 > SpriteSize< / span > < span class = cF0 > (elems0), res = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (i);
< a name = "l385" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (res, elems0, i);
< a name = "l386" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l387" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l388" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l389" > < / a > i = < / span > < span class = cF5 > SpriteSize< / span > < span class = cF0 > (elems1), res = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (i);
< a name = "l390" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (res, elems1, i);
< a name = "l391" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l392" > < / a > tmpgr = res - < / span > < span class = cF1 > offset< / span > < span class = cF0 > (< / span > < span class = cF9 > CSprite< / span > < span class = cF0 > .< / span > < span class = cF1 > start< / span > < span class = cF0 > );
< a name = "l393" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (tmpg0-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > )
< a name = "l394" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l395" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpg0-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > != tmpg1-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > )
< a name = "l396" > < / a > < / span > < span class = cF5 > throw< / span > < span class = cF0 > (< / span > < span class = cF6 > 'Graphics'< / span > < span class = cF0 > );
< a name = "l397" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (tmpg0-> type & < / span > < span class = cF3 > SPG_TYPE_MASK< / span > < span class = cF0 > )
< a name = "l398" > < / a > {
< a name = "l399" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ROTATED_RECT< / span > < span class = cF0 > :
< a name = "l400" > < / a > tmpgr-> ppa.angle = (tmpg0-> ppa.angle * t0 + tmpg1-> ppa.angle * t1) / < / span > < span class = cF3 > GR_SCALE< / span > < span class = cF0 > ;
< a name = "l401" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_RECT< / span > < span class = cF0 > :
< a name = "l402" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_LINE< / span > < span class = cF0 > :
< a name = "l403" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ARROW< / span > < span class = cF0 > :
< a name = "l404" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_PLANAR_SYMMETRY< / span > < span class = cF0 > :
< a name = "l405" > < / a > tmpgr-> pp.x2 = (tmpg0-> pp.x2 * t0 + tmpg1-> pp.x2 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l406" > < / a > tmpgr-> pp.y2 = (tmpg0-> pp.y2 * t0 + tmpg1-> pp.y2 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l407" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT< / span > < span class = cF0 > :
< a name = "l408" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT_BOX< / span > < span class = cF0 > :
< a name = "l409" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_TEXT_DIAMOND< / span > < span class = cF0 > :
< a name = "l410" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_PT< / span > < span class = cF0 > :
< a name = "l411" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_FLOOD_FILL< / span > < span class = cF0 > :
< a name = "l412" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_FLOOD_FILL_NOT< / span > < span class = cF0 > :
< a name = "l413" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_SHIFT< / span > < span class = cF0 > :
< a name = "l414" > < / a > tmpgr-> p.x1 = (tmpg0-> p.x1 * t0 + tmpg1-> p.x1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l415" > < / a > tmpgr-> p.y1 = (tmpg0-> p.y1 * t0 + tmpg1-> p.y1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l416" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l417" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l418" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_CIRCLE< / span > < span class = cF0 > :
< a name = "l419" > < / a > tmpgr-> pr.radius = (tmpg0-> pr.radius * t0 + tmpg1-> pr.radius * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l420" > < / a > tmpgr-> pr.x1 = (tmpg0-> pr.x1 * t0 + tmpg1-> pr.x1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l421" > < / a > tmpgr-> pr.y1 = (tmpg0-> pr.y1 * t0 + tmpg1-> pr.y1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l422" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l423" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l424" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_ELLIPSE< / span > < span class = cF0 > :
< a name = "l425" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYGON< / span > < span class = cF0 > :
< a name = "l426" > < / a > tmpgr-> pwha.x1 = (tmpg0-> pwha.x1 * t0 + tmpg1-> pwha.x1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l427" > < / a > tmpgr-> pwha.y1 = (tmpg0-> pwha.y1 * t0 + tmpg1-> pwha.y1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l428" > < / a > tmpgr-> pwha.width = (tmpg0-> pwha.width * t0 + tmpg1-> pwha.width * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l429" > < / a > tmpgr-> pwha.height = (tmpg0-> pwha.height * t0 + tmpg1-> pwha.height * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l430" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l431" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l432" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BITMAP< / span > < span class = cF0 > :
< a name = "l433" > < / a > tmpgr-> pwhu.x1 = (tmpg0-> pwhu.x1 * t0 + tmpg1-> pwhu.x1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l434" > < / a > tmpgr-> pwhu.y1 = (tmpg0-> pwhu.y1 * t0 + tmpg1-> pwhu.y1 * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l435" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l436" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l437" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYLINE< / span > < span class = cF0 > :
< a name = "l438" > < / a > ptr0 = & tmpg0-> nu.u;
< a name = "l439" > < / a > ptr1 = & tmpg1-> nu.u;
< a name = "l440" > < / a > ptrr = & tmpgr-> nu.u;
< a name = "l441" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg0-> nu.num; i++)
< a name = "l442" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l443" > < / a > ptrr[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > ] = (ptr0[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > ] * t0 + ptr1[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > ] * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l444" > < / a > ptrr[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > ] = (ptr0[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > ] * t0 + ptr1[i < < < / span > < span class = cFE > 1< / span > < span class = cF0 > + < / span > < span class = cFE > 1< / span > < span class = cF0 > ] * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l445" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l446" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l447" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l448" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_POLYPT< / span > < span class = cF0 > :
< a name = "l449" > < / a > tmpgr-> npu.x = (tmpg0-> npu.x * t0 + tmpg1-> npu.x * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l450" > < / a > tmpgr-> npu.y = (tmpg0-> npu.y * t0 + tmpg1-> npu.y * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l451" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l452" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l453" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE2< / span > < span class = cF0 > :
< a name = "l454" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE3< / span > < span class = cF0 > :
< a name = "l455" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE2_CLOSED< / span > < span class = cF0 > :
< a name = "l456" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_BSPLINE3_CLOSED< / span > < span class = cF0 > :
< a name = "l457" > < / a > p0 = & tmpg0-> nu.u;
< a name = "l458" > < / a > p1 = & tmpg1-> nu.u;
< a name = "l459" > < / a > pr = & tmpgr-> nu.u;
< a name = "l460" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg0-> nu.num; i++)
< a name = "l461" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l462" > < / a > pr[i].x = (p0[i].x * t0 + p1[i].x * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l463" > < / a > pr[i].y = (p0[i].y * t0 + p1[i].y * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l464" > < / a > pr[i].z = (p0[i].z * t0 + p1[i].z * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l465" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l466" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l467" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l468" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_MESH< / span > < span class = cF0 > :
< a name = "l469" > < / a > p0 = & tmpg0-> mu.u;
< a name = "l470" > < / a > p1 = & tmpg1-> mu.u;
< a name = "l471" > < / a > pr = & tmpgr-> mu.u;
< a name = "l472" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg0-> mu.vertex_count; i++)
< a name = "l473" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l474" > < / a > pr[i].x = (p0[i].x * t0 + p1[i].x * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l475" > < / a > pr[i].y = (p0[i].y * t0 + p1[i].y * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l476" > < / a > pr[i].z = (p0[i].z * t0 + p1[i].z * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l477" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l478" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l479" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l480" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > SPT_SHIFTABLE_MESH< / span > < span class = cF0 > :
< a name = "l481" > < / a > p0 = & tmpg0-> pmu.u;
< a name = "l482" > < / a > p1 = & tmpg1-> pmu.u;
< a name = "l483" > < / a > pr = & tmpgr-> pmu.u;
< a name = "l484" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < tmpg0-> pmu.vertex_count; i++)
< a name = "l485" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l486" > < / a > pr[i].x = (p0[i].x * t0 + p1[i].x * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l487" > < / a > pr[i].y = (p0[i].y * t0 + p1[i].y * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l488" > < / a > pr[i].z = (p0[i].z * t0 + p1[i].z * t1) > > < / span > < span class = cFE > 32< / span > < span class = cF0 > ;
< a name = "l489" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l490" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l491" > < / a > }
< a name = "l492" > < / a > tmpg0(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *) += < / span > < span class = cF5 > SpriteElemSize< / span > < span class = cF0 > (tmpg0);
< a name = "l493" > < / a > tmpg1(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *) += < / span > < span class = cF5 > SpriteElemSize< / span > < span class = cF0 > (tmpg1);
< a name = "l494" > < / a > tmpgr(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *) += < / span > < span class = cF5 > SpriteElemSize< / span > < span class = cF0 > (tmpgr);
< a name = "l495" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l496" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l497" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
2021-07-03 05:07:57 +01:00
< a name = "l498" > < / a > }
< a name = "l499" > < / a >
< a name = "l500" > < / a > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Graphics/Sprite;DolDoc/Output;StdOut/DolDoc" < / span > < span class = cF0 >
< a name = "l501" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *< / span > < span class = cF5 > DocSprite< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *format=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
2021-07-04 23:11:34 +01:00
< a name = "l502" > < / a > {< / span > < span class = cF2 > //Put a sprite into a document.< / span > < span class = cF0 > < / span > < span class = cF2 > You can, optionally, supply a format string< / span > < span class = cF0 >
2021-07-26 20:29:49 +01:00
< a name = "l503" > < / a > < / span > < span class = cF2 > //for < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/Doc/DolDocOverview.DD.html#l1" > < span class = cF4 > DolDoc< / span > < / a > < span class = cF2 > cmd with a %d for the bin_num.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l504" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > size;
< a name = "l505" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st;
< a name = "l506" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unlock;
< a name = "l507" > < / a > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *doc_e;
< a name = "l508" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *tmpb;
2021-07-03 05:07:57 +01:00
< a name = "l509" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l510" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!doc & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > doc = < / span > < span class = cF5 > DocPut< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l511" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l512" > < / a > unlock = < / span > < span class = cF5 > DocLock< / span > < span class = cF0 > (doc);
< a name = "l513" > < / a > size = < / span > < span class = cF5 > SpriteSize< / span > < span class = cF0 > (elems);
< a name = "l514" > < / a > tmpb = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CDocBin< / span > < span class = cF7 > )< / span > < span class = cF0 > , doc-> mem_task);
< a name = "l515" > < / a > tmpb-> size = size;
< a name = "l516" > < / a > tmpb-> data = < / span > < span class = cF5 > MAlloc< / span > < span class = cF0 > (size, doc-> mem_task);
< a name = "l517" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (tmpb-> data, elems, size);
< a name = "l518" > < / a > tmpb-> num = doc-> cur_bin_num;
< a name = "l519" > < / a > tmpb-> use_count = < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l520" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpb, doc-> bin_head.last);
< a name = "l521" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (format)
< a name = "l522" > < / a > st = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (format, doc-> cur_bin_num++);
< a name = "l523" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l524" > < / a > st = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " $SP,\" \" ,BI=%d$" < / span > < span class = cF0 > , doc-> cur_bin_num++);
< a name = "l525" > < / a > doc_e = < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , st);
< a name = "l526" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
< a name = "l527" > < / a > doc_e-> bin_data = tmpb;
< a name = "l528" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e & & doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_TAG< / span > < span class = cF0 > & & doc_e-> tag & & *doc_e-> tag)
< a name = "l529" > < / a > tmpb-> tag = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (doc_e-> tag, doc-> mem_task);
< a name = "l530" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unlock)
< a name = "l531" > < / a > < / span > < span class = cF5 > DocUnlock< / span > < span class = cF0 > (doc);
2021-07-03 05:07:57 +01:00
< a name = "l532" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l533" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > doc_e;
2021-07-03 05:07:57 +01:00
< a name = "l534" > < / a > }
< a name = "l535" > < / a >
< a name = "l536" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *< / span > < span class = cF5 > Sprite< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *elems, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *format=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
2021-07-26 20:29:49 +01:00
< a name = "l537" > < / a > {< / span > < span class = cF2 > //Put sprite to the command-line, < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocDblBuf.CC.html#l2" > < span class = cF4 > DocPut< / span > < / a > < span class = cF2 > .< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l538" > < / a > < / span > < span class = cF2 > //If you set format, then include dollars (" $SP ...$" ) and leave %d for num.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l539" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc;
2021-07-03 05:07:57 +01:00
< a name = "l540" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l541" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc = < / span > < span class = cF5 > DocPut< / span > < span class = cF0 > )
< a name = "l542" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF5 > DocSprite< / span > < span class = cF0 > (doc, elems, format);
2021-07-03 05:07:57 +01:00
< a name = "l543" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l544" > < / 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 = "l545" > < / a > }
< / span > < / pre > < / body >
< / html >