Skip to content

Commit

Permalink
TempleOS V5.03 Nightly (ISO SHA-1 9d79d10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry A. Davis authored and ohnxbot committed Sep 9, 2018
1 parent 3b252c6 commit 9318165
Show file tree
Hide file tree
Showing 20 changed files with 94 additions and 56 deletions.
Binary file modified 0000Boot/0000Kernel.BIN.C
Binary file not shown.
2 changes: 1 addition & 1 deletion Adam/ADefine.HC
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ U0 LoadDocDefines()
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$

$TR,"LineRep"$
$ID,2$DefinePrint("DD_TEMPLEOS_LOC","80,845");
$ID,2$DefinePrint("DD_TEMPLEOS_LOC","80,849");
$ID,-2$
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END","%08X",
Expand Down
13 changes: 5 additions & 8 deletions Adam/ASnd.HC
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,11 @@ per second. It defaults to
ona=ONA_REST;
if (words && (word=LstSub(i++,words)) && StrCmp(word," "))
"%s",word;

d=JIFFY_FREQ*music.note_len/music.tempo;
if (tie) {
on_jiffies =d;
off_jiffies =0;
} else {
on_jiffies =d*music.stacatto_factor;
off_jiffies =d*(1.0-music.stacatto_factor);
}
on_jiffies =d*music.stacatto_factor;
off_jiffies =d*(1.0-music.stacatto_factor);

timeout_val+=on_jiffies;
timeout_val2=timeout_val+off_jiffies;

Expand All @@ -291,7 +288,7 @@ per second. It defaults to
SleepUntil(timeout_val);
music.tM_correction+=on_jiffies-ToI64(on_jiffies);

if (!music.mute)
if (!music.mute && !tie)
Snd;
SleepUntil(timeout_val2);
music.tM_correction+=off_jiffies-ToI64(off_jiffies);
Expand Down
41 changes: 18 additions & 23 deletions Adam/Gr/SpriteEd.HC
Original file line number Diff line number Diff line change
Expand Up @@ -296,38 +296,38 @@ CSprite *SpriteTransformBitMap(I64 *r,CSprite *tmpg)
I64 x,y,z,minx,maxx,miny,maxy,minz,maxz;
CSprite *tmpg1;

x=0; y=0; z=0;
x=tmpg->pwhu.x1; y=tmpg->pwhu.y1; z=0;
Mat4x4MulXYZ(r,&x,&y,&z);
minx=maxx=x;
miny=maxy=y;
minz=maxz=z;

x=0; y=tmpg->pwhu.height; z=0;
x=tmpg->pwhu.x1; y=tmpg->pwhu.y1+tmpg->pwhu.height; z=0;
Mat4x4MulXYZ(r,&x,&y,&z);
if (x<minx) minx=x;
if (x>maxx) maxx=x;
if (y<minx) miny=y;
if (y>maxx) maxy=y;
if (z<minx) minz=z;
if (z>maxx) maxz=z;
if (y<miny) miny=y;
if (y>maxy) maxy=y;
if (z<minz) minz=z;
if (z>maxz) maxz=z;

x=tmpg->pwhu.width; y=0; z=0;
x=tmpg->pwhu.x1+tmpg->pwhu.width; y=tmpg->pwhu.y1; z=0;
Mat4x4MulXYZ(r,&x,&y,&z);
if (x<minx) minx=x;
if (x>maxx) maxx=x;
if (y<minx) miny=y;
if (y>maxx) maxy=y;
if (z<minx) minz=z;
if (z>maxx) maxz=z;
if (y<miny) miny=y;
if (y>maxy) maxy=y;
if (z<minz) minz=z;
if (z>maxz) maxz=z;

x=tmpg->pwhu.width; y=tmpg->pwhu.height; z=0;
x=tmpg->pwhu.x1+tmpg->pwhu.width; y=tmpg->pwhu.y1+tmpg->pwhu.height; z=0;
Mat4x4MulXYZ(r,&x,&y,&z);
if (x<minx) minx=x;
if (x>maxx) maxx=x;
if (y<minx) miny=y;
if (y>maxx) maxy=y;
if (z<minx) minz=z;
if (z>maxx) maxz=z;
if (y<miny) miny=y;
if (y>maxy) maxy=y;
if (z<minz) minz=z;
if (z>maxz) maxz=z;

dc3=DCNew(maxx-minx+1,maxy-miny+1);

Expand All @@ -345,8 +345,8 @@ CSprite *SpriteTransformBitMap(I64 *r,CSprite *tmpg)
DCMat4x4Set(dc3,r);
dc3->flags|=DCF_TRANSFORMATION;

dc3->x=-minx;
dc3->y=-miny;
dc3->x=tmpg->pwhu.x1-minx;
dc3->y=tmpg->pwhu.y1-miny;
dc3->z=-minz;
GrBlot3(dc3,0,0,0,img);
Free(img);
Expand All @@ -363,11 +363,6 @@ CSprite *SpriteTransformBitMap(I64 *r,CSprite *tmpg)
tmpg1->pwhu.x1=x;
tmpg1->pwhu.y1=y;

x=0; y=0; z=0;
Mat4x4MulXYZ(r,&x,&y,&z);
tmpg1->pwhu.x1+=minx-x;
tmpg1->pwhu.y1+=miny-y;

return tmpg1;
}

