ZealOS/docs/System/ZSplash.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

156 lines
14 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=cF0>
<a name="l2"></a>
<a name="l3"></a>
<a name="l4"></a>
<a name="l5"></a>
<a name="l6"></a>
<a name="l7"></a>
<a name="l8"></a>
<a name="l9"></a>
<a name="l10"></a>
<a name="l11"></a> </span><span class=cFA>&lt;1&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l12"></a>
<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>
<a name="l23"></a>#</span><span class=cF1>define</span><span class=cF0> STRING_CENTER_X_OFFSET </span><span class=cFE>1</span><span class=cF0>
<a name="l24"></a>#</span><span class=cF1>define</span><span class=cF0> STRING_CENTER_Y_OFFSET </span><span class=cFE>80</span><span class=cF0>
<a name="l25"></a>#</span><span class=cF1>define</span><span class=cF0> DISPLAY_RECT_HEIGHT </span><span class=cFE>8</span><span class=cF0>
<a name="l26"></a>#</span><span class=cF1>define</span><span class=cF0> WIN_TOP </span><span class=cF3>TEXT_ROWS</span><span class=cF0> / </span><span class=cFE>3</span><span class=cF0> </span><span class=cF2>// each 1 represents</span><span class=cF0>
<a name="l27"></a>#</span><span class=cF1>define</span><span class=cF0> WIN_LEFT </span><span class=cF3>TEXT_COLS</span><span class=cF0> / </span><span class=cFE>3</span><span class=cF0> </span><span class=cF2>// 8 pixels.</span><span class=cF0>
<a name="l28"></a>
<a name="l29"></a></span><span class=cF5>DefineListLoad</span><span class=cF0>(</span><span class=cF6>&quot;ST_MOTTOS&quot;</span><span class=cF0>, </span><span class=cF6>&quot;Divine Intellect Inside\0&quot;</span><span class=cF0>
<a name="l30"></a> </span><span class=cF6>&quot;Professional Recreation\0&quot;</span><span class=cF0>
<a name="l31"></a> </span><span class=cF6>&quot;Programming Enlightenment\0&quot;</span><span class=cF0>
<a name="l32"></a> </span><span class=cF6>&quot;LoseThos Resurrected\0&quot;</span><span class=cF0>
<a name="l33"></a> </span><span class=cF6>&quot;Unrestricted Potential\0&quot;</span><span class=cF0>
<a name="l34"></a> </span><span class=cF6>&quot;Ring-0 64-Bit Operating System\0&quot;</span><span class=cF0>
<a name="l35"></a> </span><span class=cF6>&quot;Simplicity Perfected\0&quot;</span><span class=cF0>);
<a name="l36"></a>
<a name="l37"></a></span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF5>Now</span><span class=cF0> + </span><span class=cFB>counts</span><span class=cF0>.timer</span><span class=cF7>)</span><span class=cF0> &amp; </span><span class=cFE>0x7F</span><span class=cF0>); </span><span class=cF2>// increase entropy of motto selection</span><span class=cF0>
<a name="l38"></a>
<a name="l39"></a></span><span class=cF1>U8</span><span class=cF0>* display_string = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%S&quot;</span><span class=cF0>, </span><span class=cF6>&quot;DD_OS_NAME_VERSION&quot;</span><span class=cF0>);
<a name="l40"></a></span><span class=cF1>U8</span><span class=cF0>* motto_string = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%Z&quot;</span><span class=cF0>, </span><span class=cF5>RandU8</span><span class=cF0> % </span><span class=cF5>DefineCount</span><span class=cF7>(</span><span class=cF6>&quot;ST_MOTTOS&quot;</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>&quot;ST_MOTTOS&quot;</span><span class=cF0>);
<a name="l41"></a></span><span class=cF9>I64</span><span class=cF0> display_string_offset = </span><span class=cF5>StrLen</span><span class=cF0>(display_string) / </span><span class=cFE>2</span><span class=cF0> * </span><span class=cFE>8</span><span class=cF0> - STRING_CENTER_X_OFFSET;
<a name="l42"></a></span><span class=cF9>I64</span><span class=cF0> motto_string_offset = </span><span class=cF5>StrLen</span><span class=cF0>(motto_string) / </span><span class=cFE>2</span><span class=cF0> * </span><span class=cFE>8</span><span class=cF0>;
<a name="l43"></a></span><span class=cF9>I64</span><span class=cF0> splash_r[</span><span class=cFE>4</span><span class=cF0>][</span><span class=cFE>4</span><span class=cF0>];
<a name="l44"></a>
<a name="l45"></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> *,</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l46"></a>{
<a name="l47"></a> </span><span class=cF9>I64</span><span class=cF0> *old_r = dc-&gt;r;
<a name="l48"></a> </span><span class=cF9>I64</span><span class=cF0> screen_center_x_pix = </span><span class=cF3>GR_WIDTH</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>; </span><span class=cF2>// each 1 represents</span><span class=cF0>
<a name="l49"></a> </span><span class=cF9>I64</span><span class=cF0> screen_center_y_pix = (</span><span class=cF3>GR_HEIGHT</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>); </span><span class=cF2>// single pixels.</span><span class=cF0>
<a name="l50"></a>
<a name="l51"></a> dc-&gt;x = screen_center_x_pix - (WIN_LEFT * </span><span class=cFE>8</span><span class=cF0>); </span><span class=cF2>// to plot in the center, we put dc at the screen center in pixels, </span><span class=cF0>
<a name="l52"></a> dc-&gt;y = screen_center_y_pix - (WIN_TOP * </span><span class=cFE>8</span><span class=cF0>); </span><span class=cF2>// minus the window position (times 8 since win row/col variables are 1:8 ratio.)</span><span class=cF0>
<a name="l53"></a> dc-&gt;z = </span><span class=cF3>GR_Z_ALL</span><span class=cF0>; </span><span class=cF2>// the result is the position in the current window that aligns to center of screen.</span><span class=cF0>
<a name="l54"></a>
<a name="l55"></a> dc-&gt;flags |= </span><span class=cF3>DCF_TRANSFORMATION</span><span class=cF0>;
<a name="l56"></a> </span><span class=cF5>DCDepthBufAlloc</span><span class=cF0>(dc);
<a name="l57"></a> </span><span class=cF5>DCMat4x4Set</span><span class=cF0>(dc, splash_r); </span><span class=cF2>//This assigns to dc-&gt;r and sets r_norm.</span><span class=cF0>
<a name="l58"></a> </span><span class=cF5>DCDepthBufReset</span><span class=cF0>(dc);
<a name="l59"></a>
<a name="l60"></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>); </span><span class=cF2>// plot the sprite directly at the position of dc.</span><span class=cF0>
<a name="l61"></a>
<a name="l62"></a> dc-&gt;color = </span><span class=cF3>LTGRAY</span><span class=cF0>;
<a name="l63"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, dc-&gt;x - display_string_offset, dc-&gt;y - STRING_CENTER_Y_OFFSET, </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>display_string</span><span class=cF7>)</span><span class=cF0> * </span><span class=cFE>8</span><span class=cF0>, DISPLAY_RECT_HEIGHT);
<a name="l64"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l65"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc, dc-&gt;x - display_string_offset, dc-&gt;y - STRING_CENTER_Y_OFFSET, display_string);
<a name="l66"></a>
<a name="l67"></a> dc-&gt;color = </span><span class=cF3>LTGRAY</span><span class=cF0>;
<a name="l68"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, dc-&gt;x - motto_string_offset, dc-&gt;y + STRING_CENTER_Y_OFFSET, </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>motto_string</span><span class=cF7>)</span><span class=cF0> * </span><span class=cFE>8</span><span class=cF0>, DISPLAY_RECT_HEIGHT);
<a name="l69"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l70"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc, dc-&gt;x - motto_string_offset, dc-&gt;y + STRING_CENTER_Y_OFFSET, motto_string);
<a name="l71"></a>
<a name="l72"></a> dc-&gt;r = old_r;
<a name="l73"></a>}
<a name="l74"></a>
<a name="l75"></a></span><span class=cF1>U0</span><span class=cF0> DrawNoMouse(</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)
<a name="l76"></a>{
<a name="l77"></a> </span><span class=cF1>no_warn</span><span class=cF0> dc, x, y;
<a name="l78"></a>}
<a name="l79"></a>
<a name="l80"></a></span><span class=cF1>U0</span><span class=cF0> ZSplash()
<a name="l81"></a>{
<a name="l82"></a> </span><span class=cF1>F64</span><span class=cF0> theta = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>3</span><span class=cF0>, phi = </span><span class=cFE>0</span><span class=cF0>;
<a name="l83"></a> </span><span class=cF9>CTask</span><span class=cF0> *bg_task = </span><span class=cF5>User</span><span class=cF0>;
<a name="l84"></a>
<a name="l85"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(bg_task);
<a name="l86"></a> </span><span class=cF5>WinBorder</span><span class=cF0>(, bg_task);
<a name="l87"></a> </span><span class=cF5>WinMax</span><span class=cF0>(bg_task);
<a name="l88"></a> </span><span class=cF5>DocClear</span><span class=cF0>(bg_task-&gt;put_doc);
<a name="l89"></a> </span><span class=cF5>Bts</span><span class=cF0>(&amp;bg_task-&gt;put_doc-&gt;flags, </span><span class=cF3>DOCf_HIDE_CURSOR</span><span class=cF0>);
<a name="l90"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
<a name="l91"></a>
<a name="l92"></a> </span><span class=cF5>WinToTop</span><span class=cF0>;
<a name="l93"></a>
<a name="l94"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_top = WIN_TOP;
<a name="l95"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_left = WIN_LEFT;
<a name="l96"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_right = WIN_LEFT * </span><span class=cFE>2</span><span class=cF0>;
<a name="l97"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;win_bottom = WIN_TOP * </span><span class=cFE>2</span><span class=cF0>;
<a name="l98"></a>
<a name="l99"></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="l100"></a>
<a name="l101"></a> </span><span class=cF5>DocClear</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;border_doc, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l102"></a>
<a name="l103"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;task_title, display_string);
<a name="l104"></a>
<a name="l105"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_draw_mouse = &amp;DrawNoMouse;
<a name="l106"></a>
<a name="l107"></a> </span><span class=cF5>Bts</span><span class=cF0>(&amp;</span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc-&gt;flags, </span><span class=cF3>DOCf_HIDE_CURSOR</span><span class=cF0>);
<a name="l108"></a> </span><span class=cF5>MouseHardEnable</span><span class=cF0>(</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l109"></a>
<a name="l110"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF5>CharScan</span><span class=cF0>)
<a name="l111"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l112"></a> </span><span class=cF5>Mat4x4IdentEqu</span><span class=cF0>(splash_r);
<a name="l113"></a> </span><span class=cF5>Mat4x4RotY</span><span class=cF0>(splash_r, phi);
<a name="l114"></a> </span><span class=cF5>Mat4x4RotX</span><span class=cF0>(splash_r, theta);
<a name="l115"></a>
<a name="l116"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>20</span><span class=cF0>);
<a name="l117"></a> phi += .</span><span class=cFE>03</span><span class=cF0>;
<a name="l118"></a> </span><span class=cF5>WinToTop</span><span class=cF0>;
<a name="l119"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l120"></a>
<a name="l121"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_draw_mouse = &amp;</span><span class=cF5>DrawStdMouse</span><span class=cF0>;
<a name="l122"></a> </span><span class=cF5>MouseHardEnable</span><span class=cF0>(</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l123"></a> </span><span class=cF5>FlushMessages</span><span class=cF0>;
<a name="l124"></a> </span><span class=cF5>Kill</span><span class=cF0>(bg_task);
<a name="l125"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>(</span><span class=cF3>ON</span><span class=cF0>);
<a name="l126"></a>}
<a name="l127"></a>
<a name="l128"></a>ZSplash;</span></pre></body>
</html>