File size: 907 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 |
//Practice your ASCII knowledge ;-)
U0 SafePutChar(U8 ch)
{
if (CH_SHIFT_SPACE<=ch<0x7F) {
if (ch=='$')
"%02X $RED$$$$FG$ ",ch;
else
"%02X $RED$%c$FG$ ",ch,ch;
} else
"%02X $RED$ $FG$ ",ch;
}
<1>/* Graphics Not Rendered in HTML */
U0 ASCIIOrgan()
{
I64 i,ch;
for (i=0;i<32;i++) {
SafePutChar(i);
SafePutChar(i+32);
SafePutChar(i+64);
SafePutChar(i+96);
'\n';
}
"\nPress keys to make snds\n"
"and press $GREEN$<SHIFT-ESC>$FG$ to exit.\n";
do {
//We don't want echo or scan codes, so we use NULL and FALSE...
ch=GetChar(,FALSE);
Snd(ch-CH_ESC);
} while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
Snd;
//Note the %d in the string for sprite number.
'\n\n\n\n\n\n\n';
Sprite(<1>,"$SP+PU,\"Click for better organ\","
"LM=\"#include \\\"::/Apps/Psalmody/Run\\\";\",BI=%d$");
'\n\n\n\n\n';
}
ASCIIOrgan;
|