ZealOS/docs/Demo/AcctExample/TOS/TOSTheme.CC.html
TomAwezome 1b75d91002 Fix Mount AHCI Port selection.
Add arg to SATARep to specify drive types to show.
Add checks in AHCIPortInit to verify port signatures, add helper method to get signatures from port.
2021-08-02 16:40:05 -04:00

250 lines
28 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.13">
<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=cF2>/*</span><span class=cF0>
<a name="l2"></a></span><span class=cF2>This is one of the oldest songs.</span><span class=cF0> </span><span class=cF2>I picked</span><span class=cF0>
<a name="l3"></a></span><span class=cF2>the random name &quot;risen&quot; and said to God</span><span class=cF0>
<a name="l4"></a></span><span class=cF2>&quot;Oh, you're ambitious,&quot; thinking it was</span><span class=cF0>
<a name="l5"></a></span><span class=cF2>an epic name. He laughed and gave an</span><span class=cF0>
<a name="l6"></a></span><span class=cF2>epic song!</span><span class=cF0>
<a name="l7"></a></span><span class=cF2>*/</span><span class=cF0>
<a name="l8"></a>
<a name="l9"></a>
<a name="l10"></a>
<a name="l11"></a>
<a name="l12"></a> </span><span class=cFA>&lt;1&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l13"></a>
<a name="l14"></a>
<a name="l15"></a>
<a name="l16"></a>
<a name="l17"></a>
<a name="l18"></a>
<a name="l19"></a>
<a name="l20"></a>
<a name="l21"></a>
<a name="l22"></a> </span><span class=cFA>&lt;2&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l23"></a>
<a name="l24"></a>
<a name="l25"></a>
<a name="l26"></a>
<a name="l27"></a>
<a name="l28"></a>
<a name="l29"></a>
<a name="l30"></a>
<a name="l31"></a>
<a name="l32"></a> </span><span class=cFA>&lt;3&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l33"></a>
<a name="l34"></a>
<a name="l35"></a>
<a name="l36"></a>
<a name="l37"></a>
<a name="l38"></a>
<a name="l39"></a>
<a name="l40"></a>
<a name="l41"></a>
<a name="l42"></a> </span><span class=cFA>&lt;4&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l43"></a>
<a name="l44"></a>
<a name="l45"></a>
<a name="l46"></a></span><span class=cF1>F64</span><span class=cF0> t0 = </span><span class=cF5>Beat</span><span class=cF0>;
<a name="l47"></a>
<a name="l48"></a>#</span><span class=cF1>define</span><span class=cF0> WING </span><span class=cFE>24</span><span class=cF0>
<a name="l49"></a>#</span><span class=cF1>define</span><span class=cF0> BODY </span><span class=cFE>8</span><span class=cF0>
<a name="l50"></a>
<a name="l51"></a></span><span class=cF1>U0</span><span class=cF0> Bird(</span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF1>F64</span><span class=cF0> wing_theta)
<a name="l52"></a>{
<a name="l53"></a> </span><span class=cF9>CD3I32</span><span class=cF0> p[</span><span class=cFE>3</span><span class=cF0>];
<a name="l54"></a>
<a name="l55"></a> dc-&gt;color = </span><span class=cF3>WHITE</span><span class=cF0>;
<a name="l56"></a>
<a name="l57"></a> p[</span><span class=cFE>0</span><span class=cF0>].x = </span><span class=cFE>0</span><span class=cF0>; p[</span><span class=cFE>0</span><span class=cF0>].y = </span><span class=cFE>0</span><span class=cF0>;
<a name="l58"></a> p[</span><span class=cFE>0</span><span class=cF0>].z = -BODY;
<a name="l59"></a> p[</span><span class=cFE>1</span><span class=cF0>].x = </span><span class=cFE>0</span><span class=cF0>; p[</span><span class=cFE>1</span><span class=cF0>].y = </span><span class=cFE>0</span><span class=cF0>;
<a name="l60"></a> p[</span><span class=cFE>1</span><span class=cF0>].z = BODY;
<a name="l61"></a> p[</span><span class=cFE>2</span><span class=cF0>].x = -WING * </span><span class=cF5>Cos</span><span class=cF0>(wing_theta);
<a name="l62"></a> p[</span><span class=cFE>2</span><span class=cF0>].y = -WING * </span><span class=cF5>Sin</span><span class=cF0>(wing_theta);
<a name="l63"></a> p[</span><span class=cFE>2</span><span class=cF0>].z = </span><span class=cFE>0</span><span class=cF0>;
<a name="l64"></a> </span><span class=cF5>GrFillPoly3</span><span class=cF0>(dc, </span><span class=cFE>3</span><span class=cF0>, p);
<a name="l65"></a>
<a name="l66"></a> p[</span><span class=cFE>0</span><span class=cF0>].x = </span><span class=cFE>0</span><span class=cF0>;
<a name="l67"></a> p[</span><span class=cFE>0</span><span class=cF0>].y = </span><span class=cFE>0</span><span class=cF0>;
<a name="l68"></a> p[</span><span class=cFE>0</span><span class=cF0>].z = -BODY;
<a name="l69"></a> p[</span><span class=cFE>1</span><span class=cF0>].x = </span><span class=cFE>0</span><span class=cF0>;
<a name="l70"></a> p[</span><span class=cFE>1</span><span class=cF0>].y = </span><span class=cFE>0</span><span class=cF0>;
<a name="l71"></a> p[</span><span class=cFE>1</span><span class=cF0>].z = BODY;
<a name="l72"></a> p[</span><span class=cFE>2</span><span class=cF0>].x = WING * </span><span class=cF5>Cos</span><span class=cF0>(wing_theta);
<a name="l73"></a> p[</span><span class=cFE>2</span><span class=cF0>].y = -WING * </span><span class=cF5>Sin</span><span class=cF0>(wing_theta);
<a name="l74"></a> p[</span><span class=cFE>2</span><span class=cF0>].z = </span><span class=cFE>0</span><span class=cF0>;
<a name="l75"></a> </span><span class=cF5>GrFillPoly3</span><span class=cF0>(dc, </span><span class=cFE>3</span><span class=cF0>, p);
<a name="l76"></a>
<a name="l77"></a> dc-&gt;color = </span><span class=cF3>ROPF_DITHER</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0> &lt;&lt; </span><span class=cFE>16</span><span class=cF0> + </span><span class=cF3>LTGRAY</span><span class=cF0>;
<a name="l78"></a> dc-&gt;thick = </span><span class=cFE>3</span><span class=cF0>;
<a name="l79"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, -BODY, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, BODY);
<a name="l80"></a>}
<a name="l81"></a>
<a name="l82"></a>#</span><span class=cF1>define</span><span class=cF0> SCALE </span><span class=cFE>115</span><span class=cF0>
<a name="l83"></a>#</span><span class=cF1>define</span><span class=cF0> ARM </span><span class=cFE>112</span><span class=cF0>
<a name="l84"></a>#</span><span class=cF1>define</span><span class=cF0> CHAIN </span><span class=cFE>100</span><span class=cF0>
<a name="l85"></a>#</span><span class=cF1>define</span><span class=cF0> CUP </span><span class=cFE>28</span><span class=cF0>
<a name="l86"></a>#</span><span class=cF1>define</span><span class=cF0> TILT -.</span><span class=cFE>25</span><span class=cF0>
<a name="l87"></a>#</span><span class=cF1>define</span><span class=cF0> ARM_Y -(</span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>93</span><span class=cF0> * CHAIN)
<a name="l88"></a>#</span><span class=cF1>define</span><span class=cF0> ARM_Z -</span><span class=cFE>45</span><span class=cF0>
<a name="l89"></a>
<a name="l90"></a>#</span><span class=cF1>define</span><span class=cF0> BIRDS_NUM </span><span class=cFE>7</span><span class=cF0>
<a name="l91"></a>#</span><span class=cF1>define</span><span class=cF0> RANGE </span><span class=cFE>40</span><span class=cF0>
<a name="l92"></a></span><span class=cF1>F64</span><span class=cF0> bx[BIRDS_NUM], by[BIRDS_NUM];
<a name="l93"></a>
<a name="l94"></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="l95"></a>{
<a name="l96"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l97"></a> </span><span class=cF1>F64</span><span class=cF0> theta, dt = </span><span class=cF5>Beat</span><span class=cF0> - t0, d_chain = </span><span class=cF5>Sin</span><span class=cF0>(</span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>64</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>) * CHAIN;
<a name="l98"></a>
<a name="l99"></a> </span><span class=cF1>if</span><span class=cF0> (t0)
<a name="l100"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l101"></a> </span><span class=cF5>DCDepthBufAlloc</span><span class=cF0>(dc);
<a name="l102"></a> dc-&gt;flags |= </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>;
<a name="l103"></a>
<a name="l104"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l105"></a> dc-&gt;x = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l106"></a> dc-&gt;y = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0> - SCALE;
<a name="l107"></a> dc-&gt;z = </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>GR_Z_ALL</span><span class=cF0> &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l108"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT);
<a name="l109"></a> </span><span class=cF5>Mat4x4RotZ</span><span class=cF0>(dc-&gt;r, </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>64</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l110"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;3&gt;</span><span class=cF0>);
<a name="l111"></a>
<a name="l112"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l113"></a> dc-&gt;x = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0> - ARM;
<a name="l114"></a> dc-&gt;y = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0> - SCALE + CHAIN - d_chain;
<a name="l115"></a> dc-&gt;z = </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>GR_Z_ALL</span><span class=cF0> &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l116"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l117"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(dc-&gt;r, </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l118"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;2&gt;</span><span class=cF0>);
<a name="l119"></a>
<a name="l120"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l121"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT);
<a name="l122"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l123"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l124"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, CUP, </span><span class=cFE>0</span><span class=cF0>, -</span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l125"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, -CUP, </span><span class=cFE>0</span><span class=cF0>, -</span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l126"></a>
<a name="l127"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l128"></a> dc-&gt;x = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0> + ARM;
<a name="l129"></a> dc-&gt;y = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0> - SCALE + CHAIN + d_chain;
<a name="l130"></a> dc-&gt;z = </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>GR_Z_ALL</span><span class=cF0> &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l131"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT - </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l132"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(dc-&gt;r, -</span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l133"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;2&gt;</span><span class=cF0>);
<a name="l134"></a>
<a name="l135"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l136"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT);
<a name="l137"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l138"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l139"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, CUP, </span><span class=cFE>0</span><span class=cF0>, -</span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l140"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, ARM_Y, ARM_Z, -CUP, </span><span class=cFE>0</span><span class=cF0>, -</span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>707</span><span class=cF0> * CUP);
<a name="l141"></a>
<a name="l142"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l143"></a> dc-&gt;x = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l144"></a> dc-&gt;y = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l145"></a> dc-&gt;z = </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>GR_Z_ALL</span><span class=cF0> &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l146"></a> </span><span class=cF5>Mat4x4RotZ</span><span class=cF0>(dc-&gt;r, </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>6</span><span class=cF0> - </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l147"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, TILT - </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l148"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(dc-&gt;r, -</span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>32</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF3>pi</span><span class=cF0> * dt / </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
<a name="l149"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;4&gt;</span><span class=cF0>);
<a name="l150"></a>
<a name="l151"></a> </span><span class=cF1>if</span><span class=cF0> (dt &gt;= </span><span class=cFE>12</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>)
<a name="l152"></a> {
<a name="l153"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l154"></a> dc-&gt;x = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l155"></a> dc-&gt;y = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l156"></a> dc-&gt;z = </span><span class=cF3>GR_Z_ALL</span><span class=cF0>;
<a name="l157"></a> </span><span class=cF5>Mat4x4Scale</span><span class=cF0>(dc-&gt;r, .</span><span class=cFE>5</span><span class=cF0> + .</span><span class=cFE>04</span><span class=cF0> * dt);
<a name="l158"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;1&gt;</span><span class=cF0>);
<a name="l159"></a> }
<a name="l160"></a>
<a name="l161"></a> dc-&gt;y = task-&gt;pix_height + </span><span class=cFE>60</span><span class=cF0>;
<a name="l162"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; BIRDS_NUM; i++)
<a name="l163"></a> {
<a name="l164"></a> bx[i] = </span><span class=cF5>Clamp</span><span class=cF0>(bx[i] + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>35</span><span class=cF0> * </span><span class=cF5>SignI64</span><span class=cF7>(</span><span class=cF5>RandI16</span><span class=cF7>)</span><span class=cF0>, -RANGE, RANGE);
<a name="l165"></a> by[i] = </span><span class=cF5>Clamp</span><span class=cF0>(by[i] + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>35</span><span class=cF0> * </span><span class=cF5>SignI64</span><span class=cF7>(</span><span class=cF5>RandI16</span><span class=cF7>)</span><span class=cF0>, -RANGE, RANGE);
<a name="l166"></a> theta = </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0> * i / BIRDS_NUM + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>2</span><span class=cF0> * </span><span class=cF3>pi</span><span class=cF0> * dt + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>;
<a name="l167"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(dc-&gt;r);
<a name="l168"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>);
<a name="l169"></a> </span><span class=cF5>Mat4x4RotZ</span><span class=cF0>(dc-&gt;r, theta);
<a name="l170"></a> </span><span class=cF5>Mat4x4TranslationEqu</span><span class=cF0>(dc-&gt;r, </span><span class=cFE>230</span><span class=cF0> * </span><span class=cF5>Cos</span><span class=cF7>(</span><span class=cF0>theta</span><span class=cF7>)</span><span class=cF0> + bx[i], </span><span class=cFE>230</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF0>theta</span><span class=cF7>)</span><span class=cF0>+by[i], -</span><span class=cF7>(</span><span class=cFE>120</span><span class=cF0> * i / BIRDS_NUM + </span><span class=cFE>16</span><span class=cF0> * dt</span><span class=cF7>)</span><span class=cF0>);
<a name="l171"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(dc-&gt;r, </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>45</span><span class=cF0> * </span><span class=cF3>pi</span><span class=cF0> + </span><span class=cF3>pi</span><span class=cF0>);
<a name="l172"></a> Bird(dc, </span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cFE>2</span><span class=cF0> * </span><span class=cF3>pi</span><span class=cF0> * dt + i * </span><span class=cFE>2</span><span class=cF0> * </span><span class=cF3>pi</span><span class=cF0> / BIRDS_NUM</span><span class=cF7>)</span><span class=cF0>);
<a name="l173"></a> }
<a name="l174"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l175"></a>}
<a name="l176"></a>
<a name="l177"></a></span><span class=cF1>U0</span><span class=cF0> TOSTheme()
<a name="l178"></a>{
<a name="l179"></a> </span><span class=cF9>I64</span><span class=cF0> i, old_update = </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update;
<a name="l180"></a>
<a name="l181"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l182"></a> t0 = </span><span class=cFE>0</span><span class=cF0>;
<a name="l183"></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="l184"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l185"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l186"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l187"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF5>Fs</span><span class=cF0>);
<a name="l188"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
<a name="l189"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l190"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;text_attr = </span><span class=cF3>LTCYAN</span><span class=cF0> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l191"></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="l192"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;task_end_cb = &amp;</span><span class=cF5>SoundTaskEndCB</span><span class=cF0>;
<a name="l193"></a> </span><span class=cF5>MusicSettingsReset</span><span class=cF0>;
<a name="l194"></a> </span><span class=cFB>music</span><span class=cF0>.tempo = </span><span class=cFE>2</span><span class=cF0>.</span><span class=cFE>85</span><span class=cF0>;
<a name="l195"></a> </span><span class=cFB>music</span><span class=cF0>.stacatto_factor = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>902</span><span class=cF0>;
<a name="l196"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; BIRDS_NUM; i++)
<a name="l197"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l198"></a> bx[i] = RANGE * </span><span class=cF5>RandI16</span><span class=cF0> / RANGE;
<a name="l199"></a> by[i] = RANGE * </span><span class=cF5>RandI16</span><span class=cF0> / RANGE;
<a name="l200"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l201"></a> </span><span class=cF1>try</span><span class=cF0>
<a name="l202"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l203"></a> </span><span class=cF6>&quot;$BG+H,LTCYAN$&quot;</span><span class=cF0>;
<a name="l204"></a> </span><span class=cF5>Refresh</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>);
<a name="l205"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFE>1</span><span class=cF0>; i++)
<a name="l206"></a> {
<a name="l207"></a> t0 = </span><span class=cF5>Beat</span><span class=cF0>;
<a name="l208"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5eDEqFFetEEFqDeCDDEetCGF&quot;</span><span class=cF0>);
<a name="l209"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5eDEqFFetEEFqDeCDDEetCGF&quot;</span><span class=cF0>);
<a name="l210"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5eDCqDE4eAA5etEEFEDG4B5DCqF&quot;</span><span class=cF0>);
<a name="l211"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5eDCqDE4eAA5etEEFEDG4B5DCqF&quot;</span><span class=cF0>);
<a name="l212"></a> }
<a name="l213"></a> </span><span class=cF5>Refresh</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>);
<a name="l214"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l215"></a> </span><span class=cF1>catch</span><span class=cF0>
<a name="l216"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
<a name="l217"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l218"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update = old_update;
<a name="l219"></a>}
<a name="l220"></a>
<a name="l221"></a>TOSTheme;
</span></pre></body>
</html>