mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-29 00:36:32 +00:00
dbf8647d59
Added top & right borders to RawDr. Improved spacing in some debug and compiler reporting. Fixed RawPutChar and EdLite tab width. Fixed Ui missing '0x' prefix syntax highlighter bug. Added 32BitPaint demo.
156 lines
14 KiB
HTML
Executable file
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.08">
|
|
<style type="text/css">
|
|
body {background-color:#000000;}
|
|
.cF0{color:#ffffff;background-color:#000000;}
|
|
.cF1{color:#3465a4;background-color:#000000;}
|
|
.cF2{color:#4e9a06;background-color:#000000;}
|
|
.cF3{color:#06989a;background-color:#000000;}
|
|
.cF4{color:#a24444;background-color:#000000;}
|
|
.cF5{color:#75507b;background-color:#000000;}
|
|
.cF6{color:#ce982f;background-color:#000000;}
|
|
.cF7{color:#bcc0b9;background-color:#000000;}
|
|
.cF8{color:#555753;background-color:#000000;}
|
|
.cF9{color:#729fcf;background-color:#000000;}
|
|
.cFA{color:#82bc49;background-color:#000000;}
|
|
.cFB{color:#34e2e2;background-color:#000000;}
|
|
.cFC{color:#ac3535;background-color:#000000;}
|
|
.cFD{color:#ad7fa8;background-color:#000000;}
|
|
.cFE{color:#fce94f;background-color:#000000;}
|
|
.cFF{color:#000000;background-color:#000000;}
|
|
</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><1>/* 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>"ST_MOTTOS"</span><span class=cF0>, </span><span class=cF6>"Divine Intellect Inside\0"</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF6>"Professional Recreation\0"</span><span class=cF0>
|
|
<a name="l31"></a> </span><span class=cF6>"Programming Enlightenment\0"</span><span class=cF0>
|
|
<a name="l32"></a> </span><span class=cF6>"LoseThos Resurrected\0"</span><span class=cF0>
|
|
<a name="l33"></a> </span><span class=cF6>"Unrestricted Potential\0"</span><span class=cF0>
|
|
<a name="l34"></a> </span><span class=cF6>"Ring-0 64-Bit Operating System\0"</span><span class=cF0>
|
|
<a name="l35"></a> </span><span class=cF6>"Simplicity Perfected\0"</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> & </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>"%S"</span><span class=cF0>, </span><span class=cF6>"DD_OS_NAME_VERSION"</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>"%Z"</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>"ST_MOTTOS"</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>"ST_MOTTOS"</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->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->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->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->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->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->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><1></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->color = </span><span class=cF3>DKGRAY</span><span class=cF0>;
|
|
<a name="l63"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, dc->x - display_string_offset, dc->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->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->x - display_string_offset, dc->y - STRING_CENTER_Y_OFFSET, display_string);
|
|
<a name="l66"></a>
|
|
<a name="l67"></a> dc->color = </span><span class=cF3>DKGRAY</span><span class=cF0>;
|
|
<a name="l68"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, dc->x - motto_string_offset, dc->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->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->x - motto_string_offset, dc->y + STRING_CENTER_Y_OFFSET, motto_string);
|
|
<a name="l71"></a>
|
|
<a name="l72"></a> dc->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->put_doc);
|
|
<a name="l89"></a> </span><span class=cF5>Bts</span><span class=cF0>(&bg_task->put_doc->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>->win_top = WIN_TOP;
|
|
<a name="l95"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_left = WIN_LEFT;
|
|
<a name="l96"></a> </span><span class=cF5>Fs</span><span class=cF0>->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>->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>->draw_it = &</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>->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>->task_title, display_string);
|
|
<a name="l104"></a>
|
|
<a name="l105"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_draw_mouse = &DrawNoMouse;
|
|
<a name="l106"></a>
|
|
<a name="l107"></a> </span><span class=cF5>Bts</span><span class=cF0>(&</span><span class=cF5>Fs</span><span class=cF0>->put_doc->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 = &</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>
|