File size: 2,361 Bytes
806d4b5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
/* Graphics Not Rendered in HTML */
U8 *poem=
"To a Waterfowl
by William Cullen Bryant
Whither, 'midst falling dew,
While glow the heavens with the last steps of day,
Far, through their rosy depths, dost thou pursue
Thy solitary way?
Vainly the fowler's eye
Might mark thy distant flight to do thee wrong,
As, darkly painted on the crimson sky,
Thy figure floats along.
Seek'st thou the plashy brink
Of weedy lake, or marge of river wide,
Or where the rocking billows rise and sink
On the chafed ocean side?
There is a Power whose care
Teaches thy way along that pathless coast,--
The desert and illimitable air,--
Lone wandering, but not lost.
All day thy wings have fann'd
At that far height, the cold thin atmosphere:
Yet stoop not, weary, to the welcome land,
Though the dark night is near.
And soon that toil shall end,
Soon shalt thou find a summer home, and rest,
And scream among thy fellows; reed shall bend
Soon o'er thy sheltered nest.
Thou'rt gone, the abyss of heaven
Hath swallowed up thy form; yet, on my heart
Deeply hath sunk the lesson thou hast given,
And shall not soon depart.
He, who, from zone to zone,
Guides through the boundless sky thy certain flight,
In the long way that I must tread alone,
Will lead my steps aright.
";
#define POEM_COLS 53
#define POEM_TIME 65.0
F64 t0;
U0 DrawIt(CTask *task,CDC *dc)
{
I64 w=task->pix_width,h=task->pix_height;
F64 t=1.04-(0.35+0.65*Caw(tS-t0,20))`3,s=1.0-0.5*t,
x=w*t,y=h*(0.35-.1*t);
dc->color=WHITE;
GrPrint(dc,w>>1-(POEM_COLS*FONT_WIDTH)>>1,
Caw(tS-t0,POEM_TIME)*(h-3*FONT_HEIGHT),poem);
dc->color=BLACK;
GrLine(dc,x,y,x-8*s,y+6*s*FullTri(tS,0.4));
GrLine(dc,x,y,x+8*s,y+6*s*FullTri(tS,0.4));
}
U0 SongTask(I64)
{//Song by Terry A. Davis
//This specifies a callback routine
//to be called when the task dies.
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
while (TRUE) {
Play("5eEDC4B5C4B5C4BA5qReEDC4B5C");
Play("4B5C4BA5qReFEDEDEDC4qB");
Play("5ReFEDEDEDC4BqR");
}
}
U0 WaterFowl()
{
SettingsPush; //See SettingsPush
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
AutoComplete;
WinBorder;
WinMax;
DocClear;
t0=tS;
Fs->draw_it=&DrawIt;
Sprite(<1>);
"%h*c",TEXT_ROWS-2,'\n';
GetChar;
DocClear;
SettingsPop;
}
WaterFowl;
|