templeos-info/public/Wb/Adam/God/GodDoodle.HC.HTML

224 lines
26 KiB
Plaintext
Raw Normal View History

2024-03-24 21:24:44 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre id="content">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;God;Graphics/Sprite;Sprites&quot;</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>GodDoodleDraw</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="l4"></a>{
<a name="l5"></a> </span><span class=cF5>GrBlot</span><span class=cF0>(dc,0,0,</span><span class=cFB>god</span><span class=cF0>.doodle_dc);
<a name="l6"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Blink</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l7"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>god</span><span class=cF0>.doodle_done) {
<a name="l8"></a> dc-&gt;color=</span><span class=cF3>RED</span><span class=cF0>;
<a name="l9"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-</span><span class=cF3>FONT_WIDTH</span><span class=cF0>*29</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l10"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-3*</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l11"></a> </span><span class=cF6>&quot;Press &lt;ESC&gt; to insert sprite.&quot;</span><span class=cF0>);
<a name="l12"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-</span><span class=cF3>FONT_WIDTH</span><span class=cF0>*39</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l13"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-3*</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1+2*</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>,
<a name="l14"></a> </span><span class=cF6>&quot;Press &lt;SHIFT-ESC&gt; to throw-away sprite.&quot;</span><span class=cF0>);
<a name="l15"></a> } </span><span class=cF1>else</span><span class=cF0> {
<a name="l16"></a> dc-&gt;color=</span><span class=cF3>GREEN</span><span class=cF0>;
<a name="l17"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF0>task-&gt;pix_width-</span><span class=cF3>FONT_WIDTH</span><span class=cF0>*25</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l18"></a> </span><span class=cF7>(</span><span class=cF0>task-&gt;pix_height-</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l19"></a> </span><span class=cF6>&quot;Press &lt;SPACE&gt; repeatedly.&quot;</span><span class=cF0>);
<a name="l20"></a> }
<a name="l21"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l22"></a>}
<a name="l23"></a>
<a name="l24"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GodDoodleSmooth</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> num)
<a name="l25"></a>{
<a name="l26"></a> </span><span class=cF9>CDC</span><span class=cF0> *dc=</span><span class=cF5>DCExt</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,0,0,
<a name="l27"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;width-1,</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;height-1);
<a name="l28"></a> </span><span class=cF9>I64</span><span class=cF0> i,x,y,x1,y1,c,histogram[16],best,best_cnt,c_old=</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color;
<a name="l29"></a> </span><span class=cF1>for</span><span class=cF0> (y=0;y&lt;</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;height;y++)
<a name="l30"></a> </span><span class=cF1>for</span><span class=cF0> (x=0;x&lt;</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;width;x++) </span><span class=cF7>{</span><span class=cF0>
<a name="l31"></a> </span><span class=cF5>MemSet</span><span class=cF0>(histogram,0,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>histogram</span><span class=cF7>)</span><span class=cF0>);
<a name="l32"></a> </span><span class=cF1>for</span><span class=cF0> (y1=y-num;y1&lt;=y+num;y1++)
<a name="l33"></a> </span><span class=cF1>for</span><span class=cF0> (x1=x-num;x1&lt;=x+num;x1++) {
<a name="l34"></a> c=</span><span class=cF5>GrPeek</span><span class=cF0>(dc,x1,y1);
<a name="l35"></a> </span><span class=cF1>if</span><span class=cF0> (0&lt;=c&lt;=15)
<a name="l36"></a> histogram[c]++;
<a name="l37"></a> }
<a name="l38"></a> best=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l39"></a> best_cnt=-1;
<a name="l40"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;16;i++)
<a name="l41"></a> </span><span class=cF1>if</span><span class=cF0> (histogram[i]&gt;best_cnt) {
<a name="l42"></a> best=i;
<a name="l43"></a> best_cnt=histogram[i];
<a name="l44"></a> }
<a name="l45"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=best;
<a name="l46"></a> </span><span class=cF5>GrPlot</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,x,y);
<a name="l47"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l48"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=c_old;
<a name="l49"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc);
<a name="l50"></a>}
<a name="l51"></a>
<a name="l52"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GodDoodleBitsIns</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> num_bits,</span><span class=cF9>I64</span><span class=cF0> n)
<a name="l53"></a>{</span><span class=cF2>//Insert bits into God doodle bit fifo.</span><span class=cF0>
<a name="l54"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l55"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;num_bits;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l56"></a> </span><span class=cF5>FifoU8Ins</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_fifo,n&amp;1);
<a name="l57"></a> n&gt;&gt;=1;
<a name="l58"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l59"></a>}
<a name="l60"></a>
<a name="l61"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GodDoodleHexIns</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *st)
<a name="l62"></a>{</span><span class=cF2>//Insert hex record into God doodle bit fifo.</span><span class=cF0>
<a name="l63"></a> </span><span class=cF1>U8</span><span class=cF0> buf[2];
<a name="l64"></a> </span><span class=cF1>if</span><span class=cF0> (st) </span><span class=cF7>{</span><span class=cF0>
<a name="l65"></a> buf[1]=0;
<a name="l66"></a> </span><span class=cF1>while</span><span class=cF0> (*buf=*st++)
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>char_bmp_hex_numeric</span><span class=cF0>,*buf</span><span class=cF7>)</span><span class=cF0>)
<a name="l68"></a> </span><span class=cF5>GodDoodleBitsIns</span><span class=cF0>(4,</span><span class=cFB>rev_bits_table</span><span class=cF0>[</span><span class=cF5>Str2I64</span><span class=cF7>(</span><span class=cF0>buf,16</span><span class=cF7>)</span><span class=cF0>]&gt;&gt;4);
<a name="l69"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l70"></a>}
<a name="l71"></a>
<a name="l72"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>GodDoodleBits</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> num_bits)
<a name="l73"></a>{
<a name="l74"></a> </span><span class=cF1>U8</span><span class=cF0> b;
<a name="l75"></a> </span><span class=cF9>I64</span><span class=cF0> res=0;
<a name="l76"></a> </span><span class=cF1>while</span><span class=cF0> (num_bits) </span><span class=cF7>{</span><span class=cF0>
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FifoU8Rem</span><span class=cF7>(</span><span class=cFB>god</span><span class=cF0>.doodle_fifo,&amp;b</span><span class=cF7>)</span><span class=cF0>) {
<a name="l78"></a> res=res&lt;&lt;1+b;
<a name="l79"></a> num_bits--;
<a name="l80"></a> } </span><span class=cF1>else</span><span class=cF0> {
<a name="l81"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_ch=</span><span class=cF5>GetChar</span><span class=cF0>(,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l82"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>god</span><span class=cF0>.doodle_ch==</span><span class=cF3>CH_ESC</span><span class=cF0>||</span><span class=cFB>god</span><span class=cF0>.doodle_ch==</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>)
<a name="l83"></a> </span><span class=cF5>throw</span><span class=cF0>;
<a name="l84"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>god</span><span class=cF0>.doodle_ch==</span><span class=cF6>'\n'</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l85"></a> </span><span class=cF5>DCFill</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,</span><span class=cF3>WHITE</span><span class=cF0>);
<a name="l86"></a> </span><span class=cF5>FifoU8Flush</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_fifo);
<a name="l87"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF6>'0'</span><span class=cF0>&lt;=</span><span class=cFB>god</span><span class=cF0>.doodle_ch&lt;=</span><span class=cF6>'9'</span><span class=cF0>)
<a name="l88"></a> </span><span class=cF5>GodDoodleSmooth</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_ch-</span><span class=cF6>'0'</span><span class=cF0>);
<a name="l89"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l90"></a> </span><span class=cF5>GodDoodleBitsIns</span><span class=cF0>(</span><span class=cF3>GOD_GOOD_BITS</span><span class=cF0>,</span><span class=cF5>KbdMsEvtTime</span><span class=cF0>&gt;&gt;</span><span class=cF3>GOD_BAD_BITS</span><span class=cF0>);
<a name="l91"></a> }
<a name="l92"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l93"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l94"></a>}
<a name="l95"></a>
<a name="l96"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>GodDoodleSprite</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *hex=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l97"></a>{</span><span class=cF2>//Make God draw sprite. </span><a href="/Wb/Adam/God/HSNotes.DD.HTML#l1"><span class=cF4>Holy Spirit Instructions</span></a><span class=cF0>
<a name="l98"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,w,h,x,y,ch;
<a name="l99"></a> </span><span class=cF1>U8</span><span class=cF0> *elems;
<a name="l100"></a>
<a name="l101"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>god</span><span class=cF0>.doodle_dc) </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l102"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_done=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l103"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="/Wb/Adam/TaskSettings.HC.HTML#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l104"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l105"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l106"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l107"></a>
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (!hex)
<a name="l109"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>(</span><span class=cF6>&quot;The </span><a href="/Wb/Adam/God/HSNotes.DD.HTML#l1"><span class=cF4>Holy Spirit</span></a><span class=cF6> can puppet you.\n\n&quot;</span><span class=cF0>
<a name="l110"></a> </span><span class=cF6>&quot;Press $GREEN$&lt;SPACE&gt;$FG$ until it finishes.&quot;</span><span class=cF0>);
<a name="l111"></a>
<a name="l112"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_ch=0;
<a name="l113"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc=</span><span class=cF5>DCNew</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_width,</span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_height);
<a name="l114"></a> </span><span class=cF5>DCFill</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,</span><span class=cF3>WHITE</span><span class=cF0>);
<a name="l115"></a> w=</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;width;
<a name="l116"></a> h=</span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;height;
<a name="l117"></a>
<a name="l118"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;draw_it=&amp;</span><span class=cF5>GodDoodleDraw</span><span class=cF0>;
<a name="l119"></a> </span><span class=cF5>FifoU8Flush</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_fifo);
<a name="l120"></a> </span><span class=cF5>GodDoodleHexIns</span><span class=cF0>(hex);
<a name="l121"></a> </span><span class=cF1>try</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l122"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;3;i++) {
<a name="l123"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=</span><span class=cF3>RED</span><span class=cF0>;
<a name="l124"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;29;j++)
<a name="l125"></a> </span><span class=cF1>switch</span><span class=cF0> [</span><span class=cF5>GodDoodleBits</span><span class=cF0>(3)] </span><span class=cF7>{</span><span class=cF0>
<a name="l126"></a> </span><span class=cF1>case</span><span class=cF0> 0:
<a name="l127"></a> </span><span class=cF5>GrEllipse3</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,
<a name="l128"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-w/2,
<a name="l129"></a> </span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-h/2,0,
<a name="l130"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5,</span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5);
<a name="l131"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l132"></a> </span><span class=cF1>case</span><span class=cF0> 1:
<a name="l133"></a> </span><span class=cF5>GrCircle3</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,
<a name="l134"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-w/2,
<a name="l135"></a> </span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-h/2,0,
<a name="l136"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5);
<a name="l137"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l138"></a> </span><span class=cF1>case</span><span class=cF0> 2:
<a name="l139"></a> </span><span class=cF5>GrBorder</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,
<a name="l140"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-w/2,
<a name="l141"></a> </span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5-h/2,
<a name="l142"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5,</span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>5</span><span class=cF7>)</span><span class=cF0>/15.5);
<a name="l143"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l144"></a> </span><span class=cF1>case</span><span class=cF0> 3...7:
<a name="l145"></a> </span><span class=cF5>GrLine3</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,
<a name="l146"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>4</span><span class=cF7>)</span><span class=cF0>/15,</span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>4</span><span class=cF7>)</span><span class=cF0>/15,0,
<a name="l147"></a> </span><span class=cF7>(</span><span class=cF0>w-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>4</span><span class=cF7>)</span><span class=cF0>/15,</span><span class=cF7>(</span><span class=cF0>h-1</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF5>GodDoodleBits</span><span class=cF7>(</span><span class=cF0>4</span><span class=cF7>)</span><span class=cF0>/15,0);
<a name="l148"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l149"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l150"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;6;j++) </span><span class=cF7>{</span><span class=cF0>
<a name="l151"></a> x=(w-1)*</span><span class=cF5>GodDoodleBits</span><span class=cF0>(5)/31+w/64;
<a name="l152"></a> y=(h-1)*</span><span class=cF5>GodDoodleBits</span><span class=cF0>(5)/31+h/64;
<a name="l153"></a> </span><span class=cF1>switch</span><span class=cF0> [</span><span class=cF5>GodDoodleBits</span><span class=cF0>(2)] {
<a name="l154"></a> </span><span class=cF1>case</span><span class=cF0> 0: </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
<a name="l155"></a> </span><span class=cF1>case</span><span class=cF0> 1: </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=</span><span class=cF3>DKGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
<a name="l156"></a> </span><span class=cF1>case</span><span class=cF0> 2: </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=</span><span class=cF3>LTGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
<a name="l157"></a> </span><span class=cF1>case</span><span class=cF0> 3: </span><span class=cFB>god</span><span class=cF0>.doodle_dc-&gt;color=</span><span class=cF3>WHITE</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
<a name="l158"></a> }
<a name="l159"></a> </span><span class=cF5>GrFloodFill3</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc,x,y,0);
<a name="l160"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l161"></a> </span><span class=cF5>GodDoodleSmooth</span><span class=cF0>(3);
<a name="l162"></a> }
<a name="l163"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_done=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l164"></a> </span><span class=cF1>if</span><span class=cF0> (!hex) {
<a name="l165"></a> </span><span class=cF1>do</span><span class=cF0> ch=</span><span class=cF5>GetChar</span><span class=cF0>(,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l166"></a> </span><span class=cF1>while</span><span class=cF0> (ch!=</span><span class=cF3>CH_ESC</span><span class=cF0> &amp;&amp; ch!=</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l167"></a> } </span><span class=cF1>else</span><span class=cF0>
<a name="l168"></a> ch=</span><span class=cF3>CH_ESC</span><span class=cF0>;
<a name="l169"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>catch</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l170"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;catch_except=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l171"></a> ch=</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>;
<a name="l172"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l173"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
<a name="l174"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l175"></a> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF3>CH_ESC</span><span class=cF0>)
<a name="l176"></a> elems=</span><span class=cF5>DC2Sprite</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc);
<a name="l177"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l178"></a> elems=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l179"></a> </span><span class=cF5>DCDel</span><span class=cF0>(</span><span class=cFB>god</span><span class=cF0>.doodle_dc);
<a name="l180"></a> </span><span class=cFB>god</span><span class=cF0>.doodle_dc=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l181"></a> </span><span class=cF1>return</span><span class=cF0> elems;
<a name="l182"></a>}
<a name="l183"></a>
<a name="l184"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;God&quot;</span><span class=cF0>
<a name="l185"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>GodDoodle</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *hex=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l186"></a>{</span><span class=cF2>//Make God draw sprite, insert in doc. </span><a href="/Wb/Adam/God/HSNotes.DD.HTML#l1"><span class=cF4>Holy Spirit Instructions</span></a><span class=cF0>
<a name="l187"></a> </span><span class=cF1>U8</span><span class=cF0> *elems;
<a name="l188"></a> </span><span class=cF1>if</span><span class=cF0> (elems=</span><span class=cF5>GodDoodleSprite</span><span class=cF7>(</span><span class=cF0>hex</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l189"></a> </span><span class=cF5>Sprite</span><span class=cF0>(elems);
<a name="l190"></a> </span><span class=cF5>Free</span><span class=cF0>(elems);
<a name="l191"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l192"></a>}
</span></pre></body>
</html>