ZealOS/docs/Demo/Games/Whap.CC.html
TomAwezome d0cafb0198 Allow OS Upgrade feature on VMs.
Update and fix more documentation.
Alter Splash messages and logo color.
2021-07-05 15:23:13 -04:00

203 lines
24 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.06">
<style type="text/css">
body {background-color:#000000;}
.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:monospace;font-size:12pt">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>define</span><span class=cF0> BALLS_NUM </span><span class=cFE>7</span><span class=cF0>
<a name="l2"></a>#</span><span class=cF1>define</span><span class=cF0> SPRINGS_NUM </span><span class=cFE>3</span><span class=cF0>
<a name="l3"></a>
<a name="l4"></a>#</span><span class=cF1>define</span><span class=cF0> STRETCH </span><span class=cFE>500</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>
<a name="l5"></a>#</span><span class=cF1>define</span><span class=cF0> GRAVITY </span><span class=cFE>50</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> </span><span class=cF2>//not really gravity</span><span class=cF0>
<a name="l6"></a>#</span><span class=cF1>define</span><span class=cF0> BALL_RADIUS </span><span class=cFE>5</span><span class=cF0>
<a name="l7"></a>#</span><span class=cF1>define</span><span class=cF0> BASE_SIZE </span><span class=cFE>10</span><span class=cF0>
<a name="l8"></a>
<a name="l9"></a></span><span class=cF9>CMass</span><span class=cF0> balls[BALLS_NUM];
<a name="l10"></a></span><span class=cF9>CSpring</span><span class=cF0> springs[SPRINGS_NUM];
<a name="l11"></a></span><span class=cF1>F64</span><span class=cF0> collision_t;
<a name="l12"></a>
<a name="l13"></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="l14"></a>{
<a name="l15"></a> </span><span class=cF9>I64</span><span class=cF0> i, cx = task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>, cy = task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0>;
<a name="l16"></a> </span><span class=cF1>Bool</span><span class=cF0> sound_on = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l17"></a>
<a name="l18"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l19"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF6>&quot;Protect your base.&quot;</span><span class=cF0>);
<a name="l20"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, cx - BASE_SIZE, cy - BASE_SIZE, BASE_SIZE * </span><span class=cFE>2</span><span class=cF0>, BASE_SIZE * </span><span class=cFE>2</span><span class=cF0>);
<a name="l21"></a> dc-&gt;color = </span><span class=cF3>CYAN</span><span class=cF0>;
<a name="l22"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc, cx - BASE_SIZE + </span><span class=cFE>2</span><span class=cF0>, cy - BASE_SIZE + </span><span class=cFE>2</span><span class=cF0>, BASE_SIZE * </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>4</span><span class=cF0>, BASE_SIZE * </span><span class=cFE>2</span><span class=cF0> - </span><span class=cFE>4</span><span class=cF0>);
<a name="l23"></a> dc-&gt;color = </span><span class=cF3>YELLOW</span><span class=cF0>;
<a name="l24"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, balls[</span><span class=cFE>0</span><span class=cF0>].x, balls[</span><span class=cFE>0</span><span class=cF0>].y,
<a name="l25"></a> </span><span class=cFB>mouse</span><span class=cF0>.pos.x - task-&gt;pix_left - task-&gt;scroll_x,
<a name="l26"></a> </span><span class=cFB>mouse</span><span class=cF0>.pos.y - task-&gt;pix_top - task-&gt;scroll_y);
<a name="l27"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; SPRINGS_NUM; i++)
<a name="l28"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc, springs[i].end1-&gt;x, springs[i].end1-&gt;y, springs[i].end2-&gt;x, springs[i].end2-&gt;y);
<a name="l29"></a>
<a name="l30"></a> dc-&gt;color = </span><span class=cF3>LTCYAN</span><span class=cF0>;
<a name="l31"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc, balls[</span><span class=cFE>0</span><span class=cF0>].x, balls[</span><span class=cFE>0</span><span class=cF0>].y, BALL_RADIUS);
<a name="l32"></a> </span><span class=cF5>GrFloodFill</span><span class=cF0>(dc, balls[</span><span class=cFE>0</span><span class=cF0>].x, balls[</span><span class=cFE>0</span><span class=cF0>].y, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l33"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l34"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc, balls[</span><span class=cFE>0</span><span class=cF0>].x, balls[</span><span class=cFE>0</span><span class=cF0>].y, BALL_RADIUS);
<a name="l35"></a>
<a name="l36"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt; BALLS_NUM; i++)
<a name="l37"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l38"></a> dc-&gt;color = </span><span class=cF3>LTPURPLE</span><span class=cF0>;
<a name="l39"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc, balls[i].x, balls[i].y, BALL_RADIUS);
<a name="l40"></a> </span><span class=cF5>GrFloodFill</span><span class=cF0>(dc, balls[i].x, balls[i].y, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l41"></a> </span><span class=cF1>if</span><span class=cF0> ( cx - BASE_SIZE - BALL_RADIUS &lt;= balls[i].x &lt;= cx + BASE_SIZE + BALL_RADIUS &amp;&amp;
<a name="l42"></a> cy - BASE_SIZE - BALL_RADIUS &lt;= balls[i].y &lt;= cy + BASE_SIZE + BALL_RADIUS)
<a name="l43"></a> sound_on = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l44"></a> dc-&gt;color = </span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l45"></a> </span><span class=cF5>GrCircle</span><span class=cF0>(dc, balls[i].x, balls[i].y, BALL_RADIUS);
<a name="l46"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l47"></a> </span><span class=cF1>if</span><span class=cF0> (sound_on)
<a name="l48"></a> </span><span class=cF5>Sound</span><span class=cF0>(</span><span class=cFE>74</span><span class=cF0>);
<a name="l49"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l50"></a> </span><span class=cF5>Sound</span><span class=cF0>;
<a name="l51"></a>}
<a name="l52"></a>
<a name="l53"></a></span><span class=cF1>U0</span><span class=cF0> MyDerivative(</span><span class=cF9>CMathODE</span><span class=cF0> *ode, </span><span class=cF1>F64</span><span class=cF0> t, </span><span class=cF9>COrder2D3</span><span class=cF0> *, </span><span class=cF9>COrder2D3</span><span class=cF0> *)
<a name="l54"></a>{
<a name="l55"></a> </span><span class=cF9>I64</span><span class=cF0> i, j;
<a name="l56"></a> </span><span class=cF1>F64</span><span class=cF0> d, dd;
<a name="l57"></a> </span><span class=cF9>CD3</span><span class=cF0> p, p2;
<a name="l58"></a> </span><span class=cF9>CTask</span><span class=cF0> *task = ode-&gt;win_task;
<a name="l59"></a>
<a name="l60"></a> </span><span class=cF5>D3SubEqu</span><span class=cF0>(</span><span class=cF5>D3Equ</span><span class=cF7>(</span><span class=cF0>&amp;p2,
<a name="l61"></a> </span><span class=cFB>mouse</span><span class=cF0>.pos.x - task-&gt;pix_left - task-&gt;scroll_x,
<a name="l62"></a> </span><span class=cFB>mouse</span><span class=cF0>.pos.y - task-&gt;pix_top - task-&gt;scroll_y, </span><span class=cFE>0</span><span class=cF7>)</span><span class=cF0>, &amp;balls[</span><span class=cFE>0</span><span class=cF0>].state-&gt;x);
<a name="l63"></a> </span><span class=cF5>D3AddEqu</span><span class=cF0>(&amp;balls[</span><span class=cFE>0</span><span class=cF0>].DstateDt-&gt;DxDt, </span><span class=cF5>D3MulEqu</span><span class=cF7>(</span><span class=cF0>&amp;p2, STRETCH</span><span class=cF7>)</span><span class=cF0>);
<a name="l64"></a>
<a name="l65"></a> </span><span class=cF5>D3Equ</span><span class=cF0>(&amp;p2, task-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>, task-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
<a name="l66"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt; BALLS_NUM; i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l67"></a> </span><span class=cF5>D3Sub</span><span class=cF0>(&amp;p, &amp;p2, &amp;balls[i].state-&gt;x);
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (d = </span><span class=cF5>D3Norm</span><span class=cF7>(</span><span class=cF0>&amp;p</span><span class=cF7>)</span><span class=cF0>)
<a name="l69"></a> {
<a name="l70"></a> </span><span class=cF2>//Gravity would be /(d*d*d), but that's too exponential.</span><span class=cF0>
<a name="l71"></a> </span><span class=cF5>D3MulEqu</span><span class=cF0>(&amp;p, GRAVITY/d);
<a name="l72"></a> </span><span class=cF5>D3AddEqu</span><span class=cF0>(&amp;balls[i].DstateDt-&gt;DxDt, &amp;p);
<a name="l73"></a> }
<a name="l74"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l75"></a>
<a name="l76"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; BALLS_NUM; i++)
<a name="l77"></a> </span><span class=cF1>for</span><span class=cF0> (j = i + </span><span class=cFE>1</span><span class=cF0>; j &lt; BALLS_NUM; j++)
<a name="l78"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l79"></a> </span><span class=cF5>D3Sub</span><span class=cF0>(&amp;p, &amp;balls[j].state-&gt;x, &amp;balls[i].state-&gt;x);
<a name="l80"></a> dd = </span><span class=cF5>D3NormSqr</span><span class=cF0>(&amp;p);
<a name="l81"></a> </span><span class=cF1>if</span><span class=cF0> (dd &lt;= </span><span class=cF7>(</span><span class=cFE>2</span><span class=cF0> * BALL_RADIUS</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF7>(</span><span class=cFE>2</span><span class=cF0> * BALL_RADIUS</span><span class=cF7>)</span><span class=cF0>)
<a name="l82"></a> {
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (t-collision_t &gt; </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>05</span><span class=cF0>)
<a name="l84"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l85"></a> </span><span class=cF5>Noise</span><span class=cF0>(</span><span class=cFE>50</span><span class=cF0>, </span><span class=cFE>102</span><span class=cF0>, </span><span class=cFE>105</span><span class=cF0>);
<a name="l86"></a> collision_t = t;
<a name="l87"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l88"></a> d = </span><span class=cF5>Sqrt</span><span class=cF0>(dd) + </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>0001</span><span class=cF0>;
<a name="l89"></a> dd = </span><span class=cFE>10</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> * </span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF5>Sqr</span><span class=cF7>(</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0> * BALL_RADIUS) * (</span><span class=cFE>2</span><span class=cF0> * BALL_RADIUS) - dd</span><span class=cF7>)</span><span class=cF0>);
<a name="l90"></a> </span><span class=cF5>D3MulEqu</span><span class=cF0>(&amp;p, dd / d);
<a name="l91"></a> </span><span class=cF5>D3AddEqu</span><span class=cF0>(&amp;balls[j].DstateDt-&gt;DxDt, &amp;p);
<a name="l92"></a> </span><span class=cF5>D3SubEqu</span><span class=cF0>(&amp;balls[i].DstateDt-&gt;DxDt, &amp;p);
<a name="l93"></a> }
<a name="l94"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l95"></a>
<a name="l96"></a> d = balls[</span><span class=cFE>0</span><span class=cF0>].state-&gt;x;
<a name="l97"></a> </span><span class=cF1>if</span><span class=cF0> (d - BALL_RADIUS &lt; </span><span class=cFE>0</span><span class=cF0>)
<a name="l98"></a> balls[</span><span class=cFE>0</span><span class=cF0>].DstateDt-&gt;DxDt += </span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF5>Sqr</span><span class=cF7>(</span><span class=cF5>Sqr</span><span class=cF0>(d - BALL_RADIUS)</span><span class=cF7>)</span><span class=cF0>);
<a name="l99"></a> </span><span class=cF1>if</span><span class=cF0> (d + BALL_RADIUS &gt; task-&gt;pix_width)
<a name="l100"></a> balls[</span><span class=cFE>0</span><span class=cF0>].DstateDt-&gt;DxDt -= </span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF5>Sqr</span><span class=cF7>(</span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>d + BALL_RADIUS</span><span class=cF7>)</span><span class=cF0> - task-&gt;pix_width)</span><span class=cF7>)</span><span class=cF0>);
<a name="l101"></a>
<a name="l102"></a> d = balls[</span><span class=cFE>0</span><span class=cF0>].state-&gt;y;
<a name="l103"></a> </span><span class=cF1>if</span><span class=cF0> (d - BALL_RADIUS &lt; </span><span class=cFE>0</span><span class=cF0>)
<a name="l104"></a> balls[</span><span class=cFE>0</span><span class=cF0>].DstateDt-&gt;DyDt += </span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF5>Sqr</span><span class=cF7>(</span><span class=cF5>Sqr</span><span class=cF0>(d - BALL_RADIUS)</span><span class=cF7>)</span><span class=cF0>);
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (d + BALL_RADIUS &gt; task-&gt;pix_height)
<a name="l106"></a> balls[</span><span class=cFE>0</span><span class=cF0>].DstateDt-&gt;DyDt -= </span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF5>Sqr</span><span class=cF7>(</span><span class=cF5>Sqr</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>d + BALL_RADIUS</span><span class=cF7>)</span><span class=cF0> - task-&gt;pix_height)</span><span class=cF7>)</span><span class=cF0>);
<a name="l107"></a>}
<a name="l108"></a>
<a name="l109"></a></span><span class=cF1>U0</span><span class=cF0> Whap()
<a name="l110"></a>{
<a name="l111"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l112"></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="l113"></a>
<a name="l114"></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.CC.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l115"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l116"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l117"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l118"></a>
<a name="l119"></a> </span><span class=cF5>MenuPush</span><span class=cF0>( </span><span class=cF6>&quot;File {&quot;</span><span class=cF0>
<a name="l120"></a> </span><span class=cF6>&quot; Abort(,CH_SHIFT_ESC);&quot;</span><span class=cF0>
<a name="l121"></a> </span><span class=cF6>&quot; Exit(,CH_ESC);&quot;</span><span class=cF0>
<a name="l122"></a> </span><span class=cF6>&quot;}&quot;</span><span class=cF0>
<a name="l123"></a> );
<a name="l124"></a> ode-&gt;derive = &amp;MyDerivative;
<a name="l125"></a> ode-&gt;drag_v2 = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>002</span><span class=cF0>;
<a name="l126"></a> ode-&gt;drag_v3 = </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>00001</span><span class=cF0>;
<a name="l127"></a> ode-&gt;acceleration_limit = </span><span class=cFE>5</span><span class=cF0>e3;
<a name="l128"></a> </span><span class=cF5>MemSet</span><span class=cF0>(balls, </span><span class=cFE>0</span><span class=cF0>, BALLS_NUM * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CMass</span><span class=cF7>)</span><span class=cF0>);
<a name="l129"></a> </span><span class=cF5>D3Equ</span><span class=cF0>(&amp;balls[</span><span class=cFE>0</span><span class=cF0>].x, </span><span class=cFE>100</span><span class=cF0>, </span><span class=cFE>100</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
<a name="l130"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>1</span><span class=cF0>; i &lt; BALLS_NUM; i++)
<a name="l131"></a> </span><span class=cF5>D3Equ</span><span class=cF0>(&amp;balls[i].x, </span><span class=cF5>RandI16</span><span class=cF0> % </span><span class=cFE>500</span><span class=cF0> + </span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_width &gt;&gt; </span><span class=cFE>1</span><span class=cF0>, </span><span class=cF5>RandI16</span><span class=cF0> % </span><span class=cFE>500</span><span class=cF0> + </span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_height &gt;&gt; </span><span class=cFE>1</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
<a name="l132"></a> balls[</span><span class=cFE>0</span><span class=cF0>].x = </span><span class=cFB>mouse</span><span class=cF0>.pos.x - </span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_left - </span><span class=cF5>Fs</span><span class=cF0>-&gt;scroll_x;
<a name="l133"></a> balls[</span><span class=cFE>0</span><span class=cF0>].y = </span><span class=cFB>mouse</span><span class=cF0>.pos.y - </span><span class=cF5>Fs</span><span class=cF0>-&gt;pix_top - </span><span class=cF5>Fs</span><span class=cF0>-&gt;scroll_y;
<a name="l134"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; BALLS_NUM; i++)
<a name="l135"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l136"></a> balls[i].mass = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
<a name="l137"></a> balls[i].drag_profile_factor = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
<a name="l138"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&amp;balls[i], ode-&gt;last_mass);
<a name="l139"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l140"></a> balls[</span><span class=cFE>2</span><span class=cF0>].x = balls[</span><span class=cFE>1</span><span class=cF0>].x + </span><span class=cFE>15</span><span class=cF0>;
<a name="l141"></a> balls[</span><span class=cFE>2</span><span class=cF0>].y = balls[</span><span class=cFE>1</span><span class=cF0>].y;
<a name="l142"></a> balls[</span><span class=cFE>3</span><span class=cF0>].x = balls[</span><span class=cFE>1</span><span class=cF0>].x;
<a name="l143"></a> balls[</span><span class=cFE>3</span><span class=cF0>].y = balls[</span><span class=cFE>1</span><span class=cF0>].y + </span><span class=cFE>15</span><span class=cF0>;
<a name="l144"></a> </span><span class=cF5>MemSet</span><span class=cF0>(springs, </span><span class=cFE>0</span><span class=cF0>, SPRINGS_NUM * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CSpring</span><span class=cF7>)</span><span class=cF0>);
<a name="l145"></a> springs[</span><span class=cFE>0</span><span class=cF0>].end1 = &amp;balls[</span><span class=cFE>1</span><span class=cF0>];
<a name="l146"></a> springs[</span><span class=cFE>0</span><span class=cF0>].end2 = &amp;balls[</span><span class=cFE>2</span><span class=cF0>];
<a name="l147"></a> springs[</span><span class=cFE>0</span><span class=cF0>].rest_len = </span><span class=cFE>15</span><span class=cF0>;
<a name="l148"></a> springs[</span><span class=cFE>0</span><span class=cF0>].const = </span><span class=cFE>10000</span><span class=cF0>;
<a name="l149"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&amp;springs[</span><span class=cFE>0</span><span class=cF0>], ode-&gt;last_spring);
<a name="l150"></a> springs[</span><span class=cFE>1</span><span class=cF0>].end1 = &amp;balls[</span><span class=cFE>1</span><span class=cF0>];
<a name="l151"></a> springs[</span><span class=cFE>1</span><span class=cF0>].end2 = &amp;balls[</span><span class=cFE>3</span><span class=cF0>];
<a name="l152"></a> springs[</span><span class=cFE>1</span><span class=cF0>].rest_len = </span><span class=cFE>15</span><span class=cF0>;
<a name="l153"></a> springs[</span><span class=cFE>1</span><span class=cF0>].const = </span><span class=cFE>10000</span><span class=cF0>;
<a name="l154"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&amp;springs[</span><span class=cFE>1</span><span class=cF0>], ode-&gt;last_spring);
<a name="l155"></a> springs[</span><span class=cFE>2</span><span class=cF0>].end1 = &amp;balls[</span><span class=cFE>2</span><span class=cF0>];
<a name="l156"></a> springs[</span><span class=cFE>2</span><span class=cF0>].end2 = &amp;balls[</span><span class=cFE>3</span><span class=cF0>];
<a name="l157"></a> springs[</span><span class=cFE>2</span><span class=cF0>].rest_len = </span><span class=cF3>sqrt2</span><span class=cF0> * </span><span class=cFE>15</span><span class=cF0>;
<a name="l158"></a> springs[</span><span class=cFE>2</span><span class=cF0>].const = </span><span class=cFE>10000</span><span class=cF0>;
<a name="l159"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(&amp;springs[</span><span class=cFE>2</span><span class=cF0>], ode-&gt;last_spring);
<a name="l160"></a>
<a name="l161"></a> collision_t = </span><span class=cFE>0</span><span class=cF0>;
<a name="l162"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(ode, </span><span class=cF5>Fs</span><span class=cF0>-&gt;last_ode);
<a name="l163"></a>
<a name="l164"></a> </span><span class=cF5>DocCursor</span><span class=cF0>;
<a name="l165"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l166"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;draw_it = &amp;</span><span class=cF5>DrawIt</span><span class=cF0>;
<a name="l167"></a> </span><span class=cF5>CharGet</span><span class=cF0>;
<a name="l168"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l169"></a> </span><span class=cF5>QueueRemove</span><span class=cF0>(ode);
<a name="l170"></a> </span><span class=cF5>ODEDel</span><span class=cF0>(ode);
<a name="l171"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
<a name="l172"></a>}
<a name="l173"></a>
<a name="l174"></a>Whap;
</span></pre></body>
</html>