mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-29 16:56:30 +00:00
258 lines
26 KiB
HTML
Executable file
258 lines
26 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.05">
|
|
<style type="text/css">
|
|
body {background-color:#000000;}
|
|
.cB0{color:#ffffff;background-color:#34e2e2;}
|
|
.cBA{color:#82bc49;background-color:#34e2e2;}
|
|
.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:courier;font-size:10pt">
|
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>define</span><span class=cF0> THRUST </span><span class=cFE>100</span><span class=cF0>
|
|
<a name="l2"></a>
|
|
<a name="l3"></a></span><span class=cF1>Bool</span><span class=cF0> blast_off;
|
|
<a name="l4"></a></span><span class=cF9>CMass</span><span class=cF0> m1, </span><span class=cF2>//Bottom of rocket</span><span class=cF0>
|
|
<a name="l5"></a> m2; </span><span class=cF2>//Top of rocket</span><span class=cF0>
|
|
<a name="l6"></a></span><span class=cF9>CSpring</span><span class=cF0> s;
|
|
<a name="l7"></a>
|
|
<a name="l8"></a>#</span><span class=cF1>define</span><span class=cF0> ROCKET_HEIGHT </span><span class=cFE>40</span><span class=cF0>
|
|
<a name="l9"></a>#</span><span class=cF1>define</span><span class=cF0> GROUND_Y (</span><span class=cF3>GR_HEIGHT</span><span class=cF0> - </span><span class=cFE>3</span><span class=cF0> * </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>)
|
|
<a name="l10"></a></span><span class=cB0>
|
|
<a name="l11"></a>
|
|
<a name="l12"></a> </span><span class=cBA><1>/* Graphics Not Rendered in HTML */</span><span class=cB0>
|
|
<a name="l13"></a>
|
|
<a name="l14"></a></span><span class=cF0>
|
|
<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>
|
|
<a name="l24"></a>
|
|
<a name="l25"></a>
|
|
<a name="l26"></a>
|
|
<a name="l27"></a>
|
|
<a name="l28"></a></span><span class=cFA>
|
|
<a name="l29"></a>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l30"></a>
|
|
<a name="l31"></a></span><span class=cF9>CDC</span><span class=cF0> *dc2;
|
|
<a name="l32"></a>
|
|
<a name="l33"></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="l34"></a>{
|
|
<a name="l35"></a> </span><span class=cF9>I64</span><span class=cF0> i, x, y, cx = </span><span class=cF3>GR_WIDTH</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>, cy = GROUND_Y;
|
|
<a name="l36"></a> </span><span class=cF1>Bool</span><span class=cF0> engine_on;
|
|
<a name="l37"></a> </span><span class=cF1>F64</span><span class=cF0> nozzle_angle, theta = </span><span class=cF5>Arg</span><span class=cF0>(m2.x - m1.x, m2.y - m1.y);
|
|
<a name="l38"></a>
|
|
<a name="l39"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, GROUND_Y, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA><2></span><span class=cF0>);
|
|
<a name="l40"></a>
|
|
<a name="l41"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_UP</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l42"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l43"></a> nozzle_angle = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l44"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l45"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l46"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_LEFT</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l47"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l48"></a> nozzle_angle = </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l49"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l50"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l51"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l52"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l53"></a> nozzle_angle = -</span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l54"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l55"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l56"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l57"></a> engine_on = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l58"></a>
|
|
<a name="l59"></a> </span><span class=cF1>if</span><span class=cF0> (engine_on)
|
|
<a name="l60"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l61"></a> x = m1.x - </span><span class=cFE>10</span><span class=cF0> * </span><span class=cF5>Cos</span><span class=cF0>(theta+nozzle_angle);
|
|
<a name="l62"></a> y = m1.y - </span><span class=cFE>10</span><span class=cF0> * </span><span class=cF5>Sin</span><span class=cF0>(theta+nozzle_angle);
|
|
<a name="l63"></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>6</span><span class=cF0>; i++)
|
|
<a name="l64"></a> {
|
|
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>i ^ </span><span class=cFB>winmgr</span><span class=cF0>.updates</span><span class=cF7>)</span><span class=cF0> & </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l66"></a> dc->color = </span><span class=cF3>YELLOW</span><span class=cF0>;
|
|
<a name="l67"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l68"></a> dc->color = </span><span class=cF3>RED</span><span class=cF0>;
|
|
<a name="l69"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, cx + </span><span class=cF7>(</span><span class=cF0>m1.x + i * </span><span class=cF5>Cos</span><span class=cF0>(theta - </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>, cy - </span><span class=cF7>(</span><span class=cF0>m1.y + i * </span><span class=cF5>Sin</span><span class=cF0>(theta - </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>, cx + x, cy - y);
|
|
<a name="l70"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, cx + </span><span class=cF7>(</span><span class=cF0>m1.x + i * </span><span class=cF5>Cos</span><span class=cF0>(theta + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>, cy - </span><span class=cF7>(</span><span class=cF0>m1.y + i * </span><span class=cF5>Sin</span><span class=cF0>(theta + </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>, cx + x, cy - y);
|
|
<a name="l71"></a> }
|
|
<a name="l72"></a>
|
|
<a name="l73"></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>10</span><span class=cF0>; i++)
|
|
<a name="l74"></a> {
|
|
<a name="l75"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>RandU16</span><span class=cF0> & </span><span class=cFE>3</span><span class=cF0>)
|
|
<a name="l76"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l77"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>: dc2->color = </span><span class=cF3>WHITE</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l78"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>1</span><span class=cF0>: dc2->color = </span><span class=cF3>LTGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l79"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>2</span><span class=cF0>: dc2->color = </span><span class=cF3>DKGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l80"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>3</span><span class=cF0>: dc2->color = </span><span class=cF3>BLACK</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l81"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l82"></a> </span><span class=cF5>GrPlot</span><span class=cF0>(dc2, cx + </span><span class=cF7>(</span><span class=cF0>x + </span><span class=cF5>RandU16</span><span class=cF0> % </span><span class=cFE>12</span><span class=cF0> - </span><span class=cFE>6</span><span class=cF7>)</span><span class=cF0>, cy - </span><span class=cF7>(</span><span class=cF0>y + </span><span class=cF5>RandU16</span><span class=cF0> % </span><span class=cFE>12</span><span class=cF0> - </span><span class=cFE>6</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l83"></a> }
|
|
<a name="l84"></a> </span><span class=cF5>Sound</span><span class=cF0>(</span><span class=cFE>22</span><span class=cF0>);
|
|
<a name="l85"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l86"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l87"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l88"></a> </span><span class=cF5>Sprite3ZB</span><span class=cF0>(dc, cx + </span><span class=cF7>(</span><span class=cF0>m1.x + m2.x</span><span class=cF7>)</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>, cy - </span><span class=cF7>(</span><span class=cF0>m1.y + m2.y</span><span class=cF7>)</span><span class=cF0> / </span><span class=cFE>2</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA><1></span><span class=cF0>, -theta);
|
|
<a name="l89"></a>}
|
|
<a name="l90"></a>
|
|
<a name="l91"></a></span><span class=cF1>U0</span><span class=cF0> MyDerivative(</span><span class=cF9>CMathODE</span><span class=cF0> *, </span><span class=cF1>F64</span><span class=cF0>, </span><span class=cF9>COrder2D3</span><span class=cF0> *, </span><span class=cF9>COrder2D3</span><span class=cF0> *)
|
|
<a name="l92"></a>{
|
|
<a name="l93"></a> </span><span class=cF1>Bool</span><span class=cF0> engine_on;
|
|
<a name="l94"></a> </span><span class=cF1>F64</span><span class=cF0> nozzle_angle, theta = </span><span class=cF5>Arg</span><span class=cF0>(m2.state->x - m1.state->x, m2.state->y - m1.state->y);
|
|
<a name="l95"></a>
|
|
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_UP</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l97"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l98"></a> nozzle_angle = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l99"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l100"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l101"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_LEFT</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l102"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l103"></a> nozzle_angle = </span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l104"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l105"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l106"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>kbd</span><span class=cF0>.down_bitmap, </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l107"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l108"></a> nozzle_angle = -</span><span class=cF3>pi</span><span class=cF0> / </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l109"></a> engine_on = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l110"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l111"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l112"></a> engine_on = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l113"></a>
|
|
<a name="l114"></a> </span><span class=cF1>if</span><span class=cF0> (engine_on)
|
|
<a name="l115"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l116"></a> m1.DstateDt->DxDt += THRUST * </span><span class=cF5>Cos</span><span class=cF0>(theta + nozzle_angle);
|
|
<a name="l117"></a> m1.DstateDt->DyDt += THRUST * </span><span class=cF5>Sin</span><span class=cF0>(theta + nozzle_angle);
|
|
<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> (blast_off)
|
|
<a name="l120"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l121"></a> m1.DstateDt->DyDt -= </span><span class=cFE>25</span><span class=cF0>; </span><span class=cF2>//Gravity</span><span class=cF0>
|
|
<a name="l122"></a> m2.DstateDt->DyDt -= </span><span class=cFE>25</span><span class=cF0>;
|
|
<a name="l123"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l124"></a>}
|
|
<a name="l125"></a>
|
|
<a name="l126"></a></span><span class=cF1>U0</span><span class=cF0> Init()
|
|
<a name="l127"></a>{
|
|
<a name="l128"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
|
<a name="l129"></a> </span><span class=cF6>"$BG,LTCYAN$$GREEN$Up, Left, Right$FG$%h*c"</span><span class=cF0>, </span><span class=cF5>ToI64</span><span class=cF0>(GROUND_Y / </span><span class=cF3>FONT_HEIGHT</span><span class=cF0>), </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l130"></a>
|
|
<a name="l131"></a> blast_off = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l132"></a>
|
|
<a name="l133"></a> </span><span class=cF2>//We don't clear que links.</span><span class=cF0>
|
|
<a name="l134"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&m1.</span><span class=cF1>start</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CMass</span><span class=cF0>.</span><span class=cF1>end</span><span class=cF7>)</span><span class=cF0> - </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CMass</span><span class=cF0>.</span><span class=cF1>start</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l135"></a> m1.y = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l136"></a>
|
|
<a name="l137"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&m2.</span><span class=cF1>start</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CMass</span><span class=cF0>.</span><span class=cF1>end</span><span class=cF7>)</span><span class=cF0> - </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CMass</span><span class=cF0>.</span><span class=cF1>start</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l138"></a> m2.y = ROCKET_HEIGHT;
|
|
<a name="l139"></a>
|
|
<a name="l140"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&s.</span><span class=cF1>start</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CSpring</span><span class=cF0>.</span><span class=cF1>end</span><span class=cF7>)</span><span class=cF0> - </span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF9>CSpring</span><span class=cF0>.</span><span class=cF1>start</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l141"></a> s.end1 = &m1;
|
|
<a name="l142"></a> s.end2 = &m2;
|
|
<a name="l143"></a> s.rest_len = ROCKET_HEIGHT;
|
|
<a name="l144"></a> s.const = </span><span class=cFE>10000</span><span class=cF0>;
|
|
<a name="l145"></a>
|
|
<a name="l146"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l147"></a>}
|
|
<a name="l148"></a>
|
|
<a name="l149"></a></span><span class=cF1>U0</span><span class=cF0> TaskEndCB()
|
|
<a name="l150"></a>{
|
|
<a name="l151"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l152"></a> </span><span class=cF5>SoundTaskEndCB</span><span class=cF0>;
|
|
<a name="l153"></a>}
|
|
<a name="l154"></a>
|
|
<a name="l155"></a></span><span class=cF1>U0</span><span class=cF0> Rocket()
|
|
<a name="l156"></a>{
|
|
<a name="l157"></a> </span><span class=cF9>CMathODE</span><span class=cF0> *ode = </span><span class=cF5>ODENew</span><span class=cF0>(</span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0>e-</span><span class=cFE>2</span><span class=cF0>, </span><span class=cF3>ODEF_HAS_MASSES</span><span class=cF0>);
|
|
<a name="l158"></a>
|
|
<a name="l159"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://tomawezome.github.io/ZealOS/System/TaskSettings.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
|
|
<a name="l160"></a> </span><span class=cF5>Fs</span><span class=cF0>->text_attr = </span><span class=cF3>YELLOW</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLUE</span><span class=cF0>;
|
|
<a name="l161"></a> </span><span class=cF5>MenuPush</span><span class=cF0>( </span><span class=cF6>"File {"</span><span class=cF0>
|
|
<a name="l162"></a> </span><span class=cF6>" Abort(,CH_SHIFT_ESC);"</span><span class=cF0>
|
|
<a name="l163"></a> </span><span class=cF6>" Exit(,CH_ESC);"</span><span class=cF0>
|
|
<a name="l164"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l165"></a> </span><span class=cF6>"Play {"</span><span class=cF0>
|
|
<a name="l166"></a> </span><span class=cF6>" Restart(,'\n');"</span><span class=cF0>
|
|
<a name="l167"></a> </span><span class=cF6>" Up(,,SC_CURSOR_UP);"</span><span class=cF0>
|
|
<a name="l168"></a> </span><span class=cF6>" UpLeft(,,SC_CURSOR_LEFT);"</span><span class=cF0>
|
|
<a name="l169"></a> </span><span class=cF6>" UpRight(,,SC_CURSOR_RIGHT);"</span><span class=cF0>
|
|
<a name="l170"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
|
<a name="l171"></a> );
|
|
<a name="l172"></a>
|
|
<a name="l173"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
|
<a name="l174"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
|
|
<a name="l175"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
|
|
<a name="l176"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
|
|
<a name="l177"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
|
<a name="l178"></a> dc2 = </span><span class=cF5>DCAlias</span><span class=cF0>;
|
|
<a name="l179"></a> </span><span class=cF5>Fs</span><span class=cF0>->task_end_cb = &TaskEndCB;
|
|
<a name="l180"></a>
|
|
<a name="l181"></a> ode->derive = &MyDerivative;
|
|
<a name="l182"></a> ode->drag_v2 = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>002</span><span class=cF0>;
|
|
<a name="l183"></a> ode->drag_v3 = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>00001</span><span class=cF0>;
|
|
<a name="l184"></a> ode->acceleration_limit = </span><span class=cFE>5</span><span class=cF0>e3;
|
|
<a name="l185"></a>
|
|
<a name="l186"></a> Init;
|
|
<a name="l187"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&m1, ode->last_mass);
|
|
<a name="l188"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&m2, ode->last_mass);
|
|
<a name="l189"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&s, ode->last_spring);
|
|
<a name="l190"></a>
|
|
<a name="l191"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(ode, </span><span class=cF5>Fs</span><span class=cF0>->last_ode);
|
|
<a name="l192"></a>
|
|
<a name="l193"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it = &</span><span class=cF5>DrawIt</span><span class=cF0>;
|
|
<a name="l194"></a>
|
|
<a name="l195"></a> </span><span class=cF1>try</span><span class=cF0>
|
|
<a name="l196"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l197"></a> </span><span class=cF5>KeyGet</span><span class=cF0>;
|
|
<a name="l198"></a> blast_off = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l199"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l200"></a> {
|
|
<a name="l201"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>CharGet</span><span class=cF7>(</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l202"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l203"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
|
|
<a name="l204"></a> Init;
|
|
<a name="l205"></a> </span><span class=cF5>KeyGet</span><span class=cF0>;
|
|
<a name="l206"></a> blast_off = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l207"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l208"></a>
|
|
<a name="l209"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
|
<a name="l210"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
|
<a name="l211"></a> </span><span class=cF1>goto</span><span class=cF0> rk_done;
|
|
<a name="l212"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l213"></a> }
|
|
<a name="l214"></a>rk_done:
|
|
<a name="l215"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l216"></a> </span><span class=cF1>catch</span><span class=cF0>
|
|
<a name="l217"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
|
|
<a name="l218"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(ode);
|
|
<a name="l219"></a> </span><span class=cF5>ODEDel</span><span class=cF0>(ode);
|
|
<a name="l220"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
|
<a name="l221"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
|
<a name="l222"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
|
<a name="l223"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc2);
|
|
<a name="l224"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
|
|
<a name="l225"></a>}
|
|
<a name="l226"></a>
|
|
<a name="l227"></a>Rocket;
|
|
</span></pre></body>
|
|
</html>
|