Expand Down
16 changes: 14 additions & 2 deletions Adam/Opt/Utils/TOS.HC
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ U0 TOSStaffIns()
"$$PURPLE$$$$TX+CX,\"Complete TOS install from TOS_Staff.ISO\"$$$$FG$$\n\n\n\n";
InsRereg;

"\nDownload TOS_Supplemental1.ISO.C\tfrom http://www.templeos.org\n";
"\nDownload TOS_Supplemental1.ISO.C\tfrom http://www.templeos.org\n"
"Download TOS_Supplemental2.ISO.C\tfrom http://www.templeos.org\n"
"Download TOS_Supplemental3.ISO.C\tfrom http://www.templeos.org\n";

if (PressAKey!=CH_SHIFT_ESC) {
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental1.ISO.C"))
CopyTree("T:/","~/Sup1");
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental2.ISO.C"))
CopyTree("T:/","~/Sup2");
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental3.ISO.C"))
CopyTree("T:/","~/Sup3");

Once("TOSBootHDIns;");
"\nDo you wish to run >$FG,2$TOSRegen;$FG$ to generate\n the "
Expand All @@ -41,13 +47,19 @@ public U0 TOSStdIns()
"$$PURPLE$$$$TX+CX,\"Complete TOS install from TOS_Distro.ISO\"$$$$FG$$\n\n\n\n";
InsRereg;

"\nDownload TOS_Supplemental1.ISO.C\tfrom http://www.templeos.org\n";
"\nDownload TOS_Supplemental1.ISO.C\tfrom http://www.templeos.org\n"
"Download TOS_Supplemental2.ISO.C\tfrom http://www.templeos.org\n"
"Download TOS_Supplemental3.ISO.C\tfrom http://www.templeos.org\n";

if (PressAKey!=CH_SHIFT_ESC) {
if (FileFind("/Demo/AcctExample"))
CopyTree("::/Demo/AcctExample","~");
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental1.ISO.C"))
CopyTree("T:/","~/Sup1");
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental2.ISO.C"))
CopyTree("T:/","~/Sup2");
if (HostChgDsk("/home/tad/Downloads/TOS_Supplemental3.ISO.C"))
CopyTree("T:/","~/Sup3");

Once("TOSBootHDIns;");
"\nDo you wish to run >$FG,2$TOSRegen;$FG$ to generate\n the distro ISO's ";
Expand Down
6 changes: 6 additions & 0 deletions Apps/Psalmody/JukePuppet.HC
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,17 @@ public U0 JukeSongsPuppet(U8 *dirname="~/Psalmody",I64 passes=2,
I64 i;
CDirEntry *tmpde,*tmpde1;
CTask *juke_task=User("JukeBox(0x%X);\n",dirname);
F64 t0;
Cd(dirname);
tmpde1=FilesFind("*",FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES);
for (tmpde=tmpde1,i=0;tmpde && i<start_song;i++)
tmpde=tmpde->next;
if (scrncast.record)
t0=scrncast.t0_tS;
else
t0=tS;
for (i=start_song;tmpde && i<end_song;i++) {
"%12.6fs %s\n",tS-t0,tmpde->full_name;
JukeSongPuppet(juke_task,passes,i,tmpde->name);
tmpde=tmpde->next;
}
Expand Down
Binary file modified Compiler/Compiler.BIN
Binary file not shown.
4 changes: 2 additions & 2 deletions Demo/AcctExample/HomeKeyPlugIns.HC
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ Bool MyPutKey(I64 ch,I64 sc)
KeyDescSet("Cmd /JukeBox");
else
PopUp("#include \"::/Apps/Psalmody/Load\";"
"JukeBox(\"::/Home/Sup1/Sup1Hymns\");");
"JukeBox(\"::/Home/Sup3/Sup3Hymns\");");
return TRUE;
case 'P':
if (sc&SCF_KEY_DESC)
KeyDescSet("Cmd /Psalmody");
else
PopUp("#include \"::/Apps/Psalmody/Load\";"
"Psalmody(\"~/Sup1/Sup1Hymns\");");
"Psalmody(\"~/Sup3/Sup3Hymns\");");
return TRUE;

//Ins your own ALT-key plug-ins
Expand Down
Binary file modified Demo/AcctExample/PersonalMenu.DD
Binary file not shown.
2 changes: 2 additions & 0 deletions Demo/AcctExample/PersonalNotes.DD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$

* Does entire tool chain support super/sub script?

* 170624 $LK,"DskChk",A="MN:DskChk"$() showed extra alloced clus for FAT32, Sup1Hymns. ClusNum was '.'+1 and clus was zero.

* $LK,"::/Apps/X-Caliber/X-Caliber.HC"$
* Add asteroid harbor defense.
* Afterburner thruster.
Expand Down
2 changes: 1 addition & 1 deletion Demo/AcctExample/Registry.HC
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $ID,-2$$TR,"Titanium"$
$ID,2$I64 best_score=16469;
$ID,-2$$TR,"TOSRegen"$
$ID,2$progress1_tf=0.000;progress2_tf=0.000;
progress3_tf=0.000;progress4_tf=341.847;
progress3_tf=0.000;progress4_tf=256.163;
$ID,-2$$ID,-2$$TR,"Once"$
$ID,2$$TR,"Adam"$
$ID,2$$ID,-2$$TR,"User"$
Expand Down
19 changes: 16 additions & 3 deletions Demo/AcctExample/TOS/TOSDistro.HC
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public U0 TOSCopyDrv(U8 src,U8 dst)
src=Let2Let(src);
dst=Let2Let(dst);

Fmt(dst,,FALSE,FSt_FAT32);
if (dst=='D')
Fmt(dst,,FALSE,FSt_FAT32);
else
Fmt(dst,,FALSE,FSt_REDSEA);

StrPrint(buf_s,"%c:/",src);
StrPrint(buf_d,"%c:/",dst);
Expand Down Expand Up @@ -69,6 +72,8 @@ U0 DistroPrep()
CopyTree("/Home","/Demo/AcctExample");
DelTree("/Demo/AcctExample/TAD");
DelTree("/Demo/AcctExample/Sup1");
DelTree("/Demo/AcctExample/Sup2");
DelTree("/Demo/AcctExample/Sup3");
Del("/Demo/AcctExample/Test*");
if (FileFind("~/Sup1/Sup1Utils/SortHeaders.HC.Z"))
ExeFile("~/Sup1/Sup1Utils/SortHeaders.HC.Z");
Expand Down Expand Up @@ -125,6 +130,8 @@ U0 StaffDistroPrep()
DelTree(TOS_DISTRO_DIR);
CopyTree("C:/",TOS_DISTRO_DIR "/");
DelTree(TOS_DISTRO_DIR "/Home/Sup1");
DelTree(TOS_DISTRO_DIR "/Home/Sup2");
DelTree(TOS_DISTRO_DIR "/Home/Sup3");
Del(TOS_DISTRO_DIR "/" KERNEL_BIN_C);
}
U0 MakeStaffDistro()
Expand Down Expand Up @@ -239,7 +246,7 @@ U0 TOSProgress(U8 *st)
progress4=tos_progress;
progress3_max=1;
*progress4_desc=0;
progress4_max=8+MAKE_DBG+MAKE_STAFF;
progress4_max=9+MAKE_DBG+MAKE_STAFF;
progress4_t0=tos_progress_t0;
StrPrint(buf,"%d. %s",++progress4,st);
"$$PURPLE$$$$TX+CX,\"%s\"$$$$FG$$\n",buf;
Expand Down Expand Up @@ -275,6 +282,12 @@ U0 TOSRegen2()
TOSProgress("Make Supplemental1 ISO");
RedSeaISO("D:/Downloads/TOS_Supplemental1","C:/Home/Sup1");

