mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
923b700822
Add CAtapiWriteCmd for AHCIAtapiBlksWrite. Remove AHCIAtapiSeek and AHCIAtapiFormat.
210 lines
25 KiB
HTML
Executable file
210 lines
25 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.16">
|
|
<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/Input"</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>, </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_default=</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l4"></a>{</span><span class=cF2>//Chooser for 16-color, default or transparent.</span><span class=cF0>
|
|
<a name="l5"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l6"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l7"></a>
|
|
<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>"%s"</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>"$MU,\"TRANSPARENT\",LE=TRANSPARENT$\n"</span><span class=cF0>);
|
|
<a name="l12"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </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>"$BG,%d$$MU,\"__%-8Z__\",LE=%d$$BG$\n"</span><span class=cF0>, i, i, </span><span class=cF6>"ST_COLORS"</span><span class=cF0>, i);
|
|
<a name="l14"></a> </span><span class=cF1>if</span><span class=cF0> (allow_default)
|
|
<a name="l15"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$BG,WHITE$$MU,\"DEFAULT\",LE=DOC_DEFAULT$$BG$"</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>
|
|
<a name="l19"></a> </span><span class=cF1>return</span><span class=cF0> i;
|
|
<a name="l20"></a>}
|
|
<a name="l21"></a>
|
|
<a name="l22"></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="l23"></a>{</span><span class=cF2>//Chooser for std ZealOS </span><a href="https://zeal-operating-system.github.io/ZealOS/System/Gr/GrDC.CC.html#l62"><span class=cF4>DCLighting</span></a><span class=cF2>() color.</span><span class=cF0>
|
|
<a name="l24"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l25"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l26"></a>
|
|
<a name="l27"></a> </span><span class=cF1>if</span><span class=cF0> (header)
|
|
<a name="l28"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"%s"</span><span class=cF0>, header);
|
|
<a name="l29"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\nSingle-Sided means front and back different."</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF6>"\nDouble-Sided means front and back same."</span><span class=cF0>
|
|
<a name="l31"></a> </span><span class=cF6>"\n"</span><span class=cF0>
|
|
<a name="l32"></a> </span><span class=cF6>"\nHalf-Range means 0 to [0,7]"</span><span class=cF0>
|
|
<a name="l33"></a> </span><span class=cF6>"\n [8,15]-8 to [8,15]"</span><span class=cF0>
|
|
<a name="l34"></a> </span><span class=cF6>"\nFull-Range means 0 to [0,7] to [0,7]+8"</span><span class=cF0>
|
|
<a name="l35"></a> </span><span class=cF6>"\n"</span><span class=cF0>);
|
|
<a name="l36"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\n$LTPURPLE$Single-Sided Full-Range Double-Sided Full-Range\n$BLACK$"</span><span class=cF0>);
|
|
<a name="l37"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cF3>COLORS_NUM</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>; i++)
|
|
<a name="l38"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l39"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$BG,%d$$MU,\"__%-19Z__\",LE=%d$$BG$ "</span><span class=cF0>, i, i, </span><span class=cF6>"ST_COLORS"</span><span class=cF0>, i);
|
|
<a name="l40"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$BG,%d$$MU,\"__%-19Z__\",LE=%d$$BG$\n"</span><span class=cF0>, i, i, </span><span class=cF6>"ST_COLORS"</span><span class=cF0>, </span><span class=cF3>ROPF_TWO_SIDED</span><span class=cF0>+i);
|
|
<a name="l41"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l42"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\n$LTPURPLE$Single-Sided Half-Range Double-Sided Half-Range\n$BLACK$"</span><span class=cF0>);
|
|
<a name="l43"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cF3>COLORS_NUM</span><span class=cF0>; i++)
|
|
<a name="l44"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l45"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$BG,%d$$MU,\"__%-19Z__\",LE=%d$$BG$ "</span><span class=cF0>, i, i, </span><span class=cF6>"ST_COLORS"</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>"$BG,%d$$MU,\"__%-19Z__\",LE=%d$$BG$\n"</span><span class=cF0>, i, i, </span><span class=cF6>"ST_COLORS"</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="l47"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l48"></a> i = </span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
|
|
<a name="l49"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l50"></a>
|
|
<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>"$DA-TRM,A=\"X Scale :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l57"></a> </span><span class=cF1>F64</span><span class=cF0> y_scale format </span><span class=cF6>"$DA-TRM,A=\"Y Scale :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l58"></a> </span><span class=cF1>F64</span><span class=cF0> z_scale format </span><span class=cF6>"$DA-TRM,A=\"Z Scale :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l59"></a>
|
|
<a name="l60"></a> </span><span class=cF1>F64</span><span class=cF0> theta_z format </span><span class=cF6>"\nAngles are in degrees\n"</span><span class=cF0>
|
|
<a name="l61"></a> </span><span class=cF6>"$DA-TRM,A=\"Z-Axis :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l62"></a> </span><span class=cF1>F64</span><span class=cF0> theta_y format </span><span class=cF6>"$DA-TRM,A=\"Y-Axis :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l63"></a> </span><span class=cF1>F64</span><span class=cF0> theta_x format </span><span class=cF6>"$DA-TRM,A=\"X-Axis :%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l64"></a>
|
|
<a name="l65"></a> </span><span class=cF1>F64</span><span class=cF0> x_offset format </span><span class=cF6>"\n$DA-TRM,A=\"X Offset:%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l66"></a> </span><span class=cF1>F64</span><span class=cF0> y_offset format </span><span class=cF6>"$DA-TRM,A=\"Y Offset:%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l67"></a> </span><span class=cF1>F64</span><span class=cF0> z_offset format </span><span class=cF6>"$DA-TRM,A=\"Z Offset:%12.6f\"$\n"</span><span class=cF0>;
|
|
<a name="l68"></a>};
|
|
<a name="l69"></a>
|
|
<a name="l70"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Graphics/Input;Graphics/Math/3D Transformation"</span><span class=cF0>
|
|
<a name="l71"></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="l72"></a>{</span><span class=cF2>//Prompt for Mat4x4 transform.</span><span class=cF0>
|
|
<a name="l73"></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="l74"></a>
|
|
<a name="l75"></a> tf->x_scale = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l76"></a> tf->y_scale = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l77"></a> tf->z_scale = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l78"></a> tf->theta_x = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l79"></a> tf->theta_y = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l80"></a> tf->theta_z = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l81"></a> tf->x_offset = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l82"></a> tf->y_offset = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l83"></a> tf->z_offset = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l84"></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>)
|
|
<a name="l85"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l86"></a> </span><span class=cF5>MemSet</span><span class=cF0>(r, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>16</span><span class=cF0> * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I64</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l87"></a> r[</span><span class=cFE>0</span><span class=cF0>] = tf->x_scale * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l88"></a> r[</span><span class=cFE>5</span><span class=cF0>] = tf->y_scale * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l89"></a> r[</span><span class=cFE>10</span><span class=cF0>] = tf->z_scale * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l90"></a> r[</span><span class=cFE>15</span><span class=cF0>] = </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l91"></a>
|
|
<a name="l92"></a> </span><span class=cF5>Mat4x4RotZ</span><span class=cF0>(r, tf->theta_z * </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>180</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l93"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(r, tf->theta_y * </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>180</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l94"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(r, tf->theta_x * </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>180</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l95"></a>
|
|
<a name="l96"></a> r[</span><span class=cFE>3</span><span class=cF0>] = tf->x_offset * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l97"></a> r[</span><span class=cFE>7</span><span class=cF0>] = tf->y_offset * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l98"></a> r[</span><span class=cFE>11</span><span class=cF0>] = tf->z_offset * </span><span class=cF3>GR_SCALE</span><span class=cF0>;
|
|
<a name="l99"></a>
|
|
<a name="l100"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l101"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l102"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l103"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l104"></a>}
|
|
<a name="l105"></a>
|
|
<a name="l106"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Graphics/Input"</span><span class=cF0>
|
|
<a name="l107"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>PU_SPACING</span><span class=cF0> </span><span class=cFE>10</span><span class=cF0>
|
|
<a name="l108"></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="l109"></a>{
|
|
<a name="l110"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, i1, j1;
|
|
<a name="l111"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocPut</span><span class=cF0>(task);
|
|
<a name="l112"></a>
|
|
<a name="l113"></a> </span><span class=cF1>for</span><span class=cF0> (j = </span><span class=cFE>0</span><span class=cF0>; j < </span><span class=cFE>17</span><span class=cF0>; j++)
|
|
<a name="l114"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cFE>17</span><span class=cF0>; i++)
|
|
<a name="l115"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l116"></a> </span><span class=cF1>if</span><span class=cF0> (j < </span><span class=cFE>16</span><span class=cF0>)
|
|
<a name="l117"></a> j1 = j;
|
|
<a name="l118"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l119"></a> j1 = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (i < </span><span class=cFE>16</span><span class=cF0>)
|
|
<a name="l121"></a> i1 = i;
|
|
<a name="l122"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l123"></a> i1 = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l124"></a> dc->color = j1 + i1 << </span><span class=cFE>16</span><span class=cF0> + </span><span class=cF3>ROPF_DITHER</span><span class=cF0>;
|
|
<a name="l125"></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>"DitherFrame"</span><span class=cF0>, task</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF3>PU_SPACING</span><span class=cF0>, </span><span class=cF3>PU_SPACING</span><span class=cF0>);
|
|
<a name="l126"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l127"></a> i = (</span><span class=cFE>17</span><span class=cF0> * </span><span class=cF3>PU_SPACING</span><span class=cF0> + </span><span class=cF3>FONT_WIDTH</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>) / </span><span class=cF3>FONT_WIDTH</span><span class=cF0>;
|
|
<a name="l128"></a> </span><span class=cF1>if</span><span class=cF0> (doc->max_x > i)
|
|
<a name="l129"></a> i = doc->max_x;
|
|
<a name="l130"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(task->win_left, task->win_left + i, task);
|
|
<a name="l131"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task->win_top, task->win_top + doc->max_y + </span><span class=cF7>(</span><span class=cFE>17</span><span class=cF0> * </span><span class=cF3>PU_SPACING</span><span class=cF0> + </span><span class=cF3>FONT_WIDTH</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0> / </span><span class=cF3>FONT_WIDTH</span><span class=cF0>, task);
|
|
<a name="l132"></a>}
|
|
<a name="l133"></a>
|
|
<a name="l134"></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="l135"></a>{
|
|
<a name="l136"></a> </span><span class=cF9>I64</span><span class=cF0> message_code, arg1, arg2, res = -</span><span class=cFE>1</span><span class=cF0>, i, j;
|
|
<a name="l137"></a>
|
|
<a name="l138"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
|
<a name="l139"></a> </span><span class=cF6>"%s"</span><span class=cF0>, header;
|
|
<a name="l140"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(</span><span class=cF5>DocPut</span><span class=cF0>);
|
|
<a name="l141"></a> </span><span class=cF5>FramePtrAdd</span><span class=cF0>(</span><span class=cF6>"DitherFrame"</span><span class=cF0>, </span><span class=cF7>(</span><span class=cF5>DocPut</span><span class=cF0>->max_y + </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>);
|
|
<a name="l142"></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="l143"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it = &</span><span class=cF5>DrawIt</span><span class=cF0>;
|
|
<a name="l144"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l145"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l146"></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_DOWN</span><span class=cF0> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>);
|
|
<a name="l147"></a> </span><span class=cF1>if</span><span class=cF0> (message_code == </span><span class=cF3>MESSAGE_MS_L_DOWN</span><span class=cF0>)
|
|
<a name="l148"></a> {
|
|
<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>);
|
|
<a name="l150"></a> i = arg1 / </span><span class=cF3>PU_SPACING</span><span class=cF0>;
|
|
<a name="l151"></a> j = (arg2 - </span><span class=cF5>FramePtr</span><span class=cF7>(</span><span class=cF6>"DitherFrame"</span><span class=cF7>)</span><span class=cF0>) / </span><span class=cF3>PU_SPACING</span><span class=cF0>;
|
|
<a name="l152"></a> </span><span class=cF1>if</span><span class=cF0> (arg1 >= </span><span class=cFE>0</span><span class=cF0> && arg2 >= </span><span class=cFE>0</span><span class=cF0> && </span><span class=cFE>0</span><span class=cF0> <= j < </span><span class=cFE>17</span><span class=cF0> && </span><span class=cFE>0</span><span class=cF0> <= i < </span><span class=cFE>17</span><span class=cF0>)
|
|
<a name="l153"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l154"></a> </span><span class=cF1>if</span><span class=cF0> (j == </span><span class=cFE>16</span><span class=cF0>)
|
|
<a name="l155"></a> j = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l156"></a> </span><span class=cF1>if</span><span class=cF0> (i == </span><span class=cFE>16</span><span class=cF0>)
|
|
<a name="l157"></a> i = </span><span class=cF3>TRANSPARENT</span><span class=cF0>;
|
|
<a name="l158"></a> res = j + i << </span><span class=cFE>16</span><span class=cF0> + </span><span class=cF3>ROPF_DITHER</span><span class=cF0>;
|
|
<a name="l159"></a> </span><span class=cF1>goto</span><span class=cF0> dc_done;
|
|
<a name="l160"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l161"></a> }
|
|
<a name="l162"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l163"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>message_code == </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0> && (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="l164"></a>
|
|
<a name="l165"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF5>MessageGet</span><span class=cF0>(&arg1, &arg2, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_KEY_UP</span><span class=cF0>);
|
|
<a name="l166"></a> </span><span class=cF1>while</span><span class=cF0> (!arg1);
|
|
<a name="l167"></a>dc_done:
|
|
<a name="l168"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
|
<a name="l169"></a> </span><span class=cF5>FramePtrDel</span><span class=cF0>(</span><span class=cF6>"DitherFrame"</span><span class=cF0>);
|
|
<a name="l170"></a>
|
|
<a name="l171"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l172"></a>}
|
|
<a name="l173"></a>
|
|
<a name="l174"></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="l175"></a>{</span><span class=cF2>//Chooser for 2 x 16 colors or transparent.</span><span class=cF0>
|
|
<a name="l176"></a> </span><span class=cF1>U8</span><span class=cF0> buf[</span><span class=cF3>STR_LEN</span><span class=cF0>];
|
|
<a name="l177"></a>
|
|
<a name="l178"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>"DitherColor2(0x%X);"</span><span class=cF0>, header);
|
|
<a name="l179"></a>
|
|
<a name="l180"></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="l181"></a>}
|
|
</span></pre></body>
|
|
</html>
|