mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-31 17:56:30 +00:00
1b75d91002
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.
153 lines
12 KiB
HTML
Executable file
153 lines
12 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>/* You "System Include" this because you want the wallpaper</span><span class=cF0>
|
|
<a name="l2"></a></span><span class=cF2>routine to stay in mem even if this task is killed.</span><span class=cF0>
|
|
<a name="l3"></a>
|
|
<a name="l4"></a> </span><span class=cF2><CTRL-t> to see the hidden text needed for sprite elements.</span><span class=cF0>
|
|
<a name="l5"></a>
|
|
<a name="l6"></a> </span><span class=cF2><CTRL-r> to add a sprite to a document.</span><span class=cF0>
|
|
<a name="l7"></a></span><span class=cF2>*/</span><span class=cF0>
|
|
<a name="l8"></a></span><span class=cFA>
|
|
<a name="l9"></a><1>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l10"></a>
|
|
<a name="l11"></a></span><span class=cFA>
|
|
<a name="l12"></a><2>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l13"></a>
|
|
<a name="l14"></a></span><span class=cFA>
|
|
<a name="l15"></a><3>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l16"></a>
|
|
<a name="l17"></a></span><span class=cFA>
|
|
<a name="l18"></a><4>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l19"></a>
|
|
<a name="l20"></a>
|
|
<a name="l21"></a></span><span class=cFA>
|
|
<a name="l22"></a><5>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l23"></a>
|
|
<a name="l24"></a>
|
|
<a name="l25"></a></span><span class=cFA>
|
|
<a name="l26"></a><6>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l27"></a>
|
|
<a name="l28"></a>
|
|
<a name="l29"></a></span><span class=cFA>
|
|
<a name="l30"></a><7>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l31"></a>
|
|
<a name="l32"></a></span><span class=cFA>
|
|
<a name="l33"></a><8>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l34"></a>
|
|
<a name="l35"></a></span><span class=cFA>
|
|
<a name="l36"></a><9>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l37"></a>
|
|
<a name="l38"></a>
|
|
<a name="l39"></a>#</span><span class=cF1>define</span><span class=cF0> TYPES_OF_CRITTERS </span><span class=cFE>3</span><span class=cF0>
|
|
<a name="l40"></a>#</span><span class=cF1>define</span><span class=cF0> FRAMES_PER_CRITTER </span><span class=cFE>4</span><span class=cF0>
|
|
<a name="l41"></a>
|
|
<a name="l42"></a></span><span class=cF1>U8</span><span class=cF0> *imgs[TYPES_OF_CRITTERS][FRAMES_PER_CRITTER] = {
|
|
<a name="l43"></a> </span><span class=cF7>{</span><span class=cFA><1></span><span class=cF0>, </span><span class=cFA><2></span><span class=cF0>, </span><span class=cFA><3></span><span class=cF0>, </span><span class=cFA><2></span><span class=cF7>}</span><span class=cF0>,
|
|
<a name="l44"></a> </span><span class=cF7>{</span><span class=cFA><4></span><span class=cF0>, </span><span class=cFA><5></span><span class=cF0>, </span><span class=cFA><6></span><span class=cF0>, </span><span class=cFA><5></span><span class=cF7>}</span><span class=cF0>,
|
|
<a name="l45"></a> </span><span class=cF7>{</span><span class=cFA><7></span><span class=cF0>, </span><span class=cFA><8></span><span class=cF0>, </span><span class=cFA><9></span><span class=cF0>, </span><span class=cFA><8></span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l46"></a>};
|
|
<a name="l47"></a>
|
|
<a name="l48"></a>#</span><span class=cF1>define</span><span class=cF0> CRITTERS_NUM </span><span class=cFE>16</span><span class=cF0>
|
|
<a name="l49"></a></span><span class=cF1>class</span><span class=cF0> Critter
|
|
<a name="l50"></a>{
|
|
<a name="l51"></a> </span><span class=cF9>I64</span><span class=cF0> x, y, dx, dy, type;
|
|
<a name="l52"></a> </span><span class=cF1>F64</span><span class=cF0> t_offset;
|
|
<a name="l53"></a>
|
|
<a name="l54"></a>} wall_crits[CRITTERS_NUM];
|
|
<a name="l55"></a>
|
|
<a name="l56"></a></span><span class=cF1>U0</span><span class=cF0> (*old_wall_paper)(</span><span class=cF9>CTask</span><span class=cF0> *task);
|
|
<a name="l57"></a>
|
|
<a name="l58"></a></span><span class=cF1>U0</span><span class=cF0> WallPaperFish(</span><span class=cF9>CTask</span><span class=cF0> *task)
|
|
<a name="l59"></a>{
|
|
<a name="l60"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, x, y;
|
|
<a name="l61"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc = </span><span class=cF5>DCAlias</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.dc2, task);
|
|
<a name="l62"></a> Critter *c = wall_crits;
|
|
<a name="l63"></a>
|
|
<a name="l64"></a> task->text_attr = </span><span class=cF3>CYAN</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>;
|
|
<a name="l65"></a> dc->color = </span><span class=cF3>BROWN</span><span class=cF0>;
|
|
<a name="l66"></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>GR_HEIGHT</span><span class=cF0>; i += </span><span class=cFE>20</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l67"></a> j = </span><span class=cFE>16</span><span class=cF0> * </span><span class=cF5>Tri</span><span class=cF0>(</span><span class=cF5>tS</span><span class=cF0> * </span><span class=cFE>10</span><span class=cF0>, </span><span class=cFE>20</span><span class=cF0>);
|
|
<a name="l68"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0> - i - j, </span><span class=cF3>GR_HEIGHT</span><span class=cF0> - i - j, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>);
|
|
<a name="l69"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l70"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < CRITTERS_NUM; i++, c++)
|
|
<a name="l71"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l72"></a> j = (</span><span class=cF5>tS</span><span class=cF0> * </span><span class=cFE>4</span><span class=cF0> + c->t_offset) % FRAMES_PER_CRITTER;
|
|
<a name="l73"></a> x = c->x >> </span><span class=cFE>16</span><span class=cF0> % </span><span class=cF3>GR_WIDTH</span><span class=cF0>;
|
|
<a name="l74"></a> </span><span class=cF1>if</span><span class=cF0> (x < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l75"></a> x += </span><span class=cF3>GR_WIDTH</span><span class=cF0>;
|
|
<a name="l76"></a> y = c->y >> </span><span class=cFE>16</span><span class=cF0> % </span><span class=cF3>GR_HEIGHT</span><span class=cF0>;
|
|
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (y < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l78"></a> y += </span><span class=cF3>GR_HEIGHT</span><span class=cF0>;
|
|
<a name="l79"></a> </span><span class=cF1>if</span><span class=cF0> (c->dx < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l80"></a> {
|
|
<a name="l81"></a> dc->flags |= </span><span class=cF3>DCF_SYMMETRY</span><span class=cF0> | </span><span class=cF3>DCF_JUST_MIRROR</span><span class=cF0>;
|
|
<a name="l82"></a> </span><span class=cF5>DCSymmetrySet</span><span class=cF0>(dc, x, y - </span><span class=cFE>1</span><span class=cF0>, x, y + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l83"></a> }
|
|
<a name="l84"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l85"></a> dc->flags &= ~(</span><span class=cF3>DCF_SYMMETRY</span><span class=cF0> | </span><span class=cF3>DCF_JUST_MIRROR</span><span class=cF0>);
|
|
<a name="l86"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, x, y, </span><span class=cFE>0</span><span class=cF0>, imgs[c->type][j]);
|
|
<a name="l87"></a> c->x += c->dx; c->y += c->dy;
|
|
<a name="l88"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l89"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc);
|
|
<a name="l90"></a>
|
|
<a name="l91"></a> </span><span class=cF2>//Uncomment the following if you wish.</span><span class=cF0>
|
|
<a name="l92"></a> </span><span class=cF2>//old_wall_paper(task);</span><span class=cF0>
|
|
<a name="l93"></a>}
|
|
<a name="l94"></a>
|
|
<a name="l95"></a></span><span class=cF1>U0</span><span class=cF0> WallInit()
|
|
<a name="l96"></a>{
|
|
<a name="l97"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l98"></a> Critter *c;
|
|
<a name="l99"></a>
|
|
<a name="l100"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Fs</span><span class=cF0> != </span><span class=cFB>sys_task</span><span class=cF0>)
|
|
<a name="l101"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l102"></a> </span><span class=cF6>"Must be System Included with SHIFT-F5.\n"</span><span class=cF0>
|
|
<a name="l103"></a> </span><span class=cF6>"(Would crash when code mem was freed.)\n"</span><span class=cF0>;
|
|
<a name="l104"></a> </span><span class=cF1>return</span><span class=cF0>;
|
|
<a name="l105"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l106"></a> old_wall_paper = </span><span class=cFB>gr</span><span class=cF0>.fp_wall_paper;
|
|
<a name="l107"></a> c = wall_crits;
|
|
<a name="l108"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < CRITTERS_NUM; i++, c++)
|
|
<a name="l109"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l110"></a> c->x = (</span><span class=cF5>RandU16</span><span class=cF0> % </span><span class=cF3>GR_WIDTH</span><span class=cF0>) << </span><span class=cFE>16</span><span class=cF0>;
|
|
<a name="l111"></a> c->y = (</span><span class=cF5>RandU16</span><span class=cF0> % </span><span class=cF3>GR_HEIGHT</span><span class=cF0>) << </span><span class=cFE>16</span><span class=cF0>;
|
|
<a name="l112"></a> c->type = </span><span class=cF5>RandU16</span><span class=cF0> % TYPES_OF_CRITTERS;
|
|
<a name="l113"></a> c->dx = </span><span class=cF5>RandI16</span><span class=cF0>;
|
|
<a name="l114"></a> </span><span class=cF1>if</span><span class=cF0> (c->dx < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l115"></a> c->dx -= </span><span class=cFE>0x4000</span><span class=cF0>;
|
|
<a name="l116"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l117"></a> c->dx += </span><span class=cFE>0x4000</span><span class=cF0>;
|
|
<a name="l118"></a> c->dy = </span><span class=cF5>RandI16</span><span class=cF0>;
|
|
<a name="l119"></a> c->t_offset = </span><span class=cF5>Rand</span><span class=cF0> * FRAMES_PER_CRITTER;
|
|
<a name="l120"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l121"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_wall_paper = &WallPaperFish;
|
|
<a name="l122"></a>}
|
|
<a name="l123"></a>
|
|
<a name="l124"></a>WallInit;
|
|
</span></pre></body>
|
|
</html>
|