TempleOSCD_140715.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:09 +02:00
1 parent 7ef616a20e
commit 64f679eeb9
1095 files changed
+24814 -221011

No files matched your search

Binary file not shown.
+5 -8
View File
@@ -1,8 +1,7 @@
I64 num_people=100;
U0 SongTask(I64)
{ //Song by the Holy Spirit
{//Song by the Holy Spirit
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
while (TRUE) {
@@ -21,7 +20,7 @@ U0 HoldCourt()
FlushMsgs;
DocDblBufStart;
NewLine;
'\n';
accused=RandU32%3;
"%s",LstSub(accused,"A man \0A woman \0A child \0");
@@ -37,8 +36,7 @@ U0 HoldCourt()
", again!";
else
'.';
NewLine(4);
"\n\n\n\n"
"$$LM,4$$"
"\n\n$$BT,\"Show Mercy\",LE=0$$\n\n"
"\n\n$$BT,\"Punish\",LE=1$$\n\n"
@@ -63,7 +61,6 @@ U0 HoldCourt()
#define T_HELP 9
#define T_QUIT 10
Bool TakeTurn()
{
I64 i;
@@ -129,7 +126,7 @@ Bool TakeTurn()
ViewComics;
break;
case T_HELP:
PopUp("Ed(\"::/Adam/God/HSNotes.TXT.Z\");",Fs);
PopUpEd("::/Adam/God/HSNotes.TXT.Z",Fs);
PopUpOk("Add your own story-line...\nLike old school toys.\n");
break;
}
@@ -189,7 +186,7 @@ U0 AfterEgypt()
WinMax;
PopUp("Trailer;",Fs);
WordStat;
try //This is to catch <CTRL-ALT-C>.
try //Catch <CTRL-ALT-c>.
while (TakeTurn);
catch
PutExcept;
Binary file not shown.
+1 -1
View File
@@ -21,6 +21,6 @@ U0 ViewComics()
break;
}
DocDel(doc);
DirLstDel(tempde1);
DirTreeDel(tempde1);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -37,12 +37,12 @@ U0 MPDrawHoreb(CDC *dc2)
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,tempo->z1,imgs[tempo->type]);
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
if (tempo==&objs[O_BURNING_BUSH]) { //draw burning bush
if (tempo==&objs[O_BURNING_BUSH]) {//draw burning bush
dc->x=s*tempo->x1+cx;
dc->y=s*tempo->y1+h;
dc->z=tempo->z1;
dc->pen_width=1;
dc->color=win_updates&15;
dc->color=winmgr.updates&15;
for (j=0;j<45;j++) {
m=Sqr(Rand); a=2*ã*Rand;
P2R(&x1,&y1,m,a);
+2 -2
View File
@@ -59,13 +59,13 @@ U0 DrawHoreb(CTask *task,CDC *dc)
}
Sprite3B(dc,s*tempo->x1+cx,s*tempo->y1+h,0,imgs[tempo->type]);
dc->flags&=~(DCF_SYMMETRY|DCF_JUST_MIRROR);
if (o_sort[i]==&objs[O_BURNING_BUSH]) { //draw burning bush
if (o_sort[i]==&objs[O_BURNING_BUSH]) {//draw burning bush
dc->x=s*tempo->x1+cx;
dc->y=s*tempo->y1+h;
dc->z=0;
dc->pen_width=1;
dc->color=win_updates&15;
dc->color=winmgr.updates&15;
for (j=0;j<45;j++) {
m=Sqr(Rand); a=2*ã*Rand;
P2R(&x1,&y1,m,a);
+5 -5
View File
@@ -1,5 +1,5 @@
U0 AnimateTask(I64)
{ //Preemption is off after Spawn
{//Preemption is off after Spawn
I64 i;
F64 t;
Obj *tempo;
@@ -86,7 +86,7 @@ U0 Horeb()
"Play {"
" Restart(,'\n');"
" Fwd(,,SC_CURSOR_UP);"
" Backward(,,SC_CURSOR_DOWN);"
" Bwd(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
@@ -94,15 +94,15 @@ U0 Horeb()
SettingsPush(Fs,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
try {
Fs->text_attr=YELLOW<<4+BLUE;
Fs->win_inhibit=WIG_TASK_DFT-WIF_FOCUS-WIF_GRAB_SCROLL-WIF_MENU;
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_FOCUS-WIF_SELF_GRAB_SCROLL-WIF_FOCUS_TASK_MENU;
WordStat;
WinMax;
WinBorder;
Preempt(OFF);
DocClear;
"$$BG,LTCYAN$$"; NewLine(6);
"$$BG,YELLOW$$"; NewLine(30);
"$$BG,LTCYAN$$%h6c",'\n';
"$$BG,YELLOW$$%h30c",'\n';
BibleVerse(,"Exodus,3:1",21);
Init;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
+12 -12
View File
@@ -16,10 +16,10 @@ U0 DrawMap(CTask *,CDC *dc)
last_x=x;
}
#define A1_MIN 0.02
#define A1_MAX 0.05
#define A2_MIN 0.15
#define A2_MAX 0.30
#define AE1_MIN 0.02
#define AE1_MAX 0.05
#define AE2_MIN 0.15
#define AE2_MAX 0.30
U0 AEMap()
{
@@ -30,31 +30,31 @@ U0 AEMap()
*r=NULL,
x1=0,y1=0,z1=0,
x_last=x1,y_last=y1;
F64 a,a1=(A1_MAX+A1_MIN)/2,a2=(A2_MAX+A2_MIN)/2,a2_total=a2,
F64 a,a1=(AE1_MAX+AE1_MIN)/2,a2=(AE2_MAX+AE2_MIN)/2,a2_total=a2,
x_scale=ToF64(cx)/c_min,y_scale=ToF64(cy)/c_min;
CDC *dc=DCAlias;
SettingsPush(Fs,TSF_SAME_SONG); //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->text_attr=YELLOW<<4+BLUE;
DocClear;
"$$BG,YELLOW$$"; NewLine(TEXT_ROWS);
"$$BG,YELLOW$$%h*c",TEXT_ROWS,'\n';
BibleVerse(,"Exodus,16:35",3);
Fs->draw_it=&DrawMap;
try {
while (!ScanChar) {
dc->color=BLACK;
a1=Clamp(Wrap(a1+(A1_MAX+A1_MIN)/5.0*(Rand-0.5)),-A1_MAX,A1_MAX);
a1=Clamp(Wrap(a1+(AE1_MAX+AE1_MIN)/5.0*(Rand-0.5)),-AE1_MAX,AE1_MAX);
a=a1;
if ( 0.0<=a<=A1_MIN) a=A1_MIN;
if (-A1_MIN<=a<=0.0) a=-A1_MIN;
if ( 0.0<=a<=AE1_MIN) a=AE1_MIN;
if (-AE1_MIN<=a<=0.0) a=-AE1_MIN;
Free(r);
r=GrRotZNew(a);
GrRot(r,&x1,&y1,&z1);
a2=Clamp(Wrap(a2+(A2_MAX+A2_MIN)/5.0*(Rand-0.5)),-A2_MAX,A2_MAX);
a2=Clamp(Wrap(a2+(AE2_MAX+AE2_MIN)/5.0*(Rand-0.5)),-AE2_MAX,AE2_MAX);
a=a2;
if ( 0.0<=a<=A2_MIN) a=A2_MIN;
if (-A2_MIN<=a<=0.0) a=-A2_MIN;
if ( 0.0<=a<=AE2_MIN) a=AE2_MIN;
if (-AE2_MIN<=a<=0.0) a=-AE2_MIN;
a2_total+=a;
x1=ClampI64(x1+6.0*Cos(a2_total),-c_min+10,c_min-10);
Binary file not shown.
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
$FG,6$JOB
$FG,1$BANK
$FG,4$CREDIT
$FG,2$CASH
$FG,0$RENT
CAR
UTILITIES
MISC
CLOTHS
HEALTH
CHARITY
+75
View File
@@ -0,0 +1,75 @@
U0 BgtAcctsUpdate()
{
CBgtEntry *tempb;
CBgtTemplate *tempt;
tempb=b_root.next;
while (tempb!=&b_root) {
if (tempb->type!=BE_TEMPLATE_COPY) {
tempb->credit_index =StrFileAdd(tempb->credit,accts_table);
tempb->debit_index =StrFileAdd(tempb->debit,accts_table);
}
tempb=tempb->next;
}
tempt=t_root.next;
while (tempt!=&t_root) {
tempt->b.credit_index =StrFileAdd(tempt->b.credit,accts_table);
tempt->b.debit_index =StrFileAdd(tempt->b.debit,accts_table);
tempt=tempt->next;
}
}
U0 BgtAcctsWrite()
{
BgtAcctsUpdate;
StrFileWrite(BGT_ACCTS_FILE,accts_table,TRUE);
}
U0 BgtAcctsRead()
{
I64 i,max_num;
U8 *colors,**s=StrFileRead(BGT_ACCTS_FILE,&max_num,&colors,TRUE);
StrFileDel(accts_table);
accts_table=HashTableNew(0x200);
for (i=0;i<=max_num;i++)
if (s[i])
StrFileAdd(s[i],accts_table,colors[i]);
StrFileArrDel(s,max_num);
Free(colors);
}
I64 BgtAcctColor(U8 *st)
{
CHashGeneric *temph;
if (temph=HashFind(st,accts_table,SFT_GENERIC))
return temph->user_data1;
else
return BLACK;
}
U8 *BgtPopUpAcct(U8 *header=NULL,U8 *dft=NULL)
{
U8 *result;
CDoc *doc=DocNew;
CDocEntry *doc_e,*doc_dft=NULL;
CHashGeneric *temph;
if (header)
DocPrint(doc,"%s",header);
temph=accts_table->next_added;
while (temph!=accts_table) {
doc_e=DocPrint(doc,"$$FG,%d$$$$MU-UL,\"%s\",LE=0x%X$$\n",
temph->user_data1,temph->str,temph->str);
if (dft && !StrCmp(dft,temph->str))
doc_dft=doc_e;
temph=temph->next_added;
}
if (doc_dft) {
doc->cur_entry=doc_dft;
doc->cur_data_col=0;
}
result=PopUpMenu(doc,DOF_DONT_HOME);
DocDel(doc);
return result;
}
+71
View File
@@ -0,0 +1,71 @@
U0 BgtEntryDel2(CBgtEntry *tempb)
{
if (tempb->type!=BE_TEMPLATE_COPY) {
Free(tempb->credit);
Free(tempb->debit);
Free(tempb->desc);
}
}
U0 BgtEntryDel(CBgtEntry *tempb)
{
BgtEntryDel2(tempb);
Free(tempb);
}
U0 BgtIns(CBgtEntry *tempb)
{
CBgtEntry *tempb1=b_root.next;
while (tempb1!=&b_root && tempb1->date<tempb->date)
tempb1=tempb1->next;
QueIns(tempb,tempb1->last);
}
class CBgtEntryForm
{
U8 date[512] fmtstr "$$DA-P,511,A=\"Date :%s\"$$\n";
F64 amount fmtstr "Amount $$$$$$DA,511,A=\"%6.2f\"$$\n";
U8 credit[512] fmtstr "$$DA-P,511,A=\"Credit Acct:%s\"$$\n";
U8 debit [512] fmtstr "$$DA-P,511,A=\"Debit Acct:%s\"$$\n";
U8 desc [512] fmtstr "$$DA-P,511,A=\"Desc :%s\"$$\n";
};
CBgtEntry *BgtEntryPmt(CBgtEntry *dft=NULL)
{
CBgtEntryForm b;
CBgtEntry *tempb;
U8 *st;
MemSet(&b,0,sizeof(CBgtEntryForm));
StrCpy(&b.date,"*");
if (dft) {
StrPrint(b.date,"%D",dft->date);
b.amount=dft->amount;
StrCpy(b.credit,dft->credit);
StrCpy(b.debit ,dft->debit);
StrCpy(b.desc ,dft->desc);
}
while (TRUE)
if (PopUpForm(&b)) {
if (!*b.credit) {
st=BgtPopUpAcct("Credit Acct\n\n");
if (st!=DOCM_CANCEL)
StrCpy(b.credit,st);
} else if (!*b.debit) {
st=BgtPopUpAcct("Debit Acct\n\n");
if (st!=DOCM_CANCEL)
StrCpy(b.debit,st);
} else {
tempb=CAlloc(sizeof(CBgtEntry));
tempb->date =Str2Date(b.date);
tempb->amount=b.amount;
tempb->credit=StrNew(b.credit);
tempb->debit =StrNew(b.debit);
tempb->desc =StrNew(b.desc);
tempb->type =BE_NORMAL;
StrFileAdd(tempb->credit,accts_table);
StrFileAdd(tempb->debit,accts_table);
return tempb;
}
} else
return NULL;
}
+137
View File
@@ -0,0 +1,137 @@
U0 BgtDataRead()
{
CBgtEntry *tempb;
CBgtTemplate *tempt;
I64 i,cnt,size;
U8 *b,*ptr;
I64 max_num;
U8 **s=StrFileRead(BGT_STRINGS_FILE,&max_num);
MemSet(&b_root,0,sizeof(CBgtEntry));
QueInit(&b_root);
b_root.date=Now;
MemSet(&t_root,0,sizeof(CBgtTemplate));
QueInit(&t_root);
t_root.b.date=Now;
if (ptr=b=FileRead(BGT_DATA_FILE,&size)) {
cnt=*ptr(I64 *)++;
for (i=0;i<cnt;i++) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(&tempb->start,ptr,BE_SIZE);
tempb->credit=StrNew(s[tempb->credit_index]);
tempb->debit =StrNew(s[tempb->debit_index]);
tempb->desc =StrNew(s[tempb->desc_index]);
QueIns(tempb,b_root.last);
ptr+=BE_SIZE;
}
cnt=*ptr(I64 *)++;
for (i=0;i<cnt;i++) {
tempt=CAlloc(sizeof(CBgtTemplate));
MemCpy(&tempt->start,ptr,BT_SIZE);
ptr+=BT_SIZE;
MemCpy(&tempt->b.start,ptr,BE_SIZE);
ptr+=BE_SIZE;
tempt->b.credit=StrNew(s[tempt->b.credit_index]);
tempt->b.debit =StrNew(s[tempt->b.debit_index]);
tempt->b.desc =StrNew(s[tempt->b.desc_index]);
QueIns(tempt,t_root.last);
}
}
StrFileArrDel(s,max_num);
Free(b);
BgtAcctsUpdate;
}
U0 BgtDataWrite()
{
I64 size,cnt1,cnt2;
CHashTable *table=HashTableNew(0x1000);
CBgtEntry *tempb;
CBgtTemplate *tempt;
CHashGeneric *temph;
U8 *buf,*ptr;
temph=accts_table->next_added;
while (temph!=accts_table) {
StrFileAdd(temph->str,table); //Make so accts come first. (Cosmetic)
temph=temph->next_added;
}
tempb=b_root.next;
cnt1=0;
while (tempb!=&b_root) {
if (tempb->type!=BE_TEMPLATE_COPY) {
tempb->credit_index =StrFileAdd(tempb->credit,table);
tempb->debit_index =StrFileAdd(tempb->debit,table);
tempb->desc_index =StrFileAdd(tempb->desc,table);
cnt1++;
}
tempb=tempb->next;
}
tempt=t_root.next;
cnt2=0;
while (tempt!=&t_root) {
tempt->b.credit_index =StrFileAdd(tempt->b.credit,table);
tempt->b.debit_index =StrFileAdd(tempt->b.debit,table);
tempt->b.desc_index =StrFileAdd(tempt->b.desc,table);
cnt2++;
tempt=tempt->next;
}
StrFileWrite(BGT_STRINGS_FILE,table);
StrFileDel(table);
size=sizeof(I64)*2+cnt1*BE_SIZE+cnt2*(BT_SIZE+BE_SIZE);
buf=ptr=MAlloc(size);
MemCpy(ptr,&cnt1,sizeof(I64));
ptr+=sizeof(I64);
tempb=b_root.next;
while (tempb!=&b_root) {
if (tempb->type!=BE_TEMPLATE_COPY) {
MemCpy(ptr,&tempb->start,BE_SIZE);
ptr+=BE_SIZE;
}
tempb=tempb->next;
}
MemCpy(ptr,&cnt2,sizeof(I64));
ptr+=sizeof(I64);
tempt=t_root.next;
while (tempt!=&t_root) {
MemCpy(ptr,&tempt->start,BT_SIZE);
ptr+=BT_SIZE;
MemCpy(ptr,&tempt->b.start,BE_SIZE);
ptr+=BE_SIZE;
tempt=tempt->next;
}
FileWrite(BGT_DATA_FILE,buf,size);
Free(buf);
}
U0 BgtDel()
{
CBgtEntry *tempb,*tempb1;
CBgtTemplate *tempt,*tempt1;
tempb=b_root.next;
while (tempb!=&b_root) {
tempb1=tempb->next;
BgtEntryDel2(tempb);
Free(tempb);
tempb=tempb1;
}
tempt=t_root.next;
while (tempt!=&t_root) {
tempt1=tempt->next;
BgtEntryDel2(&tempt->b);
Free(tempt);
tempt=tempt1;
}
StrFileDel(accts_table);
accts_table=NULL;
}
+210
View File
@@ -0,0 +1,210 @@
extern U0 BgtRegen();
Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
{//ch=ASCII; sc=scan_code
nounusedwarn sc;
CBgtEntry *tempb,*tempb1;
CBgtTemplate *tempt,*tempt1;
CDocEntry *doc_ce;
U8 *st;
switch (ch) {
case '\n':
if ((doc_ce=doc->cur_entry) && doc_ce!=doc && doc_ce->type_u8==DOCT_MENU_VAL) {
tempb=doc_ce->user_data;
if (tempt=tempb->template) {
if (tempt1=BgtTemplatePmt(tempt)) {
QueRem(tempt);
BgtTemplatePurge(tempt);
BgtEntryDel2(&tempt->b);
Free(tempt);
QueIns(tempt1,t_root.last);
BgtTemplateExpand(tempt1);
BgtRegen;
}
} else {
if (tempb1=BgtEntryPmt(tempb)) {
QueRem(tempb);
BgtEntryDel(tempb);
BgtIns(tempb1);
BgtRegen;
}
}
}
return TRUE;
case CH_CTRLY:
if ((doc_ce=doc->cur_entry) && doc_ce!=doc && doc_ce->type_u8==DOCT_MENU_VAL) {
tempb=doc_ce->user_data;
if (tempt=tempb->template) {
QueRem(tempt);
BgtTemplatePurge(tempt);
BgtEntryDel2(&tempt->b);
Free(tempt);
} else {
QueRem(tempb);
BgtEntryDel(tempb);
}
BgtRegen;
}
return TRUE;
case 'a':
PopUpOk( "Set the name and color of your accounts.\n"
"To delete accounts, manually edit\n"
"$$GREEN$$HOME/Budget/Accts.TXT.Z$$FG$$.");
if (PopUpEd(BGT_ACCTS_FILE,Fs)) {
BgtAcctsRead;
BgtRegen;
}
return TRUE;
case 'v':
if ((st=BgtPopUpAcct("View Acct\n\n",view_acct))>=0) {
StrCpy(view_acct,st);
BgtRegen;
}
return TRUE;
case 'n':
if (tempb1=BgtEntryPmt) {
BgtIns(tempb1);
BgtRegen;
}
return TRUE;
case 't':
if (tempt1=BgtTemplatePmt) {
QueIns(tempt1,t_root.last);
BgtTemplateExpand(tempt1);
BgtRegen;
}
return TRUE;
case 'c':
if ((doc_ce=doc->cur_entry) && doc_ce!=doc && doc_ce->type_u8==DOCT_MENU_VAL)
tempb=doc_ce->user_data;
else
tempb=NULL;
if (tempb1=BgtEntryPmt(tempb)) {
BgtIns(tempb1);
BgtRegen;
}
return TRUE;
}
return FALSE;
}
U0 BgtRegen()
{
I64 timeout_jiffy,c,color=COLOR_INVALID;
F64 balance=0;
CDoc *doc,*pdoc,*ddoc;
CDocEntry *doc_ce;
CBgtEntry *tempb=b_root.next,*tempb_ce;
doc=DocNew;
doc->flags|=DOCF_FORM;
while (tempb!=&b_root) {
if (!StrCmp(view_acct,tempb->credit))
balance-=tempb->amount;
if (!StrCmp(view_acct,tempb->debit))
balance+=tempb->amount;
c=BgtAcctColor(tempb->credit);
if (c!=color) {
color=c;
DocPrint(doc,"$$FG,%d$$",color);
}
tempb->doc_e=DocPrint(doc,"$$MU-UL,\"%D %8ts %8ts:%8.2f %8.2f:%Q\",U=0x%X$$\n",
tempb->date,tempb->credit,tempb->debit,balance,
tempb->amount,tempb->desc,tempb);
tempb=tempb->next;
}
DocRecalc(doc);
if (pdoc=Fs->put_doc) {
DocLock(pdoc);
//Now, we want to preserve old position in doc, using ugly brute force.
//It's tricky -- can't use old line num because of editor filters.
//The price we pay for using the standard document editor is this kludge.
//When I originally wrote my budget program, I did not have separate budget
//and line entries, so we never had to resync.
doc_ce=pdoc->cur_entry;
timeout_jiffy=cnts.jiffies+JIFFY_FREQ; //Max one second.
while (doc_ce!=pdoc && cnts.jiffies<timeout_jiffy) {
while (doc_ce->type_u8!=DOCT_MENU_VAL || !(tempb_ce=doc_ce->user_data)) {
doc_ce=doc_ce->next;
if (doc_ce==pdoc) goto br_cont;
}
tempb=b_root.next;
while (tempb!=&b_root) {
if (tempb==tempb_ce) {
doc->cur_entry=tempb->doc_e;
doc->cur_data_col=0;
DocCenter(doc);
goto br_cont;
}
tempb=tempb->next;
}
doc_ce=doc_ce->next;
}
}
br_cont:
ddoc=Fs->display_doc;
Fs->put_doc =doc;
Fs->display_doc=doc;
DocDel(pdoc);
if (pdoc!=ddoc)
DocDel(ddoc);
doc->user_put_key=&BgtPutKey;
}
U0 Budget()
{
CDoc *pdoc,*ddoc,*old_put,*old_display;
BgtAcctsRead;
BgtDataRead;
CBgtTemplatesExpand;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
WinMax;
WinBorder;
WordStat;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Edit {"
" NewEntry(,'n');"
" CopyEntry(,'c');"
" EditEntry(,'\n');"
" DeleteEntry(,CH_CTRLY);"
" NewTemplate(,'t');"
" AcctsFile(,'a');"
"}"
"View {"
" ViewAcct(,'v');"
"}"
);
StrCpy(view_acct,"BANK");
DocMax;
old_put =Fs->put_doc;
old_display =Fs->display_doc;
Fs->put_doc =NULL;
Fs->display_doc=NULL;
BgtRegen;
try
if (View) {
BgtDataWrite;
BgtAcctsWrite;
}
catch
PutExcept;
pdoc=Fs->put_doc;
ddoc=Fs->display_doc;
Fs->put_doc =old_put;
Fs->display_doc=old_display;
DocDel(pdoc);
if (pdoc!=ddoc)
DocDel(ddoc);
SettingsPop;
BgtDel;
MenuPop;
}
+112
View File
@@ -0,0 +1,112 @@
#define SFT_GENERIC 1
public U8 **StrFileRead(U8 *name,I64 *_max_num=NULL,U8 **_colors=NULL,Bool no_nums=FALSE)
{
CDoc *doc=DocRead(name,DOCF_DBL_DOLLARS|DOCF_NO_CURSOR);
CDocEntry *doc_e=doc->root.next;
I64 i,max_num=0;
U8 *ptr,**result,*colors;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_TEXT) {
if (no_nums)
i=++max_num;
else {
i=Str2I64(doc_e->tag,,&ptr);
if (i>max_num) max_num=i;
if (*ptr==',') ptr++;
ptr=StrNew(ptr);
Free(doc_e->tag);
doc_e->tag=ptr;
}
doc_e->user_data=i;
}
doc_e=doc_e->next;
}
result=CAlloc(sizeof(U8 *)*(max_num+1));
colors=CAlloc(sizeof(U8)*(max_num+1));
doc_e=doc->root.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_TEXT && 0<=doc_e->user_data<=max_num) {
result[doc_e->user_data]=doc_e->tag;
doc_e->tag=NULL;
colors[doc_e->user_data]=doc_e->type.u8[1]&15;
}
doc_e=doc_e->next;
}
DocDel(doc);
if (_max_num) *_max_num=max_num;
if (_colors)
*_colors=colors;
else
Free(colors);
return result;
}
public U0 StrFileArrDel(U8 **a,I64 max_num)
{
I64 i;
for (i=0;i<=max_num;i++)
Free(a[i]);
Free(a);
}
public I64 StrFileAdd(U8 *st,CHashTable *table,I64 color=COLOR_INVALID)
{
CHashGeneric *temph;
if (!st) return 0;
if (!(temph=HashFind(st,table,SFT_GENERIC))) {
temph=CAlloc(sizeof(CHashGeneric));
temph->type=SFT_GENERIC;
temph->str=StrNew(st);
if (table->last_added==table)
temph->user_data0=1;
else
temph->user_data0=table->last_added(CHashGeneric *)->user_data0+1;
HashAdd(temph,table);
}
if (color!=COLOR_INVALID)
temph->user_data1=color;
return temph->user_data0;
}
public U0 StrFileWrite(U8 *name,CHashTable *table,Bool no_nums=FALSE)
{
I64 color=BLACK;
CDoc *doc=DocNew(name);
CHashGeneric *temph;
if (table) {
temph=table->next_added;
while (temph!=table) {
if (temph->user_data1&15!=color) {
DocPrint(doc,"$$FG,%d$$",temph->user_data1&15);
color=temph->user_data1&15;
}
if (no_nums)
DocPrint(doc,"%s\n",temph->str);
else
DocPrint(doc,"%d,%s\n",temph->user_data0,temph->str);
temph=temph->next_added;
}
}
doc->flags|=DOCF_NO_CURSOR;
DocWrite(doc);
DocDel(doc);
}
public U0 StrFileDel(CHashTable *table)
{
CHashGeneric *temph,*temph1;
if (!table) return;
temph=table->next_added;
while (temph!=table) {
temph1=temph->next_added;
Free(temph->str);
Free(temph);
temph=temph1;
}
Free(table->body);
Free(table);
}
+147
View File
@@ -0,0 +1,147 @@
U0 BgtTemplatePurge(CBgtTemplate *tempt)
{
CBgtEntry *tempb,*tempb1;
tempb=b_root.next;
while (tempb!=&b_root) {
tempb1=tempb->next;
if (tempb->template==tempt) {
QueRem(tempb);
BgtEntryDel2(tempb);
Free(tempb);
}
tempb=tempb1;
}
}
U0 BgtTemplateExpand(CBgtTemplate *tempt)
{
CDate d,start,end;
CDateStruct ds;
CBgtEntry *tempb;
start=MyStr2Date(tempt->start_date);
end =MyStr2Date(tempt->end_date);
tempt->b.template=tempt;
switch (tempt->type) {
case BT_INTERVAL:
d=start;
while (d<=end) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(tempb,&tempt->b,sizeof(CBgtEntry));
tempb->date=d;
tempb->type=BE_TEMPLATE_COPY;
BgtIns(tempb);
d+=tempt->period*0x100000000;
}
break;
case BT_MONTHLY:
Date2Struct(&ds,start);
while (TRUE) {
d=Struct2Date(&ds);
if (d<=end) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(tempb,&tempt->b,sizeof(CBgtEntry));
tempb->date=d;
tempb->type=BE_TEMPLATE_COPY;
BgtIns(tempb);
} else
break;
if (++ds.mon>11) {
ds.mon=0;
ds.year++;
}
}
break;
case BT_BIMONTHLY:
Date2Struct(&ds,start);
while (TRUE) {
d=Struct2Date(&ds);
if (d<=end) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(tempb,&tempt->b,sizeof(CBgtEntry));
tempb->date=d;
tempb->type=BE_TEMPLATE_COPY;
BgtIns(tempb);
} else
break;
ds.mon+=2;
if (ds.mon>11) {
ds.mon-=12;
ds.year++;
}
}
break;
case BT_SEMIANNUAL:
Date2Struct(&ds,start);
while (TRUE) {
d=Struct2Date(&ds);
if (d<=end) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(tempb,&tempt->b,sizeof(CBgtEntry));
tempb->date=d;
tempb->type=BE_TEMPLATE_COPY;
BgtIns(tempb);
} else
break;
ds.mon+=6;
if (ds.mon>11) {
ds.mon-=12;
ds.year++;
}
}
break;
case BT_ANNUAL:
Date2Struct(&ds,start);
while (TRUE) {
d=Struct2Date(&ds);
if (d<=end) {
tempb=CAlloc(sizeof(CBgtEntry));
MemCpy(tempb,&tempt->b,sizeof(CBgtEntry));
tempb->date=d;
tempb->type=BE_TEMPLATE_COPY;
BgtIns(tempb);
} else
break;
ds.year++;
}
break;
}
}
U0 CBgtTemplatesExpand()
{
CBgtTemplate *tempt=t_root.next;
while (tempt!=&t_root) {
BgtTemplateExpand(tempt);
tempt=tempt->next;
}
}
CBgtTemplate *BgtTemplatePmt(CBgtTemplate *dft_t=NULL)
{
CBgtTemplate t,*tempt;
CBgtEntry *tempb,*dft_b;
MemSet(&t,0,sizeof(CBgtTemplate));
if (dft_t) {
MemCpy(&t.start,&dft_t->start,BT_SIZE);
dft_b=&dft_t->b;
} else {
t.type=BT_INTERVAL;
StrCpy(&t.start_date,"[");
StrCpy(&t.end_date,"]");
dft_b=NULL;
}
while (TRUE)
if (PopUpForm(&t) && ((t.type==BT_INTERVAL && t.period>0) ||
t.type>BT_INTERVAL)) {
if (tempb=BgtEntryPmt(dft_b)) {
tempt=CAlloc(sizeof(CBgtTemplate));
MemCpy(&tempt->start,&t.start,BT_SIZE);
MemCpy(&tempt->b,tempb,sizeof(CBgtEntry));
Free(tempb);
return tempt;
}
} else
break;
return NULL;
}
+76
View File
@@ -0,0 +1,76 @@
#define BGT_STRINGS_FILE "HOME/Budget/Strs.TXT.Z"
#define BGT_ACCTS_FILE "HOME/Budget/Accts.TXT.Z"
#define BGT_DATA_FILE "HOME/Budget/Bgt.DAT.Z"
#define BE_NORMAL 0
#define BE_GAS 1
#define BE_ANNIVERSARY 2
#define BE_PRICE 3
#define BE_TEMPLATE_COPY 4
extern class CBgtTemplate;
class CBgtEntry
{
CBgtEntry *next,*last;
U0 start;
CDate date;
U16 type,flags;
U32 credit_index,debit_index,desc_index;
F64 amount;
U0 end;
U8 *credit,*debit,*desc;
CBgtTemplate *template;
CDocEntry *doc_e;
} b_root;
#define BE_SIZE (offset(CBgtEntry.end)-offset(CBgtEntry.start))
#define BT_NULL 0
#define BT_INTERVAL 1
#define BT_MONTHLY 2
#define BT_BIMONTHLY 3
#define BT_SEMIANNUAL 4
#define BT_ANNUAL 5
DefineLstLoad("ST_BGT_TEMPLATE_TYPES",
"Null\0Interval\0Monthly\0Bimonthly\0Semiannual\0Annual\0");
class CBgtTemplate
{
CBgtTemplate *next,*last;
U0 start;
U16 type fmtstr "$$LS,RT=U16,D=\"ST_BGT_TEMPLATE_TYPES\"$$\n";
U16 flags;
U8 start_date[16] fmtstr "$$DA-P,15,A=\"Start Date:%s\"$$\n";
U8 end_date[16] fmtstr "$$DA-P,15,A=\"End Date :%s\"$$\n";
F64 period fmtstr "$$DA,511, A=\"Period :%6.2f\"$$\n";
U0 end;
CBgtEntry b;
} t_root;
#define BT_SIZE (offset(CBgtTemplate.end)-offset(CBgtTemplate.start))
U8 view_acct[512];
CHashTable *accts_table=NULL;
CDate MyStr2Date(U8 *st)
{
CDateStruct ds;
CDate result;
if (st&&*st) {
if (StrOcc(st,'['))
result=b_root.next->date;
else if (StrOcc(st,']'))
result=b_root.last->date;
else
result=Str2Date(st);
} else
result=Now;
Date2Struct(&ds,result);
if (ds.year>2050)
ds.year-=100;
return Struct2Date(&ds);
}
+4
View File
@@ -0,0 +1,4 @@
if (!FileFind("HOME/Budget",,FUF_JUST_DIRS)) {
MkDir("HOME/Budget");
Copy("/Apps/Budget/Accts.TXT.Z","HOME/Budget");
}
+11
View File
@@ -0,0 +1,11 @@
#help_index "Finance"
#include "/Apps/Budget/BgtStrs"
#include "/Apps/Budget/Budget"
#include "/Apps/Budget/BgtAccts"
#include "/Apps/Budget/BgtEntry"
#include "/Apps/Budget/BgtTemplate"
#include "/Apps/Budget/BgtFile"
#include "/Apps/Budget/BgtMain"
#help_index ""
+4
View File
@@ -0,0 +1,4 @@
Cd("/Apps/Budget");;
#include "Load"
#include "Install" //Might as well always install
Budget;
+7 -12
View File
@@ -1,7 +1,4 @@
/*
This makes a mesh ball.
*/
//Makes a mesh ball.
#define MAX_VERTICES 1024
#define MAX_TRIS 1024
@@ -14,10 +11,9 @@ class Ball
CMeshTri t[MAX_TRIS];
} *b;
class BallDefineStruct
{
F64 radius fmtstr "$$DA-TRM,32,A=\"Radius :%8.3f\"$$\n";
F64 radius fmtstr "$$DA-TRM,32,RT=F64,A=\"Radius :%8.3f\"$$\n";
I64 n_longitude fmtstr "$$DA-TRM,32,A=\"Longitude Faces:%5d\"$$\n";
I64 n_lattitude fmtstr "$$DA-TRM,32,A=\"Lattitude Rings:%5d\"$$\n";
};
@@ -36,7 +32,6 @@ U0 BDCorrect(BallDefineStruct *bd)
bd->n_lattitude=(bd->n_lattitude+1)/2;
}
I64 AddVertex(BallDefineStruct *,I64 x,I64 y,I64 z)
{
I64 i;
@@ -64,16 +59,16 @@ U8 *Ball2CSprite()
{
//See $LK,"::/Adam/Gr/GrSpritePlot.CPP",A="FL:::/Adam/Gr/GrSpritePlot.CPP,1"$ for how CSprite are stored.
U8 *result=MAlloc(sizeof(U8)+2*sizeof(I32)+
b->vertex_cnt*sizeof(CD3I32)+b->tri_cnt*sizeof(CMeshTri)+sprite_base_size[GRST_END]),
b->vertex_cnt*sizeof(CD3I32)+b->tri_cnt*sizeof(CMeshTri)+sprite_elem_base_sizes[SPT_END]),
*dst=result;
*dst(U8 *)++ =GRST_MESH;
*dst(U8 *)++ =SPT_MESH;
*dst(I32 *)++ =b->vertex_cnt;
*dst(I32 *)++ =b->tri_cnt;
MemCpy(dst,&b->v,b->vertex_cnt*sizeof(CD3I32));
dst+=b->vertex_cnt*sizeof(CD3I32);
MemCpy(dst,&b->t,b->tri_cnt*sizeof(CMeshTri));
dst+=b->tri_cnt*sizeof(CMeshTri);
*dst(U8 *)++ =GRST_END;
*dst(U8 *)++ =SPT_END;
return result;
}
@@ -117,9 +112,9 @@ public U8 *BallGen()
}
result=Ball2CSprite;
NewLine(7);
"%h7c",'\n';
Sprite(result,"\t\t$$SP,\"<1>\",BI=%d$$");
NewLine(7);
"%h7c",'\n';
"Vertices:%d\n",b->vertex_cnt;
Free(b);
"Do another";
+4
View File
@@ -1,3 +1,7 @@
#help_index "Misc"
#include "/Apps/GrModels/ManGen"
#include "/Apps/GrModels/BallGen"
#include "/Apps/GrModels/Models"
#help_index ""
+34 -40
View File
@@ -1,7 +1,4 @@
/*
This makes a mesh man.
*/
//Makes a mesh man.
#define MAX_VERTICES 1024
#define MAX_TRIS 1024
@@ -14,42 +11,41 @@ class Man
CMeshTri t[MAX_TRIS];
} *m;
class ManDefineStruct
{
F64 head_rad fmtstr "$$DA-TRM,32,A=\"Head Radius :%8.3f\"$$\n";
F64 head_rad fmtstr "$$DA-TRM,32,RT=F64,A=\"Head Radius :%8.3f\"$$\n";
F64 torso_len fmtstr "$$DA-TRM,32,A=\"Torso Length :%8.3f\"$$\n";
F64 arm_len fmtstr "$$DA-TRM,32,A=\"Arm Length :%8.3f\"$$\n";
F64 hand_len fmtstr "$$DA-TRM,32,A=\"Hand Length :%8.3f\"$$\n";
F64 leg_len fmtstr "$$DA-TRM,32,A=\"Leg Length :%8.3f\"$$\n";
F64 foot_len fmtstr "$$DA-TRM,32,A=\"Foot Length :%8.3f\"$$\n";
F64 torso_width fmtstr "$$DA-TRM,32,A=\"Torso Width :%8.3f\"$$\n";
F64 torso_depth fmtstr "$$DA-TRM,32,A=\"Torso Depth :%8.3f\"$$\n";
F64 arm_rad fmtstr "$$DA-TRM,32,A=\"Arm Radius :%8.3f\"$$\n";
F64 hand_rad fmtstr "$$DA-TRM,32,A=\"Hand Radius :%8.3f\"$$\n";
F64 leg_rad fmtstr "$$DA-TRM,32,A=\"Leg Radius :%8.3f\"$$\n";
F64 foot_rad fmtstr "$$DA-TRM,32,A=\"Foot Radius :%8.3f\"$$\n\n";
F64 torso_len fmtstr "$$DA-TRM,32,RT=F64,A=\"Torso Length :%8.3f\"$$\n";
F64 arm_len fmtstr "$$DA-TRM,32,RT=F64,A=\"Arm Length :%8.3f\"$$\n";
F64 hand_len fmtstr "$$DA-TRM,32,RT=F64,A=\"Hand Length :%8.3f\"$$\n";
F64 leg_len fmtstr "$$DA-TRM,32,RT=F64,A=\"Leg Length :%8.3f\"$$\n";
F64 foot_len fmtstr "$$DA-TRM,32,RT=F64,A=\"Foot Length :%8.3f\"$$\n";
F64 torso_width fmtstr "$$DA-TRM,32,RT=F64,A=\"Torso Width :%8.3f\"$$\n";
F64 torso_depth fmtstr "$$DA-TRM,32,RT=F64,A=\"Torso Depth :%8.3f\"$$\n";
F64 arm_rad fmtstr "$$DA-TRM,32,RT=F64,A=\"Arm Radius :%8.3f\"$$\n";
F64 hand_rad fmtstr "$$DA-TRM,32,RT=F64,A=\"Hand Radius :%8.3f\"$$\n";
F64 leg_rad fmtstr "$$DA-TRM,32,RT=F64,A=\"Leg Radius :%8.3f\"$$\n";
F64 foot_rad fmtstr "$$DA-TRM,32,RT=F64,A=\"Foot Radius :%8.3f\"$$\n\n";
F64 r_shoulder_a1 fmtstr "$$DA-TRM,32,A=\"R.Shoulder Front/Back Angle:%8.3f\"$$\n";
F64 l_shoulder_a1 fmtstr "$$DA-TRM,32,A=\"L.Shoulder Front/Back Angle:%8.3f\"$$\n";
F64 r_hip_a1 fmtstr "$$DA-TRM,32,A=\"R.Hip Front/Back Angle :%8.3f\"$$\n";
F64 l_hip_a1 fmtstr "$$DA-TRM,32,A=\"L.Hip Front/Back Angle :%8.3f\"$$\n";
F64 r_shoulder_a1 fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Shoulder Front/Back Angle:%8.3f\"$$\n";
F64 l_shoulder_a1 fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Shoulder Front/Back Angle:%8.3f\"$$\n";
F64 r_hip_a1 fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Hip Front/Back Angle :%8.3f\"$$\n";
F64 l_hip_a1 fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Hip Front/Back Angle :%8.3f\"$$\n";
F64 r_shoulder_a2 fmtstr "$$DA-TRM,32,A=\"R.Shoulder Side Angle :%8.3f\"$$\n";
F64 l_shoulder_a2 fmtstr "$$DA-TRM,32,A=\"L.Shoulder Side Angle :%8.3f\"$$\n";
F64 r_hip_a2 fmtstr "$$DA-TRM,32,A=\"R.Hip Side Angle :%8.3f\"$$\n";
F64 l_hip_a2 fmtstr "$$DA-TRM,32,A=\"L.Hip Side Angle :%8.3f\"$$\n";
F64 r_shoulder_a2 fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Shoulder Side Angle :%8.3f\"$$\n";
F64 l_shoulder_a2 fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Shoulder Side Angle :%8.3f\"$$\n";
F64 r_hip_a2 fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Hip Side Angle :%8.3f\"$$\n";
F64 l_hip_a2 fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Hip Side Angle :%8.3f\"$$\n";
F64 r_elbow_a fmtstr "$$DA-TRM,32,A=\"R.Elbow Angle :%8.3f\"$$\n";
F64 l_elbow_a fmtstr "$$DA-TRM,32,A=\"L.Elbow Angle :%8.3f\"$$\n";
F64 r_knee_a fmtstr "$$DA-TRM,32,A=\"R.Knee Angle :%8.3f\"$$\n";
F64 l_knee_a fmtstr "$$DA-TRM,32,A=\"L.Knee Angle :%8.3f\"$$\n";
F64 r_elbow_a fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Elbow Angle :%8.3f\"$$\n";
F64 l_elbow_a fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Elbow Angle :%8.3f\"$$\n";
F64 r_knee_a fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Knee Angle :%8.3f\"$$\n";
F64 l_knee_a fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Knee Angle :%8.3f\"$$\n";
F64 r_wrist_a fmtstr "$$DA-TRM,32,A=\"R.Wrist Angle :%8.3f\"$$\n";
F64 l_wrist_a fmtstr "$$DA-TRM,32,A=\"L.Wrist Angle :%8.3f\"$$\n";
F64 r_ankle_a fmtstr "$$DA-TRM,32,A=\"R.Ankle Angle :%8.3f\"$$\n";
F64 l_ankle_a fmtstr "$$DA-TRM,32,A=\"L.Ankle Angle :%8.3f\"$$\n";
F64 r_wrist_a fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Wrist Angle :%8.3f\"$$\n";
F64 l_wrist_a fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Wrist Angle :%8.3f\"$$\n";
F64 r_ankle_a fmtstr "$$DA-TRM,32,RT=F64,A=\"R.Ankle Angle :%8.3f\"$$\n";
F64 l_ankle_a fmtstr "$$DA-TRM,32,RT=F64,A=\"L.Ankle Angle :%8.3f\"$$\n";
};
@@ -116,7 +112,6 @@ U0 MDCorrect(ManDefineStruct *md)
md->l_ankle_a+=md->l_knee_a;
}
I64 AddVertex(ManDefineStruct *md,I64 x,I64 y,I64 z)
{
I64 result=m->vertex_cnt++;
@@ -184,21 +179,20 @@ U0 AddBox(ManDefineStruct *md,I64 c,I64 x1,I64 y1,I64 z1,F64 w,F64 h,F64 d,F64 h
Free(r);
}
U8 *Man2CSprite()
{
//See $LK,"::/Adam/Gr/GrSpritePlot.CPP",A="FL:::/Adam/Gr/GrSpritePlot.CPP,1"$ for how CSprite are stored.
U8 *result=MAlloc(sizeof(U8)+2*sizeof(I32)+
m->vertex_cnt*sizeof(CD3I32)+m->tri_cnt*sizeof(CMeshTri)+sprite_base_size[GRST_END]),
m->vertex_cnt*sizeof(CD3I32)+m->tri_cnt*sizeof(CMeshTri)+sprite_elem_base_sizes[SPT_END]),
*dst=result;
*dst(U8 *)++ =GRST_MESH;
*dst(U8 *)++ =SPT_MESH;
*dst(I32 *)++ =m->vertex_cnt;
*dst(I32 *)++ =m->tri_cnt;
MemCpy(dst,&m->v,m->vertex_cnt*sizeof(CD3I32));
dst+=m->vertex_cnt*sizeof(CD3I32);
MemCpy(dst,&m->t,m->tri_cnt*sizeof(CMeshTri));
dst+=m->tri_cnt*sizeof(CMeshTri);
*dst(U8 *)++ =GRST_END;
*dst(U8 *)++ =SPT_END;
return result;
}
@@ -281,9 +275,9 @@ public U8 *ManGen()
md2.l_hip_a2,0,md2.l_ankle_a,&x,&y,&z);
result=Man2CSprite;
NewLine(7);
"%h7c",'\n';
Sprite(result,"\t\t$$SP,\"<1>\",BI=%d$$");
NewLine(7);
"%h7c",'\n';
Free(m);
"Do another";
if (YorN)
+9 -65
View File
@@ -2,8 +2,6 @@
//with $LK,"::/Apps/GrModels/Run.CPP"$.
//They were cut-and-pasted here.
$BG,14$
$SP,"<1>",BI=1$
@@ -18,8 +16,6 @@ $BG,14$
$SP,"<3>",BI=3$
@@ -27,8 +23,6 @@ $BG,14$
$SP,"<4>",BI=4$
@@ -36,8 +30,6 @@ $BG,14$
$SP,"<5>",BI=5$
@@ -45,8 +37,6 @@ $BG,14$
$SP,"<6>",BI=6$
@@ -54,8 +44,6 @@ $BG,14$
$SP,"<7>",BI=7$
@@ -63,8 +51,6 @@ $BG,14$
$SP,"<8>",BI=8$
@@ -72,8 +58,6 @@ $BG,14$
$SP,"<9>",BI=9$
@@ -81,8 +65,6 @@ $BG,14$
$SP,"<10>",BI=10$
@@ -90,8 +72,6 @@ $BG,14$
$SP,"<11>",BI=11$
@@ -99,19 +79,12 @@ $BG,14$
$SP,"<12>",BI=12$
$SP,"<13>",BI=13$
@@ -119,24 +92,18 @@ $BG,14$
$SP,"<14>",BI=14$
$SP,"<15>",BI=15$
$SP,"<16>",BI=16$
@@ -144,8 +111,6 @@ $BG,14$
$SP,"<17>",BI=17$
@@ -153,8 +118,6 @@ $BG,14$
$SP,"<18>",BI=18$
@@ -162,8 +125,6 @@ $BG,14$
$SP,"<19>",BI=19$
@@ -171,8 +132,6 @@ $BG,14$
$SP,"<20>",BI=20$
@@ -180,8 +139,6 @@ $BG,14$
$SP,"<21>",BI=21$
@@ -189,8 +146,6 @@ $BG,14$
$SP,"<22>",BI=22$
@@ -198,17 +153,11 @@ $BG,14$
$SP,"<23>",BI=23$
$BG$
class Frame
$BG$class Frame
{
CSprite *img[2];
F64 dt;
@@ -217,7 +166,7 @@ class Frame
#define COURT_BORDER 10
#define COLLISION_DAMP 0.8
/* This viscosity is way bigger than
/* Viscosity is way bigger than
real air viscosity. In reality
air is approximated by V and V$SY,-3$2$SY,0$
terms and is smaller. However, I use
@@ -294,9 +243,7 @@ class Obj
Bool stopped,shooting,has_ball,pad[5];
} objs[NUM_OBJS],*ball,*human;
/*
Just to be different, I didn't use the built-in
/*Just to be different, I didn't use the built-in
DCF_TRANSFORMATION flag in this game.
Instead, I chose a 45 degree angle
between Y and Z as the view point.
@@ -337,7 +284,6 @@ I64 ObjCompare(Obj *o1,Obj *o2)
return o1->y-o2->y;
}
U0 DrawIt(CTask *task,CDC *dc)
{
F64 tt=tS,d,d_down,d_up;
@@ -355,7 +301,7 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->pen_width=2;
dc->color=RED;
GrLineRect4(dc,COURT_BORDER,COURT_BORDER,
GrBorder(dc,COURT_BORDER,COURT_BORDER,
task->pix_width -1-COURT_BORDER,
task->pix_height-1-COURT_BORDER);
for (i=0;i<NUM_OBJS;i++) {
@@ -457,7 +403,6 @@ U0 DrawIt(CTask *task,CDC *dc)
GrPrint(dc,FONT_WIDTH*42,0,"%02d",best_score1);
}
U0 Shoot(Obj *o)
{
if (!someone_shooting && o->has_ball) {
@@ -466,7 +411,6 @@ U0 Shoot(Obj *o)
}
}
U0 AnimateTask(CTask *parent_task)
{
F64 d,dx,dy,dt,dx2,dy2,t0=tS;
@@ -538,8 +482,8 @@ U0 AnimateTask(CTask *parent_task)
Shoot(o);
if (!o->shooting) {
if (o==human) {
dx=(ipx-parent_task->pix_left-parent_task->scroll_x)-o->x;
dy=(ipy-parent_task->pix_top-parent_task->scroll_y)*2-o->y;
dx=(ip.pos.x-parent_task->pix_left-parent_task->scroll_x)-o->x;
dy=(ip.pos.y-parent_task->pix_top-parent_task->scroll_y)*2-o->y;
} else {
dx=o->DxDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
dy=o->DyDt+=RANDOM_MAN_ACCELERATION/sqrt2*RandI16/MAX_I16*dt;
@@ -661,7 +605,7 @@ U0 CleanUp()
U0 KeepAway()
{
I64 msg_code,p1,p2;
I64 msg_code,a1,a2;
PopUpOk(
"$$RED$$Pass or hand-off to score points.$$FG$$\n\n"
@@ -696,7 +640,7 @@ U0 KeepAway()
try {
while (TRUE) {
msg_code=GetMsg(&p1,&p2,1<<MSG_IP_L_DOWN|1<<MSG_IP_R_DOWN|1<<MSG_KEY_DOWN);
msg_code=GetMsg(&a1,&a2,1<<MSG_IP_L_DOWN|1<<MSG_IP_R_DOWN|1<<MSG_KEY_DOWN);
switch (msg_code) {
case MSG_IP_L_DOWN:
ka_shoot:
@@ -707,7 +651,7 @@ ka_jump:
human->DzDt=JUMP_VELOCITY;
break;
case MSG_KEY_DOWN:
switch (p1) {
switch (a1) {
case '\n':
CleanUp;
Init;
+4
View File
@@ -1 +1,5 @@
#help_index "Games"
#include "/Apps/KeepAway/KeepAway"
#help_index ""
+4
View File
@@ -1 +1,5 @@
#help_index "Misc"
#include "/Apps/Logic/Logic"
#help_index ""
+8 -18
View File
@@ -17,27 +17,21 @@ $ID,6$
$SP,"",BI=1$
$SP,"",BI=2$
$SP,"",BI=3$
$SP,"",BI=4$
$SP,"",BI=5$
$SP,"",BI=6$
$SP,"",BI=7$
@@ -46,7 +40,6 @@ $SP,"",BI=8$
$SP,"",BI=9$
@@ -54,7 +47,6 @@ $SP,"",BI=9$
$SP,"",BI=10$
$ID,-6$
U8 *gate_type_lst="NULL\0OUTPUT\0INPUT\0"
"NOT\0AND\0OR\0NAND\0NOR\0XOR\0AND3\0OR3\0NAND3\0NOR3\0";
@@ -84,7 +76,7 @@ I64 num_inputs_entered,num_outputs_entered;
I64 num_selected_gates,
selected_gates[MAX_SELECTED_GATES];
U0 PmtGates()
U0 GetGates()
{
I64 i;
U8 *st;
@@ -93,12 +85,12 @@ U0 PmtGates()
"Your choices are:\n";
for (i=GT_FIRST_REAL_GATE;i<GT_NUM_ENTRIES;i++)
"%z ",i,gate_type_lst;
NewLine;
'\n';
num_selected_gates=0;
while (num_selected_gates<GT_NUM_ENTRIES) {
"%d",num_selected_gates;
st=PmtStr(" Gate: ");
st=GetStr(" Gate: ");
if (!*st) {
Free(st);
return;
@@ -112,13 +104,12 @@ U0 PmtGates()
}
}
U0 Init()
{
I64 i;
do {
table_size=PmtI64("\nTable size in hex (3 input=0x100,4=0x10000): ",0);
table_size=GetI64("\nTable size in hex (3 input=0x100,4=0x10000): ",0);
if (table_size>MAX_TABLE_SIZE)
"Too large\n";
else if (table_size<1) {
@@ -142,7 +133,7 @@ U0 Init()
num_inputs_entered=0;
while (TRUE) {
"Input %C: ",'A'+num_inputs_entered;
i=PmtI64("",-1);
i=GetI64("",-1);
if (i<0) break;
if (i>table_size)
"Too large\n";
@@ -164,7 +155,7 @@ U0 Init()
num_outputs_entered=0;
while (TRUE) {
"Output %C: ",'A'+num_outputs_entered;
i=PmtI64("",-1);
i=GetI64("",-1);
if (i<0) break;
if (i>table_size)
"Too large\n";
@@ -523,7 +514,6 @@ U0 FillNOr3(Bool *chged,I64 *num_outputs_found)
}
}
I64 FillGateTable()
{
I64 current_gate,num_outputs_found=0;
@@ -532,7 +522,7 @@ I64 FillGateTable()
output_found=-1;
ProgressBarsRst;
progress1_max=table_size;
NewLine;
'\n';
while (num_outputs_found<num_outputs_entered && chged) {
"Pass : %d\n",passes++;
chged=FALSE;
@@ -581,7 +571,7 @@ U0 DigitalLogic()
WordStat;
WinBorder(ON);
DocClear;
PmtGates;
GetGates;
try {
Init;
if (FillGateTable) {
-20
View File
@@ -1,20 +0,0 @@
//7 no nothing
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qCeBGqFD2G3eBsBGe.AsEeAG");
Play("qCeBGqFD2G3eBsBGe.AsEeAG");
Play("CCDqBsCRDBDB2eG3FCFqBsCCDD");
Play("qCeDqBsCRDBDB2eG3FCFqBsCCDD");
}
} catch
PutExcept;
Snd(0);
}
Song;
-20
View File
@@ -1,20 +0,0 @@
//9 no nothing
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.646;
music_stacatto_factor= 0.989;
try {
while (!ScanKey) {
Play("2q.G3sCCqAeBB2qG3CeAAqB");
Play("q.CsCCeCCCCBDDDDDqB");
Play("e.AsADCeAetDDDeAsEGeBFsFDFDeEsFACGeC");
Play("e.AsADCeAetDDDeAsEGeBFsFDFDeEsFACGeC");
}
} catch
PutExcept;
Snd(0);
}
Song;
-20
View File
@@ -1,20 +0,0 @@
//7 no nothing
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("4qBDBA3eG4BqCeCFqC");
Play("BDBA3eG4BqCeCFqC");
Play("eBDFGqD3eG4G3qG4sA3G4eDqBe.DsE");
Play("eBDFGqD3eG4G3qG4sA3G4eDqBe.DsE");
}
} catch
PutExcept;
Snd(0);
}
Song;
-26
View File
@@ -1,26 +0,0 @@
$WW,1$$FG,5$$TX+CX,"Music Organ Help"$$FG$
* The keyboard can be used as an organ by typing letter keys or clicking the mouse on the keyboard diagram$FG$. You can "record" notes by pressing the red button and typing letters. They will appear on the musical staff. You can edit and save them.
* The clipboard can be used to cut and paste.
* $FG,2$MusicOrgan$FG$ uses $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ files as it's fmt! See $LK,"::/Apps/MusicOrgan/Examples/personal.CPP"$. It does not fully parse them when loading back in, so changes made outside $FG,2$MusicOrgan$FG$ can be lost.
* The first line of the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ files has a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/MusicOrgan/JukeBox.CPP,JukeBox"$(). The categories are $FG,2$"no nothing"$FG$, $FG,2$"has words"$FG$, $FG,2$"has graphics"$FG$, or $FG,2$"special"$FG$. The third character in the comment is a digit rating number.
* You can take the $LK,"Play",A="MN:Play"$() statements out of a song file and place them in your programs. You can also add a song to a document with $FG,2$<CTRL-L>$FG$, but you should do it after pressing $FG,2$<CTRL-T>$FG$ because the clipboard-insert in $FG,2$<CTRL-L>$FG$ is screwy. See this $SO,"<Song>",A="2qG3ECB2eGG3qCeFDsBGBG2qG3ECB2eGG3qCeFDsBGBGqEeEFqEB2eG3FetCAGqFCEeEFqEB2eG3FetCAGqFC"$ after pressing $FG,2$<CTRL-T>$FG$, now.
* You can call $LK,"JukeBox",A="FF:::/Apps/MusicOrgan/JukeBox.CPP,JukeBox"$("HOME/MusicOrgan"); to play your songs.
* To create a $FG,2$.SND$FG$ file which can be exported and played under Windows, set the $FG,2$Bool$FG$ $LK,"snd_record",A="MN:snd_record"$ to $FG,2$TRUE$FG$, play music, and set it to $FG,2$FALSE$FG$. Then, call $LK,"SndFileCreate",A="MN:SndFileCreate"$(). You might wish to make a $FG,2$<CTRL-ALT-key>$FG$ to toggle this system level recording feat. See $LK,"Snd",A="MN:Snd"$(). Add this code to your $LK,"HOME/Adam3cKeyPlugIns.CPP"$ file.
$FG,5$U0 CtrlAltR(I64)
{
snd_record=!snd_record;
}
SetCtrlAltLetCB('R',&CtrlAltR,"Toggle snd_record");$FG$
* When calling $LK,"SndFileCreate",A="MN:SndFileCreate"$() you can set a waveform. The PC speaker is $LK,"WF_SQUARE",A="MN:WF_SQUARE"$. You can select reverb and averaging, also.
-1
View File
@@ -1 +0,0 @@
MkDir("HOME/MusicOrgan");
-6
View File
@@ -1,6 +0,0 @@
#help_index "Snd"
#include "/Apps/MusicOrgan/JukeBox"
#include "/Apps/MusicOrgan/JukePuppet"
#include "/Apps/MusicOrgan/OrganCtrls"
#include "/Apps/MusicOrgan/Organ"
#help_index ""
-2
View File
@@ -1,2 +0,0 @@
#include "/Apps/MusicOrgan/Load"
MusicOrgan;
@@ -1,5 +1,4 @@
//9 has graphics
#define X 330
#define Y 15
@@ -34,14 +33,14 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
for (i=0;i<NUM_BEAMS;i++) {
beams_r[i]=Rand;
beams_é[i]=2*ã*Rand;
}
try {
task=PopUpViewStr(
task=PopUpViewPrint(
"$LK,"Numbers,6:25",A="BF:Numbers,6:25"$\n"
"$LK,"Psalms,31:16",A="BF:Psalms,31:16"$\n"
"$LK,"Psalms,67:1",A="BF:Psalms,67:1"$\n"
@@ -4,10 +4,10 @@ U0 Song()
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.736;
music.tempo= 2.480;
music.stacatto_factor= 0.736;
try {
task=PopUpViewStr(
task=PopUpViewPrint(
"There are myths about the River\n"
"Styx separating the land of the\n"
"living from dead. Jesus' told a story\n"
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3eCsAAeCsAAeDABRCqEsBBeEDFE");
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (!ScanKey) {
Play("2qG3etC2GG3qARR2etG3FBqEeFE",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("2q.GeGqG3sBBCB2q.GeGqG3sBBCB",
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (!ScanKey) {
Play("3etDGDqGeCGetAE2G3eEFsGBGBqEG",
@@ -1,5 +1,4 @@
//8 has graphics
#define R1 13
#define R2 21
@@ -38,7 +37,6 @@ U0 DrawIt(CTask *,CDC *dc)
GrFloodFill(dc,x1,y1);
}
U0 Song()
{
CTask *task;
@@ -46,10 +44,10 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
task=PopUpViewStr("$LK,"Mark,14:37",A="BF:Mark,14:37"$\n");
task=PopUpViewPrint("$LK,"Mark,14:37",A="BF:Mark,14:37"$\n");
TaskWait(task);
SetWinHorz(Fs->win_left,Fs->win_right,task);
SetWinVert(Fs->win_bottom+3,Fs->win_bottom+15,task);
@@ -1,46 +1,44 @@
//7 has graphics
U0 Song()
{
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->text_attr=BLACK<<4+WHITE;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.9;
music.tempo= 2.480;
music.stacatto_factor= 0.9;
try {
while (!ScanKey) {
DocClear;
"$$BG,BLACK$$$$WHITE$$\n\n\n\n\nWait for the end...";
NewLine(5);
Spaces(17);
"\n\n\n\n\n%17c",CH_SPACE;
Sprite($IB,"<1>",BI=1,BP="::/Demo/Graphics/SpritePut.CPP.Z,1"$);
Play("3e.GsGe.GsFe.EsG4e.CsDe.EsEe.EsDqCe.CsB");
NewLine;
'\n';
Play("e.AsAe.AsBe.CsBe.CsA3e.G4sA3e.GsEqGe.GsG");
NewLine;
'\n';
Play("e.GsGe.GsFe.EsG4e.CsDe.EsEe.EsDqCC");
NewLine;
'\n';
Play("DDCBh.CqR");
NewLine;
'\n';
Play("3(Ge.G");
NewLine;
'\n';
Play("sFe.EsG4e.CsDhEq.CeR");
NewLine;
'\n';
Play("q(Ae.A");
NewLine;
'\n';
Play("sBe.CsBe.CsA3hGq.EeR");
NewLine;
'\n';
Play("q(Ge.G");
NewLine;
'\n';
Play("sFe.EsG4e.CsDhEqCC");
NewLine;
'\n';
Play("DDCBh.CqR");
NewLine;
'\n';
Play("etEEGqCsDCDCFCFCqAetCDBBD3G4FCF");
NewLine;
'\n';
Play("EEGqCsDCDCFCFCqAetCDBBD3G4FCF");
NewLine;
'\n';
}
} catch
PutExcept;
@@ -1,5 +1,4 @@
//7 has words
F64 t0=Beat;
U0 DrawIt(CTask *task,CDC *dc)
@@ -17,12 +16,12 @@ U0 Song()
CTask *task;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
DocCursor;
DocClear;
Fs->draw_it=&DrawIt;
try {
task=PopUpViewStr("$LK,"BF:Acts,9:3"$\n");
task=PopUpViewPrint("$LK,"BF:Acts,9:3"$\n");
TaskWait(task);
SetWinHorz(Fs->win_left,Fs->win_right,task);
SetWinVert(Fs->win_bottom+3,Fs->win_bottom+15,task);
@@ -1,5 +1,4 @@
//9 has graphics
F64 t0=Beat;
#define HORIZON_Y 50
#define LEFT_EDGE 200
@@ -32,8 +31,8 @@ U0 Song()
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.500;
music_stacatto_factor= 0.900;
music.tempo= 2.500;
music.stacatto_factor= 0.900;
try {
while (!ScanKey) {
t0=Beat;
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qEsCDCDqCDeEGsEBEBeCBsDADA",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qBAeEEqAeAEDB2qG3F",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 3.966;
music_stacatto_factor= 0.902;
music.tempo= 3.966;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qABeCCqABAAR",
@@ -3,9 +3,9 @@ U0 Song()
{
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
task=PopUpViewStr("$LK,"BF:Luke,12:16"$\n");
task=PopUpViewPrint("$LK,"BF:Luke,12:16"$\n");
TaskWait(task);
SetWinHorz(Fs->win_left,Fs->win_right,task);
SetWinVert(Fs->win_bottom+3,Fs->win_bottom+15,task);
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("M9/8");
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (!ScanKey) {
Play("3sEAEAeFFsA2G3A2G3FGFGqCCBA",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("M3/4");
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
while (TRUE) {
Play("et2G32G3Gq2G3qCq2G3sFAFAq2G3etGDAqA",
"Don't \0 \0need \0 \0help. \0 \0Got \0 \0it \0 \0all \0figured \0 \0 \0out.\n\0");
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qAsDGDGqAsCACAeCBsFDFDetCGAsADAD",
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (!ScanKey) {
Play("2qG3sDADAeF2G3etFDCBA2G3qAetGFC2eG3E",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
"$$GREEN$$To God...$$FG$$\n";
@@ -4,10 +4,10 @@ U0 Song()
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.500;
music_stacatto_factor= 0.900;
music.tempo= 2.500;
music.stacatto_factor= 0.900;
try {
task=PopUpViewStr(
task=PopUpViewPrint(
"$$WW+H,1$$You get what you pray for. "
"Most people are fools like King Midas. People have laughable notions of Heaven. "
"You'd be surprised -- I can't imagine things being much better than Earth "
@@ -1,6 +1,4 @@
//9 has graphics
U0 DrawIt(CTask *task,CDC *dc)
{
I64 i,cx=0.85*task->pix_width,cy=task->pix_height+10;
@@ -18,7 +16,7 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (!ScanKey) {
DocClear;
@@ -1,5 +1,4 @@
//8 has graphics
U0 DrawIt(CTask *,CDC *dc)
{
I64 i;
@@ -42,8 +41,8 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
"$$BG+H,LTCYAN$$";
while (!ScanKey) {
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3e.C2sG3qEe.FsBeCCsFGeBAAetAREeEsCB");
@@ -3,9 +3,9 @@ U0 Song()
{
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
task=PopUpViewStr(
task=PopUpViewPrint(
"$LK,"BF:Luke,7:42"$\n"
"\n"
"Prodigal Son\n"
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.857;
music.tempo= 2.480;
music.stacatto_factor= 0.857;
try {
while (!ScanKey) {
Play("3eEDEFqDDeEDEDqCC",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.758;
music.tempo= 2.480;
music.stacatto_factor= 0.758;
try {
while (!ScanKey) {
Play("3sDDeBCsAAeB2G3A2F3sCCeDsFFeEsFFEEeDE");
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.714;
music.tempo= 2.480;
music.stacatto_factor= 0.714;
try {
while (!ScanKey) {
Play("3sBBBBEBDBeEBqDeBBEDEBqD",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 1.930;
music_stacatto_factor= 0.604;
music.tempo= 1.930;
music.stacatto_factor= 0.604;
try {
while (!ScanKey) {
Play("3sEqAsDeCqAsEqAsDeCqAsDeEqEsE",
@@ -1,5 +1,4 @@
//8 has graphics
class CBubble
{
CBubble *next,*last;
@@ -65,7 +64,7 @@ U0 DrawIt(CTask *,CDC *dc)
}
U0 AnimateTask(I64)
{ //Preemption is off after Spawn
{//Preemption is off after Spawn
CTask *task=Fs->parent_task;
CBubble *tempb,*tempb1;
F64 t_last=Beat,dt,tSpawn=0,é;
@@ -74,7 +73,6 @@ U0 AnimateTask(I64)
dt=Beat-t_last;
t_last=Beat;
x+=2*Sin(Beat/3)*dt;
y+=2*Sin(Beat/2)*dt;
@@ -141,10 +139,10 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
task=PopUpViewStr("$LK,"Romans,8:28",A="BF:Romans,8:28"$\n");
task=PopUpViewPrint("$LK,"Romans,8:28",A="BF:Romans,8:28"$\n");
TaskWait(task);
SetWinHorz(Fs->win_left,Fs->win_right,task);
SetWinVert(Fs->win_bottom+3,Fs->win_bottom+15,task);
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3qAeCDqEAeCDECDECsCC",
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.758;
music.tempo= 2.480;
music.stacatto_factor= 0.758;
try {
while (!ScanKey) {
Play("3qBeABqA2G3AB2hG");
@@ -3,9 +3,9 @@ U0 Song()
{
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
task=PopUpViewStr(
task=PopUpViewPrint(
"Asking God for stuff is like knocking on the door\n"
"of a neighbor in the middle of the night.\n"
"It's annoying! We're supposed to love God!\n"
@@ -4,7 +4,7 @@ U0 Song()
CTask *task;
Fs->task_end_cb=&SndTaskEndCB;
try {
task=PopUpViewStr("$LK,"BF:Matthew,19:16"$\n");
task=PopUpViewPrint("$LK,"BF:Matthew,19:16"$\n");
TaskWait(task);
SetWinHorz(Fs->win_left,Fs->win_right,task);
SetWinVert(Fs->win_bottom+3,Fs->win_bottom+15,task);
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("M4/4");
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.976;
music_stacatto_factor= 0.538;
music.tempo= 2.976;
music.stacatto_factor= 0.538;
try {
while (!ScanKey) {
Play("3qEDCDeEEqEeDDqD");
@@ -1,5 +1,4 @@
//8 has graphics
U0 DrawIt(CTask *task,CDC *dc)
{
F64 x1,x2,y1,y2,x3,y3,radius,pedals,é,t=Beat,
@@ -32,7 +31,7 @@ U0 Song()
Fs->draw_it=&DrawIt;
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
while (TRUE) {
Play("qBq2G3sGAGAetCBBqAq2G3sBBBBeFE",
@@ -2,7 +2,7 @@
U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
music_tempo=2.5;
music.tempo=2.5;
try {
"$$WW+H,1$$";
while (!ScanKey) {
@@ -3,8 +3,8 @@ U0 Song()
{
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
music_tempo= 2.480;
music_stacatto_factor= 0.902;
music.tempo= 2.480;
music.stacatto_factor= 0.902;
try {
while (!ScanKey) {
Play("3sCGCGetADD2sG3G2G3GFAFADDDDqGsB2G3B2G3qG");
Loaded 100 of 1095 files, more files were not shown because too many files have changed in this diff. Show more