templeos-info/public/Wb/Adam/DolDoc/DocGr.HC.HTML

195 lines
21 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre id="content">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/Input&quot;</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpColor</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>,
<a name="l4"></a> </span><span class=cF1>Bool</span><span class=cF0> allow_transparent=</span><span class=cF3>TRUE</span><span class=cF0>,</span><span class=cF1>Bool</span><span class=cF0> allow_dft=</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l5"></a>{</span><span class=cF2>//Chooser for 16-color, default or transparent.</span><span class=cF0>
<a name="l6"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l7"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l8"></a> </span><span class=cF1>if</span><span class=cF0> (header)
<a name="l9"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;%s&quot;</span><span class=cF0>,header);
<a name="l10"></a> </span><span class=cF1>if</span><span class=cF0> (allow_transparent)
<a name="l11"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU,\&quot;TRANSPARENT\&quot;,LE=TRANSPARENT$\n&quot;</span><span class=cF0>);
<a name="l12"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;</span><span class=cF3>COLORS_NUM</span><span class=cF0>;i++)
<a name="l13"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,%d$$MU,\&quot;__%-8Z__\&quot;,LE=%d$$BG$\n&quot;</span><span class=cF0>,i,i,</span><span class=cF6>&quot;ST_COLORS&quot;</span><span class=cF0>,i);
<a name="l14"></a> </span><span class=cF1>if</span><span class=cF0> (allow_dft)
<a name="l15"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,WHITE$$MU,\&quot;DEFAULT\&quot;,LE=DOC_DFT$$BG$&quot;</span><span class=cF0>);
<a name="l16"></a> i=</span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
<a name="l17"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l18"></a> </span><span class=cF1>return</span><span class=cF0> i;
<a name="l19"></a>}
<a name="l20"></a>
<a name="l21"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpColorLighting</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l22"></a>{</span><span class=cF2>//Chooser for std TempleOS </span><a href="/Wb/Adam/Gr/GrDC.HC.HTML#l57"><span class=cF4>DCLighting</span></a><span class=cF2>() color.</span><span class=cF0>
<a name="l23"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l24"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l25"></a> </span><span class=cF1>if</span><span class=cF0> (header)
<a name="l26"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;%s&quot;</span><span class=cF0>,header);
<a name="l27"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\nSingle-Sided means front and back different.&quot;</span><span class=cF0>
<a name="l28"></a> </span><span class=cF6>&quot;\nDouble-Sided means front and back same.&quot;</span><span class=cF0>
<a name="l29"></a> </span><span class=cF6>&quot;\n&quot;</span><span class=cF0>
<a name="l30"></a> </span><span class=cF6>&quot;\nHalf-Range means 0 to [0,7]&quot;</span><span class=cF0>
<a name="l31"></a> </span><span class=cF6>&quot;\n [8,15]-8 to [8,15]&quot;</span><span class=cF0>
<a name="l32"></a> </span><span class=cF6>&quot;\nFull-Range means 0 to [0,7] to [0,7]+8&quot;</span><span class=cF0>
<a name="l33"></a> </span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l34"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
<a name="l35"></a> </span><span class=cF6>&quot;\n$LTPURPLE$Single-Sided Full-Range Double-Sided Full-Range\n$BLACK$&quot;</span><span class=cF0>);
<a name="l36"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;</span><span class=cF3>COLORS_NUM</span><span class=cF0>/2;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l37"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,%d$$MU,\&quot;__%-19Z__\&quot;,LE=%d$$BG$ &quot;</span><span class=cF0>,i,i,</span><span class=cF6>&quot;ST_COLORS&quot;</span><span class=cF0>,i);
<a name="l38"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,%d$$MU,\&quot;__%-19Z__\&quot;,LE=%d$$BG$\n&quot;</span><span class=cF0>,i,i,</span><span class=cF6>&quot;ST_COLORS&quot;</span><span class=cF0>,
<a name="l39"></a> </span><span class=cF3>ROPF_TWO_SIDED</span><span class=cF0>+i);
<a name="l40"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l41"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
<a name="l42"></a> </span><span class=cF6>&quot;\n$LTPURPLE$Single-Sided Half-Range Double-Sided Half-Range\n$BLACK$&quot;</span><span class=cF0>);
<a name="l43"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;</span><span class=cF3>COLORS_NUM</span><span class=cF0>;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l44"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,%d$$MU,\&quot;__%-19Z__\&quot;,LE=%d$$BG$ &quot;</span><span class=cF0>,
<a name="l45"></a> i,i,</span><span class=cF6>&quot;ST_COLORS&quot;</span><span class=cF0>,</span><span class=cF3>ROPF_HALF_RANGE_COLOR</span><span class=cF0>+i);
<a name="l46"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BG,%d$$MU,\&quot;__%-19Z__\&quot;,LE=%d$$BG$\n&quot;</span><span class=cF0>,
<a name="l47"></a> i,i,</span><span class=cF6>&quot;ST_COLORS&quot;</span><span class=cF0>,</span><span class=cF3>ROPF_TWO_SIDED</span><span class=cF0>+</span><span class=cF3>ROPF_HALF_RANGE_COLOR</span><span class=cF0>+i);
<a name="l48"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l49"></a> i=</span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
<a name="l50"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l51"></a> </span><span class=cF1>return</span><span class=cF0> i;
<a name="l52"></a>}
<a name="l53"></a>
<a name="l54"></a></span><span class=cF1>class</span><span class=cF0> </span><span class=cF9>CTransformForm</span><span class=cF0>
<a name="l55"></a>{
<a name="l56"></a> </span><span class=cF1>F64</span><span class=cF0> x_scale format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;X Scale :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l57"></a> </span><span class=cF1>F64</span><span class=cF0> y_scale format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Y Scale :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l58"></a> </span><span class=cF1>F64</span><span class=cF0> z_scale format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Z Scale :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l59"></a> </span><span class=cF1>F64</span><span class=cF0> theta_z format </span><span class=cF6>&quot;\nAngles are in degrees\n&quot;</span><span class=cF0>
<a name="l60"></a> </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Z-Axis :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l61"></a> </span><span class=cF1>F64</span><span class=cF0> theta_y format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Y-Axis :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l62"></a> </span><span class=cF1>F64</span><span class=cF0> theta_x format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;X-Axis :%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l63"></a> </span><span class=cF1>F64</span><span class=cF0> x_offset format </span><span class=cF6>&quot;\n$DA-TRM,A=\&quot;X Offset:%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l64"></a> </span><span class=cF1>F64</span><span class=cF0> y_offset format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Y Offset:%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l65"></a> </span><span class=cF1>F64</span><span class=cF0> z_offset format </span><span class=cF6>&quot;$DA-TRM,A=\&quot;Z Offset:%12.6f\&quot;$\n&quot;</span><span class=cF0>;
<a name="l66"></a>};
<a name="l67"></a>
<a name="l68"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/Input;Graphics/Math/3D Transformation&quot;</span><span class=cF0>
<a name="l69"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>PopUpTransform</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> *r)
<a name="l70"></a>{</span><span class=cF2>//Prompt for Mat4x4 transform.</span><span class=cF0>
<a name="l71"></a> </span><span class=cF9>CTransformForm</span><span class=cF0> *tf=</span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CTransformForm</span><span class=cF7>)</span><span class=cF0>);
<a name="l72"></a> tf-&gt;x_scale=1.0;
<a name="l73"></a> tf-&gt;y_scale=1.0;
<a name="l74"></a> tf-&gt;z_scale=1.0;
<a name="l75"></a> tf-&gt;theta_x=0.0;
<a name="l76"></a> tf-&gt;theta_y=0.0;
<a name="l77"></a> tf-&gt;theta_z=0.0;
<a name="l78"></a> tf-&gt;x_offset=0.0;
<a name="l79"></a> tf-&gt;y_offset=0.0;
<a name="l80"></a> tf-&gt;z_offset=0.0;
<a name="l81"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpForm</span><span class=cF7>(</span><span class=cF0>tf</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l82"></a> </span><span class=cF5>MemSet</span><span class=cF0>(r,0,16*</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I64</span><span class=cF7>)</span><span class=cF0>);
<a name="l83"></a> r[0] =tf-&gt;x_scale*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l84"></a> r[5] =tf-&gt;y_scale*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l85"></a> r[10]=tf-&gt;z_scale*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l86"></a> r[15]=</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l87"></a>
<a name="l88"></a> </span><span class=cF5>Mat4x4RotZ</span><span class=cF0>(r,tf-&gt;theta_z*</span><span class=cF3>pi</span><span class=cF0>/180.0);
<a name="l89"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(r,tf-&gt;theta_y*</span><span class=cF3>pi</span><span class=cF0>/180.0);
<a name="l90"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(r,tf-&gt;theta_x*</span><span class=cF3>pi</span><span class=cF0>/180.0);
<a name="l91"></a>
<a name="l92"></a> r[3] =tf-&gt;x_offset*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l93"></a> r[7] =tf-&gt;y_offset*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l94"></a> r[11]=tf-&gt;z_offset*</span><span class=cF3>GR_SCALE</span><span class=cF0>;
<a name="l95"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l96"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l97"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l98"></a>}
<a name="l99"></a>
<a name="l100"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Graphics/Input&quot;</span><span class=cF0>
<a name="l101"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>PU_SPACING</span><span class=cF0> 10
<a name="l102"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawIt</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l103"></a>{
<a name="l104"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,i1,j1;
<a name="l105"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocPut</span><span class=cF0>(task);
<a name="l106"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;17;j++)
<a name="l107"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;17;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (j&lt;16)
<a name="l109"></a> j1=j;
<a name="l110"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l111"></a> j1=</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l112"></a> </span><span class=cF1>if</span><span class=cF0> (i&lt;16)
<a name="l113"></a> i1=i;
<a name="l114"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l115"></a> i1=</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l116"></a> dc-&gt;color=j1+i1&lt;&lt;16+</span><span class=cF3>ROPF_DITHER</span><span class=cF0>;
<a name="l117"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,i*</span><span class=cF3>PU_SPACING</span><span class=cF0>,j*</span><span class=cF3>PU_SPACING</span><span class=cF0>+</span><span class=cF5>FramePtr</span><span class=cF7>(</span><span class=cF6>&quot;DitherFrame&quot;</span><span class=cF0>,task</span><span class=cF7>)</span><span class=cF0>,
<a name="l118"></a> </span><span class=cF3>PU_SPACING</span><span class=cF0>,</span><span class=cF3>PU_SPACING</span><span class=cF0>);
<a name="l119"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l120"></a> i=(17*</span><span class=cF3>PU_SPACING</span><span class=cF0>+</span><span class=cF3>FONT_WIDTH</span><span class=cF0>-1)/</span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
<a name="l121"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;max_x&gt;i) i=doc-&gt;max_x;
<a name="l122"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(task-&gt;win_left,task-&gt;win_left+i,task);
<a name="l123"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_top,task-&gt;win_top+doc-&gt;max_y+
<a name="l124"></a> </span><span class=cF7>(</span><span class=cF0>17*</span><span class=cF3>PU_SPACING</span><span class=cF0>+</span><span class=cF3>FONT_WIDTH</span><span class=cF0>-1</span><span class=cF7>)</span><span class=cF0>/</span><span class=cF3>FONT_WIDTH</span><span class=cF0>,task);
<a name="l125"></a>}
<a name="l126"></a>
<a name="l127"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>DitherColor2</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l128"></a>{
<a name="l129"></a> </span><span class=cF9>I64</span><span class=cF0> msg_code,arg1,arg2,res=-1,i,j;
<a name="l130"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l131"></a> </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>,header;
<a name="l132"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(</span><span class=cF5>DocPut</span><span class=cF0>);
<a name="l133"></a> </span><span class=cF5>FramePtrAdd</span><span class=cF0>(</span><span class=cF6>&quot;DitherFrame&quot;</span><span class=cF0>,</span><span class=cF7>(</span><span class=cF5>DocPut</span><span class=cF0>-&gt;max_y+1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>);
<a name="l134"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="/Wb/Adam/TaskSettings.HC.HTML#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l135"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;draw_it=&amp;</span><span class=cF5>DrawIt</span><span class=cF0>;
<a name="l136"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l137"></a> msg_code=</span><span class=cF5>GetMsg</span><span class=cF0>(&amp;arg1,&amp;arg2,1&lt;&lt;</span><span class=cF3>MSG_MS_L_DOWN</span><span class=cF0>|1&lt;&lt;</span><span class=cF3>MSG_KEY_DOWN</span><span class=cF0>);
<a name="l138"></a> </span><span class=cF1>if</span><span class=cF0> (msg_code==</span><span class=cF3>MSG_MS_L_DOWN</span><span class=cF0>) {
<a name="l139"></a> msg_code=</span><span class=cF5>GetMsg</span><span class=cF0>(&amp;arg1,&amp;arg2,1&lt;&lt;</span><span class=cF3>MSG_MS_L_UP</span><span class=cF0>);
<a name="l140"></a> i=arg1/</span><span class=cF3>PU_SPACING</span><span class=cF0>;
<a name="l141"></a> j=(arg2-</span><span class=cF5>FramePtr</span><span class=cF7>(</span><span class=cF6>&quot;DitherFrame&quot;</span><span class=cF7>)</span><span class=cF0>)/</span><span class=cF3>PU_SPACING</span><span class=cF0>;
<a name="l142"></a> </span><span class=cF1>if</span><span class=cF0> (arg1&gt;=0 &amp;&amp; arg2&gt;=0 &amp;&amp; 0&lt;=j&lt;17 &amp;&amp; 0&lt;=i&lt;17) </span><span class=cF7>{</span><span class=cF0>
<a name="l143"></a> </span><span class=cF1>if</span><span class=cF0> (j==16) j=</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l144"></a> </span><span class=cF1>if</span><span class=cF0> (i==16) i=</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l145"></a> res=j+i&lt;&lt;16+</span><span class=cF3>ROPF_DITHER</span><span class=cF0>;
<a name="l146"></a> </span><span class=cF1>goto</span><span class=cF0> dc_done;
<a name="l147"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l148"></a> }
<a name="l149"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>msg_code==</span><span class=cF3>MSG_KEY_DOWN</span><span class=cF0> &amp;&amp; (arg1==</span><span class=cF3>CH_ESC</span><span class=cF0> || arg1==</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>);
<a name="l150"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF5>GetMsg</span><span class=cF0>(&amp;arg1,&amp;arg2,1&lt;&lt;</span><span class=cF3>MSG_KEY_UP</span><span class=cF0>);
<a name="l151"></a> </span><span class=cF1>while</span><span class=cF0> (!arg1);
<a name="l152"></a>dc_done:
<a name="l153"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l154"></a> </span><span class=cF5>FramePtrDel</span><span class=cF0>(</span><span class=cF6>&quot;DitherFrame&quot;</span><span class=cF0>);
<a name="l155"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l156"></a>}
<a name="l157"></a>
<a name="l158"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpColorDither</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l159"></a>{</span><span class=cF2>//Chooser for 2 x 16 colors or transparent.</span><span class=cF0>
<a name="l160"></a> </span><span class=cF1>U8</span><span class=cF0> buf[</span><span class=cF3>STR_LEN</span><span class=cF0>];
<a name="l161"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;DitherColor2(0x%X);&quot;</span><span class=cF0>,header);
<a name="l162"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>PopUp</span><span class=cF0>(buf,</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l163"></a>}
</span></pre></body>
</html>