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.
243 lines
30 KiB
HTML
Executable file
243 lines
30 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>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Graphics/Screen"</span><span class=cF0>
|
|
<a name="l2"></a>
|
|
<a name="l3"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GrSetUpTables</span><span class=cF0>()
|
|
<a name="l4"></a>{
|
|
<a name="l5"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc;
|
|
<a name="l6"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, k, l, m, x, y, rr;
|
|
<a name="l7"></a> </span><span class=cF1>U8</span><span class=cF0> *dst;
|
|
<a name="l8"></a>
|
|
<a name="l9"></a> k = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l10"></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>256</span><span class=cF0>; i++)
|
|
<a name="l11"></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>8</span><span class=cF0>; j++)
|
|
<a name="l12"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&i, j</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l13"></a> </span><span class=cFB>gr</span><span class=cF0>.to_8_bits(</span><span class=cF1>U8</span><span class=cF0> *)[k++] = </span><span class=cFE>0xFF</span><span class=cF0>;
|
|
<a name="l14"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l15"></a> </span><span class=cFB>gr</span><span class=cF0>.to_8_bits(</span><span class=cF1>U8</span><span class=cF0> *)[k++] = </span><span class=cFE>0x00</span><span class=cF0>;
|
|
<a name="l16"></a> k = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l17"></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>256</span><span class=cF0>; i++)
|
|
<a name="l18"></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>8</span><span class=cF0>; j++)
|
|
<a name="l19"></a> </span><span class=cFB>gr</span><span class=cF0>.to_8_colors(</span><span class=cF1>U8</span><span class=cF0> *)[k++] = i;
|
|
<a name="l20"></a>
|
|
<a name="l21"></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_PEN_BRUSHES_NUM</span><span class=cF0>; i++)
|
|
<a name="l22"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l23"></a> k = i + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l24"></a>
|
|
<a name="l25"></a> rr = k * k;
|
|
<a name="l26"></a> </span><span class=cF1>for</span><span class=cF0> (y = </span><span class=cFE>1</span><span class=cF0>; y < k; y++)
|
|
<a name="l27"></a> </span><span class=cF1>for</span><span class=cF0> (x = </span><span class=cFE>1</span><span class=cF0>; x < k; x++)
|
|
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> < rr)
|
|
<a name="l29"></a> {
|
|
<a name="l30"></a> </span><span class=cF1>if</span><span class=cF0> (x - </span><span class=cFE>1</span><span class=cF0> - i >> </span><span class=cFE>1</span><span class=cF0> < </span><span class=cFB>gr</span><span class=cF0>.circle_lo[i][i - y])
|
|
<a name="l31"></a> </span><span class=cFB>gr</span><span class=cF0>.circle_lo[i][i - y] = x - </span><span class=cFE>1</span><span class=cF0> - i >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (x - </span><span class=cFE>1</span><span class=cF0> - i >> </span><span class=cFE>1</span><span class=cF0> > </span><span class=cFB>gr</span><span class=cF0>.circle_hi[i][i - y])
|
|
<a name="l33"></a> </span><span class=cFB>gr</span><span class=cF0>.circle_hi[i][i-y] = x - </span><span class=cFE>1</span><span class=cF0> - i >> </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l34"></a> }
|
|
<a name="l35"></a>
|
|
<a name="l36"></a> dc = </span><span class=cF5>DCNew</span><span class=cF0>(i, i);
|
|
<a name="l37"></a> </span><span class=cFB>gr</span><span class=cF0>.pen_brushes[i] = dc;
|
|
<a name="l38"></a> dc->color = </span><span class=cF3>COLOR_MONO</span><span class=cF0>;
|
|
<a name="l39"></a> rr = k * k;
|
|
<a name="l40"></a> </span><span class=cF1>for</span><span class=cF0> (y = </span><span class=cFE>1</span><span class=cF0>; y < k; y++)
|
|
<a name="l41"></a> </span><span class=cF1>for</span><span class=cF0> (x = </span><span class=cFE>1</span><span class=cF0>; x < k; x++)
|
|
<a name="l42"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> < rr)
|
|
<a name="l43"></a> </span><span class=cF5>GrPlot0</span><span class=cF0>(dc, x - </span><span class=cFE>1</span><span class=cF0>, y - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l44"></a>
|
|
<a name="l45"></a> dc = </span><span class=cF5>DCNew</span><span class=cF0>(i, i);
|
|
<a name="l46"></a> </span><span class=cFB>gr</span><span class=cF0>.collision_pen_brushes[i] = dc;
|
|
<a name="l47"></a> dc->color = </span><span class=cF3>COLOR_INVALID</span><span class=cF0>;</span><span class=cF2>//Want color that never occurs.</span><span class=cF0>
|
|
<a name="l48"></a> rr = k * k;
|
|
<a name="l49"></a> </span><span class=cF1>for</span><span class=cF0> (y = </span><span class=cFE>1</span><span class=cF0>; y < k; y++)
|
|
<a name="l50"></a> </span><span class=cF1>for</span><span class=cF0> (x = </span><span class=cFE>1</span><span class=cF0>; x < k; x++)
|
|
<a name="l51"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> < rr)
|
|
<a name="l52"></a> </span><span class=cF5>GrPlot0</span><span class=cF0>(dc, x - </span><span class=cFE>1</span><span class=cF0>, y - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l53"></a>
|
|
<a name="l54"></a> dc = </span><span class=cF5>DCNew</span><span class=cF0>(i, i);
|
|
<a name="l55"></a> </span><span class=cFB>gr</span><span class=cF0>.even_pen_brushes[i] = dc;
|
|
<a name="l56"></a> dc->color = </span><span class=cF3>COLOR_MONO</span><span class=cF0>;
|
|
<a name="l57"></a> rr = k * k;
|
|
<a name="l58"></a> </span><span class=cF1>for</span><span class=cF0> (y = </span><span class=cFE>1</span><span class=cF0>;y < k; y++)
|
|
<a name="l59"></a> </span><span class=cF1>for</span><span class=cF0> (x = </span><span class=cFE>1</span><span class=cF0>; x < k; x++)
|
|
<a name="l60"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>x - </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0> ^ </span><span class=cF7>(</span><span class=cF0>y - </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0>) & </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0> && </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> < rr)
|
|
<a name="l61"></a> </span><span class=cF5>GrPlot0</span><span class=cF0>(dc, x - </span><span class=cFE>1</span><span class=cF0>, y - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l62"></a>
|
|
<a name="l63"></a> dc = </span><span class=cF5>DCNew</span><span class=cF0>(i, i);
|
|
<a name="l64"></a> </span><span class=cFB>gr</span><span class=cF0>.odd_pen_brushes[i] = dc;
|
|
<a name="l65"></a> dc->color = </span><span class=cF3>COLOR_MONO</span><span class=cF0>;
|
|
<a name="l66"></a> rr = k * k;
|
|
<a name="l67"></a> </span><span class=cF1>for</span><span class=cF0> (y = </span><span class=cFE>1</span><span class=cF0>; y < k; y++)
|
|
<a name="l68"></a> </span><span class=cF1>for</span><span class=cF0> (x = </span><span class=cFE>1</span><span class=cF0>; x < k; x++)
|
|
<a name="l69"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>(x - </span><span class=cFE>1</span><span class=cF0>) ^ (y - </span><span class=cFE>1</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> & </span><span class=cFE>1</span><span class=cF0> && </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>y * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF5>SqrI64</span><span class=cF7>(</span><span class=cF0>x * </span><span class=cFE>2</span><span class=cF0> - k</span><span class=cF7>)</span><span class=cF0> < rr)
|
|
<a name="l70"></a> </span><span class=cF5>GrPlot0</span><span class=cF0>(dc, x - </span><span class=cFE>1</span><span class=cF0>, y - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l71"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l72"></a>
|
|
<a name="l73"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i <= </span><span class=cF3>GR_SCREEN_ZOOM_MAX</span><span class=cF0>; i++)
|
|
<a name="l74"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l75"></a> dst = </span><span class=cFB>gr</span><span class=cF0>.screen_zoom_tables[i] = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cFE>256</span><span class=cF0> * i);
|
|
<a name="l76"></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>256</span><span class=cF0>; j++)
|
|
<a name="l77"></a> {
|
|
<a name="l78"></a> m = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l79"></a> </span><span class=cF1>for</span><span class=cF0> (k = </span><span class=cFE>0</span><span class=cF0>; k < </span><span class=cFE>8</span><span class=cF0>; k++)
|
|
<a name="l80"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l81"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&j, k</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l82"></a> {
|
|
<a name="l83"></a> </span><span class=cF1>for</span><span class=cF0> (l = </span><span class=cFE>0</span><span class=cF0>; l < i; l++)
|
|
<a name="l84"></a> </span><span class=cF5>Bts</span><span class=cF0>(&m, l + k * i);
|
|
<a name="l85"></a> }
|
|
<a name="l86"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l87"></a> </span><span class=cF1>for</span><span class=cF0> (l = </span><span class=cFE>0</span><span class=cF0>; l < i; l++)
|
|
<a name="l88"></a> dst[j + l * </span><span class=cFE>256</span><span class=cF0>] = m.u8[l];
|
|
<a name="l89"></a> }
|
|
<a name="l90"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l91"></a>}
|
|
<a name="l92"></a>
|
|
<a name="l93"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Graphics/Screen;Windows"</span><span class=cF0>
|
|
<a name="l94"></a>
|
|
<a name="l95"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinZBufFill</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task)
|
|
<a name="l96"></a>{</span><span class=cF2>//Not public</span><span class=cF0>
|
|
<a name="l97"></a> </span><span class=cF9>I64</span><span class=cF0> y, t, b, l, r, w;
|
|
<a name="l98"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&task->display_flags, </span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l99"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l100"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_top - </span><span class=cFE>1</span><span class=cF0> > </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l101"></a> t = task->win_top - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l102"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l103"></a> t = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_bottom + </span><span class=cFE>1</span><span class=cF0> < </span><span class=cF3>TEXT_ROWS</span><span class=cF0>)
|
|
<a name="l105"></a> b = task->win_bottom + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l106"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l107"></a> b = </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_left - </span><span class=cFE>1</span><span class=cF0> > </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l109"></a> l = task->win_left - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l110"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l111"></a> l = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l112"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_right + </span><span class=cFE>1</span><span class=cF0> < </span><span class=cF3>TEXT_COLS</span><span class=cF0>)
|
|
<a name="l113"></a> r = task->win_right + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l114"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l115"></a> r = </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l116"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l117"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l118"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l119"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_top > </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l120"></a> t = task->win_top;
|
|
<a name="l121"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l122"></a> t = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l123"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_bottom < </span><span class=cF3>TEXT_ROWS</span><span class=cF0>)
|
|
<a name="l124"></a> b = task->win_bottom;
|
|
<a name="l125"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l126"></a> b = </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l127"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_left > </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l128"></a> l = task->win_left;
|
|
<a name="l129"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l130"></a> l = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l131"></a> </span><span class=cF1>if</span><span class=cF0> (task->win_right < </span><span class=cF3>TEXT_COLS</span><span class=cF0>)
|
|
<a name="l132"></a> r = task->win_right;
|
|
<a name="l133"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l134"></a> r = </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l135"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l136"></a> t = </span><span class=cF5>ClampI64</span><span class=cF0>(t, </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>);
|
|
<a name="l137"></a> b = </span><span class=cF5>ClampI64</span><span class=cF0>(b, t, </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l138"></a> l = </span><span class=cF5>ClampI64</span><span class=cF0>(l, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l139"></a> r = </span><span class=cF5>ClampI64</span><span class=cF0>(r, l, </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l140"></a> </span><span class=cF1>if</span><span class=cF0> (w = r - l + </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l141"></a> </span><span class=cF1>for</span><span class=cF0> (y = t; y <= b; y++)
|
|
<a name="l142"></a> </span><span class=cF5>MemSetU16</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.win_z_buf</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0> + </span><span class=cF7>(</span><span class=cF0>y * </span><span class=cF3>TEXT_COLS</span><span class=cF0> + l</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>U16</span><span class=cF7>)</span><span class=cF0>, task->win_z_num, w);
|
|
<a name="l143"></a>}
|
|
<a name="l144"></a>
|
|
<a name="l145"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinZBufUpdate</span><span class=cF0>()
|
|
<a name="l146"></a>{</span><span class=cF2>//Might have to call if doing graphics outside winmgr callback routines.</span><span class=cF0>
|
|
<a name="l147"></a></span><span class=cF2>//Call it if, for example, when a pop-up window closes and you need to refresh</span><span class=cF0>
|
|
<a name="l148"></a> </span><span class=cF2>//before graphics.</span><span class=cF0>
|
|
<a name="l149"></a> </span><span class=cF9>I64</span><span class=cF0> i, z = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l150"></a> </span><span class=cF9>U16</span><span class=cF0> *ptr;
|
|
<a name="l151"></a> </span><span class=cF9>CTask</span><span class=cF0> *task, *task1;
|
|
<a name="l152"></a>
|
|
<a name="l153"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>gr</span><span class=cF0>.win_z_buf)
|
|
<a name="l154"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l155"></a> </span><span class=cF5>LBtr</span><span class=cF0>(&</span><span class=cFB>sys_semas</span><span class=cF0>[</span><span class=cF3>SEMA_UPDATE_WIN_Z_BUF</span><span class=cF0>], </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l156"></a> task1 = task = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
|
|
<a name="l157"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l158"></a> {
|
|
<a name="l159"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l160"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l161"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&task->display_flags, </span><span class=cF3>DISPLAYf_SHOW</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l162"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l163"></a> task->win_z_num = z++;
|
|
<a name="l164"></a> </span><span class=cF5>WinZBufFill</span><span class=cF0>(task);
|
|
<a name="l165"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l166"></a> task = task->next_task;
|
|
<a name="l167"></a> }
|
|
<a name="l168"></a> </span><span class=cF1>while</span><span class=cF0> (task != task1 && z < </span><span class=cFE>0x10000</span><span class=cF0>);
|
|
<a name="l169"></a>
|
|
<a name="l170"></a> </span><span class=cF5>MemSet</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.win_uncovered_bitmap, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF7>(</span><span class=cFB>gr</span><span class=cF0>.highest_uncovered + </span><span class=cFE>7</span><span class=cF7>)</span><span class=cF0> >> </span><span class=cFE>3</span><span class=cF0> + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l171"></a> </span><span class=cFB>gr</span><span class=cF0>.highest_uncovered = z - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l172"></a> </span><span class=cF1>for</span><span class=cF0> (ptr = </span><span class=cFB>gr</span><span class=cF0>.win_z_buf, i = </span><span class=cF3>TEXT_ROWS</span><span class=cF0> * </span><span class=cF3>TEXT_COLS</span><span class=cF0>; i; i--)
|
|
<a name="l173"></a> </span><span class=cF5>Bts</span><span class=cF0>(</span><span class=cFB>gr</span><span class=cF0>.win_uncovered_bitmap, *ptr++);
|
|
<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>help_index</span><span class=cF0> </span><span class=cF6>"Graphics"</span><span class=cF0>
|
|
<a name="l178"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GrInit2</span><span class=cF0>()
|
|
<a name="l179"></a>{
|
|
<a name="l180"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&</span><span class=cFB>gr</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CGrGlobals</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l181"></a> </span><span class=cFB>gr</span><span class=cF0>.sprite_hash = </span><span class=cF5>HashTableNew</span><span class=cF0>(</span><span class=cFE>512</span><span class=cF0>);
|
|
<a name="l182"></a> </span><span class=cF5>HashDefineListAdd</span><span class=cF0>(</span><span class=cF6>"ST_SPRITE_ELEM_CODES"</span><span class=cF0>, </span><span class=cF3>SPHT_ELEM_CODE</span><span class=cF0>, </span><span class=cFB>gr</span><span class=cF0>.sprite_hash);
|
|
<a name="l183"></a> </span><span class=cFB>gr</span><span class=cF0>.screen_zoom = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l184"></a>
|
|
<a name="l185"></a> </span><span class=cF5>PaletteSetLight</span><span class=cF0>;
|
|
<a name="l186"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&</span><span class=cFB>text</span><span class=cF0>.font, &</span><span class=cFB>text</span><span class=cF0>.aux_font);
|
|
<a name="l187"></a>
|
|
<a name="l188"></a> </span><span class=cFB>gr</span><span class=cF0>.to_8_bits = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cFE>256</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="l189"></a> </span><span class=cFB>gr</span><span class=cF0>.to_8_colors = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cFE>256</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="l190"></a>
|
|
<a name="l191"></a> </span><span class=cFB>gr</span><span class=cF0>.screen_cache = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cFB>sys_vbe_mode</span><span class=cF0>.width * </span><span class=cFB>sys_vbe_mode</span><span class=cF0>.height);
|
|
<a name="l192"></a>
|
|
<a name="l193"></a> </span><span class=cFB>gr</span><span class=cF0>.text_base = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF3>TEXT_ROWS</span><span class=cF0> * </span><span class=cF3>TEXT_COLS</span><span class=cF0> * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>U32</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l194"></a> </span><span class=cFB>gr</span><span class=cF0>.win_uncovered_bitmap = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cFE>65536</span><span class=cF0> / </span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l195"></a> </span><span class=cFB>gr</span><span class=cF0>.highest_uncovered = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l196"></a> </span><span class=cFB>gr</span><span class=cF0>.win_z_buf = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF3>TEXT_ROWS</span><span class=cF0> * </span><span class=cF3>TEXT_COLS</span><span class=cF0> * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>U16</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l197"></a>
|
|
<a name="l198"></a> </span><span class=cFB>gr</span><span class=cF0>.dc2 = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>);
|
|
<a name="l199"></a> </span><span class=cFB>gr</span><span class=cF0>.dc2->flags |= </span><span class=cF3>DCF_SCREEN_BITMAP</span><span class=cF0>;
|
|
<a name="l200"></a> </span><span class=cFB>gr</span><span class=cF0>.dc_cache = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>);
|
|
<a name="l201"></a>
|
|
<a name="l202"></a> </span><span class=cFB>gr</span><span class=cF0>.dc = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>);
|
|
<a name="l203"></a> </span><span class=cFB>gr</span><span class=cF0>.dc->flags |= </span><span class=cF3>DCF_SCREEN_BITMAP</span><span class=cF0> | </span><span class=cF3>DCF_ON_TOP</span><span class=cF0>;
|
|
<a name="l204"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l205"></a>
|
|
<a name="l206"></a> </span><span class=cFB>gr</span><span class=cF0>.dc1 = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>);
|
|
<a name="l207"></a> </span><span class=cFB>gr</span><span class=cF0>.dc1->flags |= </span><span class=cF3>DCF_SCREEN_BITMAP</span><span class=cF0>;
|
|
<a name="l208"></a>
|
|
<a name="l209"></a> </span><span class=cFB>gr</span><span class=cF0>.screen_image = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>); </span><span class=cF2>//4-bit</span><span class=cF0>
|
|
<a name="l210"></a> </span><span class=cFB>gr</span><span class=cF0>.zoomed_dc = </span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>, </span><span class=cF3>GR_HEIGHT</span><span class=cF0>); </span><span class=cF2>//4-bit</span><span class=cF0>
|
|
<a name="l211"></a> </span><span class=cFB>gr</span><span class=cF0>.zoomed_dc->flags |= </span><span class=cF3>DCF_SCREEN_BITMAP</span><span class=cF0>;
|
|
<a name="l212"></a>}
|
|
<a name="l213"></a>
|
|
<a name="l214"></a></span><span class=cF5>GrInit2</span><span class=cF0>;
|
|
</span></pre></body>
|
|
</html>
|