templeos-info/public/Wb/Demo/Snd/WaterFowl.HC.HTML

188 lines
9.7 KiB
Plaintext
Raw Normal View History

2024-03-24 21:24:44 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.c05{color:#aa00aa;background-color:#000000;}
.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=c05>/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a>
<a name="l4"></a>
<a name="l5"></a>
<a name="l6"></a>
<a name="l7"></a>
<a name="l8"></a>
<a name="l9"></a>
<a name="l10"></a>
<a name="l11"></a>
<a name="l12"></a>
<a name="l13"></a>
<a name="l14"></a>
<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>
<a name="l29"></a>
<a name="l30"></a>
<a name="l31"></a>
<a name="l32"></a>
<a name="l33"></a>
<a name="l34"></a>
<a name="l35"></a>
<a name="l36"></a>
<a name="l37"></a>
<a name="l38"></a>
<a name="l39"></a>
<a name="l40"></a>
<a name="l41"></a>
<a name="l42"></a>
<a name="l43"></a>
<a name="l44"></a>
<a name="l45"></a>
<a name="l46"></a>
<a name="l47"></a>
<a name="l48"></a>
<a name="l49"></a>
<a name="l50"></a>
<a name="l51"></a>
<a name="l52"></a>
<a name="l53"></a>
<a name="l54"></a>
<a name="l55"></a>
<a name="l56"></a>
<a name="l57"></a>
<a name="l58"></a>
<a name="l59"></a>
<a name="l60"></a>
<a name="l61"></a></span><span class=cF1>U8</span><span class=cF0> *poem=</span><span class=cF6>
<a name="l62"></a>&quot;To a Waterfowl
<a name="l63"></a>by William Cullen Bryant
<a name="l64"></a>
<a name="l65"></a>Whither, 'midst falling dew,
<a name="l66"></a>While glow the heavens with the last steps of day,
<a name="l67"></a>Far, through their rosy depths, dost thou pursue
<a name="l68"></a>Thy solitary way?
<a name="l69"></a>
<a name="l70"></a>Vainly the fowler's eye
<a name="l71"></a>Might mark thy distant flight to do thee wrong,
<a name="l72"></a>As, darkly painted on the crimson sky,
<a name="l73"></a>Thy figure floats along.
<a name="l74"></a>
<a name="l75"></a>Seek'st thou the plashy brink
<a name="l76"></a>Of weedy lake, or marge of river wide,
<a name="l77"></a>Or where the rocking billows rise and sink
<a name="l78"></a>On the chafed ocean side?
<a name="l79"></a>
<a name="l80"></a>There is a Power whose care
<a name="l81"></a>Teaches thy way along that pathless coast,--
<a name="l82"></a>The desert and illimitable air,--
<a name="l83"></a>Lone wandering, but not lost.
<a name="l84"></a>
<a name="l85"></a>All day thy wings have fann'd
<a name="l86"></a>At that far height, the cold thin atmosphere:
<a name="l87"></a>Yet stoop not, weary, to the welcome land,
<a name="l88"></a>Though the dark night is near.
<a name="l89"></a>
<a name="l90"></a>And soon that toil shall end,
<a name="l91"></a>Soon shalt thou find a summer home, and rest,
<a name="l92"></a>And scream among thy fellows; reed shall bend
<a name="l93"></a>Soon o'er thy sheltered nest.
<a name="l94"></a>
<a name="l95"></a>Thou'rt gone, the abyss of heaven
<a name="l96"></a>Hath swallowed up thy form; yet, on my heart
<a name="l97"></a>Deeply hath sunk the lesson thou hast given,
<a name="l98"></a>And shall not soon depart.
<a name="l99"></a>
<a name="l100"></a>He, who, from zone to zone,
<a name="l101"></a>Guides through the boundless sky thy certain flight,
<a name="l102"></a>In the long way that I must tread alone,
<a name="l103"></a>Will lead my steps aright.
<a name="l104"></a>&quot;</span><span class=cF0>;
<a name="l105"></a>
<a name="l106"></a>#</span><span class=cF1>define</span><span class=cF0> POEM_COLS 53
<a name="l107"></a>#</span><span class=cF1>define</span><span class=cF0> POEM_TIME 65.0
<a name="l108"></a>
<a name="l109"></a></span><span class=cF1>F64</span><span class=cF0> t0;
<a name="l110"></a>
<a name="l111"></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="l112"></a>{
<a name="l113"></a> </span><span class=cF9>I64</span><span class=cF0> w=task-&gt;pix_width,h=task-&gt;pix_height;
<a name="l114"></a> </span><span class=cF1>F64</span><span class=cF0> t=1.04-(0.35+0.65*</span><span class=cF5>Caw</span><span class=cF7>(</span><span class=cF5>tS</span><span class=cF0>-t0,20</span><span class=cF7>)</span><span class=cF0>)`3,s=1.0-0.5*t,
<a name="l115"></a> x=w*t,y=h*(0.35-.1*t);
<a name="l116"></a> dc-&gt;color=</span><span class=cF3>WHITE</span><span class=cF0>;
<a name="l117"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,w&gt;&gt;1-</span><span class=cF7>(</span><span class=cF0>POEM_COLS*</span><span class=cF3>FONT_WIDTH</span><span class=cF7>)</span><span class=cF0>&gt;&gt;1,
<a name="l118"></a> </span><span class=cF5>Caw</span><span class=cF7>(</span><span class=cF5>tS</span><span class=cF0>-t0,POEM_TIME</span><span class=cF7>)</span><span class=cF0>*</span><span class=cF7>(</span><span class=cF0>h-3*</span><span class=cF3>FONT_HEIGHT</span><span class=cF7>)</span><span class=cF0>,poem);
<a name="l119"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l120"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x,y,x-8*s,y+6*s*</span><span class=cF5>FullTri</span><span class=cF7>(</span><span class=cF5>tS</span><span class=cF0>,0.4</span><span class=cF7>)</span><span class=cF0>);
<a name="l121"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,x,y,x+8*s,y+6*s*</span><span class=cF5>FullTri</span><span class=cF7>(</span><span class=cF5>tS</span><span class=cF0>,0.4</span><span class=cF7>)</span><span class=cF0>);
<a name="l122"></a>}
<a name="l123"></a>
<a name="l124"></a></span><span class=cF1>U0</span><span class=cF0> SongTask(</span><span class=cF9>I64</span><span class=cF0>)
<a name="l125"></a>{</span><span class=cF2>//Song by Terry A. Davis</span><span class=cF0>
<a name="l126"></a></span><span class=cF2>//This specifies a callback routine</span><span class=cF0>
<a name="l127"></a> </span><span class=cF2>//to be called when the task dies.</span><span class=cF0>
<a name="l128"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;task_end_cb=&amp;</span><span class=cF5>SndTaskEndCB</span><span class=cF0>;
<a name="l129"></a> </span><span class=cF5>MusicSettingsRst</span><span class=cF0>;
<a name="l130"></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="l131"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5eEDC4B5C4B5C4BA5qReEDC4B5C&quot;</span><span class=cF0>);
<a name="l132"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;4B5C4BA5qReFEDEDEDC4qB&quot;</span><span class=cF0>);
<a name="l133"></a> </span><span class=cF5>Play</span><span class=cF0>(</span><span class=cF6>&quot;5ReFEDEDEDC4BqR&quot;</span><span class=cF0>);
<a name="l134"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l135"></a>}
<a name="l136"></a>
<a name="l137"></a></span><span class=cF1>U0</span><span class=cF0> WaterFowl()
<a name="l138"></a>{
<a name="l139"></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="l140"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;song_task=</span><span class=cF5>Spawn</span><span class=cF0>(&amp;SongTask,</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF6>&quot;Song&quot;</span><span class=cF0>,,</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l141"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l142"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l143"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l144"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l145"></a> t0=</span><span class=cF5>tS</span><span class=cF0>;
<a name="l146"></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="l147"></a> </span><span class=cF5>Sprite</span><span class=cF0>(</span><span class=cFA>&lt;1&gt;</span><span class=cF0>);
<a name="l148"></a> </span><span class=cF6>&quot;%h*c&quot;</span><span class=cF0>,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2,</span><span class=cF6>'\n'</span><span class=cF0>;
<a name="l149"></a> </span><span class=cF5>GetChar</span><span class=cF0>;
<a name="l150"></a> </span><span class=cF5>DocClear</span><span class=cF0>;
<a name="l151"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l152"></a>}
<a name="l153"></a>
<a name="l154"></a>WaterFowl;
<a name="l155"></a>
</span></pre></body>
</html>