238 lines
21 KiB
Plaintext
238 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">
|
||
|
.cB0{color:#000000;background-color:#55ffff;}
|
||
|
.cBA{color:#55ff55;background-color:#55ffff;}
|
||
|
.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>define</span><span class=cF0> THRUST 100
|
||
|
<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 40
|
||
|
<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>-3*</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>/2,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,0,GROUND_Y,0,</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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l42"></a> nozzle_angle=0;
|
||
|
<a name="l43"></a> engine_on=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l44"></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=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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l45"></a> nozzle_angle=</span><span class=cF3>pi</span><span class=cF0>/8;
|
||
|
<a name="l46"></a> engine_on=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l47"></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=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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l48"></a> nozzle_angle=-</span><span class=cF3>pi</span><span class=cF0>/8;
|
||
|
<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> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l51"></a> engine_on=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l52"></a>
|
||
|
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (engine_on) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l54"></a> x=m1.x-10*</span><span class=cF5>Cos</span><span class=cF0>(theta+nozzle_angle);
|
||
|
<a name="l55"></a> y=m1.y-10*</span><span class=cF5>Sin</span><span class=cF0>(theta+nozzle_angle);
|
||
|
<a name="l56"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i<6;i++) {
|
||
|
<a name="l57"></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>&1)
|
||
|
<a name="l58"></a> dc->color=</span><span class=cF3>YELLOW</span><span class=cF0>;
|
||
|
<a name="l59"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l60"></a> dc->color=</span><span class=cF3>RED</span><span class=cF0>;
|
||
|
<a name="l61"></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>/2)</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>/2)</span><span class=cF7>)</span><span class=cF0>,cx+x,cy-y);
|
||
|
<a name="l62"></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>/2)</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>/2)</span><span class=cF7>)</span><span class=cF0>,cx+x,cy-y);
|
||
|
<a name="l63"></a> }
|
||
|
<a name="l64"></a>
|
||
|
<a name="l65"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i<10;i++) {
|
||
|
<a name="l66"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>RandU16</span><span class=cF0>&3) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l67"></a> </span><span class=cF1>case</span><span class=cF0> 0: dc2->color=</span><span class=cF3>WHITE</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l68"></a> </span><span class=cF1>case</span><span class=cF0> 1: dc2->color=</span><span class=cF3>LTGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l69"></a> </span><span class=cF1>case</span><span class=cF0> 2: dc2->color=</span><span class=cF3>DKGRAY</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l70"></a> </span><span class=cF1>case</span><span class=cF0> 3: dc2->color=</span><span class=cF3>BLACK</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l71"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l72"></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>%12-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>%12-6</span><span class=cF7>)</span><span class=cF0>);
|
||
|
<a name="l73"></a> }
|
||
|
<a name="l74"></a> </span><span class=cF5>Snd</span><span class=cF0>(22);
|
||
|
<a name="l75"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l76"></a> </span><span class=cF5>Snd</span><span class=cF0>;
|
||
|
<a name="l77"></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>/2,cy-</span><span class=cF7>(</span><span class=cF0>m1.y+m2.y</span><span class=cF7>)</span><span class=cF0>/2,0,</span><span class=cFA><1></span><span class=cF0>,-theta);
|
||
|
<a name="l78"></a>}
|
||
|
<a name="l79"></a>
|
||
|
<a name="l80"></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="l81"></a>{
|
||
|
<a name="l82"></a> </span><span class=cF1>Bool</span><span class=cF0> engine_on;
|
||
|
<a name="l83"></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="l84"></a>
|
||
|
<a name="l85"></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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l86"></a> nozzle_angle=0;
|
||
|
<a name="l87"></a> engine_on=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l88"></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=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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l89"></a> nozzle_angle=</span><span class=cF3>pi</span><span class=cF0>/8;
|
||
|
<a name="l90"></a> engine_on=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l91"></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=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>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l92"></a> nozzle_angle=-</span><span class=cF3>pi</span><span class=cF0>/8;
|
||
|
<a name="l93"></a> engine_on=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l94"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l95"></a> engine_on=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l96"></a>
|
||
|
<a name="l97"></a> </span><span class=cF1>if</span><span class=cF0> (engine_on) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l98"></a> m1.DstateDt->DxDt+=THRUST*</span><span class=cF5>Cos</span><span class=cF0>(theta+nozzle_angle);
|
||
|
<a name="l99"></a> m1.DstateDt->DyDt+=THRUST*</span><span class=cF5>Sin</span><span class=cF0>(theta+nozzle_angle);
|
||
|
<a name="l100"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l101"></a> </span><span class=cF1>if</span><span class=cF0> (blast_off) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l102"></a> m1.DstateDt->DyDt-=25; </span><span class=cF2>//Gravity</span><span class=cF0>
|
||
|
<a name="l103"></a> m2.DstateDt->DyDt-=25;
|
||
|
<a name="l104"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l105"></a>}
|
||
|
<a name="l106"></a>
|
||
|
<a name="l107"></a></span><span class=cF1>U0</span><span class=cF0> Init()
|
||
|
<a name="l108"></a>{
|
||
|
<a name="l109"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
||
|
<a name="l110"></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="l111"></a>
|
||
|
<a name="l112"></a> blast_off=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l113"></a>
|
||
|
<a name="l114"></a> </span><span class=cF2>//We don't clear que links.</span><span class=cF0>
|
||
|
<a name="l115"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&m1.</span><span class=cF1>start</span><span class=cF0>,0,</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="l116"></a> m1.y=0;
|
||
|
<a name="l117"></a>
|
||
|
<a name="l118"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&m2.</span><span class=cF1>start</span><span class=cF0>,0,</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="l119"></a> m2.y=ROCKET_HEIGHT;
|
||
|
<a name="l120"></a>
|
||
|
<a name="l121"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&s.</span><span class=cF1>start</span><span class=cF0>,0,</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="l122"></a> s.end1=&m1;
|
||
|
<a name="l123"></a> s.end2=&m2;
|
||
|
<a name="l124"></a> s.rest_len=ROCKET_HEIGHT;
|
||
|
<a name="l125"></a> s.const=10000;
|
||
|
<a name="l126"></a>
|
||
|
<a name="l127"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
||
|
<a name="l128"></a>}
|
||
|
<a name="l129"></a>
|
||
|
<a name="l130"></a></span><span class=cF1>U0</span><span class=cF0> TaskEndCB()
|
||
|
<a name="l131"></a>{
|
||
|
<a name="l132"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
||
|
<a name="l133"></a> </span><span class=cF5>SndTaskEndCB</span><span class=cF0>;
|
||
|
<a name="l134"></a>}
|
||
|
<a name="l135"></a>
|
||
|
<a name="l136"></a></span><span class=cF1>U0</span><span class=cF0> Rocket()
|
||
|
<a name="l137"></a>{
|
||
|
<a name="l138"></a> </span><span class=cF9>CMathODE</span><span class=cF0> *ode=</span><span class=cF5>ODENew</span><span class=cF0>(0,1e-2,</span><span class=cF3>ODEF_HAS_MASSES</span><span class=cF0>);
|
||
|
<a name="l139"></a>
|
||
|
<a name="l140"></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="l141"></a> </span><span class=cF5>Fs</span><span class=cF0>->text_attr=</span><span class=cF3>YELLOW</span><span class=cF0><<4+</span><span class=cF3>BLUE</span><span class=cF0>;
|
||
|
<a name="l142"></a> </span><span class=cF5>MenuPush</span><span class=cF0>(
|
||
|
<a name="l143"></a> </span><span class=cF6>"File {"</span><span class=cF0>
|
||
|
<a name="l144"></a> </span><span class=cF6>" Abort(,CH_SHIFT_ESC);"</span><span class=cF0>
|
||
|
<a name="l145"></a> </span><span class=cF6>" Exit(,CH_ESC);"</span><span class=cF0>
|
||
|
<a name="l146"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
||
|
<a name="l147"></a> </span><span class=cF6>"Play {"</span><span class=cF0>
|
||
|
<a name="l148"></a> </span><span class=cF6>" Restart(,'\n');"</span><span class=cF0>
|
||
|
<a name="l149"></a> </span><span class=cF6>" Up(,,SC_CURSOR_UP);"</span><span class=cF0>
|
||
|
<a name="l150"></a> </span><span class=cF6>" UpLeft(,,SC_CURSOR_LEFT);"</span><span class=cF0>
|
||
|
<a name="l151"></a> </span><span class=cF6>" UpRight(,,SC_CURSOR_RIGHT);"</span><span class=cF0>
|
||
|
<a name="l152"></a> </span><span class=cF6>"}"</span><span class=cF0>
|
||
|
<a name="l153"></a> );
|
||
|
<a name="l154"></a>
|
||
|
<a name="l155"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
|
||
|
<a name="l156"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
|
||
|
<a name="l157"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
|
||
|
<a name="l158"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
|
||
|
<a name="l159"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
||
|
<a name="l160"></a> dc2=</span><span class=cF5>DCAlias</span><span class=cF0>;
|
||
|
<a name="l161"></a> </span><span class=cF5>Fs</span><span class=cF0>->task_end_cb=&TaskEndCB;
|
||
|
<a name="l162"></a>
|
||
|
<a name="l163"></a> ode->derive=&MyDerivative;
|
||
|
<a name="l164"></a> ode->drag_v2=0.002;
|
||
|
<a name="l165"></a> ode->drag_v3=0.00001;
|
||
|
<a name="l166"></a> ode->acceleration_limit=5e3;
|
||
|
<a name="l167"></a>
|
||
|
<a name="l168"></a> Init;
|
||
|
<a name="l169"></a> </span><span class=cF5>QueIns</span><span class=cF0>(&m1,ode->last_mass);
|
||
|
<a name="l170"></a> </span><span class=cF5>QueIns</span><span class=cF0>(&m2,ode->last_mass);
|
||
|
<a name="l171"></a> </span><span class=cF5>QueIns</span><span class=cF0>(&s,ode->last_spring);
|
||
|
<a name="l172"></a>
|
||
|
<a name="l173"></a> </span><span class=cF5>QueIns</span><span class=cF0>(ode,</span><span class=cF5>Fs</span><span class=cF0>->last_ode);
|
||
|
<a name="l174"></a>
|
||
|
<a name="l175"></a> </span><span class=cF5>Fs</span><span class=cF0>->draw_it=&</span><span class=cF5>DrawIt</span><span class=cF0>;
|
||
|
<a name="l176"></a>
|
||
|
<a name="l177"></a> </span><span class=cF1>try</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l178"></a> </span><span class=cF5>GetKey</span><span class=cF0>;
|
||
|
<a name="l179"></a> blast_off=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l180"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>) {
|
||
|
<a name="l181"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>GetChar</span><span class=cF7>(</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l182"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
|
||
|
<a name="l183"></a> Init;
|
||
|
<a name="l184"></a> </span><span class=cF5>GetKey</span><span class=cF0>;
|
||
|
<a name="l185"></a> blast_off=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l186"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l187"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
||
|
<a name="l188"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
||
|
<a name="l189"></a> </span><span class=cF1>goto</span><span class=cF0> rk_done;
|
||
|
<a name="l190"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l191"></a> }
|
||
|
<a name="l192"></a>rk_done:
|
||
|
<a name="l193"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>catch</span><span class=cF0>
|
||
|
<a name="l194"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
|
||
|
<a name="l195"></a> </span><span class=cF5>QueRem</span><span class=cF0>(ode);
|
||
|
<a name="l196"></a> </span><span class=cF5>ODEDel</span><span class=cF0>(ode);
|
||
|
<a name="l197"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
|
||
|
<a name="l198"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
||
|
<a name="l199"></a> </span><span class=cF5>DCFill</span><span class=cF0>;
|
||
|
<a name="l200"></a> </span><span class=cF5>DCDel</span><span class=cF0>(dc2);
|
||
|
<a name="l201"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
|
||
|
<a name="l202"></a>}
|
||
|
<a name="l203"></a>
|
||
|
<a name="l204"></a>Rocket;
|
||
|
</span></pre></body>
|
||
|
</html>
|