TempleOSCDV4.09.ISO
This commit is contained in:
1 parent
2d56cda5f3
commit
353eac0dbe
88 files changed
+2449
-2043
No files matched your search
@@ -16,8 +16,7 @@ U0 DoOnce()
|
||||
"Install onto hard drive ";
|
||||
if (YorN) {
|
||||
DocBottom;
|
||||
ExeFile("::/Misc/OSInstall");
|
||||
if (ExePrint("OSInstall(FALSE);")) {
|
||||
if (RunFile("::/Misc/OSInstall",,FALSE)) {
|
||||
*sys_registry_doc->filename.name='C';
|
||||
"\n\n1) TAD\n\n";
|
||||
switch (GetI64("Staff Member Number:")) {
|
||||
@@ -40,7 +39,8 @@ U0 DoOnce()
|
||||
}
|
||||
if (FileFind("D:/Temp/Logs/access.log")) {
|
||||
Auto("\n\n%C",CH_ESC);
|
||||
WebLogRep("D:/Temp/Logs/*.log","D:/Temp/LogRep.TXT");
|
||||
RunFile("::/Demo/WebLogDemo/WebLogRep",,
|
||||
"D:/Temp/Logs/*.log","D:/Temp/LogRep.TXT");
|
||||
Del("D:/Temp/Logs/*.log");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ MapFileLoad("::/Kernel/Kernel");
|
||||
MapFileLoad("::/Compiler/Compiler");
|
||||
|
||||
#include "::/Apps/Psalmody/Load"
|
||||
#include "::/Demo/WebLogDemo/WebLogRep"
|
||||
#include "~/TOSCfg"
|
||||
#include "~/TOSMisc"
|
||||
#include "~/TOSToHtml"
|
||||
|
||||
Binary file not shown.
@@ -48,7 +48,7 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* $LK,"::/Demo/Games/FlatTops.CPP"$ is torpedo, not bombs.
|
||||
|
||||
* $LK,"::/Demo/Games/EagleDive.CPP"$ doesn't make sense or look real. Bad.
|
||||
* $LK,"::/Demo/Games/EagleDive.CPP"$ foreground clipping issues.
|
||||
|
||||
* Reset MPs with $LK,"Core0StartMP",A="MN:Core0StartMP"$() after boot. Free old task memory?
|
||||
|
||||
@@ -333,6 +333,8 @@ $ID,-5$
|
||||
$FG,5$$TX+CX,"Test"$$FG$
|
||||
* $LK,"SpriteBitMap",A="FI:::/Adam/Gr/SpriteBitMap.CPP"$: Grabscroll?
|
||||
|
||||
* $LK,"DrvMap",A="MN:DrvMap"$() in $LK,"MountFile",A="MN:MountFile"$().
|
||||
|
||||
* Return ress for $LK,"GrBlot",A="MN:GrBlot"$, $LK,"GrRect",A="MN:GrRect"$, $LK,"GrPutChar",A="MN:GrPutChar"$?
|
||||
* Collision cnts for $LK,"GrBlot",A="MN:GrBlot"$, $LK,"GrRect",A="MN:GrRect"$, $LK,"GrPutChar",A="MN:GrPutChar"$?
|
||||
|
||||
@@ -404,11 +406,13 @@ Moses gets Aaron $TX,"Exodus 4:10-16",HTML="http://www.biblegateway.com/passag
|
||||
There is no council against the Lord $TX,"Proverbs 21:30",HTML="http://www.biblegateway.com/verse/en/Proverbs%2021:30"$
|
||||
Human help is worthless $TX,"Psalm 108:12",HTML="http://www.biblegateway.com/verse/en/Psalm%20108:12"$
|
||||
Do not seek your own wealth $TX,"1 Corinthians 10:24",HTML="http://www.biblegateway.com/verse/en/1%20Corinthians%2010:24"$
|
||||
The stone rejected is conrerstone $TX,"Matthew 21:42",HTML="http://www.biblegateway.com/verse/en/Matthew%2021:42"$
|
||||
New wineskins $TX,"Mark 2:22",HTML="http://www.biblegateway.com/verse/en/Mark%202:22"$
|
||||
|
||||
$FG,5$$TX+CX,"Misc Notes"$$FG$
|
||||
Intel CEO's name: Brian Krzanich
|
||||
>$FG,2$lspci -v$FG$
|
||||
Size:$TX,"17400 KB",D="DD_TEMPLEOSCD_K_SIZE"$
|
||||
Size:$TX,"17408 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"$
|
||||
|
||||
@@ -2,7 +2,7 @@ $TR-UL,"Adam"$
|
||||
$ID,2$$TR,"SysMsgFlags"$
|
||||
$ID,2$sys_msg_flags[0]=0xFF;
|
||||
$ID,-2$$TR,"SysRegVer"$
|
||||
$ID,2$registry_version=4.080;
|
||||
$ID,2$registry_version=4.090;
|
||||
$ID,-2$$ID,-2$$TR-C-UL,"TempleOS"$
|
||||
$ID,2$$TR,"TOS"$
|
||||
$ID,2$I64 tos_code_walk_thru=105,tos_after_egypt_in_action=46;
|
||||
@@ -10,36 +10,36 @@ $ID,-2$$TR,"CircleTrace"$
|
||||
$ID,2$F64 best_score=4.9425;
|
||||
$ID,-2$$TR,"DiningStars"$
|
||||
$ID,2$F64 best_score=9999.0000;
|
||||
$ID,-2$$TR,"DunGen"$
|
||||
$ID,2$F64 best_score=20.5295;
|
||||
$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,"EagleDive"$
|
||||
$ID,2$I64 best_score=8;
|
||||
$ID,-2$$TR,"DunGen"$
|
||||
$ID,2$F64 best_score=20.5295;
|
||||
$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,"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,"XCaliber"$
|
||||
$ID,2$I64 best_score=248;
|
||||
I64 msg_flags=1;
|
||||
$ID,-2$$TR,"BlackDiamond"$
|
||||
$ID,2$I64 best_score=9;
|
||||
$ID,-2$$TR,"FlapBat"$
|
||||
$ID,2$F64 best_score=16.4090;
|
||||
$ID,-2$$TR,"Wenceslas"$
|
||||
$ID,2$F64 best_score=43.9944;
|
||||
$ID,-2$$TR,"BomberGolf"$
|
||||
$ID,2$I64 best_score=175;
|
||||
$ID,-2$$TR,"TimeOut"$
|
||||
$ID,2$I64 best_score=22202;
|
||||
$ID,-2$$TR,"ZoneOut"$
|
||||
$ID,2$F64 best_score=8.1373;
|
||||
$ID,-2$$TR,"KeepAway"$
|
||||
$ID,2$I64 best_score0=68,best_score1=30;
|
||||
$ID,-2$$TR,"Varoom"$
|
||||
$ID,2$F64 best_score=46.2643;
|
||||
$ID,-2$$TR,"CastleFrankenstein"$
|
||||
$ID,2$F64 best_score=33.8405;
|
||||
$ID,-2$$TR,"XCaliber"$
|
||||
$ID,2$I64 best_score=248;
|
||||
I64 msg_flags=1;
|
||||
$ID,-2$$TR,"EagleDive"$
|
||||
$ID,2$I64 best_score=8;
|
||||
$ID,-2$$ID,-2$$TR,"DemoCompany"$
|
||||
$ID,2$
|
||||
$TR,"Game1"$
|
||||
|
||||
@@ -11,13 +11,13 @@ U8 TOSGetDrv()
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 TOSMakeOSDrvBootInstall(U8 drv_let)
|
||||
U0 TOSBootHDIns(U8 drv_let)
|
||||
{
|
||||
drv_let=ToUpper(drv_let);
|
||||
Auto(TOS_CFG);
|
||||
MakeOSDrvBootInstall(drv_let);
|
||||
BootHDIns(drv_let);
|
||||
if (StrOcc(TOS_MASTER_BOOT_DRVS,drv_let))
|
||||
MasterBootInstall(drv_let);
|
||||
BootMHDIns(drv_let);
|
||||
}
|
||||
|
||||
U0 TOSCopyDrv(U8 src,U8 dst)
|
||||
@@ -34,7 +34,7 @@ U0 TOSCopyDrv(U8 src,U8 dst)
|
||||
|
||||
DocClear;
|
||||
Drv(dst);
|
||||
TOSMakeOSDrvBootInstall(dst);
|
||||
TOSBootHDIns(dst);
|
||||
}
|
||||
|
||||
U0 TOSPromptAndCopyDrv()
|
||||
@@ -229,7 +229,7 @@ install this on top.
|
||||
Drv('C');
|
||||
DistroPrep;
|
||||
Auto(TOS_DVD_CFG);
|
||||
MakeOSDrvBootInstall('C','T');
|
||||
BootDVDIns('C');
|
||||
Fmt('B',,FALSE,FSt_REDSEA);
|
||||
DelTree(TOS_DISTRO_DIR);
|
||||
CopyTree("C:/",TOS_DISTRO_DIR "/");
|
||||
@@ -241,7 +241,7 @@ 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.08",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.09",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');
|
||||
}
|
||||
@@ -264,7 +264,7 @@ I call $LK,"MakeBootDrvFile",A="FF:::/Demo/AcctExample/TOSDistro.CPP,MakeBootRes
|
||||
DistroPrep;
|
||||
MakeBootRescueDrvFile;
|
||||
Auto(TOS_DVD_DBG_CFG);
|
||||
MakeOSDrvBootInstall('C','T');
|
||||
BootDVDIns('C');
|
||||
Fmt('B',,FALSE,FSt_REDSEA);
|
||||
DelTree(TOS_DISTRO_DIR);
|
||||
CopyTree("C:/",TOS_DISTRO_DIR "/");
|
||||
@@ -277,7 +277,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.08",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -287,7 +287,7 @@ U0 StdDistroPrep()
|
||||
Drv('C');
|
||||
DistroPrep;
|
||||
Auto(STD_DISTRO_DVD_CFG);
|
||||
MakeOSDrvBootInstall('C','T');
|
||||
BootDVDIns('C');
|
||||
Fmt('B',,FALSE,FSt_REDSEA);
|
||||
DelTree(TOS_DISTRO_DIR);
|
||||
CopyTree("C:/",TOS_DISTRO_DIR "/");
|
||||
@@ -303,7 +303,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.08",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -312,7 +312,7 @@ 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.08",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_C_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -338,7 +338,7 @@ U0 MakeLiteDistro()
|
||||
ISO9660ISO(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSLITE_SIZE",
|
||||
"Download $TX,"TempleOS V4.08",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
|
||||
"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');
|
||||
}
|
||||
@@ -371,7 +371,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.08",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
0.01*(100*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -380,7 +380,7 @@ 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.08",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
0.01*(100*Size(TOS_ISO_C_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -389,25 +389,25 @@ U0 UpdateISODocDefines()
|
||||
{
|
||||
try {
|
||||
DefinePrint("DD_TEMPLEOSCD_SIZE",
|
||||
"Download $TX,"TempleOS V4.08",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.09",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.08",D="DD_OS_NAME_VERSION"$ - Standard RedSea Distro (%0.1f MB)",
|
||||
"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_TEMPLEOSULTRA_SIZE",
|
||||
"Download $TX,"TempleOS V4.08",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.2f MB)",
|
||||
"Download $TX,"TempleOS V4.09",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.08",D="DD_OS_NAME_VERSION"$ - UltraSmall RedSea Distro (%0.2f MB)",
|
||||
"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);
|
||||
|
||||
@@ -682,5 +682,7 @@ U0 InsMyURL()
|
||||
Free(url);
|
||||
}
|
||||
|
||||
if (FileFind("~/Downloads/Words/LinuxDict.TXT"))
|
||||
GodInit("~/Downloads/Words/LinuxDict.TXT");
|
||||
//if (FileFind("~/Downloads/Words/LinuxDict.TXT"))
|
||||
// GodInit("~/Downloads/Words/LinuxDict.TXT");
|
||||
if (FileFind("~/Downloads/Words/HappyWords.TXT"))
|
||||
GodInit("~/Downloads/Words/HappyWords.TXT");
|
||||
@@ -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.08",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
@@ -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.08",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
|
||||
"<body style=\"background-color:#55FFFF; border-style:solid;
|
||||
border-width:8px; border-color:#0000AA;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
asm {
|
||||
DIV_U64_BY_U64::
|
||||
_DIV_U64_BY_U64::
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
XOR RDX,RDX
|
||||
@@ -17,6 +17,6 @@ DIV_U64_BY_U64::
|
||||
RET1 16
|
||||
}
|
||||
|
||||
_extern DIV_U64_BY_U64 I64 DivU64ByU64(I64 dividend,I64 divisor);
|
||||
_extern _DIV_U64_BY_U64 I64 DivU64ByU64(I64 dividend,I64 divisor);
|
||||
|
||||
"123456/10=%d\n",DivU64ByU64(123456,10);
|
||||
+70
-41
@@ -73,7 +73,6 @@ I64 strip_height,x,y,z,game_score;
|
||||
Bool game_over;
|
||||
|
||||
class MPCtrl {
|
||||
I64 mp_cnt;
|
||||
I64 init_not_done_flags,update_not_done_flags,app_not_done_flags;
|
||||
I64 strip_width[MP_MAX_PROCESSORS];
|
||||
Bool app_done;
|
||||
@@ -139,8 +138,8 @@ U0 MPDoPanels(CTask *task)
|
||||
Panel *tempp,*start_ptr=NULL,*end_ptr=NULL;
|
||||
CD3I32 *poly;
|
||||
Fish *tempf;
|
||||
lo=Gs->num*(MAP_HEIGHT-1)/mp.mp_cnt;
|
||||
hi=(Gs->num+1)*(MAP_HEIGHT-1)/mp.mp_cnt;
|
||||
lo=Gs->num*(MAP_HEIGHT-1)/mp_cnt;
|
||||
hi=(Gs->num+1)*(MAP_HEIGHT-1)/mp_cnt;
|
||||
for (threshold=8;threshold>=1;threshold--)
|
||||
for (j=lo;j<hi;j++) {
|
||||
for (i=0;i<MAP_WIDTH-1;i++) {
|
||||
@@ -280,22 +279,14 @@ U0 InitMap()
|
||||
and convert it to panels. "panels[][]" holds the panels
|
||||
for each spot.
|
||||
*/
|
||||
I64 i,x,y,xx,yy;
|
||||
|
||||
I64 i;
|
||||
InitElevations;
|
||||
|
||||
MemSet(panels,0,sizeof(panels));
|
||||
xx=x/(MAP_SCALE*COORDINATE_SCALE);
|
||||
yy=y/(MAP_SCALE*COORDINATE_SCALE);
|
||||
z+=elevations[yy][xx]*COORDINATE_SCALE;
|
||||
|
||||
CalcNormals;
|
||||
|
||||
panel_root=NULL;
|
||||
num_panels=0;
|
||||
|
||||
mp.init_not_done_flags=1<<mp.mp_cnt-1;
|
||||
for (i=0;i<mp.mp_cnt;i++)
|
||||
mp.init_not_done_flags=1<<mp_cnt-1;
|
||||
for (i=0;i<mp_cnt;i++)
|
||||
Spawn(&MPDoPanels,Fs,"Do Panels",i);
|
||||
while (mp.init_not_done_flags)
|
||||
Sleep(1);
|
||||
@@ -434,10 +425,11 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
{
|
||||
I64 j,strip_width,*s2w,x1,y1,z1, xx,yy,
|
||||
xh,yh,zh,yh2,xh2,x1h,y1h,x1wa,y1wa,x1wb,y1wb,
|
||||
x3,y3,z3,
|
||||
x3,y3,z3,dd,dd_old,
|
||||
cx=task->pix_width>>1,
|
||||
cy=task->pix_height>>1;
|
||||
Panel reg *tempp;
|
||||
Bool w_on_map,h_on_map;
|
||||
|
||||
xx=x/(MAP_SCALE*COORDINATE_SCALE);
|
||||
yy=y/(MAP_SCALE*COORDINATE_SCALE);
|
||||
@@ -514,9 +506,12 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
//Take half steps to cover whole grid.
|
||||
xh>>=1; yh>>=1;
|
||||
xh2>>=1; yh2>>=1;
|
||||
w_on_map=FALSE;
|
||||
dd_old=MAX_I64;
|
||||
for (strip_width=0;cnts.jiffies<update_jiffy_limit;strip_width++) {
|
||||
x1h=x1wa;
|
||||
y1h=y1wa;
|
||||
h_on_map=FALSE;
|
||||
for (j=0;j<strip_height && cnts.jiffies<update_jiffy_limit;j++) {
|
||||
x1=x1h>>8; y1=y1h>>8;
|
||||
if (0<=x1<MAP_WIDTH && 0<=y1<MAP_HEIGHT) {
|
||||
@@ -528,10 +523,18 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
} else
|
||||
tempp->cnt++;
|
||||
}
|
||||
}
|
||||
h_on_map=TRUE;
|
||||
} else if (h_on_map)
|
||||
break;
|
||||
x1h+=xh;
|
||||
y1h+=yh;
|
||||
}
|
||||
if (h_on_map)
|
||||
w_on_map=TRUE;
|
||||
else if (w_on_map) {
|
||||
strip_width=MAX_I64;
|
||||
break;
|
||||
}
|
||||
x1wb-=yh2;
|
||||
y1wb+=xh2;
|
||||
if (strip_width&1) {
|
||||
@@ -541,6 +544,12 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
x1wa+=x1wb;
|
||||
y1wa+=y1wb;
|
||||
}
|
||||
if (!w_on_map) {
|
||||
dd=SqrI64(x1wa>>8-MAP_WIDTH>>1)+SqrI64(y1wa>>8-MAP_HEIGHT>>1);
|
||||
if (dd>dd_old)
|
||||
break;
|
||||
dd_old=dd;
|
||||
}
|
||||
}
|
||||
|
||||
Free(s2w);
|
||||
@@ -573,6 +582,12 @@ U0 DrawHorizon(CDC *dc)
|
||||
CD3I32 p[4];
|
||||
I32 *old_db=dc->depth_buf;
|
||||
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);
|
||||
@@ -616,12 +631,12 @@ U0 DrawHorizon(CDC *dc)
|
||||
if (-ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
dc->color=LTCYAN;
|
||||
else
|
||||
dc->color=LTGREEN;
|
||||
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=LTGREEN;
|
||||
dc->color=ground_color;
|
||||
else
|
||||
dc->color=LTCYAN;
|
||||
GrFillPoly3(dc,4,p);
|
||||
@@ -642,12 +657,12 @@ U0 DrawHorizon(CDC *dc)
|
||||
if (x1<x2 ^^ -ã/2<=é1<ã/2 ^^ -ã/2<=Wrap(è-ã/2)<ã/2)
|
||||
dc->color=LTCYAN;
|
||||
else
|
||||
dc->color=LTGREEN;
|
||||
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)
|
||||
dc->color=LTGREEN;
|
||||
dc->color=ground_color;
|
||||
else
|
||||
dc->color=LTCYAN;
|
||||
GrFillPoly3(dc,4,p);
|
||||
@@ -659,7 +674,7 @@ U0 DrawHorizon(CDC *dc)
|
||||
U0 Core0EagleDive()
|
||||
{
|
||||
CDC *dc=DCAlias(main_dc,Fs);
|
||||
I64 i,xx,yy,height,bkcolor,cx=Fs->pix_width>>1,cy=Fs->pix_height>>1;
|
||||
I64 i,xx,yy,elev,height,bkcolor,cx=Fs->pix_width>>1,cy=Fs->pix_height>>1;
|
||||
F64 min_strip_width,roll,pitch,heading;
|
||||
Fish *tempf;
|
||||
|
||||
@@ -668,9 +683,14 @@ U0 Core0EagleDive()
|
||||
|
||||
xx=x/(MAP_SCALE*COORDINATE_SCALE);
|
||||
yy=y/(MAP_SCALE*COORDINATE_SCALE);
|
||||
height=z/COORDINATE_SCALE-elevations[yy][xx];
|
||||
if (0<=xx<MAP_WIDTH && 0<=yy<MAP_HEIGHT)
|
||||
elev=elevations[yy][xx];
|
||||
else
|
||||
elev=MAX_I64;
|
||||
|
||||
height=z/COORDINATE_SCALE-elev;
|
||||
if (height<0) {
|
||||
if (elevations[yy][xx]>WATER_ELEVATION*MAP_SCALE) {
|
||||
if (elev>WATER_ELEVATION*MAP_SCALE) {
|
||||
dc->color=bkcolor=BLACK;
|
||||
if (!game_over) {
|
||||
GrRect(dc,0,0,dc->width,dc->height);
|
||||
@@ -688,7 +708,7 @@ U0 Core0EagleDive()
|
||||
DrawHorizon(dc);
|
||||
DCDepthBufRst(dc);
|
||||
|
||||
mp.update_not_done_flags=1<<mp.mp_cnt-1;
|
||||
mp.update_not_done_flags=1<<mp_cnt-1;
|
||||
MPDrawIt(Fs,dc);
|
||||
|
||||
xx=x/COORDINATE_SCALE;
|
||||
@@ -704,7 +724,7 @@ U0 Core0EagleDive()
|
||||
Sleep(1);
|
||||
|
||||
min_strip_width=MAX_F64;
|
||||
for (i=0;i<mp.mp_cnt;i++)
|
||||
for (i=0;i<mp_cnt;i++)
|
||||
min_strip_width=Min(min_strip_width,32.0*mp.strip_width[i]/(i+32.0));
|
||||
strip_height=ClampI64(
|
||||
strip_height*Clamp(0.25*min_strip_width/strip_height,0.9,1.1),
|
||||
@@ -772,7 +792,7 @@ Fish *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;
|
||||
F64 t0=tS,mS,é,d,pitch;
|
||||
Fish *tempf;
|
||||
while (TRUE) {
|
||||
mS=1000*(tS-t0);
|
||||
@@ -792,7 +812,17 @@ U0 AnimateTask(I64)
|
||||
x1=x/COORDINATE_SCALE; y1=y/COORDINATE_SCALE; z1=z/COORDINATE_SCALE;
|
||||
|
||||
if (z1<(WATER_ELEVATION+3)*MAP_SCALE) {
|
||||
speed=0.5;
|
||||
if (z1<WATER_ELEVATION*MAP_SCALE) {
|
||||
z=WATER_ELEVATION*MAP_SCALE*COORDINATE_SCALE;
|
||||
pitch=Wrap(-è-ã/2,-ã);
|
||||
if (Abs(pitch)>ã/2) {
|
||||
pitch=Wrap(ã-pitch,-ã);
|
||||
if (pitch<-ã/8)
|
||||
è+=mS/1000.0*Sign(3*ã/8-è);
|
||||
} else if (pitch<-ã/8)
|
||||
è+=mS/1000.0*Sign(-3*ã/8-è);
|
||||
}
|
||||
speed=1.0;
|
||||
if (tempf=FishFind(x1,y1,&dd)) {
|
||||
d=Sqrt(dd);
|
||||
x1-=tempf->p.x;
|
||||
@@ -831,7 +861,7 @@ U0 AnimateTask(I64)
|
||||
U0 MPEnd()
|
||||
{
|
||||
update_jiffy_limit=0;
|
||||
mp.app_not_done_flags=1<<mp.mp_cnt-1-1;
|
||||
mp.app_not_done_flags=1<<mp_cnt-1-1;
|
||||
mp.app_done=TRUE;
|
||||
//Wait for all cores to exit
|
||||
while (mp.app_not_done_flags)
|
||||
@@ -855,18 +885,15 @@ U0 SongTask(I64)
|
||||
}
|
||||
}
|
||||
|
||||
U0 Init(I64 _mp_cnt)
|
||||
U0 Init()
|
||||
{
|
||||
I64 i;
|
||||
I64 i,xx,yy;
|
||||
main_dc=DCNew(GR_WIDTH,GR_HEIGHT);
|
||||
critical_section_flag=0;
|
||||
game_over=FALSE;
|
||||
game_score=0;
|
||||
|
||||
MemSet(&mp,0,sizeof(MPCtrl));
|
||||
if (_mp_cnt<=mp_cnt)
|
||||
mp.mp_cnt=_mp_cnt;
|
||||
else
|
||||
mp.mp_cnt=mp_cnt;
|
||||
QueInit(&fish_root);
|
||||
InitMap;
|
||||
DCDepthBufAlloc(main_dc);
|
||||
@@ -876,13 +903,17 @@ U0 Init(I64 _mp_cnt)
|
||||
é1= 0.0*ã/180.0;
|
||||
é2= 0.0*ã/180.0;
|
||||
speed = 2.5;
|
||||
claws_down=0;
|
||||
|
||||
x=MAP_WIDTH>>1 *COORDINATE_SCALE*MAP_SCALE;
|
||||
y=MAP_HEIGHT>>1*COORDINATE_SCALE*MAP_SCALE;
|
||||
z=64 *COORDINATE_SCALE*MAP_SCALE;
|
||||
claws_down=0;
|
||||
|
||||
for (i=1;i<mp.mp_cnt;i++)
|
||||
xx=x/(MAP_SCALE*COORDINATE_SCALE);
|
||||
yy=y/(MAP_SCALE*COORDINATE_SCALE);
|
||||
z+=elevations[yy][xx]*COORDINATE_SCALE;
|
||||
|
||||
for (i=1;i<mp_cnt;i++)
|
||||
Spawn(&CoreAPEagleDiveTask,Fs,"AP EagleDive",i);
|
||||
Fs->task_end_cb=&TaskEndCB;
|
||||
game_t0=tS;
|
||||
@@ -911,7 +942,7 @@ U0 CleanUp()
|
||||
DCDel(main_dc);
|
||||
}
|
||||
|
||||
U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
|
||||
U0 EagleDive()
|
||||
{
|
||||
I64 ch,sc;
|
||||
F64 pp,tt1,tt2;
|
||||
@@ -937,7 +968,7 @@ U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
|
||||
DocClear;
|
||||
"Initializing...\n";
|
||||
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
|
||||
Init(_mp_cnt);
|
||||
Init;
|
||||
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
|
||||
Fs->draw_it=&DrawIt;
|
||||
try //in case <CTRL-ALT-c> is pressed.
|
||||
@@ -967,7 +998,7 @@ U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
|
||||
Fs->draw_it=NULL;
|
||||
CleanUp;
|
||||
WinMgrSync;
|
||||
Init(_mp_cnt);
|
||||
Init;
|
||||
Fs->draw_it=&DrawIt;
|
||||
break;
|
||||
}
|
||||
@@ -981,9 +1012,7 @@ U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
|
||||
PutExcept;
|
||||
SettingsPop;
|
||||
CleanUp;
|
||||
#ifjit
|
||||
RegWriteBranch("TempleOS/EagleDive","I64 best_score=%d;\n",best_score);
|
||||
#endif
|
||||
MenuPop;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ You can load it with:
|
||||
If you want to change the system font permanently,
|
||||
save to a file with this font editor program
|
||||
and cut and paste the code into $LK,"::/Kernel/FontStd.CPP"$.
|
||||
You will need to recompile Kernel by calling $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
You will need to recompile Kernel by calling $LK,"BootHDIns",A="MN:BootHDIns"$().
|
||||
|
||||
See $LK,"::/Demo/ExtendedChars.CPP"$, $LK,"::/Demo/Games/CharDemo.CPP"$,
|
||||
$LK,"::/Demo/Graphics/CharAnimation.CPP"$ and $LK,"::/Demo/ScreenCodes.CPP"$.
|
||||
|
||||
@@ -217,7 +217,7 @@ U0 Main()
|
||||
"$$RED$$This code is not efficient, but the compiler is simple.$$FG$$\n";
|
||||
Un(code,dst-code); //Unassemble the code we created.
|
||||
//$LK,"Call",A="MN:Call"$() is a function. See $LK,"_CALL",A="FF:::/Kernel/KUtils.CPP,_CALL"$::
|
||||
//See also $LK,"CallInd",A="MN:CallInd"$(). See $LK,"_CALLIND",A="FF:::/Kernel/KUtils.CPP,_CALLIND"$::
|
||||
//See also $LK,"CallInd",A="MN:CallInd"$(). See $LK,"_CALL_IND",A="FF:::/Kernel/KUtils.CPP,_CALL_IND"$::
|
||||
"$$LTBLUE$$Answer:%d$$FG$$\n",Call(code);
|
||||
} catch {
|
||||
"$$RED$$Error$$FG$$\n";
|
||||
|
||||
@@ -326,6 +326,7 @@ I64 TestCoreRange(RangeJob *r)
|
||||
if (rj.hi>r->hi)
|
||||
rj.hi=r->hi;
|
||||
res+=TestCoreSubRange(&rj);
|
||||
Yield;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,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.08",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.09",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
|
||||
Reference in new issue
Block a user