Download Apps/Psalmody/Examples/night.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Apps/Psalmody/Examples/night.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Apps/Psalmody/Examples/night.txt
-
curl -L -o night.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Apps/Psalmody/Examples/night.txt
1.67 kB
| //9 has graphics | |
| <1>/* Graphics Not Rendered in HTML */ | |
| #define X 330 | |
| #define Y 35 | |
| F64 t0=Beat; | |
| U0 DrawIt(CTask *,CDC *dc) | |
| { | |
| I64 i; | |
| F64 x,y,dt=Beat-t0; | |
| Sprite3(dc,X,Y,0,<1>); | |
| if (Beat-t0<24) { | |
| if (Rand<0.7) { | |
| dc->color=YELLOW; | |
| GrPlot(dc,X-12,Y+1); | |
| GrPlot(dc,X-12,Y+2); | |
| GrPlot(dc,X-11,Y+4); | |
| GrPlot(dc,X+10,Y+4); | |
| GrPlot(dc,X+4,Y+4); | |
| GrPlot(dc,X+5,Y+4); | |
| GrPlot(dc,X+6,Y+4); | |
| GrPlot(dc,X+7,Y+5); | |
| GrPlot(dc,X+8,Y+5); | |
| } | |
| for (i=0;i<512;i++) { | |
| x=1.0-Rand`3.0; | |
| y=Rand; | |
| x=5.0*Sin(pi*Sqrt(y))*x; | |
| y=25.0*y; | |
| if (Rand*(x*x+2.0)*Sqrt(y)<4.0) { | |
| if (Rand<0.5) | |
| dc->color=BLUE; | |
| else | |
| dc->color=LTBLUE; | |
| } else | |
| dc->color=YELLOW; | |
| if (RandI16<0) | |
| x=-x; | |
| x+=150.0*Sin(pi*dt)/(35-y)`1.5; | |
| GrPlot(dc,X+x,Y-y); | |
| } | |
| } | |
| } | |
| U0 Song() | |
| { | |
| SettingsPush; //See SettingsPush | |
| Fs->text_attr=BLACK<<4+LTGRAY; | |
| Fs->draw_it=&DrawIt; | |
| Fs->task_end_cb=&SndTaskEndCB; | |
| MusicSettingsRst; | |
| music.tempo=2.0; | |
| try { | |
| "$BG+H,BLACK$$FD+H,LTGRAY$"; | |
| while (TRUE) { | |
| t0=Beat; | |
| "$WHITE$God said this was a dirge.\n$FG$"; | |
| Play("5FqDqD4eA5CqEqEqDqDq", | |
| "Gone \0to \0sleep \0for \0the \0fi\0nal \0time.\n\0"); | |
| Play("5FqDqD4eA5CqEqEqDqDq", | |
| "Gone \0to \0sleep \0for \0the \0fi\0nal \0time.\n\0"); | |
| Play("5DqGqFeGFqFqEqE4qBq", | |
| " \0Ash \0to... \0and \0 \0dust \0to \0dust.\n\0"); | |
| Play("5DqGqFeGFqFqEqE4qBq", | |
| " \0Ash \0to... \0and \0 \0dust \0to \0dust.\n\0"); | |
| } | |
| } catch | |
| PutExcept; | |
| SettingsPop; | |
| } | |
| Song; | |