TempleOSTS_131005.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:52 +02:00
1 parent 1343005a29
commit 2d2a65d572
547 files changed
+33608 -12549

No files matched your search

+13 -24
View File
@@ -1,31 +1,20 @@
U0 DollarFile(CDirEntry *m1)
{
CDoc *doc;
while (m1) {
if (m1->attr & _ATTR_DIR)
DollarFile(m1->sub);
else {
"" m1->full_name;
NewLine;
doc=DocRead(m1->full_name,DOCF_PLAIN_TEXT|DOCF_DBL_DOLLARS);
DocWrite(doc);
DocDel(doc);
}
m1=m1->next;
}
}
public U0 Dollar(U8 *files_find_mask,U8 *fu_flags=NULL)
//This is for importing non-"TempleOS" text files.
//$BK,1$WARNING:$BK,0$Do not use on files with dollar cmds
// or on binary files. See $LK,"FilesFind","MN:FilesFind"$() for flags.
{
CDirEntry *tempm1=NULL;
CDoc *doc;
I64 fuf_flags=0;
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
tempm1=FilesFind(files_find_mask,fuf_flags);
DollarFile(tempm1);
CDirLstDel(tempm1);
CDirEntry *tempde,*tempde1;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
tempde=tempde1=FilesFind(files_find_mask,fuf_flags);
while (tempde) {
"%s\n",tempde->full_name;
doc=DocRead(tempde->full_name,DOCF_PLAIN_TEXT|DOCF_DBL_DOLLARS);
DocWrite(doc);
DocDel(doc);
tempde=tempde->next;
}
DirLstDel(tempde1);
}
+28 -8
View File
@@ -6,7 +6,7 @@ U0 TSStart()
U0 TS()
{
progress4=ts_num++;
progress4_max=142;
progress4_max=144;
*progress4_desc=0;
}
U0 TSEnd()
@@ -27,6 +27,15 @@ U0 DoSpritePlot()
XTalk(task,"Exit;\n");
}
U0 DoElephant()
{
CTask *task=SpawnUser;
XTalkWait(task,"#include \"::/TempleOS/Demo/Graphics/Elephant\";\n");
Sleep(1000);
SendMsg(task,MSG_KEY_DOWN_UP,CH_SHIFT_ESC,0);
XTalk(task,"Exit;\n");
}
U0 DoSpritePlot3D()
{
CTask *task=SpawnUser;
@@ -749,6 +758,12 @@ U0 DoScreenCodes()
XTalk(task,"Exit;\n");
}
U0 DoPanText()
{
CTask *task=SpawnUser;
XTalkWait(task,"#include \"::/TempleOS/Demo/Graphics/PanText\";\nExit;\n");
}
U0 DoExtendedChars()
{
CTask *task=SpawnUser;
@@ -814,10 +829,10 @@ U0 Do()
*/
U0 DoMPPrintF()
U0 DoMPPrint()
{
CTask *task=SpawnUser;
XTalkWait(task,"#include \"::/TempleOS/Demo/MultiCore/MPPrintF\";\n");
XTalkWait(task,"#include \"::/TempleOS/Demo/MultiCore/MPPrint\";\n");
Sleep(750);
XTalk(task,"Exit;\n");
}
@@ -1692,10 +1707,10 @@ U0 Do()
}
*/
U0 DoPrintF()
U0 DoPrint()
{
CTask *task=SpawnUser;
XTalkWait(task,"#include \"::/TempleOS/Demo/PrintF\";\n");
XTalkWait(task,"#include \"::/TempleOS/Demo/Print\";\n");
Sleep(2000);
XTalk(task,"Exit;\n");
}
@@ -2013,7 +2028,7 @@ U0 DoReps()
SendMsg(task,MSG_KEY_DOWN_UP,CH_SPACE,0);
TS; XTalkWait(task,"ATARep;\npSleep(1000);\n");
TS; XTalkWait(task,"HashDepthRep(adam_task->hash_table);Sleep(1000);\n");
TS; XTalkWait(task,"HAllRep;Sleep(1000);\n");
TS; XTalkWait(task,"Who;Sleep(1000);\n");
TS; XTalkWait(task,"PrtRep;Sleep(1000);\n");
TS; XTalkWait(task,"TaskRep;Sleep(1000);\n");
XTalk(task,"Exit;\n");
@@ -2051,10 +2066,11 @@ U0 OSTestSuite()
TS; DoClouds;
TS; if (mp_cnt>1) DoRadixSort;
TS; if (mp_cnt>1) DoLoadTest;
TS; if (mp_cnt>1) DoMPPrintF;
TS; if (mp_cnt>1) DoMPPrint;
TS; if (mp_cnt>1) DoLock;
TS; if (mp_cnt>1) DoInterrupts;
TS; DoSpritePlot;
TS; DoElephant;
TS; DoSpritePlot3D;
TS; DoSpritePut;
TS; DoSpritePutExt;
@@ -2084,7 +2100,7 @@ U0 OSTestSuite()
TS; DoPick3D;
TS; DoWhap;
TS; DoPalette;
TS; DoPrintF;
TS; DoPrint;
TS; DoShading;
TS; DoRotateTank;
TS; Do3DPoly;
@@ -2114,6 +2130,7 @@ U0 OSTestSuite()
TS; DoExceptions;
TS; DoScreenCodes;
TS; DoExtendedChars;
TS; DoPanText;
TS; DoCharGraphics;
TS; DoMagicPairs;
TS; DoHanoi;
@@ -2155,3 +2172,6 @@ U0 OSTestSuite()
}
OSTestSuite;
//$LK-A,"::/TempleOS/Demo/Carry.CPP.Z"$
//$LK-A,"::/TempleOS/Demo/Dsk/DskRaw.CPP.Z"$
+255
View File
@@ -0,0 +1,255 @@
//***************************************************
DefineLstLoad("ST_SPRITE_TYPES_OLD","End\0 \0Color 8Bit\0 \0Point\0"
"Line\0PolyLine\0PolyPoint\0Width\0Shift\0"
"BSpline2\0BSpline3\0BSpline2 Closed\0BSpline3 Closed\0"
" \0 \0 \0Rect\0Circle\0Flood Fill Not Color\0Flood Fill\0BitMap 8Bit\0"
" \0Text\0Ellipse\0Polygon\0Planar Symmetry\0"
"Dither Color 8Bit\0Rotated Rect\0Mesh\0Shiftable Mesh\0"
"Transform On\0Transform Off\0Arrow\0Text Box\0Text Diamond\0");
#define GRST_END 0
//Unused
#define GRST_COLOR8 2
//Unused
#define GRST_PT 4
#define GRST_LINE 5
#define GRST_POLYLINE 6
#define GRST_POLYPT 7
#define GRST_WIDTH 8
#define GRST_SHIFT 9
#define GRST_BSPLINE2 10
#define GRST_BSPLINE3 11
#define GRST_BSPLINE2_CLOSED 12
#define GRST_BSPLINE3_CLOSED 13
//Unused
//Unused
//Unused
#define GRST_RECT 17
#define GRST_CIRCLE 18
#define GRST_FLOOD_FILL_NOT 19
#define GRST_FLOOD_FILL 20
#define GRST_BITMAP8 21
//Unused
#define GRST_TEXT 23
#define GRST_ELLIPSE 24
#define GRST_POLYGON 25
#define GRST_PLANAR_SYMMETRY 26
#define GRST_DITHER_COLOR8 27
#define GRST_ROTATED_RECT 28
#define GRST_MESH 29
#define GRST_SHIFTABLE_MESH 30
#define GRST_TRANSFORM_ON 31
#define GRST_TRANSFORM_OFF 32
#define GRST_ARROW 33
#define GRST_TEXT_BOX 34
#define GRST_TEXT_DIAMOND 35
#define GRST_NUM_TYPES 36
I64 gr_sprite_base_size_old[GRST_NUM_TYPES]=
{
offset(CSprite.x1)-offset(CSprite.start), //GRST_END
1,
1+offset(CSprite.color8)-offset(CSprite.start), //GRST_COLOR8
1,
offset(CSprite.x2)-offset(CSprite.start), //GRST_PT
offset(CSprite.linespeed)-offset(CSprite.start), //GRST_LINE
offset(CSprite.y1)-offset(CSprite.start), //GRST_POLYLINE
offset(CSprite.y1)-offset(CSprite.start), //GRST_POLYPT
offset(CSprite.y1)-offset(CSprite.start), //GRST_WIDTH
offset(CSprite.x2)-offset(CSprite.start), //GRST_SHIFT
offset(CSprite.y1)-offset(CSprite.start), //GRST_BSPLINE2
offset(CSprite.y1)-offset(CSprite.start), //GRST_BSPLINE3
offset(CSprite.y1)-offset(CSprite.start), //GRST_BSPLINE2_CLOSED
offset(CSprite.y1)-offset(CSprite.start), //GRST_BSPLINE3_CLOSED
1,
1,
1,
offset(CSprite.linespeed)-offset(CSprite.start), //GRST_RECT
offset(CSprite.y2)-offset(CSprite.start), //GRST_CIRCLE
offset(CSprite.x2)-offset(CSprite.start), //GRST_FLOOD_FILL_NOT
offset(CSprite.x2)-offset(CSprite.start), //GRST_FLOOD_FILL
offset(CSprite.linespeed)-offset(CSprite.start), //GRST_BITMAP8
1,
offset(CSprite.st)-offset(CSprite.start), //GRST_TEXT
offset(CSprite.sides)-offset(CSprite.start), //GRST_ELLIPSE
sizeof(CSprite)-offset(CSprite.start), //GRST_POLYGON
offset(CSprite.linespeed)-offset(CSprite.start), //GRST_PLANAR_SYMMETRY
2+offset(CSprite.dither_color8)-offset(CSprite.start), //GRST_DITHER_COLOR8
offset(CSprite.sides)-offset(CSprite.start), //GRST_ROTATED_RECT
offset(CSprite.x2)-offset(CSprite.start), //GRST_MESH
offset(CSprite.shiftable_tri_cnt)+sizeof(I32)-offset(CSprite.start), //GRST_SHIFTABLE_MESH
offset(CSprite.x1)-offset(CSprite.start), //GRST_TRANSFORM_ON
offset(CSprite.x1)-offset(CSprite.start), //GRST_TRANSFORM_OFF
offset(CSprite.linespeed)-offset(CSprite.start), //GRST_ARROW
offset(CSprite.st)-offset(CSprite.start), //GRST_TEXT_BOX
offset(CSprite.st)-offset(CSprite.start), //GRST_TEXT_DIAMOND
};
I64 SpriteElemSizeOld(CSprite *tempg)
{
I64 i=gr_sprite_base_size_old[tempg->type];
switch (tempg->type) {
case GRST_POLYLINE:
i+=tempg->num<<1*sizeof(I32);
break;
case GRST_TEXT:
case GRST_TEXT_BOX:
case GRST_TEXT_DIAMOND:
i+=StrLen(tempg->st)+1;
break;
case GRST_BITMAP8:
i+=((tempg->width+7)&~7)*tempg->height;
break;
case GRST_POLYPT:
i+=sizeof(I32)<<1+(tempg->num*3+7)>>3;
break;
case GRST_BSPLINE2:
case GRST_BSPLINE3:
case GRST_BSPLINE2_CLOSED:
case GRST_BSPLINE3_CLOSED:
i+=tempg->num*sizeof(CD3I32);
break;
case GRST_MESH:
i+=tempg->vertex_cnt*sizeof(CD3I32)+tempg->tri_cnt*sizeof(CMeshTri);
break;
case GRST_SHIFTABLE_MESH:
i+=tempg->shiftable_vertex_cnt*sizeof(CD3I32)+tempg->shiftable_tri_cnt*sizeof(CMeshTri);
break;
}
return i;
}
public U8 *Sprite2TextOld(CSprite *tempg)
{ //Study $LK-A,"::/TempleOS/Demo/Graphics/SpriteText.CPP"$.
U8 buf[256],buf2[256],buf3[136];
I32 *ptr;
SPrint(buf,"%Z",tempg->type,"ST_SPRITE_TYPES_OLD");
*buf2=0;
switch (tempg->type) {
case GRST_COLOR8:
SPrint(buf2," %s",Color2Text(buf3,tempg->color8));
break;
case GRST_PT:
case GRST_FLOOD_FILL:
case GRST_FLOOD_FILL_NOT:
case GRST_SHIFT:
SPrint(buf2," %d,%d",tempg->x1,tempg->y1);
break;
case GRST_LINE:
case GRST_ARROW:
case GRST_PLANAR_SYMMETRY:
case GRST_RECT:
case GRST_ROTATED_RECT:
SPrint(buf2," (%d,%d)-(%d,%d)",
tempg->x1,tempg->y1,tempg->x2,tempg->y2);
break;
case GRST_CIRCLE:
SPrint(buf2," %d,%d:%dR",
tempg->x1,tempg->y1,tempg->x2);
break;
case GRST_WIDTH:
SPrint(buf2," %d",tempg->width);
break;
case GRST_TEXT:
case GRST_TEXT_BOX:
case GRST_TEXT_DIAMOND:
SPrint(buf2," %d,%d:%-16tQ",tempg->x1,tempg->y1,tempg->st);
break;
case GRST_DITHER_COLOR8:
SPrint(buf2," %s",Color2Text(buf3,ROPF_DITHER|tempg->dither_color8.u8[0]|tempg->dither_color8.u8[1]<<COLORROP_BITS));
break;
case GRST_POLYLINE:
case GRST_POLYPT:
ptr=&tempg->y1;
SPrint(buf2," %d %d,%d",tempg->num,ptr[0],ptr[1]);
break;
case GRST_ELLIPSE:
case GRST_POLYGON:
case GRST_BITMAP8:
SPrint(buf2," %dW,%dH:%d,%d",
tempg->width,tempg->height,tempg->x2,tempg->y2);
break;
case GRST_BSPLINE2:
case GRST_BSPLINE3:
case GRST_BSPLINE2_CLOSED:
case GRST_BSPLINE3_CLOSED:
SPrint(buf2," %d",tempg->num);
break;
case GRST_MESH:
SPrint(buf2," %dV,%dT",tempg->vertex_cnt,tempg->tri_cnt);
break;
case GRST_SHIFTABLE_MESH:
SPrint(buf2," %dV,%dT",tempg->shiftable_vertex_cnt,tempg->shiftable_tri_cnt);
break;
}
StrCat(buf,buf2);
return StrNew(buf);
}
I64 cvt_map[36]=
#define GRST_TEXT 23
{
0,-1,1,-1,8,
10,11,9,
3,7,17,
19,18,20,
-1,-1,-1,
12,14,22,
21,23,-1,27,
15,16,4,
2,13,24,
25,5,6,
26,28,29
};
U0 SpriteCvt(U8 *elems)
{
CSprite *tempg=elems-offset(CSprite.start);
U8 *st;
I64 size;
while (tempg->type) {
st=Sprite2TextOld(tempg);
"%s\n",st;
Free(st);
size=SpriteElemSizeOld(tempg);
tempg->type=cvt_map[tempg->type];
tempg(U8 *)+=size;
}
}
Bool FileCvt(U8 *name)
{
CDoc *doc;
CDocBin *tempb;
Bool result=FALSE,old_preempt=Preempt(OFF);
doc=DocRead(name);
tempb=doc->bin_root.next;
while (tempb!=&doc->bin_root) {
if (tempb->type==DOCBT_CSPRITE) {
result=TRUE;
"%s\n",name;
SpriteCvt(tempb->data);
}
tempb=tempb->next;
}
if (result)
DocWrite(doc);
DocDel(doc);
Preempt(old_preempt);
return result;
}
U0 FilesCvt(U8 *mask)
{
CDirEntry *tempde=FilesFind(mask,FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES),
*tempde1=tempde;
Bool old_preempt=Preempt(OFF);
while (tempde) {
FileCvt(tempde->full_name);
tempde=tempde->next;
}
DirLstDel(tempde1);
Preempt(old_preempt);
}
//FilesCvt("/TempleOS/*");
+2 -2
View File
@@ -2,7 +2,7 @@ public I64 PopUpTourPart()
{
I64 i;
CDoc *doc=DocNew;
DocPutS(doc,"$$FG,PURPLE$$TempleOS Tours$$FG$$\n\n"
DocPrint(doc,"$$FG,PURPLE$$TempleOS Tours$$FG$$\n\n"
"$$CM+LX,4,4$$$$BT,\"Part 1: The basics\",1$$"
"$$CM+LX,4,4$$$$BT,\"Part 2: Editing and running programs\",2$$"
"$$CM+LX,4,4$$$$BT,\"Part 3: Adding macros to personal menu\",3$$"
@@ -27,7 +27,7 @@ U0 TourMenu()
while (TRUE) {
i=PopUpTourPart;
if (i>=1) {
SPrintF(buf,"::/TempleOS/Misc/Tour/Tour%X.AUT",i);
SPrint(buf,"::/TempleOS/Misc/Tour/Tour%X.AUT",i);
ExeFile(buf);
} else
break;
+5 -5
View File
@@ -12,7 +12,7 @@ PopUpOk(
"and the boot drive is specified with \"$$FG,GREEN$$::$$FG$$\".\n\n"
"$$FG,GREEN$$<ENTER>$$FG$$ to complete the command.\n");
AFDelayedPutS("Cd(\"::/TempleOS/Demo/Games\");Dir;",25);
AFPrint(25,"Cd(\"::/TempleOS/Demo/Games\");Dir;");
AFPmtStr("\n");
PopUpOk(
@@ -22,7 +22,7 @@ PopUpOk(
"type it on the command line.\n\n"
"$$FG,GREEN$$<ENTER>$$FG$$ to complete the command.\n");
AFDelayedPutS("Ed(\"CastleFrankenstein.CPP.Z\");",25);
AFPrint(25,"Ed(\"CastleFrankenstein.CPP.Z\");");
AFPmtStr("\n");
Msg(MSG_KEY_DOWN_UP,0,SC_CURSOR_UP|SCF_CTRL);
@@ -52,7 +52,7 @@ PopUpOk(
"with cursor keys and $$FG,GREEN$$<SHIFT-ESC>$$FG$$\n"
"when you are done.\n");
AFDelayedPutS("#include \"CastleFrankenstein\";",25);
AFPrint(25,"#include \"CastleFrankenstein\";");
AFPmtStr("\n");
AFUntilChar(CH_SHIFT_ESC,CH_ESC);
@@ -63,7 +63,7 @@ PopUpOk(
"$$FG,GREEN$$<ENTER>$$FG$$ at the command line to\n"
"run it again.\n");
AFDelayedPutS("CastleFrankenstein;",25);
AFPrint(25,"CastleFrankenstein;");
AFPmtStr("\n");
AFUntilChar(CH_SHIFT_ESC,CH_ESC);
@@ -79,7 +79,7 @@ PopUpOk(
"$$FG,GREEN$$<CTRL-ALT-X>$$FG$$\tKill task (window)\n"
);
AFDelayedPutS("Ed(\"CastleFrankenstein.CPP.Z\");\n",50);
AFPrint(50,"Ed(\"CastleFrankenstein.CPP.Z\");\n");
PopUpOk(
"$$FG,GREEN$$<F5>$$FG$$ in the editor to run the file being edited.\n"
+4 -4
View File
@@ -38,11 +38,11 @@ Sleep(1000);
PopUpOk(
"Now, we'll fill-in the visible text\n"
"of the macro.\n");
AFDelayedPutS("Click Here");
AFPrint(,"Click Here");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
PopUpOk("Now, we'll fill-in the macro text.\n");
AFDelayedPutS("Cd(\"::/TempleOS/Demo/Games\");;#include \"CastleFrankenstein\";\\n");
AFPrint(,"Cd(\"::/TempleOS/Demo/Games\");;#include \"CastleFrankenstein\";\\n");
PopUpOk("$$FG,GREEN$$<ESC>$$FG$$ to exit the form.\n");
AFGetChar(CH_ESC);
@@ -70,9 +70,9 @@ Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
Msg(MSG_KEY_DOWN,CH_CTRLL,0);
for (i=0;i<6;i++)
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
AFDelayedPutS(" Click here for Pop-up version");
AFPrint(," Click here for Pop-up version");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
AFDelayedPutS("Cd(\"::/TempleOS/Demo/Games\");;#include \"CastleFrankenstein\";\\n");
AFPrint(,"Cd(\"::/TempleOS/Demo/Games\");;#include \"CastleFrankenstein\";\\n");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_LEFT|SCF_CTRL);
PopUpOk(
+2 -2
View File
@@ -1,4 +1,4 @@
PopUp("WSInit(\"::/TempleOS/\" FILENAME_MASK_TXT \";~*Bible.TXT*\");");
PopUp("WSInit(\"::/TempleOS/*;~*Bible.TXT*\");");
WordStat(ON);
Sleep(3500);
@@ -54,7 +54,7 @@ PopUpOk(
"to jump to source code. (I use WordStat.)\n"
"The $$FG,GREEN$$Man()$$FG$$ is good for short symbol names\n"
"or when inside the debugger.\n");
AFDelayedPutS("Man(\"MakeOSInstallPrtBootLoader\");");
AFPrint(,"Man(\"MakeOSInstallPrtBootLoader\");");
Sleep(1000);
"\n";
+1 -1
View File
@@ -7,7 +7,7 @@ PopUpOk(
AFGetChar(CH_CTRLF);
AFDelayedPutS("new song",150);
AFPrint(150,"new song");
PopUpOk("Cursor down 8 times.\n");
I64 i;