TOSProgress("Make Supplemental2 ISO");
RedSeaISO("D:/Downloads/TOS_Supplemental2","C:/Home/Sup2");

TOSProgress("Make Supplemental3 ISO");
RedSeaISO("D:/Downloads/TOS_Supplemental3","C:/Home/Sup3");

#if MAKE_DBG
TOSProgress("Make Dbg Distro ISO");
MakeDbgDistro;
Expand Down Expand Up @@ -316,7 +329,7 @@ U0 TOSRegen2()
}

public U0 TOSPreRegen()
{//Copy bookmarks and bins from D:/Home/Sup1 to C:/Home/Sup1
{//Copy bins from D:/Home/Sup1 to C:/Home/Sup1
Copy("D:/Home/" INS_REG_PERSONAL_INITIALS "/*",
"C:/Home/" INS_REG_PERSONAL_INITIALS);
DelTree("C:/Home/Sup1/Sup1Bin");
Expand Down
25 changes: 16 additions & 9 deletions Demo/AcctExample/TOS/TOSMisc.HC
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,42 @@ public U0 FrameGrabberToggle(Bool sync_tone,Bool tos_theme,
}
}

public U0 JukeSong(I64 num,I64 passes=2)
public U0 JukeSong(I64 vol,I64 num,I64 passes=2)
{//Make movie of one song.
U8 *st=MStrPrint("~/Sup%d/Sup%dHymns",vol,vol);
if (!fg_on)
FrameGrabberToggle(FALSE,FALSE);
JukeSongsPuppet("~/Sup1/Sup1Hymns",passes,num,num+1);
JukeSongsPuppet(st,passes,num,num+1);
if (fg_on)
FrameGrabberToggle(FALSE,FALSE);
Free(st);
}

public U0 JukeLines(I64 start_line,I64 end_line)
public U0 JukeLines(I64 vol,I64 start_line,I64 end_line)
{//Make movie of many lines of songs, starting at 0.
U8 *st=MStrPrint("~/Sup%d/Sup%dHymns",vol,vol);
if (!fg_on)
FrameGrabberToggle(FALSE,FALSE);
JukeSongsPuppet("~/Sup1/Sup1Hymns",,start_line*5,end_line*5);
JukeSongsPuppet(st,,start_line*5,end_line*5);
if (fg_on)
FrameGrabberToggle(FALSE,FALSE);
Free(st);
}

public U0 TADHymn(I64 num)
{//Make 2-lines of songs movie starting at 1.
JukeLines((num-1)*2,num*2);
public U0 TADHymns(I64 vol,I64 let)
{//Make 2-lines of songs movie
I64 line=2*(ToUpper(let)-'A');
JukeLines(vol,line,line+2);
}

#help_index "Misc/TOS"
public U0 DskChkAll()
{//DskChk on C & D.
U8 *ptr=TOS_HDS;
while (*ptr)
DskChk(*ptr++);
while (*ptr) {
"DskChk('%c')\n",*ptr;
DskChk(*ptr++,TRUE);
}
}

public CDoc *DC2Doc(CDC *dc,I64 dx=0,I64 dy=0,I64 *_total_score=NULL)
Expand Down
Binary file modified Demo/Games/Squirt.HC
Binary file not shown.
Binary file modified Demo/Snd/WaterFowl.HC
Binary file not shown.
2 changes: 1 addition & 1 deletion Demo/ToHtmlToTXTDemo/ToHtml.HC
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
"<body>\n"
"<pre style=\"font-family:courier;font-size:10pt\">\n";
if (!body_footer) body_footer=
"</pre></body>\n</html>\n";
"</pre></body>\n";
if (!html_footer) html_footer=
"</html>\n";

Expand Down
9 changes: 7 additions & 2 deletions Demo/WebLogDemo/WebLogRep.HC
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,14 @@ Bool IsIndex(LogStruct *tmplg)

Bool IsKeeper(LogStruct *tmplg,CDate dstart,CDate dend)
{
if (dstart<=tmplg->datetime<=dend && !StrOcc(tmplg->file,'?'))
if (dstart<=tmplg->datetime<=dend && !StrOcc(tmplg->file,'?') &&
StrLen(tmplg->file)>2 && 'A'<=tmplg->file[1]<='Z' &&
tmplg->size && tmplg->file[StrLen(tmplg->file)-1]!='/' &&
(StrLen(tmplg->file)<3 || MemCmp(&tmplg->file[1],"Wb",2)) &&
(StrLen(tmplg->file)<7 || MemCmp(&tmplg->file[1],"Family",6))) {
return TRUE;
else

} else
return FALSE;
}

Expand Down
Binary file modified Downloads/Linux/TOSZ
Binary file not shown.
7 changes: 4 additions & 3 deletions Downloads/Linux/TOSZ.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ int SND2MP4Lst(char *snd_print_fmt,char *mp4_print_fmt,char *out_name,
}

int AU2SNDLst(char *au_name,char *snd_print_fmt,
char *mp4_print_fmt,char *out_name,int rate=24000)
char *mp4_print_fmt,char *out_name,double vol=1.0,int rate=24000)
{//Cvt AU file to SND lst to MP4
int num=0,snd_percent_cnt;
FILE *au_file;
Expand All @@ -998,7 +998,7 @@ int AU2SNDLst(char *au_name,char *snd_print_fmt,
else
snd_percent_cnt=0;
AURead(&head,au_name);
num=SndFileCreate(&head,snd_print_fmt);
num=SndFileCreate(&head,snd_print_fmt,vol);
QueDel(&head);
return SND2MP4Lst(snd_print_fmt,mp4_print_fmt,out_name,rate);
}
Expand All @@ -1008,6 +1008,7 @@ int main(int argc, char* argv[])
char *in_name,*out_name,st[256],*mv_print_fmt,*au_name;
BOOL cvt_ascii,del_in=FALSE;
int i=1,l;
double vol=0.1;
if (argc>i && !strcmp(argv[i],"-mp4")) {
i++;
if (argc>i)
Expand All @@ -1022,7 +1023,7 @@ int main(int argc, char* argv[])
(char *)"TOSZTEMP%06d.BMP",(char *)"TOSZTEMPVID%03d.MP4",
(char *)"TOSZVIDEO.MP4");
AU2SNDLst(au_name,(char *)"TOSZTEMP%03d.SND",
(char *)"TOSZTEMPAUD%03d.MP4",(char *)"TOSZAUDIO.MP4");
(char *)"TOSZTEMPAUD%03d.MP4",(char *)"TOSZAUDIO.MP4",vol);
if (argc>i)
out_name=argv[i++];
else
Expand Down
2 changes: 1 addition & 1 deletion Kernel/KernelC.HH
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ public extern U0 SndRst();

#help_index "StdIn"
#help_file "::/Doc/Streams"

#help_index "StdOut"
#help_file "::/Doc/Streams"

Expand Down Expand Up @@ -729,6 +728,7 @@ public extern CTask *Spawn(U0 (*fp_addr)(U8 *data),U8 *data=NULL,

#help_index "Time/CPU Cycles;Time/HPET;Time/Jiffies"
public extern CCntsGlbls cnts;

#help_index "Time/Date/CDate;Date/CDate"
#help_file "::/Doc/TimeDate"
public extern U0 Date2Struct(CDateStruct *_ds,CDate cdt);
Expand Down

0 comments on commit 9318165

Please sign in to comment.