TempleOSCDV4.10.ISO
This commit is contained in:
1 parent
c5954d3371
commit
9206246147
181 files changed
+4468
-4313
No files matched your search
@@ -41,7 +41,7 @@ U0 DocHiddenDel(CDoc *doc=NULL)
|
||||
if (doc) {
|
||||
unlock=DocLock(doc);
|
||||
DocRecalc(doc);
|
||||
doc_e=doc->root.next;
|
||||
doc_e=doc->head.next;
|
||||
while (doc_e!=doc) {
|
||||
doc_e1=doc_e->next;
|
||||
if (doc_e->de_flags&(DOCEF_FILTER_SKIP|DOCEF_SKIP))
|
||||
@@ -165,7 +165,7 @@ Bool MyPutKey(I64 ch,I64 sc)
|
||||
else {
|
||||
FifoU8Flush(god.fifo);
|
||||
GodBitsIns(GOD_GOOD_BITS,KbdMouseEvtTime>>GOD_BAD_BITS);
|
||||
GodBooksPassage("C:/Home/Downloads/Text/*");
|
||||
GodBooksPassage("C:/Home/Sup1/Sup1Texts/*");
|
||||
}
|
||||
} else {
|
||||
if (sc&SCF_KEY_DESC)
|
||||
@@ -319,9 +319,9 @@ Bool MyPutKey(I64 ch,I64 sc)
|
||||
return TRUE;
|
||||
case 'p':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
KeyDescSet("Cmd /JukeBox(Home/Downloads)");
|
||||
KeyDescSet("Cmd /JukeBox(Home/Sup1)");
|
||||
else
|
||||
JukeBox("~/Downloads/Psalmody");
|
||||
JukeBox("~/Sup1/Sup1Psalmody");
|
||||
return TRUE;
|
||||
case 'P':
|
||||
if (sc&SCF_KEY_DESC)
|
||||
|
||||
@@ -9,7 +9,7 @@ U0 UserStartUp()
|
||||
WinToTop;
|
||||
WinZBufUpdate;
|
||||
Dir;
|
||||
"$TX,"80,142",D="DD_TEMPLEOS_LOC_OFFICIAL"$LOC:";
|
||||
"$TX,"81,125",D="DD_TEMPLEOS_LOC_OFFICIAL"$LOC:";
|
||||
CPURep;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#help_index "Cmd Line (Typically)"
|
||||
|
||||
#define FILEMASK_OFF_LIMITS "!*/Misc/PCIDevices.TXT*;!*/Misc/Bible.TXT*;"\
|
||||
"!*/Downloads/Text/*;!*/Downloads/Words/*;!*/Downloads/Bin/*;"\
|
||||
"!*/Sup1/Sup1Texts/*;!*/Sup1/Sup1Words/*;!*/Sup1/Sup1Bin/*;"\
|
||||
"!*/God/Vocab.TXT*"
|
||||
|
||||
public I64 F(U8 *needle_str,U8 *fu_flags=NULL)
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
$WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
* $LK,"::/Demo/Games/RawHide.CPP"$ fix waterfall code so not in center.
|
||||
* Cursor in $LK,"::/Home/TOSToHtml.CPP"$.
|
||||
|
||||
* Investigate why packet loss $LK,"Training Sleep(1)",A="FF:::/Adam/Training.CPP,Sleep(1)"$.
|
||||
|
||||
@@ -10,8 +10,7 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
* God said this is bad. $LK,"FL:::/Adam/DolDoc/DocFind.CPP,41"$
|
||||
* Backward <SHIFT-F3> is broken?
|
||||
|
||||
* Cannot entering a '$$' in $$TX command's tag.
|
||||
|
||||
* Cannot include ':' in $LK,"Document Links",A="FF:::/Adam/DolDoc/DocLink.CPP,AD"$ search string.
|
||||
* $$DA fixed width string: <Del> or <BACKSPACE> permanently shortens.
|
||||
|
||||
* Editor overstrike mode at cmd line with menu macro? Probably, many other overstrike issues.
|
||||
@@ -20,8 +19,6 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* $LK,"FL:::/Adam/Gr/SpriteEd.CPP,789"$ Resize bitmap?
|
||||
|
||||
* Cannot include ':' in $LK,"Document Links",A="FF:::/Adam/DolDoc/DocLink.CPP,AD"$ search string.
|
||||
|
||||
* $LK,"DOCEF_REMALLOC_DATA",A="FF:::/Adam/DolDoc/DocChar.CPP,DOCEF_REMALLOC_DATA"$ HexEdit Remalloc.
|
||||
|
||||
* $LK,"DOCF_DBL_DOLLARS",A="MN:DOCF_DBL_DOLLARS"$ in $LK,"Reindention",A="MN:EdCodeTools2"$.
|
||||
@@ -52,7 +49,7 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* Use pen_width and pen_height when clipping with pen_width>1.
|
||||
|
||||
* $LK,"~/Downloads/Games/Rocks.CPP"$.
|
||||
* $LK,"~/Sup1/Sup1Games/Rocks.CPP"$.
|
||||
|
||||
* Asm LIST NOLIST bugs.
|
||||
|
||||
@@ -69,6 +66,8 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* $LK,"GrLineFat3",A="MN:GrLineFat3"$() needs a little work.
|
||||
|
||||
* $LK,"GrFillTri0",A="MN:GrFillTri0"$() with both $LK,"GrHLine",A="MN:GrHLine"$() and $LK,"GrVLine",A="MN:GrVLine"$() don't match in $LK,"::/Demo/Games/CastleFrankenstein.CPP"$ causing wall spot pixels.
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"TODO? Meh"$$FG$
|
||||
* Compiler: lock{} needs warn on invalid modes or something.
|
||||
@@ -153,7 +152,6 @@ $FG,5$$TX+CX,"Bugs? Not really sure."$$FG$
|
||||
* 1/1/2015 Bug messing-up keyboard, like no CTRL key. Was working on Sprites.
|
||||
|
||||
* 4/13/14 Strut or RawHide crashed when $LK,"sys_var_init_flag",A="MN:sys_var_init_flag"$ was set during testsuite. Perhaps, floodfill?
|
||||
* 3/19/14: RESET during RawHide.
|
||||
|
||||
* $LK,"ChkDsk",A="MN:ChkDsk"$ alloc unalloced. I don't know if I fixed this.
|
||||
|
||||
@@ -268,7 +266,7 @@ $FG,5$$TX+CX,"Committee Needed"$$FG$
|
||||
|
||||
* Note: We will never put multiple $LK,"Keyboard Tables",A="FI:::/Kernel/SerialDev/Keyboard.CPP"$. Each country must make their own version of TempleOS. The $LK,"Intel Factory ROM",A="FF:::/Doc/Demands.TXT,English"$ will have just English. Our $LK,"Charter",A="FI:::/Doc/Charter.TXT"$ bans multiple country or architectures in the same version.
|
||||
|
||||
* 12 border chars in screen font codes 0x02-0x0D. $LK,"TextBorder",A="MN:TextBorder"$() $LK,"RawDr",A="MN:RawDr"$() LineFeed shows-up in $FG,2$<CTRL-m>$FG$ PersonalMenu.
|
||||
* 12 border chars in screen font codes 0x02-0x0D. $LK,"TextBorder",A="MN:TextBorder"$() $LK,"RawDr",A="MN:RawDr"$() $LK,"::/Demo/Games/CharDemo.CPP"$. LineFeed shows-up in $FG,2$<CTRL-m>$FG$ PersonalMenu.
|
||||
|
||||
* Super-simple high speed serial needs flow control. $FG,2$<CTRL-s>$FG$ and $FG,2$<CTRL-q>$FG$?
|
||||
|
||||
@@ -410,10 +408,10 @@ New wineskins $TX,"Mark 2:22",HTML="http://www.biblegateway.com/verse/en/Mark
|
||||
$FG,5$$TX+CX,"Misc Notes"$$FG$
|
||||
Intel CEO's name: Brian Krzanich
|
||||
>$FG,2$lspci -v$FG$
|
||||
Size:$TX,"17412 KB",D="DD_TEMPLEOSCD_K_SIZE"$
|
||||
Size:$TX,"17422 KB",D="DD_TEMPLEOSCD_K_SIZE"$
|
||||
|
||||
$FG,5$$TX+CX,"My Web Bookmarks"$$FG$$WW,0$
|
||||
$TX,"My FireFox Bookmarks",HTML="http://www.templeos.org/Wb/Home/Downloads/Blog/Bookmarks"$
|
||||
$TX,"My FireFox Bookmarks",HTML="http://www.templeos.org/Wb/Home/Sup1/Sup1Blog/Bookmarks"$
|
||||
Machine $HC,"<center><img src=\"http://www.templeos.org/images/Machine.jpg\" width=\"600\" height=\"400\" alt=\"\"></center>"$
|
||||
Frosting $HC,"<center><img src=\"http://www.templeos.org/images/Frosting.jpg\" width=\"600\" height=\"400\" alt=\"\"></center>"$
|
||||
Soap Carvings $HC,"<center><img src=\"http://www.templeos.org/images/SoapCarvings.jpg\" width=\"640\" height=\"480\" alt=\"\"></center>"$
|
||||
@@ -437,7 +435,6 @@ qFeDAsBDeDqCeF2G3sGGeF2sG3C2G3CBCeF
|
||||
|
||||
$FG,5$$TX+CX,"Web Bookmarks"$$FG$
|
||||
Cop tying shoe $HC,"<center><img src=\"https://goodtimestories.files.wordpress.com/2013/04/cop-tying-shoe-cambridge-county-pd.jpg\" width=\"480\" height=\"376\" alt=\"\"></center>"$
|
||||
$TX,"Good Time Bad Times Lyrics",HTML="https://www.google.com/#q=led+zep+good+times+bad+times+lyrics"$
|
||||
$TX,"Unikernels",HTML="https://ma.ttias.be/what-is-a-unikernel"$
|
||||
$TX,"Handford school",HTML="https:/pinterest.com/pin/255368241346360278"$
|
||||
$TX,"Look at PCI interrupt routing.",HTML="http://forum.osdev.org/viewtopic.php?f=1&t=29558"$
|
||||
@@ -445,8 +442,9 @@ $TX,"The sins of Newton",HTML="https://www.brainpickings.org/2012/01/04/isaac-ne
|
||||
$TX,"Stalin's Tanks",HTML="https://boardgamegeek.com/boardgame/5198/stalins-tanks"$
|
||||
$TX,"Lamp shades",HTML="http://www.lampsplus.com/products/lamp-shades"$
|
||||
$TX,"The Original Jewish Temple",HTML="http://www.jewishvirtuallibrary.org/jsource/Judaism/The_Temple.html"$
|
||||
$TX,"KingJamesBible with LineNums",HTML="http://www.templeos.org/files/NumBible.TXT"$
|
||||
$TX,"KingJamesBible with LineNums",HTML="http://www.templeos.org/Wb/Home/Sup1/Sup1Blog/NumBible.TXT"$
|
||||
$TX,"Higgs 5-Sigma Proof",HTML="http://understandinguncertainty.org/explaining-5-sigma-higgs-how-well-did-they-do"$
|
||||
$TX,"The Number Bleem",HTML="http://www.strangehorizons.com/2000/20001120/secret_number.shtml"$
|
||||
$TX,"Dwight: Nerd torture",HTML="http://www.noob.us/humor/the-office-dwight-faces-nerd-torture-of-the-highest-form"$
|
||||
$TX,"TOSZ Compression",HTML="http://www.templeos.org/Wb/Linux/TOSZ.CPP"$
|
||||
$TX,"ATA/ATAPI spec",HTML="http://www.t13.org/Documents/UploadedDocuments/docs2007/D1532v1r4b-AT_Attachment_with_Packet_Interface_-_7_Volume_1.pdf"$
|
||||
|
||||
@@ -2,8 +2,8 @@ $TR-UL,"Adam"$
|
||||
$ID,2$$TR,"SysMsgFlags"$
|
||||
$ID,2$sys_msg_flags[0]=0xFF;
|
||||
$ID,-2$$TR,"SysRegVer"$
|
||||
$ID,2$registry_version=4.090;
|
||||
$ID,-2$$ID,-2$$TR-C-UL,"TempleOS"$
|
||||
$ID,2$registry_version=4.100;
|
||||
$ID,-2$$ID,-2$$TR-UL,"TempleOS"$
|
||||
$ID,2$$TR,"TOS"$
|
||||
$ID,2$I64 tos_code_walk_thru=105,tos_after_egypt_in_action=46;
|
||||
$ID,-2$$TR,"CircleTrace"$
|
||||
@@ -13,37 +13,37 @@ $ID,2$F64 best_score=9999.0000;
|
||||
$ID,-2$$TR,"Staff"$
|
||||
$ID,2$#define PERSONAL_INITIALS "TAD"
|
||||
#define MACHINE_CFG 0
|
||||
$ID,-2$$TR,"BlackDiamond"$
|
||||
$ID,2$I64 best_score=9;
|
||||
$ID,-2$$TR,"DunGen"$
|
||||
$ID,2$F64 best_score=20.5295;
|
||||
$ID,-2$$TR,"ZoneOut"$
|
||||
$ID,2$F64 best_score=8.1373;
|
||||
$ID,-2$$TR,"Varoom"$
|
||||
$ID,2$F64 best_score=46.2643;
|
||||
$ID,-2$$TR,"FlapBat"$
|
||||
$ID,2$F64 best_score=16.4090;
|
||||
$ID,-2$$TR,"TimeOut"$
|
||||
$ID,2$I64 best_score=22202;
|
||||
$ID,-2$$TR,"RawHide"$
|
||||
$ID,2$F64 best_score=96.1279;
|
||||
$ID,-2$$TR,"KeepAway"$
|
||||
$ID,2$I64 best_score0=68,best_score1=30;
|
||||
$ID,-2$$TR,"CastleFrankenstein"$
|
||||
$ID,2$F64 best_score=33.8405;
|
||||
$ID,-2$$TR,"ZoneOut"$
|
||||
$ID,2$F64 best_score=8.1373;
|
||||
$ID,-2$$TR,"DunGen"$
|
||||
$ID,2$F64 best_score=20.5295;
|
||||
$ID,-2$$TR,"Wenceslas"$
|
||||
$ID,2$F64 best_score=43.9944;
|
||||
$ID,-2$$TR,"FlapBat"$
|
||||
$ID,2$F64 best_score=16.3077;
|
||||
$ID,-2$$TR,"RawHide"$
|
||||
$ID,2$F64 best_score=96.1279;
|
||||
$ID,-2$$TR,"Varoom"$
|
||||
$ID,2$F64 best_score=46.2643;
|
||||
$ID,-2$$TR,"TimeOut"$
|
||||
$ID,2$I64 best_score=22202;
|
||||
$ID,-2$$TR,"BlackDiamond"$
|
||||
$ID,2$I64 best_score=9;
|
||||
$ID,-2$$TR,"BomberGolf"$
|
||||
$ID,2$I64 best_score=175;
|
||||
$ID,-2$$TR,"XCaliber"$
|
||||
$ID,2$I64 best_score=248;
|
||||
I64 msg_flags=1;
|
||||
$ID,-2$$TR,"Wenceslas"$
|
||||
$ID,2$F64 best_score=43.9944;
|
||||
$ID,-2$$TR,"BomberGolf"$
|
||||
$ID,2$I64 best_score=175;
|
||||
$ID,-2$$TR,"CastleFrankenstein"$
|
||||
$ID,2$F64 best_score=33.8405;
|
||||
$ID,-2$$TR,"EagleDive"$
|
||||
$ID,2$I64 best_score=8;
|
||||
$ID,2$F64 best_score=147.6932;
|
||||
$ID,-2$$ID,-2$$TR,"DemoCompany"$
|
||||
$ID,2$
|
||||
$TR,"Game1"$
|
||||
$ID,2$F64 best_score=168.87967;
|
||||
$ID,2$F64 best_score=388.68032;
|
||||
$TR,"SimpleVal"$
|
||||
$ID,2$1330;
|
||||
$ID,2$1332;
|
||||
$ID,-2$$ID,-2$
|
||||
@@ -75,7 +75,7 @@ U0 BlogScreenShot()
|
||||
gr.fp_draw_input_ptr=NULL;
|
||||
WinMgrSync(2);
|
||||
dc1=DCScreenCapture;
|
||||
dc2=DCExtract(dc1,0,FONT_HEIGHT,GR_WIDTH-1,GR_HEIGHT-1);
|
||||
dc2=DCExt(dc1,0,FONT_HEIGHT,GR_WIDTH-1,GR_HEIGHT-1);
|
||||
BlogDCImgWrite(dc2);
|
||||
gr.fp_draw_input_ptr=old_fp_draw_input_ptr;
|
||||
DCDel(dc1);
|
||||
@@ -89,7 +89,7 @@ public U0 MakeWebSitePartial()
|
||||
MkDir("D:/Wb/Home");
|
||||
MkDir("D:/Wb/Home/Web");
|
||||
MkDir("D:/Wb/Home/Web/TAD");
|
||||
MkDir("D:/Wb/Home/Web/TAD/Blog");
|
||||
MkDir("D:/Wb/Home/Web/TAD/BlogDir");
|
||||
|
||||
FreshenWebDir("/Home/Web");
|
||||
FreshenWebDir("/Home/Web/" PERSONAL_INITIALS);
|
||||
@@ -109,6 +109,7 @@ public U0 Blog()
|
||||
Msg(MSG_KEY_DOWN_UP,0,SC_F6|SCF_ALT);
|
||||
Msg(MSG_KEY_DOWN_UP,'\n',0);
|
||||
if (Ed(BlogLocalFile,EDF_WAS_WRITE)) {
|
||||
DocOpt(BlogLocalFile,"-r");
|
||||
Copy(BlogLocalFile,"::" DAILY_BASE ".TXT.Z");
|
||||
Copy(BlogLocalFile,"D:" DAILY_BASE ".TXT.Z");
|
||||
Copy(BlogLocalFile,"D:/Wb" DAILY_BASE ".TXT.Z");
|
||||
|
||||
@@ -7,7 +7,7 @@ RegSetDftEntry("TempleOS/Staff",
|
||||
RegExeBranch("TempleOS/Staff");
|
||||
|
||||
#define PERSONAL_WEB "http:/" "/www.templeos.org/Wb"
|
||||
#define BLOG_BASE "/Home/Web/" PERSONAL_INITIALS "/Blog"
|
||||
#define BLOG_BASE "/Home/Web/" PERSONAL_INITIALS "/BlogDir"
|
||||
#define DAILY_BASE "/Home/Web/" PERSONAL_INITIALS "/DailyBlog"
|
||||
#define BLOG_LOCAL_BASE "::" BLOG_BASE
|
||||
#define BLOG_WEB_BASE PERSONAL_WEB BLOG_BASE
|
||||
|
||||
@@ -51,13 +51,13 @@ public U0 CopySongs(U8 threshold='7')
|
||||
{
|
||||
CDoc *doc;
|
||||
CDocEntry *doc_e;
|
||||
CDirEntry *tempde=FilesFind("/Home/Downloads/Psalmody/*.CPP*",
|
||||
CDirEntry *tempde=FilesFind("/Home/Sup1/Sup1Psalmody/*.CPP*",
|
||||
FUF_CLUSTER_ORDER),*tempde1=tempde;
|
||||
DelTree("/Apps/Psalmody/Examples");
|
||||
MkDir("/Apps/Psalmody/Examples");
|
||||
while (tempde) {
|
||||
doc=DocRead(tempde->full_name);
|
||||
doc_e=doc->root.next;
|
||||
doc_e=doc->head.next;
|
||||
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag[2]>=threshold)
|
||||
Copy(tempde->full_name,"/Apps/Psalmody/Examples");
|
||||
DocDel(doc);
|
||||
@@ -70,7 +70,7 @@ U0 DistroPrep()
|
||||
{
|
||||
Del("/Home/Demo*");
|
||||
DelTree("/Home/*Temp.TXT.Z");
|
||||
if (FileFind("/Home/Downloads/Psalmody"))
|
||||
if (FileFind("/Home/Sup1/Sup1Psalmody"))
|
||||
CopySongs;
|
||||
|
||||
DelTree("/Temp");
|
||||
@@ -84,17 +84,18 @@ U0 DistroPrep()
|
||||
CopyTree("/Home","/Demo/AcctExample");
|
||||
DelTree("/Demo/AcctExample/Budget");
|
||||
DelTree("/Demo/AcctExample/Private");
|
||||
DelTree("/Demo/AcctExample/Downloads");
|
||||
DelTree("/Demo/AcctExample/Sup1");
|
||||
DelTree("/Demo/AcctExample/Web");
|
||||
Del("/Demo/AcctExample/Test*");
|
||||
Copy("/Home/Web/index.TXT.Z",
|
||||
"/Demo/ToHtmlToTXTDemo/DemoInPage.TXT.Z");
|
||||
if (FileFind("/Home/Sup1/Sup1Utils/SortHeaders.CPP.Z"))
|
||||
ExeFile("/Home/Sup1/Sup1Utils/SortHeaders.CPP.Z");
|
||||
|
||||
if (FileFind("/Home/Downloads/Utils/SortHeaders.CPP.Z"))
|
||||
ExeFile("/Home/Downloads/Utils/SortHeaders.CPP.Z");
|
||||
if (FileFind("/Home/Sup1/Sup1Blog/YouTube.TXT.Z"))
|
||||
Sort("/Home/Sup1/Sup1Blog/YouTube.TXT.Z",,2);
|
||||
|
||||
if (FileFind("/Home/Downloads/Blog/YouTube.TXT.Z"))
|
||||
Sort("/Home/Downloads/Blog/YouTube.TXT.Z",,2);
|
||||
|
||||
//Once in a while, do $LK,"~/Downloads/Utils/DblSpaceScan.CPP"$.
|
||||
//Once in a while, do $LK,"~/Sup1/Sup1Utils/DblSpaceScan.CPP"$.
|
||||
|
||||
CursorRem("/*");
|
||||
DelTree("/Demo/*.BI*");
|
||||
@@ -123,11 +124,11 @@ U0 MakeBootRescueDrvFile()
|
||||
Copy("C:/Kernel/*.HPP*", "A:/Kernel");
|
||||
CopyTree("C:/Kernel/BlkDev", "A:/Kernel/BlkDev");
|
||||
|
||||
Copy("C:/Home/Downloads/Distro/DbgStartOS.CPP.Z","A:/StartOS.CPP.Z");
|
||||
Copy("C:/Home/Sup1/Sup1Distro/DbgStartOS.CPP.Z","A:/StartOS.CPP.Z");
|
||||
|
||||
MkDir("A:/Adam");
|
||||
Copy("C:/Home/Downloads/Distro/DbgMakeAdam.CPP.Z","A:/Adam/MakeAdam.CPP.Z");
|
||||
Copy("C:/Home/Downloads/Distro/DbgMount.CPP.Z","A:/Adam");
|
||||
Copy("C:/Home/Sup1/Sup1Distro/DbgMakeAdam.CPP.Z","A:/Adam/MakeAdam.CPP.Z");
|
||||
Copy("C:/Home/Sup1/Sup1Distro/DbgMount.CPP.Z","A:/Adam");
|
||||
Copy("C:/Adam/AExts.CPP.Z", "A:/Adam");
|
||||
Copy("C:/Adam/AMath.CPP.Z", "A:/Adam");
|
||||
Copy("C:/Adam/Training.CPP.Z","A:/Adam");
|
||||
@@ -221,11 +222,7 @@ I64 MakeLineRepFile()
|
||||
}
|
||||
|
||||
U0 StaffDistroPrep()
|
||||
{/*This is the TempleOS internal distro. Only run this on a
|
||||
virtual machine, not bare metal hardware because it's settings could cause
|
||||
problems. The hard drive must be partitioned. Install Std Distro, then
|
||||
install this on top.
|
||||
*/
|
||||
{
|
||||
Drv('C');
|
||||
DistroPrep;
|
||||
Auto(TOS_DVD_CFG);
|
||||
@@ -241,25 +238,13 @@ U0 MakeStaffDistro()
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSSTAFF_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
|
||||
U0 DbgDistroPrep()
|
||||
{/*This is a debug distro. The CD/DVD bootloader uses BIOS INT 0x13 0x42 to
|
||||
load Kernel.BIN.C which has been modified to also hold a small RAM drive
|
||||
(Drive A) that fits in the low 640k. The bootloader starts in real mode
|
||||
and the kernel changes to long, 64-bit mode. It loads the 64-bit compiler
|
||||
and assembler, compiles some, but not all, of the normal start-up scripts
|
||||
and drops you off at the $LK,"Dbg",A="MN:Dbg"$ command-line where you can JIT compile,
|
||||
use $LK,"EdLite",A="MN:EdLite"$ on RAM files, and use many of the other normal Kernel commands.
|
||||
I could not fit all the normal start-up scripts into the small RAM drive,
|
||||
so you do not have the window manager or normal document framework. You
|
||||
should have many Gig of RAM to play with with RAM Drive B, a high memory
|
||||
RAM drive, but you have only those few files. When I generate this distro,
|
||||
I call $LK,"MakeBootDrvFile",A="FF:::/Demo/AcctExample/TOSDistro.CPP,MakeBootRescueDrvFile"$.
|
||||
*/
|
||||
{
|
||||
Drv('C');
|
||||
DistroPrep;
|
||||
MakeBootRescueDrvFile;
|
||||
@@ -268,8 +253,12 @@ I call $LK,"MakeBootDrvFile",A="FF:::/Demo/AcctExample/TOSDistro.CPP,MakeBootRes
|
||||
Fmt('B',,FALSE,FSt_REDSEA);
|
||||
DelTree(TOS_DISTRO_DIR);
|
||||
CopyTree("C:/",TOS_DISTRO_DIR "/");
|
||||
DelTree(TOS_DISTRO_DIR "/Home");
|
||||
MkDir(TOS_DISTRO_DIR "/Home");
|
||||
CopyTree("C:/Home/Sup1",TOS_DISTRO_DIR "/Home/Sup1");
|
||||
Del(TOS_DISTRO_DIR "/" KERNEL_BIN_C);
|
||||
Del("C:" CFG_BOOT_RESCUE_DRV_FILE);
|
||||
Del(TOS_DISTRO_DIR BOOT_DIR "/OldMBR.BIN.C");
|
||||
Del(TOS_DISTRO_DIR BOOT_DIR "/BootMHD2.BIN.C");
|
||||
}
|
||||
U0 MakeDbgDistro()
|
||||
{
|
||||
@@ -277,7 +266,7 @@ U0 MakeDbgDistro()
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSDBG_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -303,7 +292,7 @@ U0 MakeStdDistro()
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSCD_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -312,46 +301,20 @@ U0 MakeStdRedSeaDistro()
|
||||
StdDistroPrep;
|
||||
RedSeaISO(TOS_ISO_C_NAME,TOS_DISTRO_DIR,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSCD_RS_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_C_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
|
||||
U0 LiteDistroPrep()
|
||||
{/*Missing: Dictionary, Bible and TOSZ Utility.Still 100% OpenSource.
|
||||
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
|
||||
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
|
||||
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
|
||||
FileManager, WindowManager, PCSpeaker, Apps, Games, God-Oracle-App, Hymns,
|
||||
Demos, Documentation.
|
||||
*/
|
||||
U0 UltraDistroPrep()
|
||||
{
|
||||
StdDistroPrep;
|
||||
DelTree(TOS_DISTRO_DIR "/Linux");
|
||||
Del(TOS_DISTRO_DIR "/" KERNEL_BIN_C);
|
||||
Del(TOS_DISTRO_DIR "/Adam/AutoComplete/ACDefs.DAT*");
|
||||
Del(TOS_DISTRO_DIR "/Misc/PCIDevices.TXT.Z");
|
||||
Del(TOS_DISTRO_DIR "/Misc/Bible.TXT.Z");
|
||||
}
|
||||
U0 MakeLiteDistro()
|
||||
{
|
||||
LiteDistroPrep;
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSLITE_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
|
||||
U0 UltraDistroPrep()
|
||||
{/*
|
||||
Missing: Apps, Demos, Dictionary, Bible and TOSZ Utility. Still 100%OpenSource.
|
||||
Includes: x86_64 64BitMultiCoredKernel, 64BitCompiler, Assembler,
|
||||
Unassembler, Debugger, Editor, VGAGraphics, Tools, BootLoaders,
|
||||
Keyboard&Mouse, HardDrives, FAT32, Partitioner, CD/DVD, ISO9660FileCreator,
|
||||
FileManager, WindowManager, PCSpeaker, Documentation.
|
||||
*/
|
||||
LiteDistroPrep;
|
||||
DelTree(TOS_DISTRO_DIR "/Apps");
|
||||
MkDir(TOS_DISTRO_DIR "/Apps");
|
||||
DelTree(TOS_DISTRO_DIR "/Demo");
|
||||
@@ -360,7 +323,7 @@ FileManager, WindowManager, PCSpeaker, Documentation.
|
||||
Del(TOS_DISTRO_DIR "/Adam/AutoComplete/ACWords.DAT*");
|
||||
Del(TOS_DISTRO_DIR "/Adam/God/Vocab.TXT.Z");
|
||||
Del(TOS_DISTRO_DIR "/Misc/OSTestSuite.CPP.Z");
|
||||
Copy("C:/Home/Downloads/Distro/UltraMenu.TXT.Z",
|
||||
Copy("C:/Home/Sup1/Sup1Distro/UltraMenu.TXT.Z",
|
||||
TOS_DISTRO_DIR "/PersonalMenu.TXT.Z");
|
||||
Copy("C:/Demo/Games/EagleDive.CPP.Z",
|
||||
TOS_DISTRO_DIR "/Misc");
|
||||
@@ -371,7 +334,7 @@ U0 MakeUltraDistro()
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
0.01*(100*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -380,7 +343,16 @@ U0 MakeUltraRedSeaDistro()
|
||||
UltraDistroPrep;
|
||||
RedSeaISO(TOS_ISO_C_NAME,TOS_DISTRO_DIR,TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSULTRA_RS_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
0.01*(100*Size(TOS_ISO_C_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
|
||||
U0 MakeSup1ISO()
|
||||
{
|
||||
RedSeaISO(TOS_ISO_C_NAME,"::/Home/Sup1");
|
||||
DefinePrint("DD_TEMPLEOS_SUP1_SIZE",
|
||||
"Supplemental ISO #1 (%0.2f MB)",
|
||||
0.01*(100*Size(TOS_ISO_C_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -389,28 +361,40 @@ U0 UpdateISODocDefines()
|
||||
{
|
||||
try {
|
||||
DefinePrint("DD_TEMPLEOSCD_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
0.1*(10*Size("D:/Wb/TempleOSCD.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSCD_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSCD.ISO","+s")/1024);
|
||||
|
||||
DefinePrint("DD_TEMPLEOSCD_RS_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
0.1*(10*Size("D:/Wb/TempleOSCDRS.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSCD_RS_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSCDRS.ISO","+s")/1024);
|
||||
// DefinePrint("DD_TEMPLEOSCD_RS_SIZE",
|
||||
// "Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
// 0.1*(10*Size("D:/Wb/TempleOSCDRS.ISO","+s")/1024/1024));
|
||||
// DefinePrint("DD_TEMPLEOSCD_RS_K_SIZE",
|
||||
// "%d KB",Size("D:/Wb/TempleOSCDRS.ISO","+s")/1024);
|
||||
|
||||
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
0.01*(100*Size("D:/Wb/TempleOSUltra.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSULTRA_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSUltra.ISO","+s")/1024);
|
||||
|
||||
DefinePrint("DD_TEMPLEOSULTRA_RS_SIZE",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
0.01*(100*Size("D:/Wb/TempleOSUltraRS.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSULTRA_RS_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSUltraRS.ISO","+s")/1024);
|
||||
// DefinePrint("DD_TEMPLEOSULTRA_RS_SIZE",
|
||||
// "Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
// 0.01*(100*Size("D:/Wb/TempleOSUltraRS.ISO","+s")/1024/1024));
|
||||
// DefinePrint("DD_TEMPLEOSULTRA_RS_K_SIZE",
|
||||
// "%d KB",Size("D:/Wb/TempleOSUltraRS.ISO","+s")/1024);
|
||||
|
||||
// DefinePrint("DD_TEMPLEOSDBG_SIZE",
|
||||
// "Download $TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.2f MB)",
|
||||
// 0.01*(100*Size("D:/Wb/TempleOSDbg.ISO","+s")/1024/1024));
|
||||
// DefinePrint("DD_TEMPLEOSDBG_K_SIZE",
|
||||
// "%d KB",Size("D:/Wb/TempleOSDbg.ISO","+s")/1024);
|
||||
|
||||
DefinePrint("DD_TEMPLEOS_SUP1_SIZE",
|
||||
"Supplemental ISO #1 (%0.2f MB)",
|
||||
0.01*(100*Size("D:/Wb/TempleOSSup1.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOS_SUP1_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSSup1.ISO","+s")/1024);
|
||||
} catch
|
||||
Fs->catch_except=TRUE;
|
||||
}
|
||||
@@ -420,7 +404,7 @@ public U0 MakeDistrosAndBackUp()
|
||||
{
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
progress4=*progress4_desc=0;
|
||||
progress4_max=19;
|
||||
progress4_max=18;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
@@ -436,17 +420,25 @@ public U0 MakeDistrosAndBackUp()
|
||||
DocClear;
|
||||
Move(TOS_ISO_NAME,"D:/Wb/TempleOSCD.ISO"); progress4++;
|
||||
|
||||
MakeStdRedSeaDistro; progress4++;
|
||||
DocClear;
|
||||
Move(TOS_ISO_C_NAME,"D:/Wb/TempleOSCDRS.ISO"); progress4++;
|
||||
// MakeStdRedSeaDistro; progress4++;
|
||||
// DocClear;
|
||||
// Move(TOS_ISO_C_NAME,"D:/Wb/TempleOSCDRS.ISO"); progress4++;
|
||||
|
||||
MakeUltraDistro; progress4++;
|
||||
DocClear;
|
||||
Move(TOS_ISO_NAME,"D:/Wb/TempleOSUltra.ISO"); progress4++;
|
||||
|
||||
MakeUltraRedSeaDistro; progress4++;
|
||||
// MakeUltraRedSeaDistro; progress4++;
|
||||
// DocClear;
|
||||
// Move(TOS_ISO_C_NAME,"D:/Wb/TempleOSUltraRS.ISO"); progress4++;
|
||||
|
||||
MakeSup1ISO; progress4++;
|
||||
DocClear;
|
||||
Move(TOS_ISO_C_NAME,"D:/Wb/TempleOSUltraRS.ISO"); progress4++;
|
||||
Move(TOS_ISO_C_NAME,"D:/Wb/TempleOSSup1.ISO"); progress4++;
|
||||
|
||||
// MakeStaffDistro; progress4++;
|
||||
// DocClear;
|
||||
// Move(TOS_ISO_NAME,"D:/Wb/TempleOSDbg.ISO"); progress4++;
|
||||
|
||||
MakeStaffDistro; progress4++;
|
||||
DocClear;
|
||||
@@ -475,9 +467,9 @@ public U0 MakeDistrosAndBackUp()
|
||||
|
||||
public U0 PreBackUp()
|
||||
{
|
||||
Copy("D:/Home/Downloads/Blog/Bookmarks.html","C:/Home/Downloads/Blog");
|
||||
Del("C:/Home/Downloads/Bin/*");
|
||||
Copy("D:/Home/Downloads/Bin/*","C:/Home/Downloads/Bin");
|
||||
Copy("D:/Home/Downloads/Bin/TempleBot","C:/Linux");
|
||||
Copy("D:/Home/Downloads/Bin/God*","C:/Linux");
|
||||
Copy("D:/Home/Sup1/Sup1Blog/Bookmarks.html","C:/Home/Sup1/Sup1Blog");
|
||||
Del("C:/Home/Sup1/Sup1Bin/*");
|
||||
Copy("D:/Home/Sup1/Sup1Bin/*","C:/Home/Sup1/Sup1Bin");
|
||||
Copy("D:/Home/Sup1/Sup1Bin/TempleBot","C:/Linux");
|
||||
Copy("D:/Home/Sup1/Sup1Bin/God*","C:/Linux");
|
||||
}
|
||||
+310
-233
@@ -10,8 +10,8 @@ U0 BadCodeJump()
|
||||
U8 *st;
|
||||
while (tempde) {
|
||||
doc=DocRead(tempde->full_name);
|
||||
tempde->user_data=doc->root.y;
|
||||
cnt+=doc->root.y;
|
||||
tempde->user_data=doc->head.y;
|
||||
cnt+=doc->head.y;
|
||||
DocDel(doc);
|
||||
tempde=tempde->next;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ U0 BadCodeJump()
|
||||
Free(st);
|
||||
}
|
||||
|
||||
U8 *WebBookMarks(U8 *filename="~/Downloads/Blog/Bookmarks.html")
|
||||
U8 *WebBookMarks(U8 *filename="~/Sup1/Sup1Blog/Bookmarks.html")
|
||||
{
|
||||
U8 *st;
|
||||
CDocEntry *doc_e;
|
||||
@@ -42,7 +42,7 @@ U8 *WebBookMarks(U8 *filename="~/Downloads/Blog/Bookmarks.html")
|
||||
CCmpCtrl *cc=CmpCtrlNew(MStrPrint("#include \"%s\"",filename));
|
||||
while (Lex(cc))
|
||||
if (cc->token==TK_STR && *cc->cur_str(U32 *)=='http') {
|
||||
DocPrint(doc,"$$MU-UL,\"%Q\",LE=0x%X$$\n",cc->cur_str,cc->cur_str);
|
||||
DocPrint(doc,"$$MU-UL,\"%$$Q\",LE=0x%X$$\n",cc->cur_str,cc->cur_str);
|
||||
cc->cur_str=NULL;
|
||||
}
|
||||
CmpCtrlDel(cc);
|
||||
@@ -52,7 +52,7 @@ U8 *WebBookMarks(U8 *filename="~/Downloads/Blog/Bookmarks.html")
|
||||
else
|
||||
st=NULL;
|
||||
|
||||
doc_e=doc->root.next;
|
||||
doc_e=doc->head.next;
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_MENU_VAL)
|
||||
Free(doc_e->left_exp);
|
||||
@@ -63,7 +63,7 @@ U8 *WebBookMarks(U8 *filename="~/Downloads/Blog/Bookmarks.html")
|
||||
return st;
|
||||
}
|
||||
|
||||
U8 *YouTubeGet(U8 *filename="C:/Home/Downloads/Blog/YouTube.TXT.Z",U8 *needle)
|
||||
U8 *YouTubeGet(U8 *filename="C:/Home/Sup1/Sup1Blog/YouTube.TXT.Z",U8 *needle)
|
||||
{
|
||||
I64 i=0,line=MIN_I64;
|
||||
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR),
|
||||
@@ -100,7 +100,7 @@ U8 *YouTubeGet(U8 *filename="C:/Home/Downloads/Blog/YouTube.TXT.Z",U8 *needle)
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 YouTubeAdd(U8 *filename="C:/Home/Downloads/Blog/YouTube.TXT.Z",
|
||||
U0 YouTubeAdd(U8 *filename="C:/Home/Sup1/Sup1Blog/YouTube.TXT.Z",
|
||||
U8 *title,U8 *code)
|
||||
{
|
||||
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT_TABS|DOCF_NO_CURSOR);
|
||||
@@ -117,9 +117,10 @@ U0 YouTubeAdd(U8 *filename="C:/Home/Downloads/Blog/YouTube.TXT.Z",
|
||||
class CTopMoviesForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN];
|
||||
I64 timestamp;
|
||||
I64 cert fmtstr "$$DA-TRM,LEN=2,A=\"Movie #1-100:%02d\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,"
|
||||
"A=\"Movie #1-100 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
I64 timestamp fmtstr "$$DA,A=\"TimeStamp :%d\"$$\n";
|
||||
I64 cert;
|
||||
I64 min;
|
||||
I64 sec;
|
||||
};
|
||||
@@ -127,9 +128,10 @@ class CTopMoviesForm
|
||||
class CMetallicaForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN];
|
||||
I64 timestamp;
|
||||
I64 cert fmtstr "$$DA-TRM,LEN=2,A=\"Song #1-99:%02d\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,"
|
||||
"A=\"Song #1-99 (2 Decimal Digits from Hex):%s\"$$\n";
|
||||
I64 timestamp fmtstr "$$DA,A=\"TimeStamp :%d\"$$\n";
|
||||
I64 cert;
|
||||
I64 min;
|
||||
I64 sec;
|
||||
};
|
||||
@@ -215,7 +217,7 @@ class CRandCertForm
|
||||
I64 sec;
|
||||
};
|
||||
|
||||
class CRandHexBeacon5Form
|
||||
class CRandHex5BeaconForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P-TRM,LEN=5,"
|
||||
@@ -226,7 +228,7 @@ class CRandHexBeacon5Form
|
||||
I64 sec;
|
||||
};
|
||||
|
||||
class CRandHexBeacon8Form
|
||||
class CRandHex8BeaconForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P-TRM,LEN=8,"
|
||||
@@ -237,6 +239,26 @@ class CRandHexBeacon8Form
|
||||
I64 sec;
|
||||
};
|
||||
|
||||
class CRandExtDec5Form
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"5 Decimal Digits from Hex:%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min;
|
||||
I64 sec;
|
||||
};
|
||||
|
||||
class CRandExtDec5BeaconForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"5 Decimal Digits from Hex:%s\"$$\n";
|
||||
I64 timestamp fmtstr "$$DA,A=\"TimeStamp:%d\"$$\n";
|
||||
I64 cert;
|
||||
I64 min;
|
||||
I64 sec;
|
||||
};
|
||||
|
||||
U8 *URLPercentSpaces(U8 *src)
|
||||
{
|
||||
U8 buf[2048],*dst=buf;
|
||||
@@ -268,6 +290,20 @@ U8 *URLPlusSpaces(U8 *src)
|
||||
return StrNew(buf);
|
||||
}
|
||||
|
||||
I64 ExtDecFromHex(U8 *st,I64 digits)
|
||||
{
|
||||
I64 res=0,ch;
|
||||
do {
|
||||
if (!(ch=*st++))
|
||||
throw;
|
||||
if ('0'<=ch<='9') {
|
||||
res=10*res+ch-'0';
|
||||
digits--;
|
||||
}
|
||||
} while (digits);
|
||||
return res;
|
||||
}
|
||||
|
||||
U8 *RandVideoRead(U8 *filename,I64 line)
|
||||
{
|
||||
U8 *res=NULL;
|
||||
@@ -295,21 +331,23 @@ U8 *RandVideoWrite(U8 *filename,I64 line,U8 *st)
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 RandVideo(U8 *title,U8 *webpage,CTopMoviesForm *url,U8 *filename)
|
||||
U0 RandVideo(U8 *title,U8 *webpage,CTopMoviesForm *url,I64 digits,U8 *filename)
|
||||
{
|
||||
U8 *st,*st2;
|
||||
if (st=RandVideoRead(filename,url->cert*2)) {
|
||||
I64 i=ExtDecFromHex(url->special,digits);
|
||||
if (st=RandVideoRead(filename,i*2)) {
|
||||
StrCpy(url->tag,st);
|
||||
Free(st);
|
||||
if (!(st=RandVideoRead(filename,url->cert*2+1))||!*st) {
|
||||
if (!(st=RandVideoRead(filename,i*2+1))||!*st) {
|
||||
Free(st);
|
||||
*url->special=0;
|
||||
if (DocForm(url(CYouTubeForm *)) && *url->special) {
|
||||
if (url->min || url->sec)
|
||||
st=MStrPrint("%s&hl=enUS&start=%d",
|
||||
url->special,url->min*60+url->sec);
|
||||
else
|
||||
st=StrNew(url->special);
|
||||
RandVideoWrite(filename,url->cert*2+1,st);
|
||||
RandVideoWrite(filename,i*2+1,st);
|
||||
} else
|
||||
st=NULL;
|
||||
}
|
||||
@@ -342,23 +380,27 @@ U0 RandVideo(U8 *title,U8 *webpage,CTopMoviesForm *url,U8 *filename)
|
||||
}
|
||||
|
||||
U0 MyBibleLines(U8 *st,I64 num_lines,I64 radix,Bool modulo,Bool plus_one)
|
||||
{
|
||||
{//Radix<0 means extract N dec digits from hex.
|
||||
CDoc *doc_out,*doc_in;
|
||||
CDocEntry *doc_e;
|
||||
I64 i,start;
|
||||
U8 *verse;
|
||||
if (*st && (doc_out=DocPut)) {
|
||||
i=Str2I64(st,radix);
|
||||
if (radix<0)
|
||||
i=ExtDecFromHex(st,-radix);
|
||||
else
|
||||
i=Str2I64(st,radix);
|
||||
if (radix<0)
|
||||
DocPrint(doc_out,"'%s'-->(Taking first %d decimal digits)",st,-radix);
|
||||
else if (radix==16)
|
||||
DocPrint(doc_out,"0x%s-->",st);
|
||||
if (modulo) {
|
||||
if (radix==16)
|
||||
DocPrint(doc_out,"0x%s-->",st);
|
||||
DocPrint(doc_out,"(%d remainder when divided by %d)",
|
||||
i,ST_BIBLE_LINES-(num_lines-1));
|
||||
start=i%(ST_BIBLE_LINES-(num_lines-1));
|
||||
} else {
|
||||
if (radix==16)
|
||||
DocPrint(doc_out,"0x%s-->",st);
|
||||
DocPrint(doc_out,"%d",i);
|
||||
if (radix>=0 || plus_one)
|
||||
DocPrint(doc_out,"%d",i);
|
||||
start=i;
|
||||
}
|
||||
if (plus_one) {
|
||||
@@ -368,13 +410,13 @@ U0 MyBibleLines(U8 *st,I64 num_lines,I64 radix,Bool modulo,Bool plus_one)
|
||||
DocPrint(doc_out,"-->Line:%d\n",start);
|
||||
|
||||
verse=BibleLine2Verse(start);
|
||||
DocPrint(doc_out,"$TX,"KingJamesBible",HTML="http://www.templeos.org/files/NumBible.TXT"$ (%s)\n\nGod says...\n$$RED$$",verse);
|
||||
DocPrint(doc_out,"$TX,"KingJamesBible",HTML="http://www.templeos.org/Wb/Home/Sup1/Sup1Blog/NumBible.TXT"$ (%s)\n\nGod says...\n$$RED$$",verse);
|
||||
Free(verse);
|
||||
|
||||
doc_in=DocNew;
|
||||
BibleLines(doc_in,start,num_lines);
|
||||
BibleLines(doc_in,start,num_lines,"::/Home/Sup1/Sup1Blog/NumBible.TXT");
|
||||
while (TRUE) {//Del leading blanks
|
||||
doc_e=doc_in->root.next;
|
||||
doc_e=doc_in->head.next;
|
||||
if (doc_e==doc_in)
|
||||
break;
|
||||
else {
|
||||
@@ -453,7 +495,7 @@ public U0 GodBooksPassage(U8 *files_find_mask,I64 len=512,
|
||||
DirTreeDel(tempde1);
|
||||
}
|
||||
|
||||
#define NIST_TIME_OFFSET (-7923-local_time_offset/CDATE_FREQ)
|
||||
#define NIST_TIME_OFFSET (-7976-local_time_offset/CDATE_FREQ)
|
||||
#define NIST_TIME_TO_SWITCH 3
|
||||
|
||||
public U0 NISTSync()
|
||||
@@ -471,6 +513,19 @@ public U0 NISTSync()
|
||||
}
|
||||
}
|
||||
|
||||
U0 NISTBeaconURL(I64 timestamp)
|
||||
{
|
||||
U8 *tag;
|
||||
CDateStruct ds;
|
||||
CDate dt=(timestamp-NIST_TIME_OFFSET)*CDATE_FREQ+Str2Date("1/1/1970");
|
||||
Date2Struct(&ds,dt+local_time_offset);
|
||||
"$$TX,\"NIST Beacon Date:%D Time:%02d:%02d Unix TimeStamp:%u\","
|
||||
"HTML=\"https://beacon.nist.gov/home\"$$\n",dt,ds.hour,ds.min,timestamp;
|
||||
tag=MStrPrint("https:/beacon.nist.gov/rest/record/%d",timestamp);
|
||||
"$$TX,\"NIST Beacon Record:%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
Free(tag);
|
||||
}
|
||||
|
||||
U0 InsMyURL()
|
||||
{
|
||||
U8 *tag,*st,*st2;
|
||||
@@ -478,211 +533,233 @@ U0 InsMyURL()
|
||||
url->timestamp=
|
||||
FloorI64((Now-Str2Date("1/1/1970"))/CDATE_FREQ+NIST_TIME_OFFSET-
|
||||
NIST_TIME_TO_SWITCH,60);
|
||||
switch (PopUpPickLst("NISTBeacon5Bible\0NISTBeacon8Passage\0"
|
||||
"BibleGatewaySearch\0BibleGatewayVerse\0"
|
||||
"YouTube\0Imgur\0Wikipedia\0RandomNumbers.info\0"
|
||||
"Random.org\0PassWord\0VirtualNotary\0ANU_NIST\0HotBits\0"
|
||||
"GenerateData\0WebBookMark\0Roulette\0Movie\0Metallica\0")) {
|
||||
case:
|
||||
if (DocForm(url(CRandHexBeacon5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\t";
|
||||
"$$TX,\"How this random Bible passage was chosen.\","
|
||||
"HTML=\"http://www.templeos.org/Wb"
|
||||
"/Home/Web/TAD/NISTPassage.html\"$$\n";
|
||||
tag=MStrPrint("https:/beacon.nist.gov/rest/record/%d",url->timestamp);
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
Free(tag);
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHexBeacon8Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\t";
|
||||
"$$TX,\"How this random book pick was chosen.\","
|
||||
"HTML=\"http://www.templeos.org/Wb"
|
||||
"/Home/Web/TAD/NISTPick001.html\"$$\n";
|
||||
tag=MStrPrint("https:/beacon.nist.gov/rest/record/%d",url->timestamp);
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
Free(tag);
|
||||
GodBooksPassage("C:/Home/Downloads/Text/*",,
|
||||
Str2I64(url->special,16),GBP_MEDIUM);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBibleForm *))) {
|
||||
tag=url->special;
|
||||
st2=URLPercentSpaces(url->special);
|
||||
st=MStrPrint(
|
||||
"http://www.biblegateway.com/passage/?search=%s&version=NIV",st2);
|
||||
Free(st2);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBibleForm *))) {
|
||||
tag=url->special;
|
||||
st2=URLPercentSpaces(url->special);
|
||||
st=MStrPrint(
|
||||
"http://www.biblegateway.com/verse/en/%s",st2);
|
||||
Free(st2);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CYouTubeForm *))) {
|
||||
if (*url->special==CH_SPACE)
|
||||
st2=YouTubeGet(,url->tag);
|
||||
else
|
||||
st2=StrNew(url->special);
|
||||
if (st2 && *st2!=CH_SPACE) {
|
||||
if (url->min || url->sec)
|
||||
st=MStrPrint("%s&hl=enUS&start=%d",st2,url->min*60+url->sec);
|
||||
else
|
||||
st=StrNew(st2);
|
||||
if (*url->special!=CH_SPACE && *url->tag)
|
||||
YouTubeAdd(,url->tag,st);
|
||||
"$$HC,\"<object width=\\\"640\\\" "
|
||||
"height=\\\"520\\\"><param name=\\\"movie\\\" "
|
||||
"value=\\\"http://www.youtube.com/v/%s\\\"></param><param "
|
||||
"name=\\\"allowscriptaccess\\\" "
|
||||
"value=\\\"always\\\"></param><embed "
|
||||
"src=\\\"http://www.youtube.com/v/%s\\\" "
|
||||
"type=\\\"application/x-shockwave-flash\\\" "
|
||||
"allowscriptaccess=\\\"always\\\" "
|
||||
"width=\\\"640\\\" height=\\\"520\\\">"
|
||||
"</embed></object>\"$$\n",st,st;
|
||||
Free(st);
|
||||
Free(st2);
|
||||
try {
|
||||
switch (PopUpPickLst("NISTExtDec5Bible\0NISTHex5Bible\0NISTHex8Passage\0"
|
||||
"BibleGatewaySearch\0BibleGatewayVerse\0"
|
||||
"YouTube\0Imgur\0Wikipedia\0ExtDec5Bible\0Random.org\0"
|
||||
"RandomNumbers.info\0PassWord\0VirtualNotary\0ANU_NIST\0HotBits\0"
|
||||
"GenerateData\0WebBookMark\0Roulette\0NISTMovie\0NISTMetallica\0")) {
|
||||
case:
|
||||
if (DocForm(url(CRandExtDec5BeaconForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\t";
|
||||
NISTBeaconURL(url->timestamp);
|
||||
MyBibleLines(url->special,20,-5,FALSE,FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CImgurForm *))) {
|
||||
"$$HC,\"<center><img src=\\\"http://i.imgur.com/%s\\\" "
|
||||
"width=\\\"%d\\\" height=\\\"%d\\\" alt=\\\"\\\"></center>\"$$\n",
|
||||
url->special,url->min,url->sec;
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWikipediaForm *))) {
|
||||
tag=url->special;
|
||||
st=MStrPrint("http://en.wikipedia.org/wiki/%s",url->special);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.randomnumbers.info";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.random.org";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://passed.pw";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandCertForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://virtual-notary.org";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
tag="Here is the certificate";
|
||||
st=MStrPrint("http://www.templeos.org/Certs/virtual-notary-cert"
|
||||
"-randomnum-%d.p12",url->cert);
|
||||
"\n$$TX,\"%Q: %d\",HTML=\"%Q\"$$.\n",tag,url->cert,st;
|
||||
Free(st);
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://qrng.anu.edu.au/NIST.php";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://www.fourmilab.ch/hotbits/secure_generate.html";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.generatedata.com";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBookMarkForm *))) {
|
||||
tag=st=WebBookMarks;
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://www.dublinbet.com";
|
||||
"$$TX,\"%Q\",HTML=\"%Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CTopMoviesForm *)))
|
||||
RandVideo("Top 100 Movies","http://www.afi.com/100years/movies10.aspx",
|
||||
url,"C:/Home/Downloads/Blog/Movies.TXT.Z");
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CMetallicaForm *)))
|
||||
RandVideo("Metallica Song",
|
||||
"http://home.hccnet.nl/a.r.adams/lyrics/metallica/songindex.html",
|
||||
url,"C:/Home/Downloads/Blog/Metallica.TXT.Z");
|
||||
break;
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex5BeaconForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\t";
|
||||
"$$TX,\"How this random Bible passage was chosen.\","
|
||||
"HTML=\"http://www.templeos.org/Wb"
|
||||
"/Home/Web/TAD/NISTPassage.html\"$$\n";
|
||||
NISTBeaconURL(url->timestamp);
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex8BeaconForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\t";
|
||||
"$$TX,\"How this random book pick was chosen.\","
|
||||
"HTML=\"http://www.templeos.org/Wb"
|
||||
"/Home/Web/TAD/NISTPick001.html\"$$\n";
|
||||
NISTBeaconURL(url->timestamp);
|
||||
GodBooksPassage("C:/Home/Sup1/Sup1Texts/*",,
|
||||
Str2I64(url->special,16),GBP_MEDIUM);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBibleForm *))) {
|
||||
tag=url->special;
|
||||
st2=URLPercentSpaces(url->special);
|
||||
st=MStrPrint("http://www.biblegateway.com/passage/"
|
||||
"?search=%s&version=NIV",st2);
|
||||
Free(st2);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBibleForm *))) {
|
||||
tag=url->special;
|
||||
st2=URLPercentSpaces(url->special);
|
||||
st=MStrPrint(
|
||||
"http://www.biblegateway.com/verse/en/%s",st2);
|
||||
Free(st2);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CYouTubeForm *))) {
|
||||
if (*url->special==CH_SPACE)
|
||||
st2=YouTubeGet(,url->tag);
|
||||
else
|
||||
st2=StrNew(url->special);
|
||||
if (st2 && *st2!=CH_SPACE) {
|
||||
if (url->min || url->sec)
|
||||
st=MStrPrint("%s&hl=enUS&start=%d",st2,url->min*60+url->sec);
|
||||
else
|
||||
st=StrNew(st2);
|
||||
if (*url->special!=CH_SPACE && *url->tag)
|
||||
YouTubeAdd(,url->tag,st);
|
||||
"$$HC,\"<object width=\\\"640\\\" "
|
||||
"height=\\\"520\\\"><param name=\\\"movie\\\" "
|
||||
"value=\\\"http://www.youtube.com/v/%s\\\"></param><param "
|
||||
"name=\\\"allowscriptaccess\\\" "
|
||||
"value=\\\"always\\\"></param><embed "
|
||||
"src=\\\"http://www.youtube.com/v/%s\\\" "
|
||||
"type=\\\"application/x-shockwave-flash\\\" "
|
||||
"allowscriptaccess=\\\"always\\\" "
|
||||
"width=\\\"640\\\" height=\\\"520\\\">"
|
||||
"</embed></object>\"$$\n",st,st;
|
||||
Free(st);
|
||||
Free(st2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CImgurForm *))) {
|
||||
"$$HC,\"<center><img src=\\\"http://i.imgur.com/%s\\\" "
|
||||
"width=\\\"%d\\\" height=\\\"%d\\\" "
|
||||
"alt=\\\"\\\"></center>\"$$\n",
|
||||
url->special,url->min,url->sec;
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWikipediaForm *))) {
|
||||
tag=url->special;
|
||||
st=MStrPrint("http://en.wikipedia.org/wiki/%s",url->special);
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandExtDec5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God.\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
MyBibleLines(url->special,20,-5,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.random.org";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.randomnumbers.info";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://passed.pw";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandCertForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://virtual-notary.org";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
tag="Here is the certificate";
|
||||
st=MStrPrint("http://www.templeos.org/Certs/virtual-notary-cert"
|
||||
"-randomnum-%d.p12",url->cert);
|
||||
"\n$$TX,\"%$$Q: %d\",HTML=\"%$$Q\"$$.\n",tag,url->cert,st;
|
||||
Free(st);
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://qrng.anu.edu.au/NIST.php";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandHex5Form *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://www.fourmilab.ch/hotbits/secure_generate.html";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,16,TRUE,TRUE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="http://www.generatedata.com";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CWebBookMarkForm *))) {
|
||||
tag=st=WebBookMarks;
|
||||
if (*url->tag)
|
||||
tag=url->tag;
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$",tag,st;
|
||||
Free(st);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CRandDecForm *))) {
|
||||
"$$TX,\"Guidelines for Talking with God\","
|
||||
"HTML=\"http://www.templeos.org/Wb/Adam/God/HSNotes.html\"$$\n";
|
||||
tag="https://www.dublinbet.com";
|
||||
"$$TX,\"%$$Q\",HTML=\"%$$Q\"$$\n",tag,tag;
|
||||
MyBibleLines(url->special,20,10,FALSE,FALSE);
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CTopMoviesForm *))) {
|
||||
NISTBeaconURL(url->timestamp);
|
||||
RandVideo("Top 100 Movies",
|
||||
"http://www.afi.com/100years/movies10.aspx",
|
||||
url,2,"C:/Home/Sup1/Sup1Blog/Movies.TXT.Z");
|
||||
}
|
||||
break;
|
||||
case:
|
||||
if (DocForm(url(CMetallicaForm *))) {
|
||||
NISTBeaconURL(url->timestamp);
|
||||
RandVideo("Metallica Song","http://home.hccnet.nl/a.r.adams/lyrics/"
|
||||
"metallica/songindex.html",
|
||||
url,2,"C:/Home/Sup1/Sup1Blog/Metallica.TXT.Z");
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch {
|
||||
Fs->catch_except=TRUE;
|
||||
Beep; Beep;
|
||||
}
|
||||
Free(url);
|
||||
}
|
||||
|
||||
//if (FileFind("~/Downloads/Words/LinuxDict.TXT"))
|
||||
// GodInit("~/Downloads/Words/LinuxDict.TXT");
|
||||
if (FileFind("~/Downloads/Words/HappyWords.TXT"))
|
||||
GodInit("~/Downloads/Words/HappyWords.TXT");
|
||||
//if (FileFind("~/Sup1/Sup1Words/LinuxDict.TXT"))
|
||||
// GodInit("~/Sup1/Sup1Words/LinuxDict.TXT");
|
||||
if (FileFind("~/Sup1/Sup1Words/HappyWords.TXT"))
|
||||
GodInit("~/Sup1/Sup1Words/HappyWords.TXT");
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
public U0 CursorRemFile(U8 *filename)
|
||||
{
|
||||
CDoc *doc;
|
||||
doc=DocRead(filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
|
||||
CDoc *doc=DocRead(filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
|
||||
DocWrite(doc);
|
||||
DocDel(doc);
|
||||
}
|
||||
@@ -124,7 +123,7 @@ public U0 JukeSong(I64 num)
|
||||
AutoComplete;
|
||||
if (!fg_on)
|
||||
FrameGrabberToggle;
|
||||
JukeSongsPuppet("~/Downloads/Psalmody",,num,num+1);
|
||||
JukeSongsPuppet("~/Sup1/Sup1Psalmody",,num,num+1);
|
||||
if (fg_on)
|
||||
FrameGrabberToggle;
|
||||
}
|
||||
@@ -134,7 +133,7 @@ public U0 JukeLines(I64 start_line,I64 end_line)
|
||||
AutoComplete;
|
||||
if (!fg_on)
|
||||
FrameGrabberToggle;
|
||||
JukeSongsPuppet("~/Downloads/Psalmody",,start_line*5,end_line*5);
|
||||
JukeSongsPuppet("~/Sup1/Sup1Psalmody",,start_line*5,end_line*5);
|
||||
if (fg_on)
|
||||
FrameGrabberToggle;
|
||||
}
|
||||
@@ -300,7 +299,7 @@ U0 TempleOSTheme()
|
||||
{
|
||||
if (!fg_on)
|
||||
PopUp("Sleep(50);FrameGrabberToggle;");
|
||||
ExeFile("~/Downloads/Graphics/TempleOSTheme.CPP");
|
||||
ExeFile("~/Sup1/Sup1Graphics/TempleOSTheme.CPP");
|
||||
DocClear;
|
||||
}
|
||||
|
||||
@@ -310,6 +309,16 @@ U0 TOSJukeVideo(I64 start=0,I64 end=10)
|
||||
Free(buf);
|
||||
AutoComplete;
|
||||
FrameGrabberToggle;
|
||||
JukeSongsPuppet("~/Downloads/Psalmody",,start,end);
|
||||
JukeSongsPuppet("~/Sup1/Sup1Psalmody",,start,end);
|
||||
FrameGrabberToggle;
|
||||
}
|
||||
|
||||
#define MEM_TEST_SIZE 128*0x100000
|
||||
U0 MemTest()
|
||||
{
|
||||
while (sys_data_bp->alloced_u8s-sys_data_bp->used_u8s>MEM_TEST_SIZE*2) {
|
||||
MemSet(MAlloc(MEM_TEST_SIZE),0x88,MEM_TEST_SIZE);
|
||||
"%X\n",sys_data_bp->alloced_u8s-sys_data_bp->used_u8s;
|
||||
Yield;
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
"<head>\n"
|
||||
"<meta http-equiv=\"Content-Type\" "
|
||||
"content=\"text/html;charset=US-ASCII\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
@@ -189,7 +189,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
"</head>\n");
|
||||
DocPrint(doc_out,"%s",body_header);
|
||||
|
||||
doc_e=doc_in->root.next;
|
||||
doc_e=doc_in->head.next;
|
||||
col=doc_e->x;
|
||||
y=doc_e->y;
|
||||
while (doc_e!=doc_in) {
|
||||
@@ -242,7 +242,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
case DOCT_TEXT:
|
||||
if (doc_e->de_flags&DOCEF_HIGHLIGHT) {
|
||||
if (doc_e->last==doc_in)
|
||||
MemCpy(&doc_e->settings,&doc_in->settings_root,
|
||||
MemCpy(&doc_e->settings,&doc_in->settings_head,
|
||||
sizeof(CDocSettings));
|
||||
else
|
||||
MemCpy(&doc_e->settings,&doc_e->last->settings,
|
||||
@@ -320,7 +320,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
".c%02X{color:#%02x%02x%02x;background-color:#%02x%02x%02x;}\n",
|
||||
i,p[i&15].r>>8,p[i&15].g>>8,p[i&15].b>>8,
|
||||
p[i/16].r>>8,p[i/16].g>>8,p[i/16].b>>8);
|
||||
doc_out->cur_entry=&doc_out->root;
|
||||
doc_out->cur_entry=&doc_out->head;
|
||||
DocRecalc(doc_out);
|
||||
|
||||
doc_in->win_task->text_attr=old_attr;
|
||||
@@ -393,7 +393,7 @@ U0 TOSWebFile(U8 *name)
|
||||
"<meta name=\"keywords\" "
|
||||
"content=\"Operating System,64-Bit,64 Bit,"
|
||||
"Temple,OS,TempleOS,Free,Open Source,Public Domain,x86_64\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.10",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
|
||||
"<body style=\"background-color:#55FFFF; border-style:solid;
|
||||
border-width:8px; border-color:#0000AA;
|
||||
@@ -417,7 +417,7 @@ public U0 MakeWebSite()
|
||||
DelTree("D:/Wb/Home/Private");
|
||||
Del("D:/Wb/Home/*");
|
||||
Touch("D:/Wb/Home/Web/index.TXT.Z","");
|
||||
Touch("D:/Wb/Home/Web/Downloads.TXT.Z","");
|
||||
Touch("D:/Wb/Home/Web/DownloadOS.TXT.Z","");
|
||||
Touch("D:/Wb/Home/Web/TempleOS.TXT.Z","");
|
||||
tempde=tempde1=FilesFind("*",
|
||||
FUF_RECURSE|FUF_JUST_FILES|FUF_JUST_TXT|FUF_CLUSTER_ORDER);
|
||||
@@ -425,11 +425,11 @@ public U0 MakeWebSite()
|
||||
TOSWebFile(tempde->full_name);
|
||||
tempde=tempde->next;
|
||||
}
|
||||
Copy( "D:/Wb/Home/Downloads/Bin/TempleBot",
|
||||
"D:/Wb/Home/Downloads/Bin/TempleBot.TXT");
|
||||
ToDolDoc("D:/Wb/Home/Downloads/Bin/TempleBot.TXT");
|
||||
TOSToHtml("D:/Wb/Home/Downloads/Bin/TempleBot.TXT");
|
||||
Del("D:/Wb/Home/Downloads/Bin/TempleBot.TXT");
|
||||
Copy( "D:/Wb/Home/Sup1/Sup1Bin/TempleBot",
|
||||
"D:/Wb/Home/Sup1/Sup1Bin/TempleBot.TXT");
|
||||
ToDolDoc("D:/Wb/Home/Sup1/Sup1Bin/TempleBot.TXT");
|
||||
TOSToHtml("D:/Wb/Home/Sup1/Sup1Bin/TempleBot.TXT");
|
||||
Del("D:/Wb/Home/Sup1/Sup1Bin/TempleBot.TXT");
|
||||
DirTreeDel(tempde1);
|
||||
Drv('C');
|
||||
}
|
||||
|
||||
@@ -149,7 +149,6 @@
|
||||
#define IC_RIP 0x7F
|
||||
|
||||
#define IC_RDTSC 0x80
|
||||
#define IC_HPET 0x81
|
||||
|
||||
#define IC_BT 0x82
|
||||
#define IC_BTS 0x83
|
||||
|
||||
@@ -8,9 +8,9 @@ public U0 DocProfile(U8 *filename,I64 flags)
|
||||
//use $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
CDoc *doc=DocRead(filename,flags);
|
||||
|
||||
//doc->root which is equ to doc is the
|
||||
//doc->head which is equ to doc is the
|
||||
//header of the CQue and represents the end-of-file marker.
|
||||
CDocEntry *doc_e=doc->root.next;
|
||||
CDocEntry *doc_e=doc->head.next;
|
||||
while (doc_e!=doc) {
|
||||
cmd_stats[doc_e->type_u8]++;
|
||||
for (i=0;i<64;i++)
|
||||
|
||||
@@ -5,7 +5,7 @@ U0 NumBible()
|
||||
{
|
||||
CDoc *doc_in=DocRead("::/Misc/Bible.TXT.Z",DOCF_PLAIN_TEXT_TABS),
|
||||
*doc_out=DocNew("~/DemoNumBible.TXT.Z");
|
||||
CDocEntry *doc_e=doc_in->root.next;
|
||||
CDocEntry *doc_e=doc_in->head.next;
|
||||
while (doc_e!=doc_in) {
|
||||
if (doc_e->type_u8==DOCT_TEXT) {
|
||||
DocPrint(doc_out,"%05d %s",doc_e->y+1,doc_e->tag);
|
||||
|
||||
@@ -53,7 +53,7 @@ U0 UnusedDefineScan()
|
||||
Find(temph->str,"/*","+l-i+T");
|
||||
Fs->put_doc=old_put_doc;
|
||||
Fs->display_doc=old_display_doc;
|
||||
doc_e=doc->root.next;
|
||||
doc_e=doc->head.next;
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_LINK) {
|
||||
"%s ",temph->str;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+251
-270
@@ -1,6 +1,6 @@
|
||||
//Uses $LK,"fixed-point",A="FI:::/Demo/Lectures/FixedPoint.CPP"$.
|
||||
|
||||
RegSetDftEntry("TempleOS/EagleDive","I64 best_score=0;\n");
|
||||
RegSetDftEntry("TempleOS/EagleDive","F64 best_score=9999;\n");
|
||||
RegExeBranch("TempleOS/EagleDive");
|
||||
|
||||
//Keep these power of two so shift is used instead of multiply
|
||||
@@ -34,15 +34,6 @@ RegExeBranch("TempleOS/EagleDive");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +59,12 @@ RegExeBranch("TempleOS/EagleDive");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -94,44 +91,6 @@ RegExeBranch("TempleOS/EagleDive");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -153,43 +112,6 @@ RegExeBranch("TempleOS/EagleDive");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -281,24 +203,39 @@ class Panel
|
||||
U16 update,num_sides;
|
||||
CColorROPU32 color;
|
||||
Obj *next_obj,*last_obj;
|
||||
} *panel_root,*panels[MAP_HEIGHT][MAP_WIDTH];
|
||||
} *panel_head,*panels[MAP_HEIGHT][MAP_WIDTH];
|
||||
|
||||
I64 critical_section_flag;
|
||||
I16 elevations[MAP_HEIGHT][MAP_WIDTH];
|
||||
CD3 normals[MAP_HEIGHT][MAP_WIDTH];
|
||||
|
||||
F64 game_t0,è,é1,é2,speed;
|
||||
|
||||
I64 strip_height,x,y,z,game_score;
|
||||
|
||||
Bool game_over;
|
||||
|
||||
class MPCtrl {
|
||||
I64 init_not_done_flags,update_not_done_flags,app_not_done_flags;
|
||||
I64 strip_width[MP_MAX_PROCESSORS];
|
||||
Bool app_done;
|
||||
} mp;
|
||||
|
||||
F64 game_t0,game_tf,pitch,roll,heading,è,speed;
|
||||
Bool invert_pitch,rolled_over;
|
||||
I64 strip_height,x,y,z,fish_left;
|
||||
|
||||
U0 WrapAngles()
|
||||
{
|
||||
è=Wrap(è);
|
||||
pitch=Wrap(-è-ã/2);
|
||||
if (Abs(pitch)>ã/2) {
|
||||
invert_pitch=TRUE;
|
||||
pitch=Wrap(ã-pitch);
|
||||
} else
|
||||
invert_pitch=FALSE;
|
||||
roll=Wrap(roll);
|
||||
if (invert_pitch ^^ -ã/2<=roll<ã/2)
|
||||
rolled_over=FALSE;
|
||||
else
|
||||
rolled_over=TRUE;
|
||||
heading=Wrap(heading,0);
|
||||
}
|
||||
|
||||
U0 EDTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
|
||||
{
|
||||
I64 zz;
|
||||
@@ -392,13 +329,13 @@ U0 MPDoPanels(CTask *task)
|
||||
tempo=MAlloc(sizeof(Obj),task);
|
||||
tempo->p.x=(i+w/2)*MAP_SCALE;
|
||||
tempo->p.y=(j+h/2)*MAP_SCALE;
|
||||
if (Rand<0.2) {
|
||||
if (Rand<0.1) {
|
||||
tempo->fish=FALSE;
|
||||
if (RandI16&1)
|
||||
tempo->img=$IB,"<2>",BI=2$; //Boat
|
||||
else
|
||||
tempo->img=$IB,"<3>",BI=3$; //Boat
|
||||
tempo->p.z=(WATER_ELEVATION+1)*MAP_SCALE;
|
||||
tempo->p.z=(WATER_ELEVATION+2)*MAP_SCALE;
|
||||
} else {
|
||||
tempo->fish=TRUE;
|
||||
tempo->img=$IB,"<1>",BI=1$; //Fish
|
||||
@@ -476,8 +413,8 @@ U0 MPDoPanels(CTask *task)
|
||||
while (LBts(&critical_section_flag,0))
|
||||
Yield;
|
||||
if (end_ptr)
|
||||
end_ptr->next=panel_root;
|
||||
panel_root=start_ptr;
|
||||
end_ptr->next=panel_head;
|
||||
panel_head=start_ptr;
|
||||
LBtr(&critical_section_flag,0);
|
||||
}
|
||||
LBtr(&mp.init_not_done_flags,Gs->num);
|
||||
@@ -523,7 +460,7 @@ for each spot.
|
||||
InitElevations;
|
||||
MemSet(panels,0,sizeof(panels));
|
||||
CalcNormals;
|
||||
panel_root=NULL;
|
||||
panel_head=NULL;
|
||||
mp.init_not_done_flags=1<<mp_cnt-1;
|
||||
for (i=0;i<mp_cnt;i++)
|
||||
Spawn(&MPDoPanels,Fs,"Do Panels",i);
|
||||
@@ -674,9 +611,9 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
|
||||
//World to screen coordinates
|
||||
Mat4x4IdentEqu(dc->r);
|
||||
Mat4x4RotZ(dc->r,é2);
|
||||
Mat4x4RotZ(dc->r,heading);
|
||||
Mat4x4RotX(dc->r,è);
|
||||
Mat4x4RotZ(dc->r,é1);
|
||||
Mat4x4RotZ(dc->r,roll);
|
||||
DCMat4x4Set(dc,dc->r);
|
||||
|
||||
//Screen to world coordinates
|
||||
@@ -687,9 +624,10 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
//y=mx+b and y=(-1/m)x+b are perpendicular.
|
||||
|
||||
s2w=Mat4x4IdentNew;
|
||||
Mat4x4RotZ(s2w,-é1);
|
||||
Mat4x4RotZ(s2w,-roll);
|
||||
Mat4x4RotX(s2w,-è);
|
||||
Mat4x4RotZ(s2w,-é2);
|
||||
Mat4x4RotZ(s2w,-heading);
|
||||
|
||||
xh=0;
|
||||
yh=0;
|
||||
zh=-256;
|
||||
@@ -827,88 +765,97 @@ U0 DrawHorizon(CDC *dc)
|
||||
dc->depth_buf=NULL;
|
||||
CColorROPU32 ground_color;
|
||||
|
||||
if (z/COORDINATE_SCALE<(WATER_ELEVATION+3)*MAP_SCALE)
|
||||
ground_color=BLUE;
|
||||
else
|
||||
ground_color=LTGREEN;
|
||||
|
||||
Mat4x4IdentEqu(dc->r);
|
||||
Mat4x4RotZ(dc->r,é2);
|
||||
Mat4x4RotX(dc->r,è);
|
||||
Mat4x4RotZ(dc->r,é1);
|
||||
DCMat4x4Set(dc,dc->r);
|
||||
dc->flags&=~DCF_TRANSFORMATION;
|
||||
dc->transform=&EDTransform;
|
||||
dc->x=cx;
|
||||
dc->y=cy;
|
||||
|
||||
Mat4x4RotZ(s2w,-é1);
|
||||
Mat4x4RotX(s2w,-è);
|
||||
Mat4x4RotZ(s2w,-é2);
|
||||
xh=0;
|
||||
yh=0;
|
||||
zh=-256;
|
||||
Mat4x4MulXYZ(s2w,&xh,&yh,&zh);
|
||||
Free(s2w);
|
||||
|
||||
x1=xh+yh*32; y1=yh-xh*32; z1=0;
|
||||
(*dc->transform)(dc,&x1,&y1,&z1);
|
||||
x2=xh-yh*32; y2=yh+xh*32; z2=0;
|
||||
(*dc->transform)(dc,&x2,&y2,&z2);
|
||||
DCClipLine(dc,&x1,&y1,&x2,&y2);
|
||||
|
||||
MemSet(p,0,sizeof(p));
|
||||
if (x2<x1) {
|
||||
SwapI64(&x1,&x2);
|
||||
SwapI64(&y1,&y2);
|
||||
}
|
||||
if (!x1 && x2==dc->width-1) {
|
||||
p[0].x=0;
|
||||
p[0].y=0;
|
||||
p[1].x=dc->width-1;
|
||||
p[1].y=0;
|
||||
p[2].x=dc->width-1;
|
||||
p[2].y=y2;
|
||||
p[3].x=0;
|
||||
p[3].y=y1;
|
||||
if (-ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
dc->color=LTCYAN;
|
||||
if (game_tf && fish_left)
|
||||
DCFill(dc,BLACK);
|
||||
else if (-ã/4<=Wrap(è-ã)<ã/4)
|
||||
DCFill(dc,LTCYAN);
|
||||
else {
|
||||
if (z/COORDINATE_SCALE<(WATER_ELEVATION+3)*MAP_SCALE)
|
||||
ground_color=BLUE;
|
||||
else
|
||||
dc->color=ground_color;
|
||||
GrFillPoly3(dc,4,p);
|
||||
p[0].y=dc->height-1;
|
||||
p[1].y=dc->height-1;
|
||||
if (-ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
dc->color=ground_color;
|
||||
else
|
||||
dc->color=LTCYAN;
|
||||
GrFillPoly3(dc,4,p);
|
||||
} else {
|
||||
if (y2<y1) {
|
||||
ground_color=LTGREEN;
|
||||
|
||||
Mat4x4IdentEqu(dc->r);
|
||||
Mat4x4RotZ(dc->r,heading);
|
||||
Mat4x4RotX(dc->r,è);
|
||||
Mat4x4RotZ(dc->r,roll);
|
||||
|
||||
DCMat4x4Set(dc,dc->r);
|
||||
dc->flags&=~DCF_TRANSFORMATION;
|
||||
dc->transform=&EDTransform;
|
||||
dc->x=cx;
|
||||
dc->y=cy;
|
||||
|
||||
Mat4x4RotZ(s2w,-roll);
|
||||
Mat4x4RotX(s2w,-è);
|
||||
Mat4x4RotZ(s2w,-heading);
|
||||
|
||||
xh=0;
|
||||
yh=0;
|
||||
zh=-256;
|
||||
Mat4x4MulXYZ(s2w,&xh,&yh,&zh);
|
||||
Free(s2w);
|
||||
|
||||
x1=xh+yh*32; y1=yh-xh*32; z1=0;
|
||||
(*dc->transform)(dc,&x1,&y1,&z1);
|
||||
x2=xh-yh*32; y2=yh+xh*32; z2=0;
|
||||
(*dc->transform)(dc,&x2,&y2,&z2);
|
||||
DCClipLine(dc,&x1,&y1,&x2,&y2);
|
||||
|
||||
MemSet(p,0,sizeof(p));
|
||||
if (x2<x1) {
|
||||
SwapI64(&x1,&x2);
|
||||
SwapI64(&y1,&y2);
|
||||
}
|
||||
if (!y1 && y2==dc->height-1) {
|
||||
if (!x1 && x2==dc->width-1) {
|
||||
p[0].x=0;
|
||||
p[0].y=0;
|
||||
p[1].x=0;
|
||||
p[1].y=dc->height-1;
|
||||
p[2].x=x2;
|
||||
p[2].y=dc->height-1;
|
||||
p[3].x=x1;
|
||||
p[3].y=0;
|
||||
if (x1<x2 ^^ -ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
dc->color=LTCYAN;
|
||||
else
|
||||
dc->color=ground_color;
|
||||
GrFillPoly3(dc,4,p);
|
||||
p[0].x=dc->width-1;
|
||||
p[1].x=dc->width-1;
|
||||
if (x1<x2 ^^ -ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
p[1].y=0;
|
||||
p[2].x=dc->width-1;
|
||||
p[2].y=y2;
|
||||
p[3].x=0;
|
||||
p[3].y=y1;
|
||||
if (rolled_over)
|
||||
dc->color=ground_color;
|
||||
else
|
||||
dc->color=LTCYAN;
|
||||
GrFillPoly3(dc,4,p);
|
||||
p[0].y=dc->height-1;
|
||||
p[1].y=dc->height-1;
|
||||
if (rolled_over)
|
||||
dc->color=LTCYAN;
|
||||
else
|
||||
dc->color=ground_color;
|
||||
GrFillPoly3(dc,4,p);
|
||||
} else {
|
||||
if (y2<y1) {
|
||||
SwapI64(&x1,&x2);
|
||||
SwapI64(&y1,&y2);
|
||||
}
|
||||
if (!y1 && y2==dc->height-1) {
|
||||
p[0].x=0;
|
||||
p[0].y=0;
|
||||
p[1].x=0;
|
||||
p[1].y=dc->height-1;
|
||||
p[2].x=x2;
|
||||
p[2].y=dc->height-1;
|
||||
p[3].x=x1;
|
||||
p[3].y=0;
|
||||
if (x1<x2 ^^ rolled_over)
|
||||
dc->color=ground_color;
|
||||
else
|
||||
dc->color=LTCYAN;
|
||||
GrFillPoly3(dc,4,p);
|
||||
p[0].x=dc->width-1;
|
||||
p[1].x=dc->width-1;
|
||||
if (x1<x2 ^^ rolled_over)
|
||||
dc->color=LTCYAN;
|
||||
else
|
||||
dc->color=ground_color;
|
||||
GrFillPoly3(dc,4,p);
|
||||
} else
|
||||
DCFill(dc,LTCYAN); //Not correct.
|
||||
}
|
||||
}
|
||||
dc->depth_buf=old_db;
|
||||
@@ -917,8 +864,8 @@ U0 DrawHorizon(CDC *dc)
|
||||
U0 Core0EagleDive()
|
||||
{
|
||||
CDC *dc=DCAlias(main_dc,Fs);
|
||||
I64 i,xx,yy,elev,height,bkcolor,cx=Fs->pix_width>>1,cy=Fs->pix_height>>1;
|
||||
F64 min_strip_width,roll,pitch,heading;
|
||||
I64 i,xx,yy,elev,height,cx=Fs->pix_width>>1,cy=Fs->pix_height>>1;
|
||||
F64 min_strip_width,tt;
|
||||
|
||||
update_jiffy_limit=cnts.jiffies+JIFFY_FREQ/40;
|
||||
|
||||
@@ -930,28 +877,26 @@ U0 Core0EagleDive()
|
||||
elev=MAX_I64;
|
||||
|
||||
height=z/COORDINATE_SCALE-elev;
|
||||
if (height<0) {
|
||||
if (elev>WATER_ELEVATION*MAP_SCALE) {
|
||||
dc->color=bkcolor=BLACK;
|
||||
if (!game_over) {
|
||||
GrRect(dc,0,0,dc->width,dc->height);
|
||||
music.mute=TRUE;
|
||||
Beep;
|
||||
game_over=TRUE;
|
||||
music.mute=FALSE;
|
||||
}
|
||||
} else
|
||||
bkcolor=BLUE;
|
||||
} else
|
||||
bkcolor=LTCYAN;
|
||||
if (height<0 && elev>WATER_ELEVATION*MAP_SCALE && !game_tf) {
|
||||
music.mute=TRUE;
|
||||
Beep;
|
||||
game_tf=tS;
|
||||
music.mute=FALSE;
|
||||
}
|
||||
|
||||
if (height>=0 && !(-ã/4<=Wrap(è-ã)<ã/4)) {
|
||||
DrawHorizon(dc);
|
||||
DrawHorizon(dc);
|
||||
|
||||
if (game_tf) {
|
||||
tt=game_tf-game_t0;
|
||||
if (Blink) {
|
||||
dc->color=RED;
|
||||
GrPrint(dc,(Fs->pix_width-9*FONT_WIDTH)/2,
|
||||
(Fs->pix_height-FONT_HEIGHT)/2,"Game Over");
|
||||
}
|
||||
} else {
|
||||
DCDepthBufRst(dc);
|
||||
|
||||
mp.update_not_done_flags=1<<mp_cnt-1;
|
||||
MPDrawIt(Fs,dc);
|
||||
|
||||
while (mp.update_not_done_flags)
|
||||
Sleep(1);
|
||||
|
||||
@@ -961,41 +906,36 @@ U0 Core0EagleDive()
|
||||
strip_height=ClampI64(
|
||||
strip_height*Clamp(0.25*min_strip_width/strip_height,0.9,1.1),
|
||||
64,1024);
|
||||
} else {
|
||||
dc->color=bkcolor;
|
||||
GrRect(dc,0,0,dc->width,dc->height);
|
||||
|
||||
tt=tS-game_t0;
|
||||
if (tt<5.0 && Blink) {
|
||||
dc->color=WHITE;
|
||||
GrPrint(dc,(Fs->pix_width-13*FONT_WIDTH)/2,
|
||||
(Fs->pix_height-FONT_HEIGHT)/2-4*FONT_HEIGHT,"Catch 10 Fish");
|
||||
}
|
||||
}
|
||||
|
||||
dc->pen_width=2;
|
||||
if (bkcolor==BLUE)
|
||||
if (game_tf && fish_left)
|
||||
dc->color=WHITE;
|
||||
else
|
||||
dc->color=BLACK;
|
||||
dc->flags&=~DCF_TRANSFORMATION;
|
||||
GrLine3(dc,cx+5,cy,0,cx-5,cy,0);
|
||||
GrLine3(dc,cx,cy+5,0,cx,cy-5,0);
|
||||
heading=Wrap(é2,0);
|
||||
roll=é1;
|
||||
pitch=Wrap(-è-ã/2,-ã);
|
||||
if (Abs(pitch)>ã/2) {
|
||||
pitch=Wrap(ã-pitch,-ã);
|
||||
roll=Wrap(roll+ã,-ã);
|
||||
heading=Wrap(heading+ã,0);
|
||||
}
|
||||
GrPrint(dc,0,0,"Roll:%5.1f Pitch:%5.1f Heading:%5.1f",
|
||||
roll*180/ã,pitch*180/ã,heading*180/ã);
|
||||
GrPrint(dc,0,FONT_HEIGHT,"Height:%5d Score:%d High:%d [Core Strip:%3d]",
|
||||
height,game_score,best_score,strip_height);
|
||||
if (invert_pitch)
|
||||
GrPrint(dc,0,0,"Pitch:%5.1f Roll:%5.1f Heading:%5.1f "
|
||||
"Height:%5d [Core Strip:%3d]",
|
||||
pitch*180/ã,Wrap(roll+ã)*180/ã,Wrap(heading+ã,0)*180/ã,
|
||||
height,strip_height);
|
||||
else
|
||||
GrPrint(dc,0,0,"Pitch:%5.1f Roll:%5.1f Heading:%5.1f "
|
||||
"Height:%5d [Core Strip:%3d]",
|
||||
pitch*180/ã,roll*180/ã,heading*180/ã,height,strip_height);
|
||||
GrPrint(dc,0,FONT_HEIGHT,"Fish Remaining:%d Time:%3.2f Best:%3.2f",
|
||||
fish_left,tt,best_score);
|
||||
|
||||
if (game_over && Blink) {
|
||||
dc->color=RED;
|
||||
GrPrint(dc,(Fs->pix_width-9*FONT_WIDTH)/2,
|
||||
(Fs->pix_height-FONT_HEIGHT)/2,"Game Over");
|
||||
} else if (tS-game_t0<5.0 && Blink) {
|
||||
dc->color=WHITE;
|
||||
GrPrint(dc,(Fs->pix_width-10*FONT_WIDTH)/2,
|
||||
(Fs->pix_height-FONT_HEIGHT)/2,"Catch Fish");
|
||||
}
|
||||
//We made an alias of this we don't want freed.
|
||||
//We made an alias of this we don't want freed.
|
||||
dc->depth_buf=NULL;
|
||||
DCDel(dc);
|
||||
WinMgrSync;
|
||||
@@ -1006,7 +946,7 @@ Obj *FishFind(I64 x1,I64 y1,I64 *_dd)
|
||||
{
|
||||
I64 dd,best_dd=MAX_I64;
|
||||
Obj *res=NULL,*tempo;
|
||||
Panel *tempp=panel_root;
|
||||
Panel *tempp=panel_head;
|
||||
while (tempp) {
|
||||
tempo=tempp->next_obj;
|
||||
while (tempo!=&tempp->next_obj) {
|
||||
@@ -1030,17 +970,18 @@ Obj *FishFind(I64 x1,I64 y1,I64 *_dd)
|
||||
U0 AnimateTask(I64)
|
||||
{//Steadily moves the airplane fwd.
|
||||
I64 *s2w,x1,y1,z1,dx,dy,dz,dd;
|
||||
F64 t0=tS,mS,é,d,pitch;
|
||||
F64 t0=tS,mS,é,d;
|
||||
Obj *tempo;
|
||||
while (TRUE) {
|
||||
mS=1000*(tS-t0);
|
||||
t0=tS;
|
||||
if (!game_over) {
|
||||
if (!game_tf) {
|
||||
//Screen to world coordinates
|
||||
s2w=Mat4x4IdentNew;
|
||||
Mat4x4RotZ(s2w,-é1);
|
||||
Mat4x4RotZ(s2w,-roll);
|
||||
Mat4x4RotX(s2w,-è);
|
||||
Mat4x4RotZ(s2w,-é2);
|
||||
Mat4x4RotZ(s2w,-heading);
|
||||
|
||||
dx=0;dy=0;dz=1<<16;
|
||||
Mat4x4MulXYZ(s2w,&dx,&dy,&dz);
|
||||
x-=speed*mS*COORDINATE_SCALE*dx/1<<16;
|
||||
@@ -1048,20 +989,20 @@ U0 AnimateTask(I64)
|
||||
z-=speed*mS*COORDINATE_SCALE*dz/1<<16;
|
||||
Free(s2w);
|
||||
x1=x/COORDINATE_SCALE; y1=y/COORDINATE_SCALE; z1=z/COORDINATE_SCALE;
|
||||
|
||||
if (z1<(WATER_ELEVATION+3)*MAP_SCALE) {
|
||||
if (z1<WATER_ELEVATION*MAP_SCALE) {
|
||||
z=WATER_ELEVATION*MAP_SCALE*COORDINATE_SCALE;
|
||||
pitch=Wrap(-è-ã/2,-ã);
|
||||
if (Abs(pitch)>ã/2) {
|
||||
pitch=Wrap(ã-pitch,-ã);
|
||||
if (invert_pitch) {
|
||||
if (pitch<-ã/8)
|
||||
è+=mS/1000.0*Sign(3*ã/8-è);
|
||||
} else if (pitch<-ã/8)
|
||||
è+=mS/1000.0*Sign(-3*ã/8-è);
|
||||
WrapAngles;
|
||||
}
|
||||
speed=1.0;
|
||||
if (tempo=FishFind(x1,y1,&dd)) {
|
||||
if (rolled_over || !(tempo=FishFind(x1,y1,&dd)))
|
||||
claws_down=0;
|
||||
else {
|
||||
d=Sqrt(dd);
|
||||
x1-=tempo->p.x;
|
||||
y1-=tempo->p.y;
|
||||
@@ -1071,9 +1012,11 @@ U0 AnimateTask(I64)
|
||||
else
|
||||
claws_down=0.01;
|
||||
if (d<MAP_SCALE*2) {
|
||||
game_score++;
|
||||
if (game_score>best_score)
|
||||
best_score=game_score;
|
||||
if (!--fish_left) {
|
||||
game_tf=tS;
|
||||
if (game_tf-game_t0<best_score)
|
||||
best_score=game_tf-game_t0;
|
||||
}
|
||||
QueRem(tempo);
|
||||
Free(tempo);
|
||||
music.mute=TRUE;
|
||||
@@ -1128,19 +1071,21 @@ U0 Init()
|
||||
I64 i,xx,yy;
|
||||
main_dc=DCNew(GR_WIDTH,GR_HEIGHT);
|
||||
critical_section_flag=0;
|
||||
game_over=FALSE;
|
||||
game_score=0;
|
||||
game_tf=0;
|
||||
fish_left=10;
|
||||
|
||||
MemSet(&mp,0,sizeof(MPCtrl));
|
||||
InitMap;
|
||||
DCDepthBufAlloc(main_dc);
|
||||
|
||||
strip_height=128;
|
||||
|
||||
è =-90.0*ã/180.0;
|
||||
é1 = 0.0*ã/180.0;
|
||||
é2 = 0.0*ã/180.0;
|
||||
speed = 2.5;
|
||||
roll =0;
|
||||
heading=0;
|
||||
speed =2.5;
|
||||
claws_down=0;
|
||||
WrapAngles;
|
||||
|
||||
x=MAP_WIDTH>>1 *COORDINATE_SCALE*MAP_SCALE;
|
||||
y=MAP_HEIGHT>>1*COORDINATE_SCALE*MAP_SCALE;
|
||||
@@ -1158,7 +1103,7 @@ U0 Init()
|
||||
|
||||
U0 CleanUp()
|
||||
{
|
||||
Panel *tempp=panel_root,*tempp1;
|
||||
Panel *tempp=panel_head,*tempp1;
|
||||
MPEnd;
|
||||
while (tempp) {
|
||||
tempp1=tempp->next;
|
||||
@@ -1173,8 +1118,6 @@ U0 CleanUp()
|
||||
U0 EagleDive()
|
||||
{
|
||||
I64 ch,sc;
|
||||
F64 pp,tt1,tt2;
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
MenuPush(
|
||||
"File {"
|
||||
@@ -1202,24 +1145,26 @@ U0 EagleDive()
|
||||
try //in case <CTRL-ALT-c> is pressed.
|
||||
do {
|
||||
if (ScanKey(&ch,&sc)) {
|
||||
pp=è; tt1=é1; tt2=é2;
|
||||
switch (ch) {
|
||||
case 0:
|
||||
switch (sc.u8[0]) {
|
||||
case SC_CURSOR_DOWN:
|
||||
è +=-CTRLS_SCALE*Cos(tt1);
|
||||
é2+=-CTRLS_SCALE*Sin(tt1)*Sin(è);
|
||||
break;
|
||||
case SC_CURSOR_UP:
|
||||
è -=-CTRLS_SCALE*Cos(tt1);
|
||||
é2-=-CTRLS_SCALE*Sin(tt1)*Sin(è);
|
||||
break;
|
||||
case SC_CURSOR_RIGHT:
|
||||
é1+=CTRLS_SCALE;
|
||||
break;
|
||||
case SC_CURSOR_LEFT:
|
||||
é1-=CTRLS_SCALE;
|
||||
break;
|
||||
start:
|
||||
case SC_CURSOR_DOWN:
|
||||
è-=CTRLS_SCALE*Cos(roll);
|
||||
heading-=CTRLS_SCALE*Sin(roll)*Sin(è);
|
||||
break;
|
||||
case SC_CURSOR_UP:
|
||||
è+=CTRLS_SCALE*Cos(roll);
|
||||
heading+=CTRLS_SCALE*Sin(roll)*Sin(è);
|
||||
break;
|
||||
case SC_CURSOR_RIGHT:
|
||||
roll+=CTRLS_SCALE;
|
||||
break;
|
||||
case SC_CURSOR_LEFT:
|
||||
roll-=CTRLS_SCALE;
|
||||
break;
|
||||
end:
|
||||
WrapAngles;
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
@@ -1230,9 +1175,6 @@ U0 EagleDive()
|
||||
Fs->draw_it=&DrawIt;
|
||||
break;
|
||||
}
|
||||
é1=Wrap(é1);
|
||||
è =Wrap(è);
|
||||
é2=Wrap(é2);
|
||||
} else
|
||||
Core0EagleDive;
|
||||
} while (ch!=CH_SHIFT_ESC && ch!=CH_ESC);
|
||||
@@ -1240,7 +1182,7 @@ U0 EagleDive()
|
||||
PutExcept;
|
||||
SettingsPop;
|
||||
CleanUp;
|
||||
RegWriteBranch("TempleOS/EagleDive","I64 best_score=%d;\n",best_score);
|
||||
RegWriteBranch("TempleOS/EagleDive","F64 best_score=%5.4f;\n",best_score);
|
||||
MenuPop;
|
||||
}
|
||||
|
||||
@@ -1253,17 +1195,56 @@ EagleDive;
|
||||
| ||||