mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
22e3d8f06e
Remove some palettes. Add PaletteSetSlate. Change all gr_palette_std to gr32_palette_std. Change all CBGR48 to CBGR24.
1501 lines
162 KiB
HTML
Executable file
1501 lines
162 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V0.11">
|
|
<style type="text/css">
|
|
body {background-color:#fef1f0;}
|
|
.cF0{color:#000000;background-color:#fef1f0;}
|
|
.cF1{color:#0148a4;background-color:#fef1f0;}
|
|
.cF2{color:#3b7901;background-color:#fef1f0;}
|
|
.cF3{color:#057c7e;background-color:#fef1f0;}
|
|
.cF4{color:#bb2020;background-color:#fef1f0;}
|
|
.cF5{color:#9e42ae;background-color:#fef1f0;}
|
|
.cF6{color:#b57901;background-color:#fef1f0;}
|
|
.cF7{color:#b2b6af;background-color:#fef1f0;}
|
|
.cF8{color:#555753;background-color:#fef1f0;}
|
|
.cF9{color:#678fbb;background-color:#fef1f0;}
|
|
.cFA{color:#82bc49;background-color:#fef1f0;}
|
|
.cFB{color:#0097a2;background-color:#fef1f0;}
|
|
.cFC{color:#e26a6a;background-color:#fef1f0;}
|
|
.cFD{color:#c671bc;background-color:#fef1f0;}
|
|
.cFE{color:#c7ab00;background-color:#fef1f0;}
|
|
.cFF{color:#fef1f0;background-color:#fef1f0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<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>
|
|
<a name="l3"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>SPT_MENU</span><span class=cF0> -</span><span class=cFE>2</span><span class=cF0>
|
|
<a name="l4"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>SPT_INS_SCREEN_BITMAP</span><span class=cF0> -</span><span class=cFE>3</span><span class=cF0>
|
|
<a name="l5"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>SPT_INS_TRANSPARENT_SCREEN_BITMAP</span><span class=cF0> -</span><span class=cFE>4</span><span class=cF0>
|
|
<a name="l6"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>SPT_ED_MENU</span><span class=cF0> -</span><span class=cFE>5</span><span class=cF0>
|
|
<a name="l7"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>SPT_EXIT</span><span class=cF0> -</span><span class=cFE>6</span><span class=cF0>
|
|
<a name="l8"></a>
|
|
<a name="l9"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpSpriteMain</span><span class=cF0>(</span><span class=cF9>CSprite</span><span class=cF0> **_head, </span><span class=cF9>I64</span><span class=cF0> *_cur_elem_num, </span><span class=cF9>CDoc</span><span class=cF0> *_doc, </span><span class=cF9>CDocEntry</span><span class=cF0> *_doc_e)
|
|
<a name="l10"></a>{
|
|
<a name="l11"></a> </span><span class=cF9>CTask</span><span class=cF0> *pu_task;
|
|
<a name="l12"></a> </span><span class=cF9>I64</span><span class=cF0> res;
|
|
<a name="l13"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l14"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_de;
|
|
<a name="l15"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l16"></a>
|
|
<a name="l17"></a> doc_de = </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
|
|
<a name="l18"></a> </span><span class=cF6>"$PURPLE$$TX+CX,\"Sprite Main Menu\"$\n"</span><span class=cF0>
|
|
<a name="l19"></a> </span><span class=cF6>"$LK+PU+CX,\"Click for Help\",A=\"FI:::/Doc/SpriteMain.DD\"$\n"</span><span class=cF0>
|
|
<a name="l20"></a> </span><span class=cF6>"\n$LTBLUE$$DA+M,A=\"Tag Text:%%s\"$\n\n"</span><span class=cF0>);
|
|
<a name="l21"></a> doc_de->data = </span><span class=cF5>StrNew</span><span class=cF0>(_doc_e->tag, doc->mem_task);
|
|
<a name="l22"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc,doc_de);
|
|
<a name="l23"></a>
|
|
<a name="l24"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
|
|
<a name="l25"></a> </span><span class=cF6>"$MU-UL,\"Color (4-bit)\",LE=SPT_COLOR$\n"</span><span class=cF0>
|
|
<a name="l26"></a> </span><span class=cF6>"$MU-UL,\"Dither Color (4-bit)\",LE=SPT_DITHER_COLOR$\n"</span><span class=cF0>
|
|
<a name="l27"></a> </span><span class=cF6>"$MU-UL,\"Thick\",LE=SPT_THICK$\n"</span><span class=cF0>
|
|
<a name="l28"></a> </span><span class=cF6>"$MU-UL,\"Planar Symmetry\",LE=SPT_PLANAR_SYMMETRY$\n"</span><span class=cF0>
|
|
<a name="l29"></a> </span><span class=cF6>"\n$MU-UL,\"Point\",LE=SPT_PT$\n"</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF6>"$MU-UL,\"Line\",LE=SPT_LINE$\n"</span><span class=cF0>
|
|
<a name="l31"></a> </span><span class=cF6>"$MU-UL,\"Arrow\",LE=SPT_ARROW$\n"</span><span class=cF0>
|
|
<a name="l32"></a> </span><span class=cF6>"$MU-UL,\"Rect\",LE=SPT_RECT$\n"</span><span class=cF0>
|
|
<a name="l33"></a> </span><span class=cF6>"$MU-UL,\"Circle\",LE=SPT_CIRCLE$\n"</span><span class=cF0>
|
|
<a name="l34"></a> </span><span class=cF6>"$MU-UL,\"Ellipse\",LE=SPT_ELLIPSE$\n"</span><span class=cF0>
|
|
<a name="l35"></a> </span><span class=cF6>"$MU-UL,\"Polygon\",LE=SPT_POLYGON$\n"</span><span class=cF0>
|
|
<a name="l36"></a> </span><span class=cF6>"$MU-UL,\"Text\",LE=SPT_TEXT$\n"</span><span class=cF0>
|
|
<a name="l37"></a> </span><span class=cF6>"$MU-UL,\"Text Box\",LE=SPT_TEXT_BOX$\n"</span><span class=cF0>
|
|
<a name="l38"></a> </span><span class=cF6>"$MU-UL,\"Text Diamond\",LE=SPT_TEXT_DIAMOND$\n"</span><span class=cF0>
|
|
<a name="l39"></a> </span><span class=cF6>"$MU-UL,\"Flood Fill\",LE=SPT_FLOOD_FILL$\n"</span><span class=cF0>
|
|
<a name="l40"></a> </span><span class=cF6>"$MU-UL,\"Flood Fill Not Color\",LE=SPT_FLOOD_FILL_NOT$\n"</span><span class=cF0>
|
|
<a name="l41"></a> </span><span class=cF6>"$MU-UL,\"PolyLine\",LE=SPT_POLYLINE$\n"</span><span class=cF0>
|
|
<a name="l42"></a> </span><span class=cF6>"$MU-UL,\"PolyPoint\",LE=SPT_POLYPT$\n"</span><span class=cF0>
|
|
<a name="l43"></a> </span><span class=cF6>"$MU-UL,\"BSpline2\",LE=SPT_BSPLINE2$\n"</span><span class=cF0>
|
|
<a name="l44"></a> </span><span class=cF6>"$MU-UL,\"BSpline3\",LE=SPT_BSPLINE3$\n"</span><span class=cF0>
|
|
<a name="l45"></a> </span><span class=cF6>"$MU-UL,\"BSpline2 Closed\",LE=SPT_BSPLINE2_CLOSED$\n"</span><span class=cF0>
|
|
<a name="l46"></a> </span><span class=cF6>"$MU-UL,\"BSpline3 Closed\",LE=SPT_BSPLINE3_CLOSED$\n"</span><span class=cF0>
|
|
<a name="l47"></a> </span><span class=cF6>"$MU-UL,\"Insert Screen-Captured BitMap\",LE=SPT_INS_SCREEN_BITMAP$\n"</span><span class=cF0>
|
|
<a name="l48"></a> </span><span class=cF6>"$MU-UL,\"Insert Transparent Screen-Captured BitMap\","</span><span class=cF0>
|
|
<a name="l49"></a> </span><span class=cF6>"LE=SPT_INS_TRANSPARENT_SCREEN_BITMAP$\n"</span><span class=cF0>
|
|
<a name="l50"></a> </span><span class=cF6>"$PURPLE$$MU-UL,\"+] Create or Edit 3D Mesh\",LE=SPT_MESH$\n"</span><span class=cF0>
|
|
<a name="l51"></a> </span><span class=cF6>"$MU-UL,\"+] Create or Edit Shiftable 3D Mesh\","</span><span class=cF0>
|
|
<a name="l52"></a> </span><span class=cF6>"LE=SPT_SHIFTABLE_MESH$\n"</span><span class=cF0>
|
|
<a name="l53"></a> </span><span class=cF6>"$MU-UL,\"+] Convert to BitMap or Edit BitMap\","</span><span class=cF0>
|
|
<a name="l54"></a> </span><span class=cF6>"LE=SPT_BITMAP$$LTBLUE$\n"</span><span class=cF0>
|
|
<a name="l55"></a> </span><span class=cF6>"\n$MU-UL,\"Transform On (for use with 3D icons)\","</span><span class=cF0>
|
|
<a name="l56"></a> </span><span class=cF6>"LE=SPT_TRANSFORM_ON$\n"</span><span class=cF0>
|
|
<a name="l57"></a> </span><span class=cF6>"$MU-UL,\"Transform Off (for use with 3D icons)\","</span><span class=cF0>
|
|
<a name="l58"></a> </span><span class=cF6>"LE=SPT_TRANSFORM_OFF$\n"</span><span class=cF0>
|
|
<a name="l59"></a> </span><span class=cF6>"\n"</span><span class=cF0>
|
|
<a name="l60"></a> </span><span class=cF6>"$PURPLE$$MU-UL,\"+] Sprite Edit Menu\",LE=SPT_ED_MENU$$LTBLUE$\n"</span><span class=cF0>
|
|
<a name="l61"></a> </span><span class=cF6>"$MU-UL,\"Exit Sprite\",LE=SPT_EXIT$\n"</span><span class=cF0>
|
|
<a name="l62"></a> </span><span class=cF6>"$MU-UL,\"Abort Sprite\",LE=DOCM_CANCEL$\n"</span><span class=cF0>
|
|
<a name="l63"></a> </span><span class=cF6>"\nRight-Click to get back to this menu."</span><span class=cF0>);
|
|
<a name="l64"></a>
|
|
<a name="l65"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"SpriteSideBarTask(0x%X,0x%X,0x%X);"</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>, _head, _cur_elem_num);
|
|
<a name="l66"></a> </span><span class=cF5>PopUp</span><span class=cF0>(st, </span><span class=cF3>NULL</span><span class=cF0>, &pu_task);
|
|
<a name="l67"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l68"></a> res = </span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
|
|
<a name="l69"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>pu_task</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l70"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l71"></a> *_head = </span><span class=cF5>SpriteSideBar2SpriteQueue</span><span class=cF0>(</span><span class=cF5>DocPut</span><span class=cF7>(</span><span class=cF0>pu_task</span><span class=cF7>)</span><span class=cF0>, *_head, _cur_elem_num);
|
|
<a name="l72"></a> </span><span class=cF5>Kill</span><span class=cF0>(pu_task);
|
|
<a name="l73"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l74"></a> </span><span class=cF5>Free</span><span class=cF0>(_doc_e->tag);
|
|
<a name="l75"></a> _doc_e->tag = </span><span class=cF5>StrNew</span><span class=cF0>(doc_de->data, _doc->mem_task);
|
|
<a name="l76"></a> _doc->cur_col = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l77"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l78"></a>
|
|
<a name="l79"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l80"></a>}
|
|
<a name="l81"></a>
|
|
<a name="l82"></a></span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>PopUpExtents</span><span class=cF0>(</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="l83"></a>{
|
|
<a name="l84"></a> </span><span class=cF9>I64</span><span class=cF0> res;
|
|
<a name="l85"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l86"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
|
|
<a name="l87"></a>
|
|
<a name="l88"></a> doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>" $DA,A=\"x1:%%d\"$\n"</span><span class=cF0>);
|
|
<a name="l89"></a> doc_e->data = _x1;
|
|
<a name="l90"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc, doc_e);
|
|
<a name="l91"></a> doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>" $DA,A=\"x2:%%d\"$\n"</span><span class=cF0>);
|
|
<a name="l92"></a> doc_e->data = _x2;
|
|
<a name="l93"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc, doc_e);
|
|
<a name="l94"></a> doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>" $DA,A=\"y1:%%d\"$\n"</span><span class=cF0>);
|
|
<a name="l95"></a> doc_e->data = _y1;
|
|
<a name="l96"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc, doc_e);
|
|
<a name="l97"></a> doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>" $DA,A=\"y2:%%d\"$\n\n"</span><span class=cF0>);
|
|
<a name="l98"></a> doc_e->data = _y2;
|
|
<a name="l99"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc, doc_e);
|
|
<a name="l100"></a>
|
|
<a name="l101"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>" $BT,\"Use These Extents\",LE=TRUE$"</span><span class=cF0>);
|
|
<a name="l102"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$CM,3,0$$BT,\"Drag-Out New Extents\",LE=FALSE$\n\n"</span><span class=cF0>);
|
|
<a name="l103"></a>
|
|
<a name="l104"></a> </span><span class=cF1>do</span><span class=cF0> res = </span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
|
|
<a name="l105"></a> </span><span class=cF1>while</span><span class=cF0> (res != </span><span class=cF3>FALSE</span><span class=cF0> && res != </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l106"></a>
|
|
<a name="l107"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l108"></a>
|
|
<a name="l109"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l110"></a>}
|
|
<a name="l111"></a>
|
|
<a name="l112"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF9>I64</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0>)
|
|
<a name="l113"></a>{ </span><span class=cF2>//Uses </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/Lectures/FixedPoint.CC.html#l1"><span class=cF4>fixed-point</span></a><span class=cF2>.</span><span class=cF0>
|
|
<a name="l114"></a> </span><span class=cF9>I64</span><span class=cF0> xx, yy, old_pen_width = dc->thick;
|
|
<a name="l115"></a> </span><span class=cF9>CColorROPU32</span><span class=cF0> old_color = dc->color;
|
|
<a name="l116"></a>
|
|
<a name="l117"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
|
|
<a name="l118"></a> </span><span class=cF5>DCFill</span><span class=cF0>(dc);
|
|
<a name="l119"></a> </span><span class=cF1>if</span><span class=cF0> (dc->flags & </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>)
|
|
<a name="l120"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l121"></a> dc->flags &= ~</span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
|
|
<a name="l122"></a> dc->thick = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l123"></a> xx = dc->sym.sny * </span><span class=cFE>8192</span><span class=cF0>;
|
|
<a name="l124"></a> yy = -dc->sym.snx * </span><span class=cFE>8192</span><span class=cF0>;
|
|
<a name="l125"></a> dc->color = </span><span class=cF3>RED</span><span class=cF0>;
|
|
<a name="l126"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc,
|
|
<a name="l127"></a> dc->sym.sx - xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy - yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, dc->sym.sx + xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy + yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>3</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l128"></a> dc->color = </span><span class=cF3>WHITE</span><span class=cF0>;
|
|
<a name="l129"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc,
|
|
<a name="l130"></a> dc->sym.sx - xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy - yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, dc->sym.sx + xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy + yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>3</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l131"></a> dc->color = </span><span class=cF3>BLACK</span><span class=cF0>;
|
|
<a name="l132"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc,
|
|
<a name="l133"></a> dc->sym.sx - xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy - yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, dc->sym.sx + xx.i32[</span><span class=cFE>1</span><span class=cF0>], dc->sym.sy + yy.i32[</span><span class=cFE>1</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>3</span><span class=cF0>, </span><span class=cFE>2</span><span class=cF0>);
|
|
<a name="l134"></a> dc->flags |= </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
|
|
<a name="l135"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l136"></a> dc->color = old_color;
|
|
<a name="l137"></a> dc->thick = old_pen_width;
|
|
<a name="l138"></a>}
|
|
<a name="l139"></a>
|
|
<a name="l140"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMLine</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1,</span><span class=cF9>I64</span><span class=cF0> arg2,</span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l141"></a>{
|
|
<a name="l142"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l143"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l144"></a>
|
|
<a name="l145"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l146"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l147"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l148"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l149"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l150"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l151"></a> x2 = arg1;
|
|
<a name="l152"></a> y2 = arg2;
|
|
<a name="l153"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l154"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l155"></a>
|
|
<a name="l156"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l157"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l158"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_LINE</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l159"></a> res->type = </span><span class=cF3>SPT_LINE</span><span class=cF0>;
|
|
<a name="l160"></a> res->pp.x1 = x1 - x;
|
|
<a name="l161"></a> res->pp.y1 = y1 - y;
|
|
<a name="l162"></a> res->pp.x2 = x2 - x;
|
|
<a name="l163"></a> res->pp.y2 = y2 - y;
|
|
<a name="l164"></a>
|
|
<a name="l165"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l166"></a>}
|
|
<a name="l167"></a>
|
|
<a name="l168"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMArrow</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l169"></a>{
|
|
<a name="l170"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l171"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l172"></a>
|
|
<a name="l173"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l174"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l175"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l176"></a> </span><span class=cF5>GrArrow3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l177"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l178"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l179"></a> x2 = arg1;
|
|
<a name="l180"></a> y2 = arg2;
|
|
<a name="l181"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l182"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l183"></a>
|
|
<a name="l184"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l185"></a> </span><span class=cF5>GrArrow3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l186"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_ARROW</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l187"></a> res->type = </span><span class=cF3>SPT_ARROW</span><span class=cF0>;
|
|
<a name="l188"></a> res->pp.x1 = x1 - x;
|
|
<a name="l189"></a> res->pp.y1 = y1 - y;
|
|
<a name="l190"></a> res->pp.x2 = x2 - x;
|
|
<a name="l191"></a> res->pp.y2 = y2 - y;
|
|
<a name="l192"></a>
|
|
<a name="l193"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l194"></a>}
|
|
<a name="l195"></a>
|
|
<a name="l196"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMPlanarSymmetry</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2)
|
|
<a name="l197"></a>{
|
|
<a name="l198"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2, old_width, old_flags;
|
|
<a name="l199"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l200"></a>
|
|
<a name="l201"></a> old_width = dc->thick;
|
|
<a name="l202"></a> old_flags = dc->flags;
|
|
<a name="l203"></a> dc->flags &= ~</span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
|
|
<a name="l204"></a> dc->thick = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l205"></a>
|
|
<a name="l206"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l207"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l208"></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="l209"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l210"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l211"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l212"></a> x2 = arg1;
|
|
<a name="l213"></a> y2 = arg2;
|
|
<a name="l214"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l215"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l216"></a>
|
|
<a name="l217"></a> dc->flags = old_flags & </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0> | dc->flags & ~</span><span class=cF3>DCF_SYMMETRY</span><span class=cF0>;
|
|
<a name="l218"></a> dc->thick = old_width;
|
|
<a name="l219"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l220"></a> res->type = </span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF0>;
|
|
<a name="l221"></a> res->pp.x1 = x1 - x;
|
|
<a name="l222"></a> res->pp.y1 = y1 - y;
|
|
<a name="l223"></a> res->pp.x2 = x2 - x;
|
|
<a name="l224"></a> res->pp.y2 = y2 - y;
|
|
<a name="l225"></a>
|
|
<a name="l226"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l227"></a>}
|
|
<a name="l228"></a>
|
|
<a name="l229"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMRect</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l230"></a>{
|
|
<a name="l231"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2, xx1 = arg1, yy1 = arg2, xx2 = arg1, yy2 = arg2;
|
|
<a name="l232"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l233"></a>
|
|
<a name="l234"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l235"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l236"></a> dc->color = color&</span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l237"></a> </span><span class=cF5>GrRect3</span><span class=cF0>(dc, xx1, yy1, </span><span class=cFE>0</span><span class=cF0>, xx2 - xx1, yy2 - yy1);
|
|
<a name="l238"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l239"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l240"></a> x2 = arg1;
|
|
<a name="l241"></a> y2 = arg2;
|
|
<a name="l242"></a> </span><span class=cF1>if</span><span class=cF0> (x2 < x1)
|
|
<a name="l243"></a> {
|
|
<a name="l244"></a> xx1 = x2;
|
|
<a name="l245"></a> xx2 = x1;
|
|
<a name="l246"></a> }
|
|
<a name="l247"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l248"></a> {
|
|
<a name="l249"></a> xx1 = x1;
|
|
<a name="l250"></a> xx2 = x2;
|
|
<a name="l251"></a> }
|
|
<a name="l252"></a> </span><span class=cF1>if</span><span class=cF0> (y2 < y1)
|
|
<a name="l253"></a> {
|
|
<a name="l254"></a> yy1 = y2;
|
|
<a name="l255"></a> yy2 = y1;
|
|
<a name="l256"></a> }
|
|
<a name="l257"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l258"></a> {
|
|
<a name="l259"></a> yy1 = y1;
|
|
<a name="l260"></a> yy2 = y2;
|
|
<a name="l261"></a> }
|
|
<a name="l262"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l263"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l264"></a>
|
|
<a name="l265"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l266"></a> </span><span class=cF5>GrRect3</span><span class=cF0>(dc, xx1, yy1, </span><span class=cFE>0</span><span class=cF0>, xx2 - xx1, yy2 - yy1);
|
|
<a name="l267"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_RECT</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l268"></a> res->type = </span><span class=cF3>SPT_RECT</span><span class=cF0>;
|
|
<a name="l269"></a> res->pp.x1 = xx1 - x;
|
|
<a name="l270"></a> res->pp.y1 = yy1 - y;
|
|
<a name="l271"></a> res->pp.x2 = xx2 - x;
|
|
<a name="l272"></a> res->pp.y2 = yy2 - y;
|
|
<a name="l273"></a>
|
|
<a name="l274"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l275"></a>}
|
|
<a name="l276"></a>
|
|
<a name="l277"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMScreenBitMap</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> eletype, </span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF9>CDC</span><span class=cF0> *dc2, </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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> bm_bkcolor)
|
|
<a name="l278"></a>{
|
|
<a name="l279"></a> </span><span class=cF9>I64</span><span class=cF0> i, message_code,
|
|
<a name="l280"></a> x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2, xx1 = arg1, yy1 = arg2, xx2 = arg1, yy2 = arg2, old_width;
|
|
<a name="l281"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc3, *img;
|
|
<a name="l282"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l283"></a>
|
|
<a name="l284"></a> old_width = dc2->thick;
|
|
<a name="l285"></a> dc2->thick = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l286"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l287"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l288"></a> dc2->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="l289"></a> </span><span class=cF5>GrBorder</span><span class=cF0>(dc2,
|
|
<a name="l290"></a> xx1 + </span><span class=cF5>Fs</span><span class=cF0>->pix_left + </span><span class=cF5>Fs</span><span class=cF0>->scroll_x,
|
|
<a name="l291"></a> yy1 + </span><span class=cF5>Fs</span><span class=cF0>->pix_top + </span><span class=cF5>Fs</span><span class=cF0>->scroll_y,
|
|
<a name="l292"></a> xx2 + </span><span class=cF5>Fs</span><span class=cF0>->pix_left + </span><span class=cF5>Fs</span><span class=cF0>->scroll_x,
|
|
<a name="l293"></a> yy2 + </span><span class=cF5>Fs</span><span class=cF0>->pix_top + </span><span class=cF5>Fs</span><span class=cF0>->scroll_y);
|
|
<a name="l294"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l295"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l296"></a> x2 = arg1;
|
|
<a name="l297"></a> y2 = arg2;
|
|
<a name="l298"></a> </span><span class=cF1>if</span><span class=cF0> (x2 < x1)
|
|
<a name="l299"></a> {
|
|
<a name="l300"></a> xx1 = x2;
|
|
<a name="l301"></a> xx2 = x1;
|
|
<a name="l302"></a> }
|
|
<a name="l303"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l304"></a> {
|
|
<a name="l305"></a> xx1 = x1;
|
|
<a name="l306"></a> xx2 = x2;
|
|
<a name="l307"></a> }
|
|
<a name="l308"></a> </span><span class=cF1>if</span><span class=cF0> (y2 < y1)
|
|
<a name="l309"></a> {
|
|
<a name="l310"></a> yy1 = y2;
|
|
<a name="l311"></a> yy2 = y1;
|
|
<a name="l312"></a> }
|
|
<a name="l313"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l314"></a> {
|
|
<a name="l315"></a> yy1 = y1;
|
|
<a name="l316"></a> yy2 = y2;
|
|
<a name="l317"></a> }
|
|
<a name="l318"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l319"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l320"></a>
|
|
<a name="l321"></a> xx2++;
|
|
<a name="l322"></a> yy2++;
|
|
<a name="l323"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_BITMAP</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l324"></a> res->type = </span><span class=cF3>SPT_BITMAP</span><span class=cF0>;
|
|
<a name="l325"></a> res->pwhu.width = xx2 - xx1;
|
|
<a name="l326"></a> res->pwhu.height = yy2 - yy1;
|
|
<a name="l327"></a> res->pwhu.x1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l328"></a> res->pwhu.y1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l329"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l330"></a> i = </span><span class=cFB>gr</span><span class=cF0>.screen_zoom;
|
|
<a name="l331"></a> </span><span class=cF5>GrScaleZoom</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> / i);
|
|
<a name="l332"></a> </span><span class=cF5>Refresh</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l333"></a>
|
|
<a name="l334"></a> dc3 = </span><span class=cF5>DCScreenCapture</span><span class=cF0>;
|
|
<a name="l335"></a> img = </span><span class=cF5>DCExt</span><span class=cF0>(dc3,
|
|
<a name="l336"></a> </span><span class=cF5>Fs</span><span class=cF0>->pix_left + </span><span class=cF5>Fs</span><span class=cF0>->scroll_x + xx1,
|
|
<a name="l337"></a> </span><span class=cF5>Fs</span><span class=cF0>->pix_top + </span><span class=cF5>Fs</span><span class=cF0>->scroll_y + yy1,
|
|
<a name="l338"></a> </span><span class=cF5>Fs</span><span class=cF0>->pix_left + </span><span class=cF5>Fs</span><span class=cF0>->scroll_x + xx2 - </span><span class=cFE>1</span><span class=cF0>,
|
|
<a name="l339"></a> </span><span class=cF5>Fs</span><span class=cF0>->pix_top + </span><span class=cF5>Fs</span><span class=cF0>->scroll_y + yy2 - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l340"></a> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>SPT_INS_TRANSPARENT_SCREEN_BITMAP</span><span class=cF0>)
|
|
<a name="l341"></a> </span><span class=cF5>DCColorChange</span><span class=cF0>(img, bm_bkcolor);
|
|
<a name="l342"></a> </span><span class=cF5>GrScaleZoom</span><span class=cF0>(i);
|
|
<a name="l343"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&res->pwhu.u, img->body, </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l344"></a> </span><span class=cF5>DCDel</span><span class=cF0>(img);
|
|
<a name="l345"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc3);
|
|
<a name="l346"></a> dc2->thick = old_width;
|
|
<a name="l347"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = </span><span class=cF3>WIG_TASK_DEFAULT</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_GRAB_SCROLL</span><span class=cF0>;
|
|
<a name="l348"></a>
|
|
<a name="l349"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l350"></a>}
|
|
<a name="l351"></a>
|
|
<a name="l352"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMCircle</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l353"></a>{
|
|
<a name="l354"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l355"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l356"></a>
|
|
<a name="l357"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l358"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l359"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l360"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF5>Sqrt</span><span class=cF7>(</span><span class=cF5>SqrI64</span><span class=cF0>(x1 - x2) + </span><span class=cF5>SqrI64</span><span class=cF0>(y1 - y2)</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l361"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l362"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l363"></a> x2 = arg1;
|
|
<a name="l364"></a> y2 = arg2;
|
|
<a name="l365"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l366"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l367"></a>
|
|
<a name="l368"></a> dc->color = color&</span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l369"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF5>Sqrt</span><span class=cF7>(</span><span class=cF5>SqrI64</span><span class=cF0>(x1-x2)+</span><span class=cF5>SqrI64</span><span class=cF0>(y1-y2)</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l370"></a> res=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_CIRCLE</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l371"></a> res->type = </span><span class=cF3>SPT_CIRCLE</span><span class=cF0>;
|
|
<a name="l372"></a> res->pr.x1 = x1 - x;
|
|
<a name="l373"></a> res->pr.y1 = y1 - y;
|
|
<a name="l374"></a> res->pr.radius = </span><span class=cF5>Sqrt</span><span class=cF0>(</span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x1 - x2</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y1 - y2</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l375"></a>
|
|
<a name="l376"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l377"></a>}
|
|
<a name="l378"></a>
|
|
<a name="l379"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMEllipse</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l380"></a>{
|
|
<a name="l381"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l382"></a> </span><span class=cF1>F64</span><span class=cF0> angle1, angle2;
|
|
<a name="l383"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l384"></a>
|
|
<a name="l385"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l386"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l387"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l388"></a> </span><span class=cF5>GrEllipse3</span><span class=cF0>(dc, </span><span class=cF7>(</span><span class=cF0>x1 + x2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF7>(</span><span class=cF0>y1 + y2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>x1 - x2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>y1 - y2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l389"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l390"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l391"></a> x2 = arg1;
|
|
<a name="l392"></a> y2 = arg2;
|
|
<a name="l393"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l394"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l395"></a>
|
|
<a name="l396"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_ELLIPSE</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l397"></a> res->type = </span><span class=cF3>SPT_ELLIPSE</span><span class=cF0>;
|
|
<a name="l398"></a> res->pwha.x1 = (x1 + x2) >> </span><span class=cFE>1</span><span class=cF0> - x;
|
|
<a name="l399"></a> res->pwha.y1 = (y1 + y2) >> </span><span class=cFE>1</span><span class=cF0> - y;
|
|
<a name="l400"></a> res->pwha.width = </span><span class=cF5>AbsI64</span><span class=cF0>(x1 - x2) >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l401"></a> res->pwha.height = </span><span class=cF5>AbsI64</span><span class=cF0>(y1 - y2) >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l402"></a> angle2 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l403"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwha.width < res->pwha.height)
|
|
<a name="l404"></a> angle2 -= </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l405"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l406"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l407"></a> angle1 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l408"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwha.width >= res->pwha.height)
|
|
<a name="l409"></a> res->pwha.angle = -(angle1 - angle2);
|
|
<a name="l410"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l411"></a> res->pwha.angle = -(angle1-angle2) + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l412"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l413"></a> </span><span class=cF5>GrEllipse3</span><span class=cF0>(dc, res->pwha.x1 + x, res->pwha.y1 + y, </span><span class=cFE>0</span><span class=cF0>, res->pwha.width, res->pwha.height, res->pwha.angle);
|
|
<a name="l414"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l415"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l416"></a> x2 = arg1;
|
|
<a name="l417"></a> y2 = arg2;
|
|
<a name="l418"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l419"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l420"></a>
|
|
<a name="l421"></a> angle1 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwha.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l422"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwha.width >= res->pwha.height)
|
|
<a name="l423"></a> res->pwha.angle = -(angle1 - angle2);
|
|
<a name="l424"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l425"></a> res->pwha.angle = -(angle1 - angle2) + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l426"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l427"></a> </span><span class=cF5>GrEllipse3</span><span class=cF0>(dc, res->pwha.x1 + x, res->pwha.y1 + y, </span><span class=cFE>0</span><span class=cF0>, res->pwha.width, res->pwha.height, res->pwha.angle);
|
|
<a name="l428"></a>
|
|
<a name="l429"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l430"></a>}
|
|
<a name="l431"></a>
|
|
<a name="l432"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMPolygon</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>I64</span><span class=cF0> sides, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l433"></a>{
|
|
<a name="l434"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l435"></a> </span><span class=cF1>F64</span><span class=cF0> angle1, angle2;
|
|
<a name="l436"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res;
|
|
<a name="l437"></a>
|
|
<a name="l438"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l439"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l440"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l441"></a> </span><span class=cF5>GrRegPoly3</span><span class=cF0>(dc, </span><span class=cF7>(</span><span class=cF0>x1 + x2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF7>(</span><span class=cF0>y1 + y2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>x1 - x2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>y1 - y2</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>1</span><span class=cF0>, sides);
|
|
<a name="l442"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l443"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l444"></a> x2 = arg1;
|
|
<a name="l445"></a> y2 = arg2;
|
|
<a name="l446"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l447"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l448"></a>
|
|
<a name="l449"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_POLYGON</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l450"></a> res->type = </span><span class=cF3>SPT_POLYGON</span><span class=cF0>;
|
|
<a name="l451"></a> res->pwhas.x1 = (x1 + x2) >> </span><span class=cFE>1</span><span class=cF0> - x;
|
|
<a name="l452"></a> res->pwhas.y1 = (y1 + y2) >> </span><span class=cFE>1</span><span class=cF0> - y;
|
|
<a name="l453"></a> res->pwhas.width = </span><span class=cF5>AbsI64</span><span class=cF0>(x1 - x2) >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l454"></a> res->pwhas.height = </span><span class=cF5>AbsI64</span><span class=cF0>(y1 - y2) >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l455"></a> res->pwhas.sides = sides;
|
|
<a name="l456"></a> angle2 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l457"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwhas.width < res->pwhas.height)
|
|
<a name="l458"></a> angle2 -= </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l459"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l460"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l461"></a> angle1 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l462"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwhas.width >= res->pwhas.height)
|
|
<a name="l463"></a> res->pwhas.angle = -(angle1 - angle2);
|
|
<a name="l464"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l465"></a> res->pwhas.angle = -(angle1 - angle2) + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l466"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l467"></a> </span><span class=cF5>GrRegPoly3</span><span class=cF0>(dc, res->pwhas.x1 + x, res->pwhas.y1 + y, </span><span class=cFE>0</span><span class=cF0>,
|
|
<a name="l468"></a> res->pwhas.width, res->pwhas.height, res->pwhas.sides, res->pwhas.angle);
|
|
<a name="l469"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l470"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l471"></a> x2 = arg1;
|
|
<a name="l472"></a> y2 = arg2;
|
|
<a name="l473"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l474"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l475"></a>
|
|
<a name="l476"></a> angle1 = </span><span class=cF5>Arg</span><span class=cF0>(x2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.x1 + x</span><span class=cF7>)</span><span class=cF0>, y2 - </span><span class=cF7>(</span><span class=cF0>res->pwhas.y1 + y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l477"></a> </span><span class=cF1>if</span><span class=cF0> (res->pwhas.width >= res->pwhas.height)
|
|
<a name="l478"></a> res->pwhas.angle = -(angle1-angle2);
|
|
<a name="l479"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l480"></a> res->pwhas.angle = -(angle1-angle2) + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l481"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l482"></a> </span><span class=cF5>GrRegPoly3</span><span class=cF0>(dc, res->pwhas.x1 + x, res->pwhas.y1 + y, </span><span class=cFE>0</span><span class=cF0>,
|
|
<a name="l483"></a> res->pwhas.width, res->pwhas.height, res->pwhas.sides, res->pwhas.angle);
|
|
<a name="l484"></a>
|
|
<a name="l485"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l486"></a>}
|
|
<a name="l487"></a>
|
|
<a name="l488"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMPolyLineFamily</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> eletype, </span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l489"></a>{
|
|
<a name="l490"></a> </span><span class=cF9>I64</span><span class=cF0> i, num = </span><span class=cFE>0</span><span class=cF0>, message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2;
|
|
<a name="l491"></a> </span><span class=cF9>I32</span><span class=cF0> *ptr;
|
|
<a name="l492"></a> </span><span class=cF9>CD3I32</span><span class=cF0> *p;
|
|
<a name="l493"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res, *tmpg, *tmpg1, head2;
|
|
<a name="l494"></a>
|
|
<a name="l495"></a> </span><span class=cF5>QueueInit</span><span class=cF0>(&head2);
|
|
<a name="l496"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l497"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l498"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l499"></a> {
|
|
<a name="l500"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l501"></a> </span><span class=cF1>if</span><span class=cF0> (num)
|
|
<a name="l502"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l503"></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_L_UP</span><span class=cF0> + </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_MS_R_UP</span><span class=cF0>);
|
|
<a name="l504"></a> dc->color = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l505"></a> </span><span class=cF1>if</span><span class=cF0> (num)
|
|
<a name="l506"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l507"></a> x2 = arg1;
|
|
<a name="l508"></a> y2 = arg2;
|
|
<a name="l509"></a> }
|
|
<a name="l510"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0> && message_code != </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0>);
|
|
<a name="l511"></a>
|
|
<a name="l512"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l513"></a> </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="l514"></a> {
|
|
<a name="l515"></a> </span><span class=cF1>if</span><span class=cF0> (num)
|
|
<a name="l516"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l517"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_PT</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l518"></a> res->type = </span><span class=cF3>SPT_PT</span><span class=cF0>;
|
|
<a name="l519"></a> res->p.x1 = x2 - x;
|
|
<a name="l520"></a> res->p.y1 = y2 - y;
|
|
<a name="l521"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(res, head2.last);
|
|
<a name="l522"></a> x1 = x2;
|
|
<a name="l523"></a> y1 = y2;
|
|
<a name="l524"></a> num++;
|
|
<a name="l525"></a> }
|
|
<a name="l526"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l527"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0>);
|
|
<a name="l528"></a>
|
|
<a name="l529"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l530"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l531"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_POLYLINE</span><span class=cF0>:
|
|
<a name="l532"></a> </span><span class=cF1>if</span><span class=cF0> (num > </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l533"></a> {
|
|
<a name="l534"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_POLYLINE</span><span class=cF7>)</span><span class=cF0> + num * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CD2I32</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l535"></a> ptr = &res->nu.u;
|
|
<a name="l536"></a> tmpg1 = head2.next;
|
|
<a name="l537"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < num; i++)
|
|
<a name="l538"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l539"></a> tmpg = tmpg1->next;
|
|
<a name="l540"></a> ptr[i << </span><span class=cFE>1</span><span class=cF0>] = tmpg1->p.x1;
|
|
<a name="l541"></a> ptr[i << </span><span class=cFE>1</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0>] = tmpg1->p.y1;
|
|
<a name="l542"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l543"></a> tmpg1 = tmpg;
|
|
<a name="l544"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l545"></a> res->type = </span><span class=cF3>SPT_POLYLINE</span><span class=cF0>;
|
|
<a name="l546"></a> res->nu.num = num;
|
|
<a name="l547"></a> }
|
|
<a name="l548"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l549"></a> {
|
|
<a name="l550"></a> tmpg1 = head2.next;
|
|
<a name="l551"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < num; i++)
|
|
<a name="l552"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l553"></a> tmpg = tmpg1->next;
|
|
<a name="l554"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l555"></a> tmpg1 = tmpg;
|
|
<a name="l556"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l557"></a> res = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l558"></a> }
|
|
<a name="l559"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l560"></a>
|
|
<a name="l561"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE2</span><span class=cF0>:
|
|
<a name="l562"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE3</span><span class=cF0>:
|
|
<a name="l563"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE2_CLOSED</span><span class=cF0>:
|
|
<a name="l564"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE3_CLOSED</span><span class=cF0>:
|
|
<a name="l565"></a> </span><span class=cF1>if</span><span class=cF0> (num > </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l566"></a> {
|
|
<a name="l567"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF0>eletype</span><span class=cF7>)</span><span class=cF0> + 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="l568"></a> p = &res->nu.u;
|
|
<a name="l569"></a> tmpg1 = head2.next;
|
|
<a name="l570"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < num; i++)
|
|
<a name="l571"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l572"></a> tmpg = tmpg1->next;
|
|
<a name="l573"></a> p[i].x = tmpg1->p.x1;
|
|
<a name="l574"></a> p[i].y = tmpg1->p.y1;
|
|
<a name="l575"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l576"></a> tmpg1 = tmpg;
|
|
<a name="l577"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l578"></a> res->type = eletype;
|
|
<a name="l579"></a> res->nu.num = num;
|
|
<a name="l580"></a> }
|
|
<a name="l581"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l582"></a> {
|
|
<a name="l583"></a> tmpg1 = head2.next;
|
|
<a name="l584"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < num; i++)
|
|
<a name="l585"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l586"></a> tmpg = tmpg1->next;
|
|
<a name="l587"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l588"></a> tmpg1 = tmpg;
|
|
<a name="l589"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l590"></a> res = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l591"></a> }
|
|
<a name="l592"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l593"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l594"></a>
|
|
<a name="l595"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l596"></a>}
|
|
<a name="l597"></a>
|
|
<a name="l598"></a></span><span class=cF9>CSprite</span><span class=cF0> *</span><span class=cF5>SMPolyPoint</span><span class=cF0>(</span><span class=cF9>CDC</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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color)
|
|
<a name="l599"></a>{
|
|
<a name="l600"></a> </span><span class=cF9>I64</span><span class=cF0> i, num = </span><span class=cFE>0</span><span class=cF0>, message_code, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2, x3, y3;
|
|
<a name="l601"></a> </span><span class=cF9>I32</span><span class=cF0> *ptr;
|
|
<a name="l602"></a> </span><span class=cF9>CSprite</span><span class=cF0> *res, *tmpg, *tmpg1, head2;
|
|
<a name="l603"></a>
|
|
<a name="l604"></a> </span><span class=cF5>QueueInit</span><span class=cF0>(&head2);
|
|
<a name="l605"></a> x3 = arg1 - x;
|
|
<a name="l606"></a> y3 = arg2 - y;
|
|
<a name="l607"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l608"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l609"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l610"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l611"></a> x2 = arg1;
|
|
<a name="l612"></a> y2 = arg2;
|
|
<a name="l613"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, x2, y2, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l614"></a> </span><span class=cF5>Line</span><span class=cF0>(&head2, x1 - x, y1 - y, </span><span class=cFE>0</span><span class=cF0>, x2 - x, y2 - y, </span><span class=cFE>0</span><span class=cF0>, &</span><span class=cF5>SpritePolyPtPlot</span><span class=cF0>);
|
|
<a name="l615"></a> x1 = x2;
|
|
<a name="l616"></a> y1 = y2;
|
|
<a name="l617"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l618"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l619"></a>
|
|
<a name="l620"></a> num = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l621"></a> res = head2.next;
|
|
<a name="l622"></a> x1 = x3;
|
|
<a name="l623"></a> y1 = y3;
|
|
<a name="l624"></a> </span><span class=cF1>while</span><span class=cF0> (res != &head2)
|
|
<a name="l625"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l626"></a> tmpg = res->next;
|
|
<a name="l627"></a> </span><span class=cF1>if</span><span class=cF0> (res->p.x1 == x1 && res->p.y1 == y1)
|
|
<a name="l628"></a> {
|
|
<a name="l629"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(res);
|
|
<a name="l630"></a> </span><span class=cF5>Free</span><span class=cF0>(res);
|
|
<a name="l631"></a> }
|
|
<a name="l632"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l633"></a> {
|
|
<a name="l634"></a> num++;
|
|
<a name="l635"></a> x1 = res->p.x1;
|
|
<a name="l636"></a> y1 = res->p.y1;
|
|
<a name="l637"></a> }
|
|
<a name="l638"></a> res = tmpg;
|
|
<a name="l639"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l640"></a>
|
|
<a name="l641"></a> res = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_POLYPT</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF7>(</span><span class=cF0>num * </span><span class=cFE>3</span><span class=cF0> + </span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>3</span><span class=cF0>);
|
|
<a name="l642"></a> res->npu.x = x3;
|
|
<a name="l643"></a> res->npu.y = y3;
|
|
<a name="l644"></a> ptr = &res->npu.u;
|
|
<a name="l645"></a> x1 = x3;
|
|
<a name="l646"></a> y1 = y3;
|
|
<a name="l647"></a> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l648"></a> tmpg1 = head2.next;
|
|
<a name="l649"></a> </span><span class=cF1>while</span><span class=cF0> (tmpg1 != &head2)
|
|
<a name="l650"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l651"></a> tmpg = tmpg1->next;
|
|
<a name="l652"></a> </span><span class=cF5>BFieldOrU32</span><span class=cF0>(ptr, i, </span><span class=cFB>polypt_map</span><span class=cF0>[</span><span class=cF5>SignI64</span><span class=cF7>(</span><span class=cF0>tmpg1->p.x1 - x1</span><span class=cF7>)</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> + </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF5>SignI64</span><span class=cF0>(tmpg1->p.y1 - y1) + </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0>]);
|
|
<a name="l653"></a> i += </span><span class=cFE>3</span><span class=cF0>;
|
|
<a name="l654"></a> x1 = tmpg1->p.x1;
|
|
<a name="l655"></a> y1 = tmpg1->p.y1;
|
|
<a name="l656"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(tmpg1);
|
|
<a name="l657"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l658"></a> tmpg1 = tmpg;
|
|
<a name="l659"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l660"></a> res->type = </span><span class=cF3>SPT_POLYPT</span><span class=cF0>;
|
|
<a name="l661"></a> res->npu.num = num;
|
|
<a name="l662"></a>
|
|
<a name="l663"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l664"></a>}
|
|
<a name="l665"></a>
|
|
<a name="l666"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>SMTextFamily</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> eletype, </span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce, </span><span class=cF9>CSprite</span><span class=cF0> *head, </span><span class=cF9>CDC</span><span class=cF0> *dc,
|
|
<a name="l667"></a> </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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> color, </span><span class=cF9>I64</span><span class=cF0> *_cur_elem_num, </span><span class=cF9>I64</span><span class=cF0> old_de_flags)
|
|
<a name="l668"></a>{
|
|
<a name="l669"></a> </span><span class=cF9>CSprite</span><span class=cF0> *tmpg, *insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(, head, *_cur_elem_num);
|
|
<a name="l670"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, x1, y1;
|
|
<a name="l671"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l672"></a>
|
|
<a name="l673"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l674"></a> st = </span><span class=cF5>PopUpGetStr</span><span class=cF0>(</span><span class=cF6>"Enter text and press <ESC>.\n"</span><span class=cF0>);
|
|
<a name="l675"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l676"></a> </span><span class=cF1>if</span><span class=cF0> (st && *st)
|
|
<a name="l677"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l678"></a> x1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l679"></a> y1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l680"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l681"></a> {
|
|
<a name="l682"></a> dc->color = color & </span><span class=cF3>COLORROP_NO_ROP0_MASK</span><span class=cF0>;
|
|
<a name="l683"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l684"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l685"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT</span><span class=cF0>: </span><span class=cF5>GrPrint3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF6>"%s"</span><span class=cF0>, st); </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l686"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT_BOX</span><span class=cF0>: </span><span class=cF5>GrTextBox3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, st); </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l687"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT_DIAMOND</span><span class=cF0>: </span><span class=cF5>GrTextDiamond3</span><span class=cF0>(dc, x1, y1, </span><span class=cFE>0</span><span class=cF0>, st); </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l688"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l689"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l690"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l691"></a> x1 = arg1;
|
|
<a name="l692"></a> y1 = arg2;
|
|
<a name="l693"></a> }
|
|
<a name="l694"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l695"></a>
|
|
<a name="l696"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF0>eletype</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l697"></a> tmpg->type = eletype;
|
|
<a name="l698"></a> tmpg->ps.x1 = x1 - x;
|
|
<a name="l699"></a> tmpg->ps.y1 = y1 - y;
|
|
<a name="l700"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(tmpg->ps.st, st);
|
|
<a name="l701"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l702"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l703"></a> *_cur_elem_num += </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l704"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l705"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l706"></a>}
|
|
<a name="l707"></a>
|
|
<a name="l708"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>SMBitMap</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> eletype, </span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce, </span><span class=cF9>CSprite</span><span class=cF0> *head,
|
|
<a name="l709"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF9>I64</span><span class=cF0> xx, </span><span class=cF9>I64</span><span class=cF0> yy, </span><span class=cF9>I64</span><span class=cF0> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>CColorROPU32</span><span class=cF0> bm_bkcolor,
|
|
<a name="l710"></a> </span><span class=cF1>Bool</span><span class=cF0> sel, </span><span class=cF9>I64</span><span class=cF0> xx1=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> yy1=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> xx2=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> yy2=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> *_cur_elem_num)
|
|
<a name="l711"></a>{
|
|
<a name="l712"></a> </span><span class=cF9>I64</span><span class=cF0> i, message_code, x = xx, y = yy, x1 = arg1, y1 = arg2, x2 = arg1, y2 = arg2, old_width;
|
|
<a name="l713"></a> </span><span class=cF9>CSprite</span><span class=cF0> *tmpg, *tmpg1, *insert_pt;
|
|
<a name="l714"></a> </span><span class=cF9>CDC</span><span class=cF0> *img;
|
|
<a name="l715"></a>
|
|
<a name="l716"></a> insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(, head, *_cur_elem_num, xx, yy,,, &x, &y);
|
|
<a name="l717"></a> x += xx;
|
|
<a name="l718"></a> y += yy;
|
|
<a name="l719"></a>
|
|
<a name="l720"></a> </span><span class=cF1>if</span><span class=cF0> (sel)
|
|
<a name="l721"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l722"></a> xx1 = arg1;
|
|
<a name="l723"></a> yy1 = arg2;
|
|
<a name="l724"></a> xx2 = arg1;
|
|
<a name="l725"></a> yy2 = arg2;
|
|
<a name="l726"></a> old_width = dc->thick;
|
|
<a name="l727"></a> dc->thick = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l728"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l729"></a> {
|
|
<a name="l730"></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="l731"></a> </span><span class=cF5>GrBorder</span><span class=cF0>(dc, xx1, yy1, xx2, yy2);
|
|
<a name="l732"></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_L_UP</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_MOVE</span><span class=cF0>);
|
|
<a name="l733"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l734"></a> x2 = arg1;
|
|
<a name="l735"></a> y2 = arg2;
|
|
<a name="l736"></a> </span><span class=cF1>if</span><span class=cF0> (x2 < x1)
|
|
<a name="l737"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l738"></a> xx1 = x2;
|
|
<a name="l739"></a> xx2 = x1;
|
|
<a name="l740"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l741"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l742"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l743"></a> xx1 = x1;
|
|
<a name="l744"></a> xx2 = x2;
|
|
<a name="l745"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l746"></a> </span><span class=cF1>if</span><span class=cF0> (y2 < y1)
|
|
<a name="l747"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l748"></a> yy1 = y2;
|
|
<a name="l749"></a> yy2 = y1;
|
|
<a name="l750"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l751"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l752"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l753"></a> yy1 = y1;
|
|
<a name="l754"></a> yy2 = y2;
|
|
<a name="l755"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l756"></a> }
|
|
<a name="l757"></a> </span><span class=cF1>while</span><span class=cF0> (message_code != </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l758"></a>
|
|
<a name="l759"></a> dc->thick = old_width;
|
|
<a name="l760"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l761"></a>
|
|
<a name="l762"></a> xx2++;
|
|
<a name="l763"></a> yy2++;
|
|
<a name="l764"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_BITMAP</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l765"></a> tmpg->type = </span><span class=cF3>SPT_BITMAP</span><span class=cF0>;
|
|
<a name="l766"></a> tmpg->pwhu.width = xx2 - xx1;
|
|
<a name="l767"></a> tmpg->pwhu.height = yy2 - yy1;
|
|
<a name="l768"></a> tmpg->pwhu.x1 = xx1 - x;
|
|
<a name="l769"></a> tmpg->pwhu.y1 = yy1 - y;
|
|
<a name="l770"></a> img = </span><span class=cF5>DCNew</span><span class=cF0>(tmpg->pwhu.width, tmpg->pwhu.height, </span><span class=cF5>Fs</span><span class=cF0>);
|
|
<a name="l771"></a> img->color = bm_bkcolor;
|
|
<a name="l772"></a> </span><span class=cF5>GrRect</span><span class=cF0>(img, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpg->pwhu.width, tmpg->pwhu.height);
|
|
<a name="l773"></a> tmpg1 = insert_pt;
|
|
<a name="l774"></a> </span><span class=cF1>if</span><span class=cF0> (tmpg1 == head || tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> != </span><span class=cF3>SPT_BITMAP</span><span class=cF0>)
|
|
<a name="l775"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l776"></a> </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(img, head, </span><span class=cFE>0</span><span class=cF0>, -</span><span class=cF7>(</span><span class=cF0>xx1 - x</span><span class=cF7>)</span><span class=cF0>, -</span><span class=cF7>(</span><span class=cF0>yy1 - y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l777"></a> x = xx;
|
|
<a name="l778"></a> y = yy;
|
|
<a name="l779"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(img, -</span><span class=cF7>(</span><span class=cF0>xx1 - x</span><span class=cF7>)</span><span class=cF0>, -</span><span class=cF7>(</span><span class=cF0>yy1 - y</span><span class=cF7>)</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, doc_ce->bin_data->data);
|
|
<a name="l780"></a> </span><span class=cF5>QueueDel</span><span class=cF0>(head);
|
|
<a name="l781"></a> insert_pt = head->next = head->last = head;
|
|
<a name="l782"></a> *_cur_elem_num = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l783"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l784"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l785"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l786"></a> </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(img, head, *_cur_elem_num, -</span><span class=cF7>(</span><span class=cF0>xx1 - x</span><span class=cF7>)</span><span class=cF0>, -</span><span class=cF7>(</span><span class=cF0>yy1 - y</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l787"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(img, -</span><span class=cF7>(</span><span class=cF0>xx1 - x</span><span class=cF7>)</span><span class=cF0>, -</span><span class=cF7>(</span><span class=cF0>yy1 - y</span><span class=cF7>)</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, &tmpg1-></span><span class=cF1>start</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l788"></a> insert_pt = tmpg1->next;
|
|
<a name="l789"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(tmpg1);
|
|
<a name="l790"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l791"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l792"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpg->pwhu.u, img->body, </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l793"></a>
|
|
<a name="l794"></a> </span><span class=cF1>switch</span><span class=cF0> (i = </span><span class=cF5>SpriteBitMapEd</span><span class=cF7>(</span><span class=cF0>doc, doc_ce, dc, &xx1, &yy1, &xx2, &yy2, &img, bm_bkcolor</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l795"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l796"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPE_EXIT</span><span class=cF0>:
|
|
<a name="l797"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPE_CONT</span><span class=cF0>:
|
|
<a name="l798"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg);
|
|
<a name="l799"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_BITMAP</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l800"></a> tmpg->type = eletype;
|
|
<a name="l801"></a> tmpg->pwhu.width = xx2 - xx1;
|
|
<a name="l802"></a> tmpg->pwhu.height = yy2 - yy1;
|
|
<a name="l803"></a> tmpg->pwhu.x1 = xx1 - x;
|
|
<a name="l804"></a> tmpg->pwhu.y1 = yy1 - y;
|
|
<a name="l805"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpg->pwhu.u, img->body, </span><span class=cF7>(</span><span class=cF0>(xx2 - xx1 + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cF0>yy2 - yy1</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l806"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l807"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l808"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l809"></a> </span><span class=cF5>DCDel</span><span class=cF0>(img);
|
|
<a name="l810"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l811"></a>
|
|
<a name="l812"></a> </span><span class=cF1>return</span><span class=cF0> i;
|
|
<a name="l813"></a>}
|
|
<a name="l814"></a>
|
|
<a name="l815"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>SMMesh</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce, </span><span class=cF9>CSprite</span><span class=cF0> *head, </span><span class=cF9>I64</span><span class=cF0> *_cur_elem_num)
|
|
<a name="l816"></a>{
|
|
<a name="l817"></a> </span><span class=cF9>CSprite</span><span class=cF0> *tmpg, *insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(, head, *_cur_elem_num), *tmpg1 = insert_pt;
|
|
<a name="l818"></a> </span><span class=cF9>CD3I32</span><span class=cF0> *p;
|
|
<a name="l819"></a> </span><span class=cF9>I64</span><span class=cF0> i, size, x1, y1, z1;
|
|
<a name="l820"></a> </span><span class=cF9>I32</span><span class=cF0> *mesh, *old_mesh;
|
|
<a name="l821"></a>
|
|
<a name="l822"></a> </span><span class=cF1>if</span><span class=cF0> (tmpg1 != head && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_MESH</span><span class=cF0>)
|
|
<a name="l823"></a> old_mesh = &tmpg1->mu.vertex_count;
|
|
<a name="l824"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmpg1 != head && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>)
|
|
<a name="l825"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l826"></a> x1 = tmpg1->pmu.x;
|
|
<a name="l827"></a> y1 = tmpg1->pmu.y;
|
|
<a name="l828"></a> z1 = tmpg1->pmu.z;
|
|
<a name="l829"></a> p = &tmpg1->pmu.u;
|
|
<a name="l830"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->pmu.vertex_count; i++, p++)
|
|
<a name="l831"></a> {
|
|
<a name="l832"></a> p->x += x1;
|
|
<a name="l833"></a> p->y += y1;
|
|
<a name="l834"></a> p->z += z1;
|
|
<a name="l835"></a> }
|
|
<a name="l836"></a> old_mesh = &tmpg1->pmu.vertex_count;
|
|
<a name="l837"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l838"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l839"></a> old_mesh = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l840"></a> </span><span class=cF1>if</span><span class=cF0> (mesh = </span><span class=cF5>SpriteMeshEd</span><span class=cF7>(</span><span class=cF0>old_mesh, &size, </span><span class=cF3>TRUE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l841"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l842"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_MESH</span><span class=cF7>)</span><span class=cF0> - </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I32</span><span class=cF7>)</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0> + size);
|
|
<a name="l843"></a> tmpg->type = </span><span class=cF3>SPT_MESH</span><span class=cF0>;
|
|
<a name="l844"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpg->mu.vertex_count, mesh, size);
|
|
<a name="l845"></a> </span><span class=cF5>Free</span><span class=cF0>(mesh);
|
|
<a name="l846"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l847"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l848"></a> </span><span class=cF1>if</span><span class=cF0> (old_mesh)
|
|
<a name="l849"></a> {
|
|
<a name="l850"></a> insert_pt = tmpg;
|
|
<a name="l851"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(tmpg1);
|
|
<a name="l852"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l853"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l854"></a> }
|
|
<a name="l855"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l856"></a> *_cur_elem_num += </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l857"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l858"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (old_mesh && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>)
|
|
<a name="l859"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l860"></a> x1 = tmpg1->pmu.x;
|
|
<a name="l861"></a> y1 = tmpg1->pmu.y;
|
|
<a name="l862"></a> z1 = tmpg1->pmu.z;
|
|
<a name="l863"></a> p = &tmpg1->pmu.u;
|
|
<a name="l864"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->pmu.vertex_count; i++, p++)
|
|
<a name="l865"></a> {
|
|
<a name="l866"></a> p->x -= x1;
|
|
<a name="l867"></a> p->y -= y1;
|
|
<a name="l868"></a> p->z -= z1;
|
|
<a name="l869"></a> }
|
|
<a name="l870"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l871"></a>}
|
|
<a name="l872"></a>
|
|
<a name="l873"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>SMShiftableMesh</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce, </span><span class=cF9>CSprite</span><span class=cF0> *head, </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> arg1, </span><span class=cF9>I64</span><span class=cF0> arg2, </span><span class=cF9>I64</span><span class=cF0> *_cur_elem_num)
|
|
<a name="l874"></a>{
|
|
<a name="l875"></a> </span><span class=cF9>CSprite</span><span class=cF0> *tmpg, *insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(, head, *_cur_elem_num), *tmpg1 = insert_pt;
|
|
<a name="l876"></a> </span><span class=cF9>CD3I32</span><span class=cF0> *p;
|
|
<a name="l877"></a> </span><span class=cF9>I64</span><span class=cF0> i, size, z, x1, y1, z1;
|
|
<a name="l878"></a> </span><span class=cF9>I32</span><span class=cF0> *mesh, *old_mesh;
|
|
<a name="l879"></a>
|
|
<a name="l880"></a> </span><span class=cF1>if</span><span class=cF0> (tmpg1 != head && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_MESH</span><span class=cF0>)
|
|
<a name="l881"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l882"></a> z = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l883"></a> x1 = -(arg1-x);
|
|
<a name="l884"></a> y1 = -(arg2-y);
|
|
<a name="l885"></a> z1 = z;
|
|
<a name="l886"></a> p = &tmpg1->mu.u;
|
|
<a name="l887"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->mu.vertex_count; i++, p++)
|
|
<a name="l888"></a> {
|
|
<a name="l889"></a> p->x += x1;
|
|
<a name="l890"></a> p->y += y1;
|
|
<a name="l891"></a> p->z += z1;
|
|
<a name="l892"></a> }
|
|
<a name="l893"></a> old_mesh = &tmpg1->mu.vertex_count;
|
|
<a name="l894"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l895"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmpg1 != head && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>)
|
|
<a name="l896"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l897"></a> z = -tmpg1->pmu.z;
|
|
<a name="l898"></a> x1 = tmpg1->pmu.x - (arg1 - x);
|
|
<a name="l899"></a> y1 = tmpg1->pmu.y - (arg2 - y);
|
|
<a name="l900"></a> z1 = tmpg1->pmu.z + z;
|
|
<a name="l901"></a> p = &tmpg1->pmu.u;
|
|
<a name="l902"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->pmu.vertex_count; i++, p++)
|
|
<a name="l903"></a> {
|
|
<a name="l904"></a> p->x += x1;
|
|
<a name="l905"></a> p->y += y1;
|
|
<a name="l906"></a> p->z += z1;
|
|
<a name="l907"></a> }
|
|
<a name="l908"></a> old_mesh = &tmpg1->pmu.vertex_count;
|
|
<a name="l909"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l910"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l911"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l912"></a> z = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l913"></a> old_mesh = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l914"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l915"></a> </span><span class=cF1>if</span><span class=cF0> (mesh = </span><span class=cF5>SpriteMeshEd</span><span class=cF7>(</span><span class=cF0>old_mesh, &size, </span><span class=cF3>TRUE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l916"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l917"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF7>)</span><span class=cF0> - </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I32</span><span class=cF7>)</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0> + size);
|
|
<a name="l918"></a> tmpg->type = </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>;
|
|
<a name="l919"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpg->pmu.vertex_count, mesh, size);
|
|
<a name="l920"></a> </span><span class=cF5>Free</span><span class=cF0>(mesh);
|
|
<a name="l921"></a> tmpg->pmu.x = arg1 - x;
|
|
<a name="l922"></a> tmpg->pmu.y = arg2 - y;
|
|
<a name="l923"></a> tmpg->pmu.z = -z;
|
|
<a name="l924"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l925"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l926"></a> </span><span class=cF1>if</span><span class=cF0> (old_mesh)
|
|
<a name="l927"></a> {
|
|
<a name="l928"></a> insert_pt = tmpg;
|
|
<a name="l929"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(tmpg1);
|
|
<a name="l930"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpg1);
|
|
<a name="l931"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l932"></a> }
|
|
<a name="l933"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l934"></a> *_cur_elem_num += </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l935"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l936"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (old_mesh && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>)
|
|
<a name="l937"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l938"></a> x1 = tmpg1->pmu.x - (arg1 - x);
|
|
<a name="l939"></a> y1 = tmpg1->pmu.y - (arg2 - y);
|
|
<a name="l940"></a> z1 = tmpg1->pmu.z + z;
|
|
<a name="l941"></a> p = &tmpg1->pmu.u;
|
|
<a name="l942"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->pmu.vertex_count; i++, p++)
|
|
<a name="l943"></a> {
|
|
<a name="l944"></a> p->x -= x1;
|
|
<a name="l945"></a> p->y -= y1;
|
|
<a name="l946"></a> p->z -= z1;
|
|
<a name="l947"></a> }
|
|
<a name="l948"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l949"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (old_mesh && tmpg1->type & </span><span class=cF3>SPG_TYPE_MASK</span><span class=cF0> == </span><span class=cF3>SPT_MESH</span><span class=cF0>)
|
|
<a name="l950"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l951"></a> x1 = -(arg1 - x);
|
|
<a name="l952"></a> y1 = -(arg2 - y);
|
|
<a name="l953"></a> z1 = z;
|
|
<a name="l954"></a> p = &tmpg1->mu.u;
|
|
<a name="l955"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpg1->mu.vertex_count; i++, p++)
|
|
<a name="l956"></a> {
|
|
<a name="l957"></a> p->x -= x1;
|
|
<a name="l958"></a> p->y -= y1;
|
|
<a name="l959"></a> p->z -= z1;
|
|
<a name="l960"></a> }
|
|
<a name="l961"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l962"></a>}
|
|
<a name="l963"></a>
|
|
<a name="l964"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>SMTaskTitleSet</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> eletype)
|
|
<a name="l965"></a>{
|
|
<a name="l966"></a> </span><span class=cF5>Fs</span><span class=cF0>->title_src = </span><span class=cF3>TTS_CONST</span><span class=cF0>; </span><span class=cF2>//Violates TTS_LOCKED_CONST</span><span class=cF0>
|
|
<a name="l967"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l968"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l969"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l970"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title, </span><span class=cF6>"Insert Screen BitMap"</span><span class=cF0>);
|
|
<a name="l971"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l972"></a>
|
|
<a name="l973"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_TRANSPARENT_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l974"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title, </span><span class=cF6>"Insert Transparent Screen BitMap"</span><span class=cF0>);
|
|
<a name="l975"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l976"></a>
|
|
<a name="l977"></a> </span><span class=cF1>default</span><span class=cF0>:
|
|
<a name="l978"></a> </span><span class=cF1>if</span><span class=cF0> (eletype >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l979"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title, </span><span class=cF5>DefineSub</span><span class=cF7>(</span><span class=cF0>eletype, </span><span class=cF6>"ST_SPRITE_ELEM_TYPES"</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l980"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l981"></a> </span><span class=cF5>Fs</span><span class=cF0>->border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l982"></a>}
|
|
<a name="l983"></a>
|
|
<a name="l984"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>SpriteMainEd</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l985"></a>{
|
|
<a name="l986"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l987"></a> </span><span class=cF9>I64</span><span class=cF0> res, i, x, y, arg1, arg2, xx, yy, xx1, yy1, xx2, yy2, thick, eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>, cur_elem_num,
|
|
<a name="l988"></a> old_border_src = </span><span class=cF5>Fs</span><span class=cF0>->border_src, old_title_src = </span><span class=cF5>Fs</span><span class=cF0>->title_src, old_de_flags = doc_ce->de_flags;
|
|
<a name="l989"></a> </span><span class=cF9>CColorROPU32</span><span class=cF0> bm_bkcolor, color;
|
|
<a name="l990"></a> </span><span class=cF9>CSprite</span><span class=cF0> *head, *tmpg, *insert_pt;
|
|
<a name="l991"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc = </span><span class=cF5>DCAlias</span><span class=cF0>(, </span><span class=cF5>Fs</span><span class=cF0>), *dc2 = </span><span class=cF5>DCAlias</span><span class=cF0>(, </span><span class=cFB>sys_winmgr_task</span><span class=cF0>), *dc3;
|
|
<a name="l992"></a> </span><span class=cF1>U8</span><span class=cF0> *old_task_title = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title);
|
|
<a name="l993"></a>
|
|
<a name="l994"></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>
|
|
<a name="l995"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
|
<a name="l996"></a> </span><span class=cF5>Refresh</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l997"></a> dc2->flags |= </span><span class=cF3>DCF_ON_TOP</span><span class=cF0>;
|
|
<a name="l998"></a> head = </span><span class=cF5>Sprite2SpriteQueue</span><span class=cF0>(doc_ce->bin_data->data);
|
|
<a name="l999"></a> cur_elem_num = </span><span class=cF5>QueueCount</span><span class=cF0>(head);
|
|
<a name="l1000"></a> xx = (doc_ce->x + doc_ce->max_col - doc->line_start_col) * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
|
|
<a name="l1001"></a> yy = (doc_ce->y - doc->top_line_num) * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>;
|
|
<a name="l1002"></a>
|
|
<a name="l1003"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l1004"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1005"></a> insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(dc, head, cur_elem_num, xx, yy, &color, &thick, &x, &y);
|
|
<a name="l1006"></a> x += xx;
|
|
<a name="l1007"></a> y += yy;
|
|
<a name="l1008"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l1009"></a> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>SPT_MENU</span><span class=cF0>)
|
|
<a name="l1010"></a> {
|
|
<a name="l1011"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = </span><span class=cF3>WIG_TASK_DEFAULT</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_GRAB_SCROLL</span><span class=cF0>;
|
|
<a name="l1012"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>winmgr</span><span class=cF0>.fps < </span><span class=cFE>10</span><span class=cF0>)
|
|
<a name="l1013"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1014"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title, old_task_title);
|
|
<a name="l1015"></a> </span><span class=cF5>Fs</span><span class=cF0>->border_src = old_border_src;
|
|
<a name="l1016"></a> </span><span class=cF5>Fs</span><span class=cF0>->title_src = old_title_src;
|
|
<a name="l1017"></a>
|
|
<a name="l1018"></a> xx -= </span><span class=cF5>StrLen</span><span class=cF0>(doc_ce->tag) * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
|
|
<a name="l1019"></a> eletype = </span><span class=cF5>PopUpSpriteMain</span><span class=cF0>(&head, &cur_elem_num, doc, doc_ce);
|
|
<a name="l1020"></a> xx += </span><span class=cF5>StrLen</span><span class=cF0>(doc_ce->tag) * </span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
|
|
<a name="l1021"></a> insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(dc, head, cur_elem_num, x, y, &color, &thick, &x, &y);
|
|
<a name="l1022"></a> x += xx;
|
|
<a name="l1023"></a> y += yy;
|
|
<a name="l1024"></a>
|
|
<a name="l1025"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1026"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l1027"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1028"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_FLOOD_FILL</span><span class=cF0>:
|
|
<a name="l1029"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_FLOOD_FILL_NOT</span><span class=cF0>:
|
|
<a name="l1030"></a> </span><span class=cF5>RegOneTimePopUp</span><span class=cF0>(</span><span class=cF3>ARf_FLOODFILL</span><span class=cF0>,
|
|
<a name="l1031"></a> </span><span class=cF3>ST_WARN_ST</span><span class=cF0> </span><span class=cF6>"This is affected by what's underneath\n"</span><span class=cF0>
|
|
<a name="l1032"></a> </span><span class=cF6>"when it is drawn. You will probably want to\n"</span><span class=cF0>
|
|
<a name="l1033"></a> </span><span class=cF6>"convert it to a bitmap.\n\n"</span><span class=cF0>
|
|
<a name="l1034"></a> </span><span class=cF6>"A tip on artistry you might consider\n"</span><span class=cF0>
|
|
<a name="l1035"></a> </span><span class=cF6>"is using lines to fill regions because\n"</span><span class=cF0>
|
|
<a name="l1036"></a> </span><span class=cF6>"brush strokes look cool.\n"</span><span class=cF0>);
|
|
<a name="l1037"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1038"></a>
|
|
<a name="l1039"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF0>:
|
|
<a name="l1040"></a> </span><span class=cF5>RegOneTimePopUp</span><span class=cF0>(</span><span class=cF3>ARf_PLANAR_SYMMETRY</span><span class=cF0>, </span><span class=cF6>"Right-click to turn-off symmetry.\n"</span><span class=cF0>);
|
|
<a name="l1041"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1042"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1043"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1044"></a> }
|
|
<a name="l1045"></a> </span><span class=cF5>SMTaskTitleSet</span><span class=cF0>(eletype);
|
|
<a name="l1046"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l1047"></a> {
|
|
<a name="l1048"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_COLOR</span><span class=cF0>:
|
|
<a name="l1049"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1050"></a> i = </span><span class=cF5>PopUpColor</span><span class=cF0>(,, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1051"></a> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l1052"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1053"></a> color = i;
|
|
<a name="l1054"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_COLOR</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1055"></a> tmpg->type = </span><span class=cF3>SPT_COLOR</span><span class=cF0>;
|
|
<a name="l1056"></a> tmpg->c.color = color;
|
|
<a name="l1057"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1058"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1059"></a> cur_elem_num++;
|
|
<a name="l1060"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1061"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1062"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1063"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1064"></a>
|
|
<a name="l1065"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_DITHER_COLOR</span><span class=cF0>:
|
|
<a name="l1066"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1067"></a> i = </span><span class=cF5>PopUpColorDither</span><span class=cF0>;
|
|
<a name="l1068"></a> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l1069"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1070"></a> color = i;
|
|
<a name="l1071"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_DITHER_COLOR</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1072"></a> tmpg->type = </span><span class=cF3>SPT_DITHER_COLOR</span><span class=cF0>;
|
|
<a name="l1073"></a> tmpg->d.dither_color = color.c0.color | color.c1.color << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l1074"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1075"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1076"></a> cur_elem_num++;
|
|
<a name="l1077"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1078"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1079"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1080"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1081"></a>
|
|
<a name="l1082"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_ED_MENU</span><span class=cF0>:
|
|
<a name="l1083"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>SpriteEd</span><span class=cF7>(</span><span class=cF0>doc, doc_ce, x, y, &head, &cur_elem_num</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1084"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1085"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPE_ABORT</span><span class=cF0>: eletype = </span><span class=cF3>DOCM_CANCEL</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1086"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPE_EXIT</span><span class=cF0>: eletype = </span><span class=cF3>SPT_EXIT</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1087"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPE_CONT</span><span class=cF0>: eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1088"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1089"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1090"></a>
|
|
<a name="l1091"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_MESH</span><span class=cF0>:
|
|
<a name="l1092"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1093"></a> </span><span class=cF5>SMMesh</span><span class=cF0>(doc, doc_ce, head, &cur_elem_num);
|
|
<a name="l1094"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1095"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1096"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1097"></a>
|
|
<a name="l1098"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>:
|
|
<a name="l1099"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1100"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpNoYes</span><span class=cF7>(</span><span class=cF6>"Study the $LK,\"X-Caliber\","</span><span class=cF0>
|
|
<a name="l1101"></a> </span><span class=cF6>"A=\"FF:::/PersonalMenu.DD,X-Caliber\"$ icon.\n\n"</span><span class=cF0>
|
|
<a name="l1102"></a> </span><span class=cF6>"It has black rectangle background with stars. The\n"</span><span class=cF0>
|
|
<a name="l1103"></a> </span><span class=cF6>"mesh is in front and rotates. To keep the background\n"</span><span class=cF0>
|
|
<a name="l1104"></a> </span><span class=cF6>"rectangle from rotating, "</span><span class=cF0>
|
|
<a name="l1105"></a> </span><span class=cF6>"$GREEN$TRANSFORM OFF$FG$ has been used.\n\n"</span><span class=cF0>
|
|
<a name="l1106"></a> </span><span class=cF6>"The X-Caliber mesh has a different origin for rotation.\n"</span><span class=cF0>
|
|
<a name="l1107"></a> </span><span class=cF6>"To avoid clipping, it also has also been moved in the\n"</span><span class=cF0>
|
|
<a name="l1108"></a> </span><span class=cF6>"negative Z direction by editing the sprite as text\n"</span><span class=cF0>
|
|
<a name="l1109"></a> </span><span class=cF6>"and changing the first vector.\n\n"</span><span class=cF0>
|
|
<a name="l1110"></a> </span><span class=cF6>"For the mesh you are creating, use same origin as\n"</span><span class=cF0>
|
|
<a name="l1111"></a> </span><span class=cF6>"the rest of the sprite? If $GREEN$YES$FG$, you can always\n"</span><span class=cF0>
|
|
<a name="l1112"></a> </span><span class=cF6>"shift the mesh origin point in the sprite edit menu.\n"</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1113"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1114"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1115"></a> arg1 = x;
|
|
<a name="l1116"></a> arg2 = y;
|
|
<a name="l1117"></a> </span><span class=cF5>SMShiftableMesh</span><span class=cF0>(doc, doc_ce, head, x, y, arg1, arg2, &cur_elem_num);
|
|
<a name="l1118"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1119"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1120"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1121"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>"Select Origin.\n"</span><span class=cF0>);
|
|
<a name="l1122"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1123"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1124"></a>
|
|
<a name="l1125"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l1126"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1127"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>"Drag-out a rect for the extents of the\nbitmap.\n"</span><span class=cF0>);
|
|
<a name="l1128"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1129"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = </span><span class=cF3>WIG_TASK_DEFAULT</span><span class=cF0> | </span><span class=cF3>WIF_FOCUS_TASK_MS_L</span><span class=cF0> | </span><span class=cF3>WIF_FOCUS_TASK_MS_R</span><span class=cF0> |
|
|
<a name="l1130"></a> </span><span class=cF3>WIF_FOCUS_TASK_BORDER</span><span class=cF0> - </span><span class=cF3>WIF_SELF_FOCUS</span><span class=cF0> - </span><span class=cF3>WIF_SELF_GRAB_SCROLL</span><span class=cF0>;
|
|
<a name="l1131"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1132"></a>
|
|
<a name="l1133"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BITMAP</span><span class=cF0>:
|
|
<a name="l1134"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1135"></a> i = </span><span class=cF5>PopUpColor</span><span class=cF0>(</span><span class=cF6>"Background Color\n\n"</span><span class=cF0>,, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1136"></a> </span><span class=cF1>if</span><span class=cF0> (i < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l1137"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1138"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1139"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1140"></a> bm_bkcolor = i;
|
|
<a name="l1141"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1142"></a> </span><span class=cF5>SpriteExtents</span><span class=cF0>(doc_ce->bin_data->data, &xx1, &xx2, &yy1, &yy2);
|
|
<a name="l1143"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>xx1 <= xx2 && yy1 <= yy2</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1144"></a> xx1 = xx2 = yy1 = yy2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l1145"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpExtents</span><span class=cF7>(</span><span class=cF0>&xx1, &xx2, &yy1, &yy2</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1146"></a> {
|
|
<a name="l1147"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1148"></a> xx1 += xx;
|
|
<a name="l1149"></a> yy1 += yy;
|
|
<a name="l1150"></a> xx2 += xx;
|
|
<a name="l1151"></a> yy2 += yy;
|
|
<a name="l1152"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SMBitMap</span><span class=cF7>(</span><span class=cF0>eletype, doc, doc_ce, head, dc, xx, yy, arg1, arg2,
|
|
<a name="l1153"></a> bm_bkcolor, </span><span class=cF3>FALSE</span><span class=cF0>, xx1, yy1, xx2, yy2, &cur_elem_num</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>SPE_EXIT</span><span class=cF0>)
|
|
<a name="l1154"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1155"></a> res = </span><span class=cF3>SPE_EXIT</span><span class=cF0>;
|
|
<a name="l1156"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1157"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1158"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1159"></a> }
|
|
<a name="l1160"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1161"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1162"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1163"></a>
|
|
<a name="l1164"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_TRANSPARENT_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l1165"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1166"></a> i = </span><span class=cF5>PopUpColor</span><span class=cF0>(</span><span class=cF6>"Color to Become Transparent\n\n"</span><span class=cF0>,, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1167"></a> </span><span class=cF1>if</span><span class=cF0> (i < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l1168"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1169"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1170"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1171"></a> bm_bkcolor = i;
|
|
<a name="l1172"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>"Drag-out a rect for the extents of the\nbitmap.\n"</span><span class=cF0>);
|
|
<a name="l1173"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1174"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1175"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit = </span><span class=cF3>WIG_TASK_DEFAULT</span><span class=cF0> | </span><span class=cF3>WIF_FOCUS_TASK_MS_L</span><span class=cF0> | </span><span class=cF3>WIF_FOCUS_TASK_MS_R</span><span class=cF0> |
|
|
<a name="l1176"></a> </span><span class=cF3>WIF_FOCUS_TASK_BORDER</span><span class=cF0> - </span><span class=cF3>WIF_SELF_FOCUS</span><span class=cF0> - </span><span class=cF3>WIF_SELF_GRAB_SCROLL</span><span class=cF0>;
|
|
<a name="l1177"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1178"></a>
|
|
<a name="l1179"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_THICK</span><span class=cF0>:
|
|
<a name="l1180"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1181"></a> i = </span><span class=cF5>PopUpRangeI64</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>, </span><span class=cFE>16</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF6>"Thick\n"</span><span class=cF0>);
|
|
<a name="l1182"></a> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l1183"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1184"></a> thick = i;
|
|
<a name="l1185"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_THICK</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1186"></a> tmpg->type = </span><span class=cF3>SPT_THICK</span><span class=cF0>;
|
|
<a name="l1187"></a> tmpg->t.thick = thick;
|
|
<a name="l1188"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1189"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1190"></a> cur_elem_num++;
|
|
<a name="l1191"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1192"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1193"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1194"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1195"></a>
|
|
<a name="l1196"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TRANSFORM_ON</span><span class=cF0>:
|
|
<a name="l1197"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TRANSFORM_OFF</span><span class=cF0>:
|
|
<a name="l1198"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_TRANSFORM_ON</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1199"></a> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>SPT_TRANSFORM_ON</span><span class=cF0>)
|
|
<a name="l1200"></a> tmpg->type = </span><span class=cF3>SPT_TRANSFORM_ON</span><span class=cF0>;
|
|
<a name="l1201"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1202"></a> tmpg->type = </span><span class=cF3>SPT_TRANSFORM_OFF</span><span class=cF0>;
|
|
<a name="l1203"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1204"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1205"></a> cur_elem_num++;
|
|
<a name="l1206"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1207"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1208"></a>
|
|
<a name="l1209"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_POLYGON</span><span class=cF0>:
|
|
<a name="l1210"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1211"></a> i = </span><span class=cF5>PopUpRangeI64</span><span class=cF0>(</span><span class=cFE>3</span><span class=cF0>, </span><span class=cFE>16</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF6>"Num of Sides\n"</span><span class=cF0>);
|
|
<a name="l1212"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1213"></a> </span><span class=cF1>if</span><span class=cF0> (i < </span><span class=cFE>3</span><span class=cF0>)
|
|
<a name="l1214"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1215"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1216"></a>
|
|
<a name="l1217"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT</span><span class=cF0>:
|
|
<a name="l1218"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT_BOX</span><span class=cF0>:
|
|
<a name="l1219"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_TEXT_DIAMOND</span><span class=cF0>:
|
|
<a name="l1220"></a> </span><span class=cF5>SMTextFamily</span><span class=cF0>(eletype, doc, doc_ce, head, dc, xx, yy, arg1, arg2, color, &cur_elem_num, old_de_flags);
|
|
<a name="l1221"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1222"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1223"></a> }
|
|
<a name="l1224"></a>
|
|
<a name="l1225"></a> </span><span class=cF1>if</span><span class=cF0> (eletype != </span><span class=cF3>SPT_MENU</span><span class=cF0>)
|
|
<a name="l1226"></a> {
|
|
<a name="l1227"></a> insert_pt = </span><span class=cF5>SpriteSetSettings</span><span class=cF0>(dc, head, cur_elem_num, xx, yy, &color, &thick, &x, &y);
|
|
<a name="l1228"></a> x += xx;
|
|
<a name="l1229"></a> y += yy;
|
|
<a name="l1230"></a> </span><span class=cF5>SpriteScreenInit</span><span class=cF0>(dc, x, y);
|
|
<a name="l1231"></a> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>SPT_EXIT</span><span class=cF0>)
|
|
<a name="l1232"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1233"></a> res = </span><span class=cF3>SPE_EXIT</span><span class=cF0>;
|
|
<a name="l1234"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1235"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1236"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>DOCM_CANCEL</span><span class=cF0>)
|
|
<a name="l1237"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1238"></a> res = </span><span class=cF3>SPE_ABORT</span><span class=cF0>;
|
|
<a name="l1239"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1240"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1241"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>MessageGet</span><span class=cF7>(</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> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_L_DOWN</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1242"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1243"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>:
|
|
<a name="l1244"></a> </span><span class=cF1>switch</span><span class=cF0> (arg1)
|
|
<a name="l1245"></a> {
|
|
<a name="l1246"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
|
<a name="l1247"></a> res = </span><span class=cF3>SPE_EXIT</span><span class=cF0>;
|
|
<a name="l1248"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1249"></a>
|
|
<a name="l1250"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
|
<a name="l1251"></a> res = </span><span class=cF3>SPE_ABORT</span><span class=cF0>;
|
|
<a name="l1252"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1253"></a>
|
|
<a name="l1254"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'c'</span><span class=cF0>: </span><span class=cF2>//eye-dropper</span><span class=cF0>
|
|
<a name="l1255"></a> dc3 = </span><span class=cF5>DCScreenCapture</span><span class=cF0>(</span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1256"></a> color = </span><span class=cF5>GrPeek</span><span class=cF0>(dc3, </span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y) ^ </span><span class=cFE>15</span><span class=cF0>;</span><span class=cF2>//Mouse cursor is XORed.</span><span class=cF0>
|
|
<a name="l1257"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc3);
|
|
<a name="l1258"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_COLOR</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1259"></a> tmpg->type = </span><span class=cF3>SPT_COLOR</span><span class=cF0>;
|
|
<a name="l1260"></a> tmpg->c.color = color;
|
|
<a name="l1261"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1262"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1263"></a> cur_elem_num++;
|
|
<a name="l1264"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1265"></a>
|
|
<a name="l1266"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'t'</span><span class=cF0>: </span><span class=cF2>//Set to transparent color</span><span class=cF0>
|
|
<a name="l1267"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_COLOR</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1268"></a> tmpg->type = </span><span class=cF3>SPT_COLOR</span><span class=cF0>;
|
|
<a name="l1269"></a> tmpg->c.color = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l1270"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1271"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1272"></a> cur_elem_num++;
|
|
<a name="l1273"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1274"></a> }
|
|
<a name="l1275"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1276"></a>
|
|
<a name="l1277"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0>:
|
|
<a name="l1278"></a> </span><span class=cF1>if</span><span class=cF0> (eletype == </span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF0>)
|
|
<a name="l1279"></a> {
|
|
<a name="l1280"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1281"></a> tmpg->type = </span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF0>;
|
|
<a name="l1282"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1283"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1284"></a> cur_elem_num++;
|
|
<a name="l1285"></a> eletype = </span><span class=cF3>SPT_MENU</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> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1289"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1290"></a>
|
|
<a name="l1291"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_MS_L_DOWN</span><span class=cF0>:
|
|
<a name="l1292"></a> </span><span class=cF1>switch</span><span class=cF0> (eletype)
|
|
<a name="l1293"></a> {
|
|
<a name="l1294"></a> </span><span class=cF1>start</span><span class=cF0>:
|
|
<a name="l1295"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_LINE</span><span class=cF0>:
|
|
<a name="l1296"></a> tmpg = </span><span class=cF5>SMLine</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1297"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1298"></a>
|
|
<a name="l1299"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_ARROW</span><span class=cF0>:
|
|
<a name="l1300"></a> tmpg = </span><span class=cF5>SMArrow</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1301"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1302"></a>
|
|
<a name="l1303"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_PLANAR_SYMMETRY</span><span class=cF0>:
|
|
<a name="l1304"></a> tmpg = </span><span class=cF5>SMPlanarSymmetry</span><span class=cF0>(dc, x, y, arg1, arg2);
|
|
<a name="l1305"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1306"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1307"></a>
|
|
<a name="l1308"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_RECT</span><span class=cF0>:
|
|
<a name="l1309"></a> tmpg = </span><span class=cF5>SMRect</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1310"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1311"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l1312"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_INS_TRANSPARENT_SCREEN_BITMAP</span><span class=cF0>:
|
|
<a name="l1313"></a> tmpg = </span><span class=cF5>SMScreenBitMap</span><span class=cF0>(eletype, dc, dc2, x, y, arg1, arg2, bm_bkcolor);
|
|
<a name="l1314"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1315"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1316"></a>
|
|
<a name="l1317"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_CIRCLE</span><span class=cF0>:
|
|
<a name="l1318"></a> tmpg = </span><span class=cF5>SMCircle</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1319"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1320"></a>
|
|
<a name="l1321"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_ELLIPSE</span><span class=cF0>:
|
|
<a name="l1322"></a> tmpg = </span><span class=cF5>SMEllipse</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1323"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1324"></a>
|
|
<a name="l1325"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_POLYGON</span><span class=cF0>:
|
|
<a name="l1326"></a> tmpg = </span><span class=cF5>SMPolygon</span><span class=cF0>(dc, x, y, arg1, arg2, i, color);
|
|
<a name="l1327"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1328"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1329"></a>
|
|
<a name="l1330"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_PT</span><span class=cF0>:
|
|
<a name="l1331"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_FLOOD_FILL</span><span class=cF0>:
|
|
<a name="l1332"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_FLOOD_FILL_NOT</span><span class=cF0>:
|
|
<a name="l1333"></a> tmpg = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF5>SpriteElemQueuedBaseSize</span><span class=cF7>(</span><span class=cF0>eletype</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l1334"></a> tmpg->type = eletype;
|
|
<a name="l1335"></a> tmpg->p.x1 = arg1 - x;
|
|
<a name="l1336"></a> tmpg->p.y1 = arg2 - y;
|
|
<a name="l1337"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1338"></a>
|
|
<a name="l1339"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_POLYLINE</span><span class=cF0>:
|
|
<a name="l1340"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE2</span><span class=cF0>:
|
|
<a name="l1341"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE3</span><span class=cF0>:
|
|
<a name="l1342"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE2_CLOSED</span><span class=cF0>:
|
|
<a name="l1343"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BSPLINE3_CLOSED</span><span class=cF0>:
|
|
<a name="l1344"></a> tmpg = </span><span class=cF5>SMPolyLineFamily</span><span class=cF0>(eletype, dc, x, y, arg1, arg2, color);
|
|
<a name="l1345"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1346"></a>
|
|
<a name="l1347"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_POLYPT</span><span class=cF0>:
|
|
<a name="l1348"></a> tmpg = </span><span class=cF5>SMPolyPoint</span><span class=cF0>(dc, x, y, arg1, arg2, color);
|
|
<a name="l1349"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1350"></a> </span><span class=cF1>end</span><span class=cF0>:
|
|
<a name="l1351"></a> </span><span class=cF1>if</span><span class=cF0> (tmpg)
|
|
<a name="l1352"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1353"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpg, insert_pt->last);
|
|
<a name="l1354"></a> </span><span class=cF5>SpriteEdUpdate</span><span class=cF0>(doc, doc_ce, head);
|
|
<a name="l1355"></a> cur_elem_num++;
|
|
<a name="l1356"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1357"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1358"></a>
|
|
<a name="l1359"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_BITMAP</span><span class=cF0>:
|
|
<a name="l1360"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SMBitMap</span><span class=cF7>(</span><span class=cF0>eletype, doc, doc_ce, head, dc, xx, yy,
|
|
<a name="l1361"></a> arg1, arg2, bm_bkcolor, </span><span class=cF3>TRUE</span><span class=cF0>,,,,, &cur_elem_num</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>SPE_EXIT</span><span class=cF0>)
|
|
<a name="l1362"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1363"></a> res = </span><span class=cF3>SPE_EXIT</span><span class=cF0>;
|
|
<a name="l1364"></a> </span><span class=cF1>goto</span><span class=cF0> ei_done;
|
|
<a name="l1365"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1366"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1367"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<a name="l1368"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l1369"></a>
|
|
<a name="l1370"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>SPT_SHIFTABLE_MESH</span><span class=cF0>:
|
|
<a name="l1371"></a> </span><span class=cF5>MessageGet</span><span class=cF0>(</span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>);
|
|
<a name="l1372"></a> doc_ce->de_flags |= </span><span class=cF3>DOCEF_DONT_DRAW</span><span class=cF0>;
|
|
<a name="l1373"></a> </span><span class=cF5>SMShiftableMesh</span><span class=cF0>(doc, doc_ce, head, x, y, arg1, arg2, &cur_elem_num);
|
|
<a name="l1374"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1375"></a> eletype = </span><span class=cF3>SPT_MENU</span><span class=cF0>;
|
|
<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>break</span><span class=cF0>;
|
|
<a name="l1379"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1380"></a> }
|
|
<a name="l1381"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1382"></a>ei_done:
|
|
<a name="l1383"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l1384"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
|
<a name="l1385"></a> doc_ce->de_flags = old_de_flags;
|
|
<a name="l1386"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc);
|
|
<a name="l1387"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc2);
|
|
<a name="l1388"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title, old_task_title);
|
|
<a name="l1389"></a> </span><span class=cF5>Free</span><span class=cF0>(old_task_title);
|
|
<a name="l1390"></a> </span><span class=cF5>Fs</span><span class=cF0>->border_src = old_border_src;
|
|
<a name="l1391"></a> </span><span class=cF5>Fs</span><span class=cF0>->title_src = old_title_src;
|
|
<a name="l1392"></a> </span><span class=cF5>QueueDel</span><span class=cF0>(head);
|
|
<a name="l1393"></a> </span><span class=cF5>Free</span><span class=cF0>(head);
|
|
<a name="l1394"></a>
|
|
<a name="l1395"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l1396"></a>}
|
|
<a name="l1397"></a>
|
|
<a name="l1398"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>EdSpriteIns</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l1399"></a>{
|
|
<a name="l1400"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock;
|
|
<a name="l1401"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l1402"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
|
|
<a name="l1403"></a> </span><span class=cF9>CDocBin</span><span class=cF0> *tmpb;
|
|
<a name="l1404"></a>
|
|
<a name="l1405"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Fs</span><span class=cF0> != doc->mem_task)
|
|
<a name="l1406"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Graphics'</span><span class=cF0>);
|
|
<a name="l1407"></a> </span><span class=cF1>if</span><span class=cF0> (st = </span><span class=cF5>EdSprite</span><span class=cF7>(</span><span class=cF0>doc->cur_bin_num</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1408"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1409"></a> unlock = </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l1410"></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="l1411"></a> tmpb->size = </span><span class=cFB>sprite_elem_base_sizes</span><span class=cF0>[</span><span class=cF3>SPT_END</span><span class=cF0>];
|
|
<a name="l1412"></a> tmpb->data = </span><span class=cF5>CAlloc</span><span class=cF0>(tmpb->size, doc->mem_task);
|
|
<a name="l1413"></a> tmpb->num = doc->cur_bin_num++;
|
|
<a name="l1414"></a> tmpb->use_count = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l1415"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpb, doc->bin_head.last);
|
|
<a name="l1416"></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="l1417"></a> doc_e->bin_data = tmpb;
|
|
<a name="l1418"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l1419"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e)
|
|
<a name="l1420"></a> {
|
|
<a name="l1421"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->de_flags & </span><span class=cF3>DOCEF_TAG</span><span class=cF0> && doc_e->tag && *doc_e->tag)
|
|
<a name="l1422"></a> tmpb->tag = </span><span class=cF5>StrNew</span><span class=cF0>(doc_e->tag, doc->mem_task);
|
|
<a name="l1423"></a> doc->cur_entry = doc_e;
|
|
<a name="l1424"></a> doc->cur_col = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l1425"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l1426"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(doc);
|
|
<a name="l1427"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SpriteMainEd</span><span class=cF7>(</span><span class=cF0>doc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>SPE_ABORT</span><span class=cF0>)
|
|
<a name="l1428"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1429"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l1430"></a> </span><span class=cF5>DocEntryDel</span><span class=cF0>(doc, doc_e);
|
|
<a name="l1431"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1432"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1433"></a> </span><span class=cF5>SpriteSelAll</span><span class=cF0>(tmpb->data, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1434"></a> }
|
|
<a name="l1435"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1436"></a> </span><span class=cF5>DocBinDel</span><span class=cF0>(doc, tmpb);
|
|
<a name="l1437"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
|
|
<a name="l1438"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l1439"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1440"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>doc->flags & (</span><span class=cF3>DOCF_PLAIN_TEXT</span><span class=cF0> | </span><span class=cF3>DOCF_PLAIN_TEXT_TABS</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l1441"></a> </span><span class=cF5>DocBinsValidate</span><span class=cF0>(doc);
|
|
<a name="l1442"></a>}
|
|
<a name="l1443"></a>
|
|
<a name="l1444"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>EdSpriteEd</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l1445"></a>{
|
|
<a name="l1446"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce;
|
|
<a name="l1447"></a> </span><span class=cF9>CDocBin</span><span class=cF0> *tmpb;
|
|
<a name="l1448"></a> </span><span class=cF9>CSprite</span><span class=cF0> *old_csprite;
|
|
<a name="l1449"></a> </span><span class=cF9>I64</span><span class=cF0> old_size;
|
|
<a name="l1450"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock = </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l1451"></a>
|
|
<a name="l1452"></a> doc_ce = doc->cur_entry;
|
|
<a name="l1453"></a> tmpb = doc_ce->bin_data;
|
|
<a name="l1454"></a> old_size = tmpb->size;
|
|
<a name="l1455"></a> old_csprite = tmpb->data;
|
|
<a name="l1456"></a> tmpb->data = </span><span class=cF5>MAllocIdent</span><span class=cF0>(old_csprite, doc->mem_task);
|
|
<a name="l1457"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l1458"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SpriteMainEd</span><span class=cF7>(</span><span class=cF0>doc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>SPE_ABORT</span><span class=cF0>)
|
|
<a name="l1459"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1460"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l1461"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpb->data);
|
|
<a name="l1462"></a> tmpb->data = old_csprite;
|
|
<a name="l1463"></a> tmpb->size = old_size;
|
|
<a name="l1464"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1465"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l1466"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l1467"></a> </span><span class=cF5>SpriteSelAll</span><span class=cF0>(tmpb->data, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l1468"></a> </span><span class=cF5>Free</span><span class=cF0>(old_csprite);
|
|
<a name="l1469"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l1470"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
|
|
<a name="l1471"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l1472"></a>}
|
|
</span></pre></body>
|
|
</html>
|