237 lines
21 KiB
Plaintext
237 lines
21 KiB
Plaintext
|
<!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=cF9>I64</span><span class=cF0> box_x_min,box_x_max,box_y_min,box_y_max;
|
||
|
<a name="l2"></a>
|
||
|
<a name="l3"></a></span><span class=cF1>class</span><span class=cF0> Arrow
|
||
|
<a name="l4"></a>{
|
||
|
<a name="l5"></a> Arrow *next,*last;
|
||
|
<a name="l6"></a> </span><span class=cF1>F64</span><span class=cF0> x,y,dx,dy;
|
||
|
<a name="l7"></a>} head;
|
||
|
<a name="l8"></a>
|
||
|
<a name="l9"></a> </span><span class=cFA><1>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
||
|
<a name="l10"></a>
|
||
|
<a name="l11"></a></span><span class=cF1>Bool</span><span class=cF0> bow_drawn;
|
||
|
<a name="l12"></a></span><span class=cF1>F64</span><span class=cF0> bow_x,bow_y,bow_theta;
|
||
|
<a name="l13"></a>
|
||
|
<a name="l14"></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> *task,</span><span class=cF9>CDC</span><span class=cF0> *dc)
|
||
|
<a name="l15"></a>{
|
||
|
<a name="l16"></a> </span><span class=cF1>F64</span><span class=cF0> theta,x,y,dx,dy,
|
||
|
<a name="l17"></a> str_w,str_h,draw_len;
|
||
|
<a name="l18"></a> Arrow *tmpa;
|
||
|
<a name="l19"></a> </span><span class=cF9>CD3I32</span><span class=cF0> ctrl[5];
|
||
|
<a name="l20"></a> dc->color=</span><span class=cF3>RED</span><span class=cF0>;
|
||
|
<a name="l21"></a> </span><span class=cF5>GrBorder</span><span class=cF0>(dc,box_x_min,box_y_min,box_x_max,box_y_max);
|
||
|
<a name="l22"></a>
|
||
|
<a name="l23"></a> x=</span><span class=cF5>ClampI64</span><span class=cF0>(</span><span class=cFB>ms</span><span class=cF0>.pos.x-task->pix_left-task->scroll_x,box_x_min,box_x_max);
|
||
|
<a name="l24"></a> y=</span><span class=cF5>ClampI64</span><span class=cF0>(</span><span class=cFB>ms</span><span class=cF0>.pos.y-task->pix_top-task->scroll_y, box_y_min,box_y_max);
|
||
|
<a name="l25"></a> dx=bow_x-x;
|
||
|
<a name="l26"></a> dy=bow_y-y;
|
||
|
<a name="l27"></a>
|
||
|
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (bow_drawn && </span><span class=cF7>(</span><span class=cF0>dx|dy</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l29"></a> bow_theta=</span><span class=cF5>Arg</span><span class=cF0>(dx,dy);
|
||
|
<a name="l30"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l31"></a> bow_x=x;
|
||
|
<a name="l32"></a> bow_y=y;
|
||
|
<a name="l33"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l34"></a>
|
||
|
<a name="l35"></a> draw_len=</span><span class=cF5>Sqrt</span><span class=cF0>(dx*dx+dy*dy);
|
||
|
<a name="l36"></a> str_w=draw_len/3;
|
||
|
<a name="l37"></a> str_h=</span><span class=cF5>Sqrt</span><span class=cF0>(60*60-str_w*str_w);
|
||
|
<a name="l38"></a>
|
||
|
<a name="l39"></a> dc->color=</span><span class=cF3>BLACK</span><span class=cF0>;
|
||
|
<a name="l40"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x-str_h/2*</span><span class=cF5>Cos</span><span class=cF7>(</span><span class=cF0>bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2</span><span class=cF7>)</span><span class=cF0>+str_w*</span><span class=cF5>Cos</span><span class=cF7>(</span><span class=cF0>bow_theta</span><span class=cF7>)</span><span class=cF0>,
|
||
|
<a name="l41"></a> y-str_h/2*</span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF0>bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2</span><span class=cF7>)</span><span class=cF0>+str_w*</span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF0>bow_theta</span><span class=cF7>)</span><span class=cF0>,
|
||
|
<a name="l42"></a> x,y);
|
||
|
<a name="l43"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x+str_h/2*</span><span class=cF5>Cos</span><span class=cF7>(</span><span class=cF0>bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2</span><span class=cF7>)</span><span class=cF0>+str_w*</span><span class=cF5>Cos</span><span class=cF7>(</span><span class=cF0>bow_theta</span><span class=cF7>)</span><span class=cF0>,
|
||
|
<a name="l44"></a> y+str_h/2*</span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF0>bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2</span><span class=cF7>)</span><span class=cF0>+str_w*</span><span class=cF5>Sin</span><span class=cF7>(</span><span class=cF0>bow_theta</span><span class=cF7>)</span><span class=cF0>,
|
||
|
<a name="l45"></a> x,y);
|
||
|
<a name="l46"></a>
|
||
|
<a name="l47"></a> </span><span class=cF5>MemSet</span><span class=cF0>(ctrl,0,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>ctrl</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l48"></a> ctrl[0].x=x-str_h/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+str_w*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta);
|
||
|
<a name="l49"></a> ctrl[0].y=y-str_h/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+str_w*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta);
|
||
|
<a name="l50"></a> ctrl[1].x=x-0.75*str_h/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+draw_len/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta)+
|
||
|
<a name="l51"></a> str_w*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta);
|
||
|
<a name="l52"></a> ctrl[1].y=y-0.75*str_h/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+draw_len/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta)+
|
||
|
<a name="l53"></a> str_w*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta);
|
||
|
<a name="l54"></a> ctrl[2].x=x+draw_len/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta)+str_w*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta);
|
||
|
<a name="l55"></a> ctrl[2].y=y+draw_len/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta)+str_w*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta);
|
||
|
<a name="l56"></a> ctrl[3].x=x+0.75*str_h/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+draw_len/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta)+
|
||
|
<a name="l57"></a> str_w*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta);
|
||
|
<a name="l58"></a> ctrl[3].y=y+0.75*str_h/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+draw_len/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta)+
|
||
|
<a name="l59"></a> str_w*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta);
|
||
|
<a name="l60"></a> ctrl[4].x=x+str_h/2*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+str_w*</span><span class=cF5>Cos</span><span class=cF0>(bow_theta);
|
||
|
<a name="l61"></a> ctrl[4].y=y+str_h/2*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta+</span><span class=cF3>pi</span><span class=cF0>/2)+str_w*</span><span class=cF5>Sin</span><span class=cF0>(bow_theta);
|
||
|
<a name="l62"></a>
|
||
|
<a name="l63"></a> dc->color=</span><span class=cF3>BROWN</span><span class=cF0>;
|
||
|
<a name="l64"></a> dc->thick=2;
|
||
|
<a name="l65"></a> </span><span class=cF5>Gr2BSpline3</span><span class=cF0>(dc,ctrl,5);
|
||
|
<a name="l66"></a> dc->thick=1;
|
||
|
<a name="l67"></a>
|
||
|
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (bow_drawn)
|
||
|
<a name="l69"></a> </span><span class=cF5>Sprite3ZB</span><span class=cF0>(dc,x,y,0,</span><span class=cFA><1></span><span class=cF0>,bow_theta);
|
||
|
<a name="l70"></a>
|
||
|
<a name="l71"></a> tmpa=head.next;
|
||
|
<a name="l72"></a> </span><span class=cF1>while</span><span class=cF0> (tmpa!=&head) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l73"></a> theta=</span><span class=cF5>Arg</span><span class=cF0>(tmpa->dx,tmpa->dy);
|
||
|
<a name="l74"></a> </span><span class=cF5>Sprite3ZB</span><span class=cF0>(dc,tmpa->x,tmpa->y,0,</span><span class=cFA><1></span><span class=cF0>,theta);
|
||
|
<a name="l75"></a> tmpa=tmpa->next;
|
||
|
<a name="l76"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l77"></a>}
|
||
|
<a name="l78"></a>
|
||
|
<a name="l79"></a>#</span><span class=cF1>define</span><span class=cF0> ANIMATE_SLEEP_MS 10
|
||
|
<a name="l80"></a>
|
||
|
<a name="l81"></a></span><span class=cF1>U0</span><span class=cF0> AnimateTask(</span><span class=cF9>I64</span><span class=cF0>)
|
||
|
<a name="l82"></a>{
|
||
|
<a name="l83"></a> </span><span class=cF9>I64</span><span class=cF0> x,y;
|
||
|
<a name="l84"></a> Arrow *tmpa,*tmpa1;
|
||
|
<a name="l85"></a> </span><span class=cF1>F64</span><span class=cF0> dt,t0=</span><span class=cF5>tS</span><span class=cF0>;
|
||
|
<a name="l86"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l87"></a> dt=</span><span class=cF5>tS</span><span class=cF0>-t0;
|
||
|
<a name="l88"></a> t0=</span><span class=cF5>tS</span><span class=cF0>;
|
||
|
<a name="l89"></a>
|
||
|
<a name="l90"></a> x=</span><span class=cF5>ClampI64</span><span class=cF0>(</span><span class=cFB>ms</span><span class=cF0>.pos.x-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_left-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_x,
|
||
|
<a name="l91"></a> box_x_min,box_x_max)+</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_left+
|
||
|
<a name="l92"></a> </span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_x;
|
||
|
<a name="l93"></a> y=</span><span class=cF5>ClampI64</span><span class=cF0>(</span><span class=cFB>ms</span><span class=cF0>.pos.y-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_top-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_y,
|
||
|
<a name="l94"></a> box_y_min,box_y_max)+</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_top+
|
||
|
<a name="l95"></a> </span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_y;
|
||
|
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms</span><span class=cF0>.pos.x!=x || </span><span class=cFB>ms</span><span class=cF0>.pos.y!=y)
|
||
|
<a name="l97"></a> </span><span class=cF5>MsSet</span><span class=cF0>(x,y);
|
||
|
<a name="l98"></a>
|
||
|
<a name="l99"></a> tmpa=head.next;
|
||
|
<a name="l100"></a> </span><span class=cF1>while</span><span class=cF0> (tmpa!=&head) {
|
||
|
<a name="l101"></a> tmpa1=tmpa->next;
|
||
|
<a name="l102"></a> tmpa->x+=tmpa->dx*dt;
|
||
|
<a name="l103"></a> tmpa->y+=tmpa->dy*dt;
|
||
|
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_x<=
|
||
|
<a name="l105"></a> tmpa->x<</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_width-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_x</span><span class=cF7>)</span><span class=cF0> ||
|
||
|
<a name="l106"></a> !</span><span class=cF7>(</span><span class=cF0>-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_y<=
|
||
|
<a name="l107"></a> tmpa->y<</span><span class=cF5>Fs</span><span class=cF0>->parent_task->pix_height-</span><span class=cF5>Fs</span><span class=cF0>->parent_task->scroll_y</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l108"></a> </span><span class=cF5>QueRem</span><span class=cF0>(tmpa);
|
||
|
<a name="l109"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpa);
|
||
|
<a name="l110"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l111"></a> tmpa=tmpa1;
|
||
|
<a name="l112"></a> }
|
||
|
<a name="l113"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
|
||
|
<a name="l114"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l115"></a>}
|
||
|
<a name="l116"></a>
|
||
|
<a name="l117"></a></span><span class=cF1>U0</span><span class=cF0> Init()
|
||
|
<a name="l118"></a>{
|
||
|
<a name="l119"></a> </span><span class=cF9>I64</span><span class=cF0> w=</span><span class=cF5>Fs</span><span class=cF0>->pix_width,
|
||
|
<a name="l120"></a> h=</span><span class=cF5>Fs</span><span class=cF0>->pix_height;
|
||
|
<a name="l121"></a> </span><span class=cF5>QueInit</span><span class=cF0>(&head);
|
||
|
<a name="l122"></a> bow_drawn=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l123"></a> box_x_min=7*w/16;
|
||
|
<a name="l124"></a> box_y_min=6*h/8;
|
||
|
<a name="l125"></a> box_x_max=9*w/16;
|
||
|
<a name="l126"></a> box_y_max=7*h/8;
|
||
|
<a name="l127"></a> bow_theta=-</span><span class=cF3>pi</span><span class=cF0>/2;
|
||
|
<a name="l128"></a> bow_x=(box_x_min+box_x_max)/2;
|
||
|
<a name="l129"></a> bow_y=(box_y_min+box_y_max)/2;
|
||
|
<a name="l130"></a> </span><span class=cF5>MsSet</span><span class=cF0>(bow_x+</span><span class=cF5>Fs</span><span class=cF0>->pix_left+</span><span class=cF5>Fs</span><span class=cF0>->scroll_x,
|
||
|
<a name="l131"></a> bow_y+</span><span class=cF5>Fs</span><span class=cF0>->pix_top+</span><span class=cF5>Fs</span><span class=cF0>->scroll_y);
|
||
|
<a name="l132"></a>}
|
||
|
<a name="l133"></a>
|
||
|
<a name="l134"></a></span><span class=cF1>U0</span><span class=cF0> CleanUp()
|
||
|
<a name="l135"></a>{
|
||
|
<a name="l136"></a> </span><span class=cF5>QueDel</span><span class=cF0>(&head,</span><span class=cF3>TRUE</span><span class=cF0>);
|
||
|
<a name="l137"></a>}
|
||
|
<a name="l138"></a>
|
||
|
<a name="l139"></a></span><span class=cF1>U0</span><span class=cF0> Zing()
|
||
|
<a name="l140"></a>{
|
||
|
<a name="l141"></a> </span><span class=cF9>I64</span><span class=cF0> arg1,arg2;
|
||
|
<a name="l142"></a> Arrow *tmpa;
|
||
|
<a name="l143"></a> </span><span class=cF5>MenuPush</span><span class=cF0>(
|
||
|
<a name="l144"></a> </span><span class=cF6>"File {"</span><span class=cF0>
|
||
|
<a name="l145"></a> </span><span class=cF6>" Abort(,CH_SHIFT_ESC);"</span><span class=cF0>
|
||
|
<a name="l146"></a> </span><span class=cF6>" Exit(,CH_ESC);"</span><span class=cF0>
|
||
|
<a name="l147"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
||
|
<a name="l148"></a> </span><span class=cF6>"Play {"</span><span class=cF0>
|
||
|
<a name="l149"></a> </span><span class=cF6>" Restart(,'\n');"</span><span class=cF0>
|
||
|
<a name="l150"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
||
|
<a name="l151"></a> );
|
||
|
<a name="l152"></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="l153"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
||
|
<a name="l154"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
|
||
|
<a name="l155"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
|
||
|
<a name="l156"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
|
||
|
<a name="l157"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
||
|
<a name="l158"></a>
|
||
|
<a name="l159"></a> Init;
|
||
|
<a name="l160"></a> </span><span class=cF5>Fs</span><span class=cF0>->animate_task=</span><span class=cF5>Spawn</span><span class=cF0>(&AnimateTask,</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF6>"Animate"</span><span class=cF0>,,</span><span class=cF5>Fs</span><span class=cF0>);
|
||
|
<a name="l161"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it=&</span><span class=cF5>DrawIt</span><span class=cF0>;
|
||
|
<a name="l162"></a> </span><span class=cF5>Fs</span><span class=cF0>->win_inhibit=</span><span class=cF3>WIG_TASK_DFT</span><span class=cF0>-</span><span class=cF3>WIF_SELF_FOCUS</span><span class=cF0>-</span><span class=cF3>WIF_SELF_GRAB_SCROLL</span><span class=cF0>;
|
||
|
<a name="l163"></a> </span><span class=cF1>try</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l164"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
||
|
<a name="l165"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>GetMsg</span><span class=cF7>(</span><span class=cF0>&arg1,&arg2,
|
||
|
<a name="l166"></a> 1<<</span><span class=cF3>MSG_KEY_DOWN</span><span class=cF0>|1<<</span><span class=cF3>MSG_MS_L_DOWN</span><span class=cF0>|1<<</span><span class=cF3>MSG_MS_L_UP</span><span class=cF7>)</span><span class=cF0>) {
|
||
|
<a name="l167"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MSG_KEY_DOWN</span><span class=cF0>:
|
||
|
<a name="l168"></a> </span><span class=cF1>switch</span><span class=cF0> (arg1) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l169"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
|
||
|
<a name="l170"></a> CleanUp;
|
||
|
<a name="l171"></a> Init;
|
||
|
<a name="l172"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l173"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
||
|
<a name="l174"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
||
|
<a name="l175"></a> </span><span class=cF1>goto</span><span class=cF0> zi_done;
|
||
|
<a name="l176"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l177"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l178"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MSG_MS_L_DOWN</span><span class=cF0>:
|
||
|
<a name="l179"></a> bow_x=arg1;
|
||
|
<a name="l180"></a> bow_y=arg2;
|
||
|
<a name="l181"></a> bow_drawn=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l182"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l183"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MSG_MS_L_UP</span><span class=cF0>:
|
||
|
<a name="l184"></a> </span><span class=cF1>if</span><span class=cF0>(arg1-bow_x || arg2-bow_y) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l185"></a> tmpa=</span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>Arrow</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l186"></a> tmpa->dx=10.0*(bow_x-arg1);
|
||
|
<a name="l187"></a> tmpa->dy=10.0*(bow_y-arg2);
|
||
|
<a name="l188"></a> tmpa->x=arg1;
|
||
|
<a name="l189"></a> tmpa->y=arg2;
|
||
|
<a name="l190"></a> </span><span class=cF5>QueIns</span><span class=cF0>(tmpa,head.last);
|
||
|
<a name="l191"></a> </span><span class=cF5>Noise</span><span class=cF0>(50,110,114);
|
||
|
<a name="l192"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l193"></a> bow_drawn=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l194"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l195"></a> }
|
||
|
<a name="l196"></a>zi_done:
|
||
|
<a name="l197"></a> </span><span class=cF5>GetMsg</span><span class=cF0>(,,1<<</span><span class=cF3>MSG_KEY_UP</span><span class=cF0>);
|
||
|
<a name="l198"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>catch</span><span class=cF0>
|
||
|
<a name="l199"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
|
||
|
<a name="l200"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
||
|
<a name="l201"></a> CleanUp;
|
||
|
<a name="l202"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
|
||
|
<a name="l203"></a>}
|
||
|
<a name="l204"></a>
|
||
|
<a name="l205"></a>Zing;
|
||
|
</span></pre></body>
|
||
|
</html>
|