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

+1
View File
@@ -5,4 +5,5 @@
Cd("HOME");;
#include "/TempleOS/Accts/TS/TSAdam"
#include "/TempleOS/Accts/TS/TSDistro"
#include "/TempleOS/Accts/TS/TSHolySpirit"
Cd("HOME");;
+48 -58
View File
@@ -4,51 +4,13 @@
U0 FillInTime()
{
CDate cdt;
cdt=GetCurTimeDate;
cdt=GetDateTime;
"$$IV,1$$----%D %T----$$IV,0$$\n",cdt,cdt;
}
U0 RandQuote(I64 num)
{ //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
I64 i,size,l=512;
U8 *bible_filename=Define("ST_BIBLE_FILE"),
*buf=FileRead(bible_filename,&size);
if (buf) {
i=num%(size-l);
buf[i+l]=0;
"" buf+i;
Free(buf);
}
}
U0 BadCodeJump(I64 num)
{ //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
CDirEntry *root=FilesFind("/TempleOS/*",FUF_JUST_FILES|FUF_RECURSE|FUF_FLATTEN_TREE|FUF_JUST_SRC_FILES),
*tempm=root;
I64 cnt=0;
CDoc *doc;
U8 *st;
while (tempm) {
doc=DocRead(tempm->full_name);
tempm->user_data=doc->root.y;
cnt+=doc->root.y;
DocDel(doc);
tempm=tempm->next;
}
num=num%cnt;
tempm=root;
while (tempm) {
num-=tempm->user_data;
if (num<0) {
st=MSPrintF("FL:%s,%d",tempm->full_name,-num);
break;
}
tempm=tempm->next;
}
CDirLstDel(root);
Ed(st);
Free(st);
}
#define WS_F6 0
#define WS_SHIFT_F6 1
I64 my_wordstat=WS_F6;
Bool MyPutKey(I64 ch,I64 sc)
{ //ch=ASCII; sc=scancode
@@ -64,7 +26,7 @@ Bool MyPutKey(I64 ch,I64 sc)
//Return TRUE if you completely
//handled the key.
I64 i,sc2=sc.u8[0];
I64 i,sc2=sc.u8[0],old_wordstat;
if (SC_F1<=sc2<=SC_F10 &&
sc&SCF_ALT &&
@@ -130,10 +92,24 @@ Bool MyPutKey(I64 ch,I64 sc)
SetKeyDesc("God Word");
} else {
//$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
DocRecalc(DocPut);
if (DocPut->cur_entry->settings->cur_text_attr&0xF!=RED)
"$$FG,RED$$";
if (sc & SCF_SHIFT)
RandQuote(KbdMouseEvtTime>>4);
else
"%s ",ws_sorted_words[KbdMouseEvtTime>>4%ws_num_words]->str;
RandQuote;
else {
if (my_wordstat!=WS_SHIFT_F6) {
old_wordstat=TaskValidate(ws_task);
my_wordstat=WS_SHIFT_F6;
PopUp("WSInit(\"::/TempleOS/Apps/HolySpirit/Vocab.TXT*\");");
while (!Bt(&ws_flags,WSf_INIT_IN_PROGRESS)) //Kinda risky
Yield;
while (Bt(&ws_flags,WSf_INIT_IN_PROGRESS))
Yield;
WordStat(old_wordstat);
}
RandWord;
}
}
break;
case SC_F6:
@@ -143,24 +119,32 @@ Bool MyPutKey(I64 ch,I64 sc)
else
SetKeyDesc("Cmd/Init WordStat TempleOS");
} else {
if (sc & SCF_SHIFT)
old_wordstat=TaskValidate(ws_task);
if (sc & SCF_SHIFT) {
my_wordstat=WS_SHIFT_F6;
PopUp("WSInit(\"::/TempleOS/Apps/HolySpirit/Vocab.TXT*\");");
else
PopUp("WSInit(\"::/TempleOS/\" FILENAME_MASK_TXT \";~*Bible.TXT*\");");
} else {
my_wordstat=WS_F6;
PopUp("WSInit(\"::/TempleOS/*;~*Bible.TXT*\");");
}
while (!Bt(&ws_flags,WSf_INIT_IN_PROGRESS)) //Kinda risky
Yield;
while (Bt(&ws_flags,WSf_INIT_IN_PROGRESS))
Yield;
WordStat(old_wordstat);
}
break;
case SC_F7:
if (sc&SCF_KEY_DESC) {
if (sc & SCF_SHIFT)
SetKeyDesc("Dollar/Insert Hidden Widget");
SetKeyDesc("Misc/Insert My URL");
else
SetKeyDesc("Misc/Insert Datetime");
} else {
if (sc & SCF_SHIFT)
DocInsSafe(DocPut,
"$$HS+C$$$$FG$$$$HE$$");
FillInMyURL;
else
FillInTime();
FillInTime;
}
break;
}
@@ -201,7 +185,7 @@ Bool MyPutKey(I64 ch,I64 sc)
SetKeyDesc("Edit/Put Link to Cur Pos on Clipboard");
else {
ClipBoardDel;
DocPrintF(sys_clipboard_doc,"$$LK-A,\"FL:%s,%d\"$$",
DocPrint(sys_clipboard_doc,"$$LK-A,\"FL:%s,%d\"$$",
DocPut->filename.name,DocPut->cur_entry->y+1);
}
return TRUE;
@@ -211,7 +195,7 @@ Bool MyPutKey(I64 ch,I64 sc)
else {
i=RandU32;
ClipBoardDel;
DocPrintF(sys_clipboard_doc,"$$LK,\"<TODO>\",\"FA:%s,ANC%d\"$$",
DocPrint(sys_clipboard_doc,"$$LK,\"<TODO>\",\"FA:%s,ANC%d\"$$",
DocPut->filename.name,i);
"$$AN,\"<TODO>\",\"ANC%d\"$$",i;
}
@@ -235,7 +219,14 @@ Bool MyPutKey(I64 ch,I64 sc)
if (sc&SCF_KEY_DESC)
SetKeyDesc("Cmd/Jump to Bad Code");
else //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
BadCodeJump(KbdMouseEvtTime>>4);
BadCodeJump;
return TRUE;
case 'g':
if (sc&SCF_KEY_DESC)
SetKeyDesc("Godle");
else //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
Godle; //God drawing
return TRUE;
case 'p':
@@ -257,9 +248,8 @@ Bool MyPutKey(I64 ch,I64 sc)
return FALSE;
}
Bool MyPutS(U8 *st)
Bool MyPutS(U8 *)
{
nounusedwarn st;
return FALSE;
}
+4 -4
View File
@@ -40,13 +40,13 @@ U0 StartUpTasks()
WinTileVert;
if (!IsSysDeterministic)
PopUp("#include \"::/TempleOS/Adam/Start\";");
AdamLog("Boot Time:%7.3fs\n",tS);
XTalk(user1,"#include \"DoItOnce\";\n");
"Boot Time:%7.3fs\n",tS;
XTalk(user1,"Cd(\"HOME\");#include \"DoItOnce\";\n");
Silent(ON);
if (!IsSysDeterministic)
WSInit("/TempleOS/" FILENAME_MASK_TXT ";~*Bible.TXT*");
WSInit("/TempleOS/*;~*Bible.TXT*");
Silent(OFF);
AdamLog("WordStat Time:%7.3fs\n",tS);
"WordStat Time:%7.3fs\n",tS;
if (ts_has_win_drv)
DrvEnable(TS_WIN_DRV_LET,OFF);
}
Binary file not shown.
+2 -4
View File
@@ -1,12 +1,10 @@
//Change anything you want in this
//acct file or others.
#exe {OptOn(OPTf_WARN_PAREN);};
#exe {OptOn(OPTf_WARN_DUP_TYPES);};
OptOn(OPTf_WARN_PAREN);
OptOn(OPTf_WARN_DUP_TYPES);
#include "HOME/Adam3aLocalize"
#include "HOME/Adam3bPkgs"
#include "HOME/Adam3dKeyPlugIns"
#include "HOME/Adam3eWrappers"
#include "HOME/Adam3fSys"
#exe {OptOff(OPTf_WARN_PAREN);};
#exe {OptOff(OPTf_WARN_DUP_TYPES);};
@@ -0,0 +1,771 @@
//This uses $LK,"fixed-point","FI:::/TempleOS/Demo/Lectures/FixedPoint.CPP"$.
AcctRegSetDftEntry("TempleOS/DiningStars","F64 best_score=9999;\n");
AcctRegExeBranch("TempleOS/DiningStars");
#define PERSON_SCALE 6.0
$SP,"<1>",1$
$SP,"<2>",2$
$SP,"<3>",3$
#define PLANT_SCALE 6.0
$SP,"<4>",4$
$SP,"<5>",5$
class Wall
{
Wall *next,*last;
CD3I32 p1,p2;
I64 cpu_num;
} walls_root;
#define SCREEN_SCALE 1024
#define PLOT_GRID_WIDTH 24
#define PLOT_GRID_HEIGHT 24
#define MAN_HEIGHT 300
#define WALL_HEIGHT 1.0
#define BLUEPRINT_SCALE 4
CDC *blueprint_dc;
I64 blueprint_width,blueprint_height;
U8 *blueprint=NULL,
*panels_processed=NULL;
I64 man_xx,man_yy;
F64 man_é;
F64 t0,tf;
#define NUM_PERSONS 16
class Person
{
I64 x,y;
} persons[NUM_PERSONS];
U0 DSTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
{
I64 zz;
GrRot(dc->r,x,y,z);
zz=SCREEN_SCALE/3+*z;
if (zz<1) zz=1;
*x=SCREEN_SCALE/2* *x/zz;
*y=SCREEN_SCALE/2* (*y+MAN_HEIGHT)/zz;
*x+=dc->x;
*y+=dc->y;
*z+=dc->z;
}
public U0 DSLighting(CDC *dc,CD3I32 *p1,CD3I32 *p2,CD3I32 *p3,CColorROPU32 color)
{
CD3I32 v1,v2;
I64 i,vn_x,vn_y,vn_z;
F64 d;
v1.x=p1->x-p2->x;
v1.y=p1->y-p2->y;
v1.z=p1->z-p2->z;
v2.x=p3->x-p2->x;
v2.y=p3->y-p2->y;
v2.z=p3->z-p2->z;
//V1 and V2 are vects along two sides
//of the tri joined at p2.
vn_x=v1.y*v2.z-v1.z*v2.y;
vn_y=v1.z*v2.x-v1.x*v2.z;
vn_z=v1.x*v2.y-v1.y*v2.x;
if (d=Sqrt(SqrI64(vn_x)+SqrI64(vn_y)+SqrI64(vn_z)))
d=1<<16/d;
vn_x*=d;
vn_y*=d;
vn_z*=d;
//Vn is the cross product of V1 and V3
//which means it is perpendicular. It
//is the normal vect to the surface.
//It has been scaled to length 65536.
//Light source has been scaled to length 65536.
i=(vn_x*dc->ls.x+vn_y*dc->ls.y+vn_z*dc->ls.z)>>16;
i=(0x8000+i)>>1;//Tables are too dark ****TODO****
//The dot product of the light source
//vect and the surface normal
//gives an illumination number.
//65536*65536>>16=65536
//TempleOS will generate a random U16
//and compare to dither_probability and
//will pick from two colors.
//Probability dithering does not work with pen_width>1 at this time.
if (color.c0.rop&ROPBF_TWO_SIDED) {
color.c0.rop&=~ROPBF_TWO_SIDED;
i=AbsI64(i)<<1;
} else
i+=65536;
if (color.c0.rop&ROPBF_HALF_RANGE_COLOR) {
color.c0.rop&=~ROPBF_HALF_RANGE_COLOR;
i>>=1;
if (color>=8) {
color-=8;
i+=65536;
}
}
if (i<65536) {
dc->color=ROPF_PROBABILITY_DITHER+color<<16+BLACK;
dc->dither_probability=i;
} else {
dc->color=ROPF_PROBABILITY_DITHER+(color^8)<<16+color;
dc->dither_probability=i-65536;
}
}
#define LOS_SCALE 4
Bool LOSPlot(U8 *,I64 x,I64 y,I64)
{
if (blueprint[(y/LOS_SCALE)*blueprint_width+(x/LOS_SCALE)]==WHITE)
return FALSE;
else
return TRUE;
}
Bool LOS(I64 x1,I64 y1,I64 x2,I64 y2)
{ //Line of sight
return LOSLine(NULL,x1*LOS_SCALE/SCREEN_SCALE,y1*LOS_SCALE/SCREEN_SCALE,0,
x2*LOS_SCALE/SCREEN_SCALE,y2*LOS_SCALE/SCREEN_SCALE,0,&LOSPlot);
}
I64 mp_not_done_flags;
I64 *r1,*r2,*r3,*s2w,cx,cy,xh,yh,zh,x1h,y1h;
U0 MPDrawWalls(CDC *_dc)
{
CD3I32 poly[4];
I64 i,j,n,cpu_num=Gs->num,xx,yy,x,y,x1,y1,z1,x2,y2,_x1h,_y1h,dx,dy,xx1,yy1,xx2,yy2,
c,x1w,y1w,*_r3=MAllocIdentical(r3);
Wall *tempw;
CDC *dc=MAllocIdentical(_dc);
dc->r=MAllocIdentical(_dc->r);
_x1h=x1h-xh*cpu_num;
_y1h=y1h-yh*cpu_num;
for (j=cpu_num;j<PLOT_GRID_HEIGHT*2;j+=mp_cnt) {
x1w=_x1h;
y1w=_y1h;
for (i=0;i<PLOT_GRID_WIDTH*4;i++) {
xx=x1w/SCREEN_SCALE; yy=y1w/SCREEN_SCALE;
x=xx*SCREEN_SCALE-man_xx; y=yy*SCREEN_SCALE-man_yy;
if (1<=xx<blueprint_width-1 && 1<=yy<blueprint_height-1 &&
!LBts(panels_processed,yy*blueprint_width+xx)) {
if ((c=blueprint[yy*blueprint_width+xx]) &&
LOS(xx*SCREEN_SCALE+SCREEN_SCALE/2,yy*SCREEN_SCALE+SCREEN_SCALE/2,
man_xx,man_yy)) {
if (c==WHITE||c==LTBLUE)
dc->color=BROWN;
else
dc->color=c;
poly[0].x=x;
poly[0].y=y;
poly[0].z=0;
poly[1].x=x+SCREEN_SCALE;
poly[1].y=y;
poly[1].z=0;
poly[2].x=x+SCREEN_SCALE;
poly[2].y=y+SCREEN_SCALE;
poly[2].z=0;
poly[3].x=x;
poly[3].y=y+SCREEN_SCALE;
poly[3].z=0;
GrFillPoly3(dc,4,poly);
if (!((yy*blueprint_width+xx)%3)) {
if (c==GREEN) {
x1=x+SCREEN_SCALE/2;
y1=y+SCREEN_SCALE/2;
z1=0;
GrTransform(dc,&x1,&y1,&z1);
if (z1>0)
SpritePlotRotMat3B(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<4>",4$,_r3);
} else if (c==BROWN) {
x1=x+SCREEN_SCALE/2;
y1=y+SCREEN_SCALE/2;
z1=0;
GrTransform(dc,&x1,&y1,&z1);
if (z1>0)
SpritePlotRotMat3B(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<5>",5$,_r3);
}
}
}
}
x1w-=yh;
y1w+=xh;
}
_x1h-=xh*mp_cnt;
_y1h-=yh*mp_cnt;
}
tempw=walls_root.next;
while (tempw!=&walls_root) {
if (tempw->cpu_num==cpu_num) {
dc->color=YELLOW;
x1=tempw->p1.x*SCREEN_SCALE/BLUEPRINT_SCALE-man_xx;
y1=tempw->p1.y*SCREEN_SCALE/BLUEPRINT_SCALE-man_yy;
x2=tempw->p2.x*SCREEN_SCALE/BLUEPRINT_SCALE-man_xx;
y2=tempw->p2.y*SCREEN_SCALE/BLUEPRINT_SCALE-man_yy;
//The foreshortening distorts Z coordinates in a funny way,
//so we do the wall in tiny pieces.
n=2*(AbsI64(x2-x1)+AbsI64(y2-y1))/SCREEN_SCALE;
if (n<1) n=1;
dx=(x2-x1)<<16/n;
dy=(y2-y1)<<16/n;
xx1=x1<<16;
yy1=y1<<16;
for (i=0;i<n;i++) {
xx2=xx1+dx;
yy2=yy1+dy;
poly[0].x=xx1>>16;
poly[0].y=yy1>>16;
poly[0].z=0;
poly[1].x=xx2>>16;
poly[1].y=yy2>>16;
poly[1].z=0;
poly[2].x=xx2>>16;
poly[2].y=yy2>>16;
poly[2].z=WALL_HEIGHT*SCREEN_SCALE;
poly[3].x=xx1>>16;
poly[3].y=yy1>>16;
poly[3].z=WALL_HEIGHT*SCREEN_SCALE;
GrFillPoly3(dc,4,poly);
xx1=xx2; yy1=yy2;
}
dc->color=BLACK;
dc->pen_width=1;
GrLine3(dc,x1,y1,0,x1,y1,WALL_HEIGHT*SCREEN_SCALE);
GrLine3(dc,x2,y2,0,x2,y2,WALL_HEIGHT*SCREEN_SCALE);
}
tempw=tempw->next;
}
Free(_r3);
Free(dc->r);
Free(dc);
LBtr(&mp_not_done_flags,cpu_num);
}
U0 DrawIt(CTask *task,CDC *dc)
{
I64 i,j,xx,yy,zz,x,y;
U8 *temps;
F64 tt;
cx=task->win_pixel_width/2;
cy=task->win_pixel_height/2;
DCAllocDepthBuf(dc);
MemSet(panels_processed,0,(blueprint_width*blueprint_height+7)>>3);
//World to screen
GrRotZEqu(dc->r,man_é+ã/2);
GrRotXEqu(dc->r,ã/2);
GrSetRotMat(dc,dc->r);
xh=-man_xx/SCREEN_SCALE; yh=-man_yy/SCREEN_SCALE; zh=0;
GrRot(dc->r,&xh,&yh,&zh);
GrSetTranslation(dc->r,xh,yh,zh);
//Screen to world
s2w=GrRotX(-ã/2,task);
GrRotZEqu(s2w,-man_é-ã/2);
xh=0; yh=0; zh=SCREEN_SCALE;
GrRot(s2w,&xh,&yh,&zh);
//Rotate light source
xx=dc->ls.x; yy=dc->ls.y; zz=-dc->ls.z;
(*dc->transform)(dc,&xx,&yy,&zz);
dc->ls.x=xx; dc->ls.y=yy; dc->ls.z=zz;
dc->flags|=DCF_TRANSFORMATION;
dc->transform=&DSTransform;
dc->lighting=&DSLighting;
dc->x=cx;
dc->y=cy;
r1=GrRotX(-ã/2,task);
GrRotZEqu(r1,tT);
GrScaleMatEqu(r1,PERSON_SCALE);
r2=GrIdent(task);
GrScaleMatEqu(r2,PERSON_SCALE);
r3=GrRotX(-ã/2,task);
GrScaleMatEqu(r3,PLANT_SCALE);
x1h=man_xx+yh*PLOT_GRID_WIDTH/2+xh*(PLOT_GRID_HEIGHT-1);
y1h=man_yy-xh*PLOT_GRID_WIDTH/2+yh*(PLOT_GRID_HEIGHT-1);
xh>>=1; yh>>=1;
mp_not_done_flags=1<<mp_cnt-1;
for (i=0;i<mp_cnt;i++)
JobQue(&MPDrawWalls,dc,i);
while (mp_not_done_flags)
Yield;
//Draw Persons
for (i=0;i<NUM_PERSONS;i++) {
x=persons[i].x;
y=persons[i].y;
if (LOS(x,y,man_xx,man_yy)) {
x-=man_xx;
y-=man_yy;
xx=x;
yy=y;
zz=0;
GrTransform(dc,&xx,&yy,&zz);
if (zz>0) {
tt=2*Tri(tT,1.0);
if (tt<1.0)
temps=SpriteInterpolate($IB,"<2>",2$,$IB,"<1>",1$,tt);
else
temps=SpriteInterpolate($IB,"<1>",1$,$IB,"<3>",3$,tt-1.0);
SpritePlotRotMat3B(dc,x,y,0,temps,r1);
Free(temps);
}
}
}
Free(r1);
Free(r2);
Free(r3);
//Draw BluePrint heads-up display, scaled 2 pixels
Free(dc->r);
GrSetRotMat(dc,GrIdent(task));
dc->x=task->win_pixel_width -2*blueprint_width;
dc->y=task->win_pixel_height-2*blueprint_height;
dc->z=0;
dc->transform=&GrTransform;
dc->pen_width=2;
for (i=0;i<blueprint_height;i++)
for (j=0;j<blueprint_width;j++) {
dc->color=blueprint[(blueprint_height-1-i)*blueprint_width+j];
GrPlot3(dc,2*j,2*i,0);
}
//Draw Things on heads-up BluePrint
dc->color=LTPURPLE;
for (i=0;i<NUM_PERSONS;i++)
GrPlot3(dc,2*(persons[i].x/SCREEN_SCALE),2*(blueprint_height-1-persons[i].y/SCREEN_SCALE),0);
dc->color=LTCYAN;
GrPlot3(dc,2*(man_xx/SCREEN_SCALE),2*(blueprint_height-1-man_yy/SCREEN_SCALE),0);
dc->color=LTGREEN;
GrLine(dc,cx-5,cy,cx+5,cy);
GrLine(dc,cx,cy-5,cx,cy+5);
Free(s2w);
}
U0 BluePrintDrawIt(CTask *task,CDC *dc)
{
task->text_attr=BLUE<<4+WHITE;
GrBlot(dc,(task->win_pixel_width-blueprint_dc->width)>>1,
(task->win_pixel_height-blueprint_dc->height)>>1,blueprint_dc);
}
#define MAN_START_X 0
#define MAN_START_Y 1
U0 MakeBluePrint()
{
I64 msg_code,i,x1,y1,x2,y2,p1,p2,color=WHITE,cpu_num=0;
Wall *tempw;
DCFill(blueprint_dc,LTBLUE);
SettingsPush; //See $LK,"SettingsPush","MN:SettingsPush"$
Fs->win_inhibit=WIF_ALL-WIF_BORDER;
DocClear;
"Draw Floor Plan:
Walls in WHITE
Tables in BROWN
Plants in GREEN
";
WinMax;
WordStat;
Fs->draw_it=&BluePrintDrawIt;
do {
msg_code=GetMsg(&p1,&p2,
1<<MSG_KEY_DOWN+1<<MSG_IP_L_DOWN+
1<<MSG_IP_R_UP);
switch (msg_code) {
case MSG_IP_R_UP:
i=PopUpColor;
if (i>=0) color=i;
break;
case MSG_IP_L_DOWN:
if (color==WHITE) {
p1-=(Fs->win_pixel_width-blueprint_dc->width)>>1;
p2-=(Fs->win_pixel_height-blueprint_dc->height)>>1;
x1=p1; y1=p2;
x2=p1; y2=p2;
blueprint_dc->color=ROP_XOR+color^LTBLUE;
while (msg_code!=MSG_IP_L_UP) {
GrLine(blueprint_dc,x1,y1,x2,y2);
msg_code=GetMsg(&p1,&p2,
1<<MSG_IP_L_UP+1<<MSG_IP_MOVE);
p1-=(Fs->win_pixel_width-blueprint_dc->width)>>1;
p2-=(Fs->win_pixel_height-blueprint_dc->height)>>1;
GrLine(blueprint_dc,x1,y1,x2,y2);
x2=p1; y2=p2;
}
blueprint_dc->color=color;
GrLine(blueprint_dc,x1,y1,x2,y2);
tempw=CAlloc(sizeof(Wall));
tempw->p1.x=x1;
tempw->p1.y=blueprint_dc->height-y1;
tempw->p2.x=x2;
tempw->p2.y=blueprint_dc->height-y2;
tempw->cpu_num=cpu_num++%mp_cnt;
QueIns(tempw,walls_root.last);
} else {
p1-=(Fs->win_pixel_width-blueprint_dc->width)>>1;
p2-=(Fs->win_pixel_height-blueprint_dc->height)>>1;
x1=p1; y1=p2;
x2=p1; y2=p2;
blueprint_dc->color=ROP_XOR+color^LTBLUE;
while (msg_code!=MSG_IP_L_UP) {
GrRectB(blueprint_dc,x1,y1,x2,y2);
msg_code=GetMsg(&p1,&p2,
1<<MSG_IP_L_UP+1<<MSG_IP_MOVE);
p1-=(Fs->win_pixel_width-blueprint_dc->width)>>1;
p2-=(Fs->win_pixel_height-blueprint_dc->height)>>1;
GrRectB(blueprint_dc,x1,y1,x2,y2);
x2=p1; y2=p2;
}
blueprint_dc->color=color;
GrRectB(blueprint_dc,x1,y1,x2,y2);
}
break;
case MSG_KEY_DOWN:
break;
}
} while (msg_code!=MSG_KEY_DOWN || !p1);
GetMsg(,,1<<MSG_KEY_UP);
SettingsPop;
}
U0 Init()
{
I64 i,j,x,y,c,c1;
QueInit(&walls_root);
blueprint_dc=DCNew(DCT_COLOR8,BLUEPRINT_SCALE*64,BLUEPRINT_SCALE*64);
MakeBluePrint;
DocClear;
"$$BG,LTGRAY$$"; NewLine(TEXT_ROWS/2-1);
blueprint_width =blueprint_dc->width/BLUEPRINT_SCALE;
blueprint_height=blueprint_dc->height/BLUEPRINT_SCALE;
Free(blueprint);
Free(panels_processed);
blueprint=MAlloc(blueprint_width*blueprint_height*sizeof(U8));
MemSet(blueprint,WHITE,blueprint_width*blueprint_height);
panels_processed=MAlloc((blueprint_width*blueprint_height+7)>>3);
for (y=1;y<blueprint_height-1;y++)
for (x=1;x<blueprint_width-1;x++) {
c=LTBLUE;
for (i=0;i<BLUEPRINT_SCALE;i++)
for (j=0;j<BLUEPRINT_SCALE;j++)
if ((c1=GrPeek(blueprint_dc,x*BLUEPRINT_SCALE+i,y*BLUEPRINT_SCALE+j))!=LTBLUE)
c=c1;
blueprint[(blueprint_height-1-y)*blueprint_width+x]=c;
}
DCDel(blueprint_dc);
man_xx=(1+MAN_START_X)*SCREEN_SCALE;
man_yy=(blueprint_height-1-MAN_START_Y)*SCREEN_SCALE;
man_é=0;
for (i=0;i<NUM_PERSONS;i++) {
do {
persons[i].x=RandU64%((blueprint_width-2)*SCREEN_SCALE)+SCREEN_SCALE;
persons[i].y=RandU64%((blueprint_height-2)*SCREEN_SCALE)+SCREEN_SCALE;
} while (blueprint[(persons[i].y/SCREEN_SCALE)*blueprint_width+persons[i].x/SCREEN_SCALE]==WHITE);
}
tf=0;
t0=tT;
}
U0 AnimateTask(I64)
{
I64 i,x,y,dd;
while (TRUE) {
dd=0.25*SCREEN_SCALE*Sin(tT/2);
for (i=0;i<NUM_PERSONS;i++) {
x=persons[i].x;
y=persons[i].y;
if (i&1)
x+=dd;
else
y+=dd;
if (0<=x<=blueprint_width*SCREEN_SCALE &&
0<=y<=blueprint_height*SCREEN_SCALE &&
blueprint[(y/SCREEN_SCALE)*blueprint_width+x/SCREEN_SCALE]!=WHITE) {
if (blueprint[(y/SCREEN_SCALE)*blueprint_width+x/SCREEN_SCALE+1]==WHITE &&
x-RoundI64(x,SCREEN_SCALE)>SCREEN_SCALE/2 ||
blueprint[(y/SCREEN_SCALE)*blueprint_width+x/SCREEN_SCALE-1]==WHITE &&
x-RoundI64(x,SCREEN_SCALE)<SCREEN_SCALE/2)
x=RoundI64(x,SCREEN_SCALE)+SCREEN_SCALE/2;
if (blueprint[(y/SCREEN_SCALE+1)*blueprint_width+x/SCREEN_SCALE]==WHITE &&
y-RoundI64(y,SCREEN_SCALE)>SCREEN_SCALE/2 ||
blueprint[(y/SCREEN_SCALE-1)*blueprint_width+x/SCREEN_SCALE]==WHITE &&
y-RoundI64(y,SCREEN_SCALE)<SCREEN_SCALE/2)
y=RoundI64(y,SCREEN_SCALE)+SCREEN_SCALE/2;
persons[i].x=x;
persons[i].y=y;
}
}
Sleep(20);
}
}
U0 CleanUp()
{
Free(blueprint);
blueprint=NULL;
Free(panels_processed);
panels_processed=NULL;
QueDel(&walls_root);
}
U0 SongTask(I64)
{ //Song by Terry A. Davis
Fs->task_end_cb=&SndTaskEndCB;
MusicSettingsRst;
while (TRUE) {
Play("2q.A#1eG2AeA#qAq.A#1eG2eAeA#qA");
Play("q.A#1eG2A#A1qG2q.A#1eG2A#A1qG");
Play("3eA#A2qG3eA#A2qG3eA#A2G3AA#A2qG");
}
}
U0 MoveMan(F64 é)
{
I64 x,y,color,step=SCREEN_SCALE/2;
do {
x=man_xx+step*Cos(é);
y=man_yy-step*Sin(é);
x=Limit(x,0,blueprint_width*SCREEN_SCALE);
y=Limit(y,0,blueprint_height*SCREEN_SCALE);
color=blueprint[y/SCREEN_SCALE*blueprint_width+x/SCREEN_SCALE];
if (color==LTBLUE || color==GREEN) {
man_xx=x;
man_yy=y;
break;
} else
step>>=1;
} while (step);
}
#define MICRO_STEPS 4
U0 RotateMan(F64 d)
{
I64 i;
for (i=0;i<MICRO_STEPS;i++) {
man_é+=d/MICRO_STEPS;
Sleep(15);
}
}
U0 DiningStars()
{
I64 sc;
MenuPush(
"File {"
" Abort(,CH_SHIFT_ESC);"
" Exit(,CH_ESC);"
"}"
"Play {"
" Fwd(,,SC_CURSOR_UP);"
" Backward(,,SC_CURSOR_DOWN);"
" Left(,,SC_CURSOR_LEFT);"
" Right(,,SC_CURSOR_RIGHT);"
"}"
);
SettingsPush; //See $LK,"SettingsPush","MN:SettingsPush"$
Fs->text_attr=BROWN<<4+WHITE;
Preempt(OFF);
WinBorder;
WinMax;
WordStat;
Init;
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
Fs->song_task=Spawn(&SongTask,NULL,"Song",,Fs);
DocCursor;
Fs->draw_it=&DrawIt;
try {
while (TRUE) {
switch (GetKey(&sc)) {
case CH_ESC:
case CH_SHIFT_ESC:
goto fs_done;
case 0:
switch (sc.u8[0]) {
case SC_CURSOR_RIGHT:
Spawn(&RotateMan,(ã/32)(I64));
break;
case SC_CURSOR_LEFT:
Spawn(&RotateMan,(-ã/32)(I64));
break;
case SC_CURSOR_UP:
MoveMan(man_é);
break;
case SC_CURSOR_DOWN:
MoveMan(man_é+ã);
break;
}
break;
}
}
fs_done:
} catch
CatchAll;
DocClear;
SettingsPop;
CleanUp;
MenuPop;
AcctRegWriteBranch("TempleOS/DiningStars","F64 best_score=%5.4f;\n",best_score);
}
DiningStars;
,ÎÿÿÿÎÿÿÿûÿÿÿçÿÿÿûÿÿÿçÿÿÿµÿÿÿ�ÿÿÿƒÿÿÿ�ÿÿÿâÿÿÿµÿÿÿâÿÿÿûÿÿÿÎÿÿÿûÿÿÿÎÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿµÿÿÿûÿÿÿ�ÿÿÿûÿÿÿ�ÿÿÿâÿÿÿûÿÿÿµÿÿÿâÿÿÿ�ÿÿÿµÿÿÿâÿÿÿµÿÿÿâÿÿÿ�ÿÿÿ�ÿÿÿûÿÿÿµÿÿÿûÿÿÿâÿÿÿµÿÿÿûÿÿÿâÿÿÿ�ÿÿÿûÿÿÿ 


  ␍␍ ␍ 
 

 ␍
␍÷ÿÿÿ÷ÿÿÿñÿÿÿ÷ÿÿÿ ôÿÿÿ ÷ÿÿÿ øÿÿÿçÿÿÿìÿÿÿçÿÿÿìÿÿÿçÿÿÿøÿÿÿøÿÿÿçÿÿÿðÿÿÿçÿÿÿðÿÿÿçÿÿÿøÿÿÿçÿÿÿçÿÿÿ   ␍ ␍ 
   


   ␍ ␍␍
$EºÿÿÿÝÿÿÿÈÿÿÿÝÿÿÿÈÿÿÿëÿÿÿºÿÿÿëÿÿÿºÿÿÿÏÿÿÿÝÿÿÿÈÿÿÿÏÿÿÿÝÿÿÿÈÿÿÿÏÿÿÿëÿÿÿºÿÿÿÏÿÿÿëÿÿÿ7ÝÿÿÿEÝÿÿÿEëÿÿÿ7ëÿÿÿ7ÏÿÿÿÝÿÿÿEÏÿÿÿÝÿÿÿEÏÿÿÿëÿÿÿ7Ïÿÿÿëÿÿÿ7EE"7"7ÏÿÿÿEÏÿÿÿEÏÿÿÿ"7Ïÿÿÿ"ºÿÿÿÈÿÿÿÈÿÿÿ"ºÿÿÿ"ºÿÿÿÏÿÿÿÈÿÿÿÏÿÿÿÈÿÿÿÏÿÿÿ"ºÿÿÿÏÿÿÿ"ºÿÿÿÈÿÿÿÝÿÿÿEÈÿÿÿÝÿÿÿEÈÿÿÿ"ºÿÿÿÈÿÿÿ"

 ␍  

␍ ␍ 
 ␍

␍         ␍ ␍#"!#! #  ##"#␍!! "!␍␍""␍Êp¨­ÿÿÿûÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ·ÿÿÿûÿÿÿûÿÿÿ·ÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ­ÿÿÿ·ÿÿÿûÿÿÿ·ÿÿÿ
·ÿÿÿûÿÿÿöÿÿÿ·ÿÿÿûÿÿÿ
ÚÿÿÿûÿÿÿöÿÿÿÚÿÿÿûÿÿÿ
·ÿÿÿöÿÿÿ·ÿÿÿ
ÚÿÿÿöÿÿÿÚÿÿÿºÿÿÿüÿÿÿ ¼ÿÿÿþÿÿÿÉÿÿÿËÿÿÿÿÿÿ ¸ÿÿÿÅÿÿÿ Çÿÿÿ ÊÿÿÿÌÿÿÿÒÿÿÿÔÿÿÿÄÿÿÿÆÿÿÿ
ÌÿÿÿÎÿÿÿÑÿÿÿÓÿÿÿÕÿÿÿ×ÿÿÿÍÿÿÿÏÿÿÿÑÿÿÿÓÿÿÿöÿÿÿ¸ÿÿÿÿÿÿÿòÿÿÿ¸ÿÿÿóÿÿÿÇÿÿÿöÿÿÿïÿÿÿÇÿÿÿøÿÿÿöÿÿÿºÿÿÿòÿÿÿºÿÿÿóÿÿÿÉÿÿÿúÿÿÿïÿÿÿÉÿÿÿüÿÿÿóÿÿÿÇÿÿÿöÿÿÿïÿÿÿÇÿÿÿøÿÿÿñÿÿÿÔÿÿÿïÿÿÿíÿÿÿÔÿÿÿñÿÿÿóÿÿÿÉÿÿÿúÿÿÿïÿÿÿÉÿÿÿüÿÿÿñÿÿÿÖÿÿÿóÿÿÿíÿÿÿÖÿÿÿõÿÿÿñÿÿÿÔÿÿÿðÿÿÿíÿÿÿÔÿÿÿòÿÿÿðÿÿÿÛÿÿÿíÿÿÿìÿÿÿÛÿÿÿïÿÿÿñÿÿÿÖÿÿÿòÿÿÿíÿÿÿÖÿÿÿôÿÿÿðÿÿÿÝÿÿÿïÿÿÿìÿÿÿÝÿÿÿñÿÿÿ ØÿÿÿýÿÿÿØÿÿÿÿÿÿÿäÿÿÿòÿÿÿäÿÿÿôÿÿÿ ÜÿÿÿÜÿÿÿèÿÿÿöÿÿÿèÿÿÿøÿÿÿäÿÿÿòÿÿÿäÿÿÿôÿÿÿðÿÿÿçÿÿÿðÿÿÿéÿÿÿèÿÿÿöÿÿÿèÿÿÿøÿÿÿôÿÿÿëÿÿÿôÿÿÿíÿÿÿõÿÿÿãÿÿÿõÿÿÿãÿÿÿîÿÿÿÿÿÿÿîÿÿÿïÿÿÿçÿÿÿïÿÿÿçÿÿÿúÿÿÿòÿÿÿÿÿÿÿúÿÿÿòÿÿÿýÿÿÿÜÿÿÿýÿÿÿ÷ÿÿÿÞÿÿÿÿÿÿÿÿÿÿÿèÿÿÿ ùÿÿÿêÿÿÿ ýÿÿÿÖÿÿÿ÷ÿÿÿØÿÿÿÿÿÿÿâÿÿÿ␍ùÿÿÿäÿÿÿÿÿÿÿçÿÿÿùÿÿÿéÿÿÿ
÷ÿÿÿ␍ûÿÿÿùÿÿÿÿÿÿÿãÿÿÿùÿÿÿåÿÿÿóÿÿÿûÿÿÿõÿÿÿýÿÿÿûÿÿÿýÿÿÿøÿÿÿýÿÿÿøÿÿÿ ÷ÿÿÿ ûÿÿÿ÷ÿÿÿòÿÿÿýÿÿÿòÿÿÿ 

␍ ␍   ␍ 
 
  
 ␍␍    ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokÊp¨­ÿÿÿûÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ·ÿÿÿûÿÿÿûÿÿÿ·ÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ­ÿÿÿ·ÿÿÿûÿÿÿ·ÿÿÿ
·ÿÿÿûÿÿÿöÿÿÿ·ÿÿÿûÿÿÿ
ÚÿÿÿûÿÿÿöÿÿÿÚÿÿÿûÿÿÿ
·ÿÿÿöÿÿÿ·ÿÿÿ
ÚÿÿÿöÿÿÿÚÿÿÿ·ÿÿÿ ¹ÿÿÿÆÿÿÿ÷ÿÿÿÈÿÿÿ÷ÿÿÿ¹ÿÿÿ »ÿÿÿÈÿÿÿûÿÿÿÊÿÿÿûÿÿÿÆÿÿÿ÷ÿÿÿÈÿÿÿ÷ÿÿÿÓÿÿÿðÿÿÿÕÿÿÿðÿÿÿÈÿÿÿûÿÿÿÊÿÿÿûÿÿÿÕÿÿÿôÿÿÿ×ÿÿÿôÿÿÿÓÿÿÿñÿÿÿÕÿÿÿñÿÿÿÚÿÿÿîÿÿÿÜÿÿÿîÿÿÿÕÿÿÿóÿÿÿ×ÿÿÿóÿÿÿÜÿÿÿðÿÿÿÞÿÿÿðÿÿÿöÿÿÿ»ÿÿÿýÿÿÿòÿÿÿ»ÿÿÿýÿÿÿóÿÿÿÊÿÿÿïÿÿÿÊÿÿÿöÿÿÿ·ÿÿÿòÿÿÿ·ÿÿÿóÿÿÿÆÿÿÿ
ïÿÿÿÆÿÿÿ
óÿÿÿËÿÿÿïÿÿÿËÿÿÿñÿÿÿÓÿÿÿíÿÿÿÓÿÿÿóÿÿÿÅÿÿÿ ïÿÿÿÅÿÿÿ ñÿÿÿÍÿÿÿíÿÿÿÍÿÿÿñÿÿÿÒÿÿÿíÿÿÿÒÿÿÿðÿÿÿÖÿÿÿìÿÿÿÖÿÿÿñÿÿÿÎÿÿÿíÿÿÿÎÿÿÿðÿÿÿÒÿÿÿìÿÿÿÒÿÿÿ ÝÿÿÿþÿÿÿÝÿÿÿþÿÿÿéÿÿÿ
éÿÿÿ
×ÿÿÿ×ÿÿÿãÿÿÿãÿÿÿèÿÿÿ èÿÿÿ øÿÿÿøÿÿÿäÿÿÿäÿÿÿôÿÿÿôÿÿÿüÿÿÿþÿÿÿ÷ÿÿÿÿÿÿÿùÿÿÿöÿÿÿ␍øÿÿÿ␍ñÿÿÿÿÿÿÿóÿÿÿýÿÿÿ×ÿÿÿþÿÿÿ÷ÿÿÿÙÿÿÿþÿÿÿÿÿÿÿãÿÿÿóÿÿÿùÿÿÿåÿÿÿóÿÿÿýÿÿÿÛÿÿÿ÷ÿÿÿÝÿÿÿÿÿÿÿçÿÿÿ÷ÿÿÿùÿÿÿéÿÿÿ÷ÿÿÿÿÿÿÿãÿÿÿóÿÿÿùÿÿÿåÿÿÿóÿÿÿïÿÿÿèÿÿÿûÿÿÿñÿÿÿèÿÿÿÿÿÿÿçÿÿÿ÷ÿÿÿùÿÿÿéÿÿÿ÷ÿÿÿóÿÿÿìÿÿÿûÿÿÿõÿÿÿìÿÿÿôÿÿÿâÿÿÿûÿÿÿöÿÿÿäÿÿÿÿÿÿÿíÿÿÿýÿÿÿïÿÿÿîÿÿÿæÿÿÿûÿÿÿðÿÿÿèÿÿÿùÿÿÿñÿÿÿýÿÿÿûÿÿÿóÿÿÿ 

␍ ␍   ␍ 
 
  
 ␍␍    ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmokÊp¨­ÿÿÿûÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ·ÿÿÿûÿÿÿûÿÿÿ·ÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ­ÿÿÿ·ÿÿÿûÿÿÿ·ÿÿÿ
·ÿÿÿûÿÿÿöÿÿÿ·ÿÿÿûÿÿÿ
ÚÿÿÿûÿÿÿöÿÿÿÚÿÿÿûÿÿÿ
·ÿÿÿöÿÿÿ·ÿÿÿ
ÚÿÿÿöÿÿÿÚÿÿÿ¸ÿÿÿýÿÿÿ ºÿÿÿýÿÿÿÉÿÿÿýÿÿÿËÿÿÿýÿÿÿ¸ÿÿÿ ºÿÿÿÉÿÿÿËÿÿÿÉÿÿÿýÿÿÿËÿÿÿýÿÿÿØÿÿÿýÿÿÿÚÿÿÿýÿÿÿÉÿÿÿËÿÿÿØÿÿÿÚÿÿÿØÿÿÿþÿÿÿÚÿÿÿþÿÿÿàÿÿÿþÿÿÿâÿÿÿþÿÿÿØÿÿÿÚÿÿÿàÿÿÿâÿÿÿöÿÿÿ¹ÿÿÿýÿÿÿòÿÿÿ¹ÿÿÿýÿÿÿóÿÿÿÊÿÿÿýÿÿÿïÿÿÿÊÿÿÿýÿÿÿöÿÿÿ¹ÿÿÿòÿÿÿ¹ÿÿÿóÿÿÿÊÿÿÿïÿÿÿÊÿÿÿóÿÿÿÊÿÿÿýÿÿÿïÿÿÿÊÿÿÿýÿÿÿñÿÿÿÙÿÿÿýÿÿÿíÿÿÿÙÿÿÿýÿÿÿóÿÿÿÊÿÿÿïÿÿÿÊÿÿÿñÿÿÿÙÿÿÿíÿÿÿÙÿÿÿñÿÿÿÙÿÿÿþÿÿÿíÿÿÿÙÿÿÿþÿÿÿðÿÿÿáÿÿÿþÿÿÿìÿÿÿáÿÿÿþÿÿÿñÿÿÿÙÿÿÿíÿÿÿÙÿÿÿðÿÿÿáÿÿÿìÿÿÿáÿÿÿ
ÚÿÿÿüÿÿÿÚÿÿÿüÿÿÿ
êÿÿÿüÿÿÿêÿÿÿüÿÿÿ
ÚÿÿÿÚÿÿÿ
êÿÿÿêÿÿÿ
êÿÿÿüÿÿÿêÿÿÿüÿÿÿ
úÿÿÿüÿÿÿúÿÿÿüÿÿÿ
êÿÿÿêÿÿÿ
úÿÿÿúÿÿÿ
üÿÿÿüÿÿÿ

úÿÿÿüÿÿÿúÿÿÿüÿÿÿ
úÿÿÿ úÿÿÿ þÿÿÿÚÿÿÿüÿÿÿöÿÿÿÚÿÿÿüÿÿÿþÿÿÿêÿÿÿüÿÿÿöÿÿÿêÿÿÿüÿÿÿþÿÿÿÚÿÿÿöÿÿÿÚÿÿÿþÿÿÿêÿÿÿöÿÿÿêÿÿÿþÿÿÿêÿÿÿüÿÿÿöÿÿÿêÿÿÿüÿÿÿþÿÿÿúÿÿÿüÿÿÿöÿÿÿúÿÿÿüÿÿÿþÿÿÿêÿÿÿöÿÿÿêÿÿÿþÿÿÿúÿÿÿöÿÿÿúÿÿÿþÿÿÿüÿÿÿöÿÿÿüÿÿÿþÿÿÿ öÿÿÿ þÿÿÿúÿÿÿüÿÿÿöÿÿÿúÿÿÿüÿÿÿþÿÿÿúÿÿÿ öÿÿÿúÿÿÿ  

␍ ␍   ␍ 
 
  
 ␍␍    ! ""#!%$&&'%! $$%!#"&&'#" $$&"#!%%'#)(**+)-,../-)(,,-)+*../+*(,,.*+)--/+10223154667510445132667320446231557398::;9=<>>?=98<<=9;:>>?;:8<<>:;9==?;A@BBCAEDFFGEA@DDEACBFFGCB@DDFBCAEEGCIHJJKIMLNNOMIHLLMIKJNNOKJHLLNJKIMMOKQPRRSQUTVVWUQPTTUQSRVVWSRPTTVRSQUUWSYXZZ[Y]\^^_]YX\\]Y[Z^^_[ZX\\^Z[Y]]_[a`bbcaedffgea`ddeacbffgcb`ddfbcaeegcihjjkimlnnomihllmikjnnokjhllnjkimmok
@@ -1,4 +1,45 @@
* fix result on Blot ect
* PSect search all tables if not found very well.
* Bug: HI:Math/CD3
* asm LIST NOLIST bug
* Bible ranges.
* Current Bible position to link on clipboard.
* Might have bug. CTRL-F Fwd gets cleared, maybe.
* hang black text layer bug is back
* No way to clear +Hold entries
-----------DiningStars---------------
Song
Better name than DiningStars
Better tables, orient, chairs
Get approval from building inspector
Health inspector visits
Hire chefs, cooks, maŒtre'd and waitresses
Busy aisles, got your back
Pipes
Walls with windows and mirrors
$$ per square foot, how about picking from randomly generated leased spaces
Plot customers per hour
Reservations bot
Menu
Candles
Advertizing
-------------------------------------
* We don't know why tS caused crash, perhaps, semaphores are broken.
(Hangs on 2nd ScreenUpdate, black almost. Perhaps bug from with $LK,"gr_pan_text_x","MN:gr_pan_text_x"$.)
Fixed with HPET in tS.
* Maybe dither_probability is bad.
* FAQ frontloaded
COMPILER
* Postpone LocalVar Init until last possible moment. (in case RETURN)
* PtrArith MUL SIZE -->QueIns(MUL)?
* QueRem(IC_NOP)?
* Fix return result for GrBlot, ect.
* Tour TestSuite on 256Meg NoMP runs out of mem. Leak,too?
@@ -35,12 +76,13 @@ $LK-A,"::/TempleOS/Demo/Lectures/FixedPointAdvanced.CPP"$.
* It would be nice if $LK,"U","MN:U"$() NOP were better.
* Make RedSea file system expanded size set in Copy.
* unhandled exception on MP message gets overwritten by WinMgr
* Cmd to enable/disable compiler warnings
* What if we had a type for either F64 or I64, like Print -- no conversion.
* What if we had a ... that did do conversion, if we have one that doesn't.
* fix documentation problem -- remembering 0 terminator in str or not for $$DA
* GetS, crazy putkey code
* editor page formatting is FUBAR
@@ -117,6 +159,7 @@ $HC,"<object width=\"750\" height=\"520\"><param name=\"movie\" value=\"http://w
* $LK,"DCF_SYMMETRY","MN:DCF_SYMMETRY"$, before transformation? (Currently it's after)
* all graphics clipping -- screen y+top<0 for top<0
* Maybe convert graphics to float
* Warn unnecessary typecast
* compiler F32
* preempt(OFF) during graphic clipping?
* compiler optimization heap_glbls with added offset
@@ -144,7 +187,7 @@ $HC,"<object width=\"750\" height=\"520\"><param name=\"movie\" value=\"http://w
* Make use of flag potential in SysFilesFind and possibly CFileAccess
* implement fixed pos files
* new Holy C language features
* new HolyC language features
* better debugging
* Change hardcoded stuff to Define
@@ -159,8 +202,8 @@ $HC,"<object width=\"750\" height=\"520\"><param name=\"movie\" value=\"http://w
* test removable media id (critical for resident files)
* add field overflow U8 "t='*'"
* Implement fmt codes into GetF
* GetF date codes and maybe $FG,2$h$FG$ fmts for nums
* Implement fmt codes into Get
* Get date codes and maybe $FG,2$h$FG$ fmts for nums
* Date Input
* Default date fmt
@@ -169,7 +212,7 @@ $HC,"<object width=\"750\" height=\"520\"><param name=\"movie\" value=\"http://w
* support r4u8 by adding 0x40 byte
* static var off of data heap.
* Might want to use U32*U32 multiplication.
* could add "const" to not set LF_NOT_CONSTANT flag for trig, etc.
* could add "const" to not set LF_NOT_CONST flag for trig, etc.
* do r,rm ICCmp like ICBrCmp
* could make glblvar imports use TY_RIP_DISP32.
* PUSH_CMP allocs reg R9 or whatever
@@ -191,3 +234,5 @@ $HC,"<object width=\"750\" height=\"520\"><param name=\"movie\" value=\"http://w
* sort options for findfiles
* recalc_start could be more accurate before recalculating?
* Maybe, get rid of $LK,"0x20000","FF:::/TempleOS/Compiler/CmpMain.CPP,0x20000"$ in compiler.
* $FG,4$$TX+HTML,"Key_and_Peele_Part_1","http://www.youtube.com/watch?v=Dd7FixvoKBw"$ $TX+HTML,"Key_and_Peele_Part_2","http://www.youtube.com/watch?v=sXc6JLmiVHs"$$FG$
+15 -22
View File
@@ -1,37 +1,30 @@
$TR,"Adam"$
$ID,2$$TR,"TempleOS"$
$ID,2$$TR,"SysMsgFlags"$
$ID,2$sys_msg_flags[0]=0x205;
$ID,2$sys_msg_flags[0]=0;
$ID,-2$$TR,"SysRegVer"$
$ID,2$registry_version=1.040;
$ID,-2$$ID,-2$$ID,-2$$TR,"DemoCompany"$
$ID,2$$TR,"Game1"$
$ID,2$F64 best_score=1.23;
$TR,"SimpleVal"$
$ID,2$1234;
$ID,2$registry_version=1.060;
$ID,-2$$ID,-2$$ID,-2$$TR,"TempleOS"$
$ID,2$$TR,"CircleTrace"$
$ID,2$F64 best_score=999.0000;
$ID,-2$$TR,"FPS"$
$ID,2$F64 best_score=55.2079;
$ID,-2$$TR,"EagleDive"$
$ID,2$I64 best_score=6;
$ID,-2$$TR,"CastleFrankenstein"$
$ID,2$F64 best_score=56.7504;
$ID,-2$$TR,"ZoneOut"$
$ID,2$F64 best_score=79.0963;
$ID,2$$TR,"Varoom"$
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"BugBird"$
$ID,2$F64 best_score=16.1659;
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"TimeOut"$
$ID,2$I64 best_score=14797;
$ID,2$I64 best_score=0;
$ID,-2$$TR,"RawHide"$
$ID,2$F64 best_score=60.9434;
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"KeepAway"$
$ID,2$I64 best_score0=0,best_score1=9999;
$ID,-2$$TR,"XCaliber"$
$ID,2$I64 best_score=118;
$ID,2$I64 best_score=0;
$ID,-2$$TR,"Wenceslas"$
$ID,2$F64 best_score=9999.0000;
$ID,-2$$TR,"BulgeBomber"$
$ID,2$I64 best_score=53;
$ID,2$I64 best_score=99999;
$ID,-2$$TR,"EagleDive"$
$ID,2$I64 best_score=0;
$ID,-2$$TR,"CastleFrankenstein"$
$ID,2$F64 best_score=69.1680;
$ID,-2$$TR,"ZoneOut"$
$ID,2$F64 best_score=76.8861;
$ID,-2$$ID,-2$
+103 -74
View File
@@ -92,78 +92,78 @@ U0 TSInit()
case CID_TAD8:
case CID_TAD8_VM:
DefinePrintF("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrintF("CFG_HARD_DRVS","\"h2s0xbc00\n0xb880\n1d2s0xbc00\n0xb880\n0\"");
DefinePrintF("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
DefinePrintF("CFG_CDROM_DRVS","\"t3s0xb800\n0\"");
DefinePrintF("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrint("CFG_HARD_DRVS","\"h2s0xbc00\n0xb880\n1d2s0xbc00\n0xb880\n0\"");
DefinePrint("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
DefinePrint("CFG_CDROM_DRVS","\"t3s0xb800\n0\"");
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
if (ts_cid==CID_TAD8) {
DefinePrintF("TS_HDS","\"DEI\"");
DefinePrintF("TS_MASTER_BOOT_DRVS","\"I\"");
DefinePrint("TS_HDS","\"DEI\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"I\"");
} else { //CID_TAD8_VM
DefinePrintF("TS_HDS","\"DE\"");
DefinePrintF("TS_MASTER_BOOT_DRVS","\"\"");
DefinePrint("TS_HDS","\"DE\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"\"");
}
DefinePrintF("TS_MAIN_DRV","\"D\"");
DefinePrintF("TS_BAK_DRV","\"E\"");
DefinePrintF("TS_RAM_DRV","\"B\"");
DefinePrintF("TS_WIN_DRV","\"H\"");
DefinePrintF("TS_CDROM_DRV","\"T\"");
DefinePrint("TS_MAIN_DRV","\"D\"");
DefinePrint("TS_BAK_DRV","\"E\"");
DefinePrint("TS_RAM_DRV","\"B\"");
DefinePrint("TS_WIN_DRV","\"H\"");
DefinePrint("TS_CDROM_DRV","\"T\"");
break;
*/
case CID_DFT:
DefinePrintF("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrintF("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
DefinePrint("CFG_ACCT","\"\nTS/TAD\n\"");
DefinePrint("CFG_RAM_DRVS","\"b1\nScale2Mem(2048,0x40000)\n\"");
if (sys_auto_mount_ide_cnt) {
//If AutoMount was successful, No need to manually mount in next compile
DefinePrintF("CFG_HARD_DRVS","\"\"");
DefinePrintF("CFG_CDROM_DRVS","\"\"");
DefinePrint("CFG_HARD_DRVS","\"\"");
DefinePrint("CFG_CDROM_DRVS","\"\"");
} else {
//These two are a crazy guess. ATA:IDE Primary ATAPI:IDE Secondary
DefinePrintF("CFG_HARD_DRVS","\"d2s0x1F0\n0x3F4\n0\"");
DefinePrintF("CFG_CDROM_DRVS","\"t3s0x170\n0\"");
DefinePrint("CFG_HARD_DRVS","\"d2s0x1F0\n0x3F4\n0\"");
DefinePrint("CFG_CDROM_DRVS","\"t3s0x170\n0\"");
bdev=Drv2BlkDev(*sys_acct);
if (bdev->type==BDT_ATAPI) {
ATARep(FALSE,,&root);
ATAIDDrvs(root,*sys_acct,&ata_drv,&atapi_drv);
if (ata_drv)
DefinePrintF("CFG_HARD_DRVS","\"d2p%d\n\"",ata_drv->num);
DefinePrint("CFG_HARD_DRVS","\"d2p%d\n\"",ata_drv->num);
if (atapi_drv)
DefinePrintF("CFG_CDROM_DRVS","\"t3p%d\n\"",atapi_drv->num);
DefinePrint("CFG_CDROM_DRVS","\"t3p%d\n\"",atapi_drv->num);
} else {
try {
bdev=Drv2BlkDev('D');
DefinePrintF("CFG_HARD_DRVS","\"d2s0x%X\n0x%X\n%d\"",
DefinePrint("CFG_HARD_DRVS","\"d2s0x%X\n0x%X\n%d\"",
bdev->base0,bdev->base1,bdev->unit);
} catch
Fs->catch_except=TRUE;
try {
bdev=Drv2BlkDev('T');
DefinePrintF("CFG_CDROM_DRVS","\"t3s0x%X\n%d\"",bdev->base0,bdev->unit);
DefinePrint("CFG_CDROM_DRVS","\"t3s0x%X\n%d\"",bdev->base0,bdev->unit);
} catch
Fs->catch_except=TRUE;
}
}
DefinePrintF("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrintF("TS_HDS","\"DE\"");
DefinePrintF("TS_MASTER_BOOT_DRVS","\"D\"");
DefinePrintF("TS_MAIN_DRV","\"D\"");
DefinePrintF("TS_BAK_DRV","\"E\"");
DefinePrintF("TS_RAM_DRV","\"B\"");
DefinePrintF("TS_WIN_DRV","\"\"");
DefinePrintF("TS_CDROM_DRV","\"T\"");
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("TS_HDS","\"DE\"");
DefinePrint("TS_MASTER_BOOT_DRVS","\"D\"");
DefinePrint("TS_MAIN_DRV","\"D\"");
DefinePrint("TS_BAK_DRV","\"E\"");
DefinePrint("TS_RAM_DRV","\"B\"");
DefinePrint("TS_WIN_DRV","\"\"");
DefinePrint("TS_CDROM_DRV","\"T\"");
}
} TSInit;
U0 TSInit2()
{
DefinePrintF("TS_MAIN_DRV_LET","'%s'",TS_MAIN_DRV);
DefinePrintF("TS_BAK_DRV_LET","'%s'",TS_BAK_DRV);
DefinePrintF("TS_RAM_DRV_LET","'%s'",TS_RAM_DRV);
DefinePrintF("TS_WIN_DRV_LET","'%s'",TS_WIN_DRV);
DefinePrintF("TS_CDROM_DRV_LET","'%s'",TS_CDROM_DRV);
DefinePrint("TS_MAIN_DRV_LET","'%s'",TS_MAIN_DRV);
DefinePrint("TS_BAK_DRV_LET","'%s'",TS_BAK_DRV);
DefinePrint("TS_RAM_DRV_LET","'%s'",TS_RAM_DRV);
DefinePrint("TS_WIN_DRV_LET","'%s'",TS_WIN_DRV);
DefinePrint("TS_CDROM_DRV_LET","'%s'",TS_CDROM_DRV);
} TSInit2;
@@ -217,14 +217,14 @@ Bool frame_grabber_on=FALSE;
public U0 MyScreenShot(I64 bits=4)
{
U8 *st;
CDirEntry *tempm;
CDirEntry *tempde;
I64 cnt=0;
tempm=FilesFind("::/Temp/ScreenShots/*.BMP.Z");
while (tempm) {
tempde=FilesFind("::/Temp/ScreenShots/*.BMP.Z");
while (tempde) {
cnt++;
tempm=tempm->next;
tempde=tempde->next;
}
st=MSPrintF("::/Temp/ScreenShots/SCRN%04d.BMP.Z",cnt);
st=MPrint("::/Temp/ScreenShots/SCRN%04d.BMP.Z",cnt);
BMPFileCaptureScreen(st,bits);
Free(st);
Beep;
@@ -254,31 +254,23 @@ Boot Windows
I64 frame_num=0;
U8 buf[136],buf2[136];
F64 end_time=tT,f;
F64 end_time=tT;
TaskInitExt;
Silent(ON); //no output to screen
MkDir("::/Temp/ScreenShots");
while (frame_grabber_on) {
SPrintF(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
SPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
StrCpy(buf2,buf);
BMPFileCaptureScreen(buf);
f=tT;
while (end_time<f) {
while (TRUE) {
end_time+=1.0/VIDEO_FRAME_RATE;
if (end_time<f) {
SPrintF(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
if (end_time<tT) {
SPrint(buf,"::/Temp/ScreenShots/VID%05d.BMP.Z",frame_num++);
Copy(buf2,buf);
}
} else
break;
}
LBts(&Fs->task_flags,TASKf_IDLE);
while (sys_cur_scan_code&SCF_NUM) {
Yield;
end_time=tT;
}
while (end_time>tT)
Yield;
LBtr(&Fs->task_flags,TASKf_IDLE);
SleepUntil(sys_jiffies+(end_time-tT)*JIFFY_FREQ);
}
}
@@ -295,17 +287,15 @@ U0 CopyVideo()
public U0 FrameGrabberToggle()
{
static F64 last_time=0;
if (tT-last_time>1.0) {
if (tT-last_time>3.0) {
last_time=tT;
if (frame_grabber_on) {
IOSnd(ON);
frame_grabber_on=FALSE;
Snd(0);
wallpaper_record_on=snd_record=FALSE;
Sleep(1000);
CopyVideo;
} else {
IOSnd(OFF); //You don't want to hear screen capture file writes
frame_grabber_on=TRUE;
Spawn(&FrameGrabberTask,NULL,"Frame Grabber");
wallpaper_record_on=snd_record=TRUE;
@@ -314,6 +304,53 @@ public U0 FrameGrabberToggle()
}
}
U0 JukeSongsPut(U8 *dir,I64 start_song,I64 end_song)
{
I64 i,j,len=4;
CDirEntry *tempde,*tempde1;
Cd(dir);
tempde1=FilesFind("*",FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES);
for (tempde=tempde1,i=0;tempde && i<start_song;i++)
tempde=tempde->next;
for (i=start_song;tempde && i<end_song;i++) {
if (FileExtDot(tempde->name))
FileExtRem(tempde->name);
if (j=StrLen(tempde->name)) {
*tempde->full_name=':';
*tempde->name=ToUpper(*tempde->name);
if (j>len) len=j;
}
tempde=tempde->next;
}
for (tempde=tempde1,i=0;tempde && i<start_song;i++)
tempde=tempde->next;
if (end_song-start_song<=9)
j=1;
else if (end_song-start_song<=99)
j=2;
else
j=3;
for (i=start_song;tempde && i<end_song;i++) {
"$$LK+CX,\"%*d) %-*s\",\"FI:%s\"$$\n",j,i-start_song+1,len,tempde->name,tempde->full_name;
tempde=tempde->next;
}
DirLstDel(tempde1);
}
public U0 JukeLines(I64 start_line,I64 end_line)
{
WordStat;
if (!frame_grabber_on)
FrameGrabberToggle;
JukeSongsPuppet("::/TempleOS/Apps/MusicOrgan/Examples",,start_line*5,end_line*5);
if (frame_grabber_on)
FrameGrabberToggle;
JukeSongsPut("::/TempleOS/Apps/MusicOrgan/Examples",start_line*5,end_line*5);
}
U0 ScreenShotTask(I64)
{
TaskInitExt;
@@ -333,18 +370,12 @@ public U0 ChkAll()
ChkDsk(*ptr++);
}
public U0 MyHAllRep(U8 *flags="-p",U8 *index=NULL)
{
HashRep(Fs->hash_table,HTG_SRC_SYM-HTT_DEFINE_STR-HTT_CLASS,NULL,flags,0,index);
}
public CDoc *DC2Doc(CDC *dc,I64 dx=0,I64 dy=0,I64 *_total_score=NULL)
{
U8 byte_bit_cnts[256],st[2];
U8 byte_bit_cnts[256];
I64 i,j,*ptr,row,col,ch,best_ch,score,best_score,cur_char_image,diff_image,total_score=0;
CDoc *doc=DocNew;
MemSet(st,0,sizeof(st));
MemSet(byte_bit_cnts,0,sizeof(byte_bit_cnts));
for (i=0;i<256;i++)
for (j=0;j<7;j++)
@@ -374,14 +405,12 @@ public CDoc *DC2Doc(CDC *dc,I64 dx=0,I64 dy=0,I64 *_total_score=NULL)
}
}
if (best_ch=='$$')
DocPutS(doc,"$$$$");
else {
*st=best_ch;
DocPutS(doc,st);
}
DocPrint(doc,"$$$$");
else
DocPrint(doc,"%c",best_ch);
total_score+=best_score;
}
DocPutS(doc,"\n");
DocPrint(doc,"\n");
}
if (_total_score) *_total_score=total_score;
return doc;
+90 -82
View File
@@ -3,7 +3,7 @@
U0 ShowBootFileDate(U8 drv_let)
{
CDirEntry de;
U8 *name=MSPrintF("%c:/Kernel.BIN.C",drv_let);
U8 *name=MPrint("%c:/Kernel.BIN.C",drv_let);
if (FileFind(name,&de)) {
Free(de.full_name);
"%s %D %T\n",name,de.datetime,de.datetime;
@@ -57,26 +57,26 @@ U0 TSCopyDrv(U8 src,U8 dst)
Fmt(dst,TRUE,FALSE,PT_FAT32);
SPrintF(buf_s,"%c:/TempleOS",src);
SPrintF(buf_d,"%c:/TempleOS",dst);
SPrint(buf_s,"%c:/TempleOS",src);
SPrint(buf_d,"%c:/TempleOS",dst);
CopyTree(buf_s,buf_d);
SPrintF(buf_s,"%c:/Windows",src);
SPrintF(buf_d,"%c:/Windows",dst);
SPrint(buf_s,"%c:/Windows",src);
SPrint(buf_d,"%c:/Windows",dst);
CopyTree(buf_s,buf_d);
SPrintF(buf_s,"%c:/Linux",src);
SPrintF(buf_d,"%c:/Linux",dst);
SPrint(buf_s,"%c:/Linux",src);
SPrint(buf_d,"%c:/Linux",dst);
CopyTree(buf_s,buf_d);
SPrintF(buf_s,"%c:/0000Boot",src);
SPrintF(buf_d,"%c:/0000Boot",dst);
SPrint(buf_s,"%c:/0000Boot",src);
SPrint(buf_d,"%c:/0000Boot",dst);
CopyTree(buf_s,buf_d);
SPrintF(buf_d,"%c:/Temp",dst);
SPrint(buf_d,"%c:/Temp",dst);
MkDir(buf_d);
SPrintF(buf_d,"%c:/Temp/ScreenShots",dst);
SPrint(buf_d,"%c:/Temp/ScreenShots",dst);
MkDir(buf_d);
DocClear;
@@ -114,28 +114,28 @@ public U0 FileCursorTop(U8 *filename)
public U0 FilesCursorRem(U8 *mask="*")
{
I64 fuf_flags=0;
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F");
CDirEntry *tempm=FilesFind(mask,fuf_flags),*tempm1;
while (tempm) {
tempm1=tempm->next;
FileCursorRem(tempm->full_name);
Touch(tempm->full_name,"",,tempm->datetime);
CDirEntryDel(tempm);
tempm=tempm1;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F");
CDirEntry *tempde=FilesFind(mask,fuf_flags),*tempde1;
while (tempde) {
tempde1=tempde->next;
FileCursorRem(tempde->full_name);
Touch(tempde->full_name,"",,tempde->datetime);
DirEntryDel(tempde);
tempde=tempde1;
}
}
public U0 FilesCursorTop(U8 *mask="*")
{
I64 fuf_flags=0;
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F");
CDirEntry *tempm=FilesFind(mask,fuf_flags),*tempm1;
while (tempm) {
tempm1=tempm->next;
FileCursorTop(tempm->full_name);
Touch(tempm->full_name,"",,tempm->datetime);
CDirEntryDel(tempm);
tempm=tempm1;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+T+f+F");
CDirEntry *tempde=FilesFind(mask,fuf_flags),*tempde1;
while (tempde) {
tempde1=tempde->next;
FileCursorTop(tempde->full_name);
Touch(tempde->full_name,"",,tempde->datetime);
DirEntryDel(tempde);
tempde=tempde1;
}
}
@@ -147,47 +147,36 @@ U0 UncollapseFile(U8 *filename,I64 *)
DocDel(doc);
}
U0 UncollapseLst(CDirEntry *tempm1,I64 *flags)
U0 Uncollapse(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{
CDirEntry *tempm2;
while (tempm1 && !Bt(flags,FUf_CANCEL)) {
tempm2=tempm1->next;
if (tempm1->attr & _ATTR_DIR) {
if (tempm1->sub) {
"%S %s\n","ST_SCANNING_DIR",tempm1->full_name;
UncollapseLst(tempm1->sub,flags);
}
} else
UncollapseFile(tempm1->full_name,flags);
CDirEntryDel(tempm1);
tempm1=tempm2;
I64 fuf_flags=0;
CDirEntry *tempde,*tempde1;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F+T");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
tempde=tempde1=FilesFind(files_find_mask,fuf_flags);
while (tempde && !Bt(&fuf_flags,FUf_CANCEL)) {
UncollapseFile(tempde->full_name,&fuf_flags);
tempde=tempde->next;
}
}
U0 Uncollapse(U8 *files_find_mask=FILENAME_MASK_TXT,U8 *fu_flags=NULL)
{
I64 f=0;
GetFFlags(&f,Define("ST_FILE_UTIL_FLAGS"),"+r");
GetFFlags(&f,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
UncollapseLst(FilesFind(files_find_mask,f),&f);
DirLstDel(tempde1);
}
public U0 CopySongs(U8 threshold='7')
{
CDoc *s;
CDocEntry *doc_e;
CDirEntry *tempm,*tempm1;
CDirEntry *tempde,*tempde1;
DelTree("/TempleOS/Apps/MusicOrgan/Examples");
MkDir("/TempleOS/Apps/MusicOrgan/Examples");
tempm1=tempm=FilesFind("/TempleOS/Accts/TS/TAD/MusicOrgan/*.CPP*");
while (tempm1) {
s=DocRead(tempm1->full_name);
tempde1=tempde=FilesFind("/TempleOS/Accts/TS/TAD/MusicOrgan/*.CPP*");
while (tempde1) {
s=DocRead(tempde1->full_name);
doc_e=s->root.next;
if (doc_e->type_u8==DOCT_TEXT && doc_e->tag[2]>=threshold)
Copy(tempm1->full_name,"/TempleOS/Apps/MusicOrgan/Examples");
tempm1=tempm1->next;
Copy(tempde1->full_name,"/TempleOS/Apps/MusicOrgan/Examples");
tempde1=tempde1->next;
}
CDirLstDel(tempm);
DirLstDel(tempde);
}
U0 DistroPrep()
@@ -222,7 +211,7 @@ U0 DistroPrep()
DelTree("/TempleOS/Demo/*.BI*");
Cd("/TempleOS");
S2T(FILENAME_MASK_SRC,"+r");
S2T("*","+r+S");
DocOpt;
Move(WSD_DEF_FILENAME,WSD_DEF_FILENAME_Z);
}
@@ -234,7 +223,7 @@ U0 MakeSymFiles()
if (ts_has_bak_drv) {
DocClear;
DocMax;
HashRep(Fs->hash_table,HTG_ALL,NULL,"-p",0,NULL);
Who;
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,TS_BAK_DRV ":/Wb/Accts/TS/Wb2/SymsAlpha.TXT.Z");
@@ -244,7 +233,7 @@ U0 MakeSymFiles()
}
DocClear;
DocMax;
HashRep(Fs->hash_table,HTG_ALL,NULL,"-p+m",0,NULL);
Who("+m");
if (doc=DocPut) {
st=StrNew(doc->filename.name);
StrCpy(doc->filename.name,TS_BAK_DRV ":/Wb/Accts/TS/Wb2/SymsAddress.TXT.Z");
@@ -290,9 +279,9 @@ I64 MakeLineCntFile()
DocCut(doc,start_indent->next,end_indent->last);
doc->cur_entry=start_indent->next;
doc->cur_data_col=0;
DocPrintF(doc,"DefinePrintF(\"DD_TEMPLEOS_LOC\",\"%,d\");\n",result);
DocPrint(doc,"DefinePrint(\"DD_TEMPLEOS_LOC\",\"%,d\");\n",result);
st=MSPrintF("%,d",result);
st=MPrint("%,d",result);
DefineLoad("DD_TEMPLEOS_LOC",st);
Free(st);
@@ -370,19 +359,39 @@ U0 TSWebFile(U8 *name)
U0 MakeWebSite()
{
CDirEntry *tempm,*tempm2;
CDirEntry *tempde,*tempde2;
if (ts_has_bak_drv) {
DocClear;
Cd(TS_BAK_DRV ":/Wb");
DelTree(TS_BAK_DRV ":/Wb/Accts/TS/TAD");
Del(TS_BAK_DRV ":/Wb/Accts/TS/*");
Touch(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/index.TXT.Z","",,GetCurTimeDate);
tempm=tempm2=FilesFind(FILENAME_MASK_TXT,FUF_RECURSE|FUF_FLATTEN_TREE|FUF_JUST_FILES);
while (tempm) {
TSWebFile(tempm->full_name);
tempm=tempm->next;
Touch(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/index.TXT.Z","",,GetDateTime);
tempde=tempde2=FilesFind("*",FUF_RECURSE|FUF_JUST_FILES|FUF_JUST_TXT);
while (tempde) {
TSWebFile(tempde->full_name);
tempde=tempde->next;
}
CDirLstDel(tempm2);
DirLstDel(tempde2);
Drv(TS_MAIN_DRV_LET);
}
}
U0 MakeWebSitePartial()
{
CDirEntry *tempde,*tempde2;
if (ts_has_bak_drv) {
DelTree(TS_BAK_DRV ":/Wb/Accts/TS/Wb2");
CopyTree(TS_MAIN_DRV ":/TempleOS/Accts/TS/Wb2",
TS_BAK_DRV ":/Wb/Accts/TS/Wb2");
DelTree(TS_BAK_DRV ":/Uncompressed/Accts/TS/Wb2");
CopyTree(TS_MAIN_DRV ":/TempleOS/Accts/TS/Wb2",
TS_BAK_DRV ":/Uncompressed/Accts/TS/Wb2");
tempde=tempde2=FilesFind(TS_BAK_DRV ":/Wb/Accts/TS/Wb2/*",FUF_RECURSE|FUF_JUST_FILES|FUF_JUST_TXT);
while (tempde) {
TSWebFile(tempde->full_name);
tempde=tempde->next;
}
DirLstDel(tempde2);
Drv(TS_MAIN_DRV_LET);
}
}
@@ -393,7 +402,7 @@ U0 ToWeb(U8 *name)
if (ts_has_bak_drv) {
st=FileNameAbs(name);
if (!StrNCmp(st+1,":/TempleOS/",12)) {
st2=MSPrintF(TS_BAK_DRV":/Wb/%s",st+13);
st2=MPrint(TS_BAK_DRV":/Wb/%s",st+13);
"%s\n",st2;
Copy(name,st2);
TSWebFile(st2);
@@ -406,21 +415,21 @@ U0 ToWeb(U8 *name)
U0 TSUncompress()
{
U8 *st;
CDirEntry *tempm,*tempm1;
CDirEntry *tempde,*tempde1;
if (ts_has_bak_drv) {
DelTree(TS_BAK_DRV ":/Uncompressed");
CopyTree(TS_MAIN_DRV ":/TempleOS",TS_BAK_DRV ":/Uncompressed");
tempm=FilesFind(TS_BAK_DRV ":/Uncompressed/*.Z",FUF_RECURSE|FUF_FLATTEN_TREE|FUF_JUST_FILES);
while (tempm) {
tempm1=tempm->next;
st=StrNew(tempm->full_name);
tempde=FilesFind(TS_BAK_DRV ":/Uncompressed/*.Z",FUF_RECURSE|FUF_JUST_FILES);
while (tempde) {
tempde1=tempde->next;
st=StrNew(tempde->full_name);
StrLastRem(st,".");
Move(tempm->full_name,st);
Move(tempde->full_name,st);
Free(st);
CDirEntryDel(tempm);
tempm=tempm1;
DirEntryDel(tempde);
tempde=tempde1;
}
FilesCursorRem(TS_BAK_DRV ":/Uncompressed/" FILENAME_MASK_TXT);
FilesCursorRem(TS_BAK_DRV ":/Uncompressed/*");
}
}
@@ -428,11 +437,11 @@ U0 UpdateISODocDefines()
{
I64 size;
size=10*FileSize(TS_BAK_DRV ":/Wb/TempleOSCD.ISO")/1024/1024;
DefinePrintF("DD_TEMPLEOSCD_SIZE",
"Download $TX+D,"TempleOS V1.03","DD_OS_NAME_VERSION"$ - Std. Distro (%0.1f MB)",0.1*size);
DefinePrint("DD_TEMPLEOSCD_SIZE",
"Download $TX+D,"TempleOS V1.05","DD_OS_NAME_VERSION"$ - Std. Distro (%0.1f MB)",0.1*size);
size=10*FileSize(TS_BAK_DRV ":/Wb/TempleOSTS.ISO")/1024/1024;
DefinePrintF("DD_TEMPLEOSTS_SIZE",
"Download $TX+D,"TempleOS V1.03","DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",0.1*size);
DefinePrint("DD_TEMPLEOSTS_SIZE",
"Download $TX+D,"TempleOS V1.05","DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",0.1*size);
}
UpdateISODocDefines;
@@ -529,4 +538,3 @@ public U0 TSInstall()
TSCopy;
}
}
+306
View File
@@ -0,0 +1,306 @@
#define TS_HS_BAD_BITS 4
#define GODLE_HS_BAD_BITS 4
#define GODLE_HS_GOOD_BITS 24
Bool godle_done;
I64 godle_ch;
CDC *main_dc;
U0 GodleDraw(CTask *task,CDC *dc)
{
GrBlot(dc,0,0,main_dc);
if (!(win_updates&7)) {
dc->color=LTRED;
if (godle_done)
GrPrint(dc,(task->win_pixel_width-FONT_WIDTH*4)>>1,(task->win_pixel_height-FONT_HEIGHT)>>1,
"Done");
}
}
U0 GodleSmooth(I64 num)
{
CDC *dc=DCExtract(main_dc,0,0,main_dc->width-1,main_dc->height-1);
I64 i,x,y,x1,y1,c,histogram[16],best,best_cnt,c_old=main_dc->color;
for (y=0;y<main_dc->height;y++)
for (x=0;x<main_dc->width;x++) {
MemSet(histogram,0,sizeof(histogram));
for (y1=y-num;y1<=y+num;y1++)
for (x1=x-num;x1<=x+num;x1++) {
c=GrPeek(dc,x1,y1);
if (0<=c<=15)
histogram[c]++;
}
best=BLACK;
best_cnt=-1;
for (i=0;i<16;i++)
if (histogram[i]>best_cnt) {
best=i;
best_cnt=histogram[i];
}
main_dc->color=best;
GrPlot(main_dc,x,y);
}
main_dc->color=c_old;
DCDel(dc);
}
CFifoU8 *godle_timer_pick_fifo=FifoU8New(32);
U0 GodleTimerPickFlush()
{
FifoU8Flush(godle_timer_pick_fifo);
}
I64 GodleTimerPickedBits(I64 num_bits)
{
U8 b;
I64 i,k,result=0;
while (num_bits) {
if (FifoU8Rem(godle_timer_pick_fifo,&b)) {
result=result<<1+b;
num_bits--;
} else {
godle_ch=GetChar(,FALSE);
if (godle_ch==CH_ESC||godle_ch==CH_SHIFT_ESC)
throw;
else if (godle_ch=='\n') {
DCFill(main_dc,WHITE);
FifoU8Flush(godle_timer_pick_fifo);
} else if ('0'<=godle_ch<='9')
GodleSmooth(godle_ch-'0');
else {
k=KbdMouseEvtTime>>GODLE_HS_BAD_BITS;
for (i=0;i<GODLE_HS_GOOD_BITS;i++) {
FifoU8Ins(godle_timer_pick_fifo,k&1);
k>>=1;
}
}
}
}
return result;
}
U0 RandQuote()
{ //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
I64 i,size,l=512;
U8 *bible_filename=Define("ST_BIBLE_FILE"),
*buf=FileRead(bible_filename,&size);
if (buf) {
i=KbdMouseEvtTime>>TS_HS_BAD_BITS%(size-l);
buf[i+l]=0;
"%s",buf+i;
Free(buf);
}
}
U0 RandWord()
{
"%s ",ws_sorted_words[KbdMouseEvtTime>>TS_HS_BAD_BITS%ws_num_words]->str;
}
U0 BadCodeJump()
{ //$LK-A,"::/TempleOS/Apps/HolySpirit/HSNotes.TXT"$
CDirEntry *root=FilesFind("/TempleOS/*",FUF_JUST_FILES|FUF_RECURSE|FUF_JUST_SRC),
*tempdee=root;
I64 cnt=0,num;
CDoc *doc;
U8 *st;
while (tempdee) {
doc=DocRead(tempdee->full_name);
tempdee->user_data=doc->root.y;
cnt+=doc->root.y;
DocDel(doc);
tempdee=tempdee->next;
}
num=KbdMouseEvtTime>>TS_HS_BAD_BITS%cnt;
tempdee=root;
while (tempdee) {
num-=tempdee->user_data;
if (num<0) {
st=MPrint("FL:%s,%d",tempdee->full_name,-num);
break;
}
tempdee=tempdee->next;
}
DirLstDel(root);
Ed(st);
Free(st);
}
U0 Godle()
{
I64 i,j,w,h,x,y,ch;
godle_done=FALSE;
SettingsPush; //See $LK,"SettingsPush","MN:SettingsPush"$
WinMax;
WinBorder;
WordStat;
WinMgrSync;
godle_ch=0;
main_dc=DCNew(DCT_COLOR8,Fs->win_pixel_width,Fs->win_pixel_height);
DCFill(main_dc,WHITE);
w=main_dc->width;
h=main_dc->height;
Fs->draw_it=&GodleDraw;
GodleTimerPickFlush;
try {
for (i=0;i<3;i++) {
main_dc->color=RED;
for (j=0;j<24;j++)
GrLine(main_dc,
(w-1)*GodleTimerPickedBits(4)/15,(h-1)*GodleTimerPickedBits(4)/15,
(w-1)*GodleTimerPickedBits(4)/15,(h-1)*GodleTimerPickedBits(4)/15);
for (j=4;j;) {
x=(w-1)*GodleTimerPickedBits(5)/31+w/64;
y=(h-1)*GodleTimerPickedBits(5)/31+h/64;
switch(GrPeek(main_dc,x,y)) {
case BLACK:
main_dc->color=WHITE;
GrFloodFill(main_dc,x,y);
j--;
break;
case WHITE:
main_dc->color=BLACK;
GrFloodFill(main_dc,x,y);
j--;
break;
}
}
GodleSmooth(3);
}
godle_done=TRUE;
do ch=GetChar(,FALSE);
while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
} catch
Fs->catch_except=TRUE;
DCFill;
SettingsPop;
DCDel(main_dc);
}
class CMyURL
{
U8 tag[136] fmtstr "$$DA-P,135,\"Tag Text:%s\"$$\n";
U8 special[136] fmtstr "$$DA-P,135,\"Special :%s\"$$\n";
I64 min fmtstr "$$DA,32, \"Min :%d\"$$\n";
I64 sec fmtstr "$$DA,32, \"Sec :%d\"$$\n";
};
U8 *URLPercentSpaces(U8 *src)
{
U8 buf[1024],*dst=buf;
while (*src) {
if (*src==CH_SPACE) {
*dst++='%';
*dst++='%';
*dst++='2';
*dst++='0';
src++;
} else
*dst++=*src++;
}
*dst=0;
return StrNew(buf);
}
U0 FillInMyURL()
{
CMyURL *url=CAlloc(sizeof(CMyURL));
U8 *tag,*st,*st2;
I64 i=PopUpPickLst("Web Bible\0YouTube\0Wikipedia\0Cert\0"
"RandomNumbers.info\0Random.org\0Virtual Notary\0Nist\0HotBits\0");
if (i>=0 && DocFormDo(url)) {
switch (i) {
case 0:
tag=url->special;
st2=URLPercentSpaces(url->special);
st=MPrint("http://www.biblegateway.com/passage/?search=%s&version=NIV",st2);
Free(st2);
if (*url->tag)
tag=url->tag;
"$$TX+HTML,\"%Q\",\"%Q\"$$",tag,st;
Free(st);
break;
case 1:
tag="YouTube Video";
if (url->min || url->sec)
st=MPrint("http://www.youtube.com/watch?v=%s&t=%dm%ds",url->special,url->min,url->sec);
else
st=MPrint("http://www.youtube.com/watch?v=%s",url->special);
if (*url->tag)
tag=url->tag;
"$$TX+HTML,\"%Q\",\"%Q\"$$",tag,st;
Free(st);
break;
case 2:
tag=url->special;
st=MPrint("http://en.wikipedia.org/wiki/%s",url->special);
if (*url->tag)
tag=url->tag;
"$$TX+HTML,\"%Q\",\"%Q\"$$",tag,st;
Free(st);
break;
case 3:
tag="Here is the certificate";
st=MPrint("http://www.templeos.org/Certs/virtual-notary-cert-randomnum-%s.p12",url->special);
if (*url->tag)
tag=url->tag;
"$$TX+HTML,\"%Q\",\"%Q\"$$",tag,st;
Free(st);
break;
case 4:
tag="http://www.randomnumbers.info";
"$$TX+HTML,\"%Q\",\"%Q\"$$\n",tag,tag;
if (*url->special) {
i=A2I(url->special);
"\nLine:%d\nGod says...\n$$FG,RED$$",i;
PutBibleLines(i%100000,20);
"$$FG$$\n";
}
break;
case 5:
tag="http://www.random.org";
"$$TX+HTML,\"%Q\",\"%Q\"$$\n",tag,tag;
if (*url->special) {
i=A2I(url->special);
"\nLine:%d\nGod says...\n$$FG,RED$$",i;
PutBibleLines(i%100000,20);
"$$FG$$\n";
}
break;
case 6:
tag="http://virtual-notary.org";
"$$TX+HTML,\"%Q\",\"%Q\"$$\n",tag,tag;
if (*url->special) {
i=A2I(url->special);
"\nLine:%d\nGod says...\n$$FG,RED$$",i;
PutBibleLines(i%100000,20);
"$$FG$$\n";
}
break;
case 7:
tag="http://qrng.anu.edu.au/NIST.php";
"$$TX+HTML,\"%Q\",\"%Q\"$$\n",tag,tag;
if (*url->special) {
i=A2I(url->special,16);
"\n0x%s-->%d mod 100000-->Line:%05d\n"
"God says...\n$$FG,RED$$",url->special,i,i%100000;
PutBibleLines(i%100000,20);
"$$FG$$\n";
}
break;
case 8:
tag="https://www.fourmilab.ch/hotbits/secure_generate.html";
"$$TX+HTML,\"%Q\",\"%Q\"$$\n",tag,tag;
if (*url->special) {
i=A2I(url->special,16);
"\n0x%s-->%d mod 100000-->Line:%05d\n"
"God says...\n$$FG,RED$$",url->special,i,i%100000;
PutBibleLines(i%100000,20);
"$$FG$$\n";
}
break;
}
}
Free(url);
}
+1 -1
View File
@@ -45,7 +45,7 @@ I64 AsmAndC()
Beeps(i);
asm {
//You can clobber RAX,RBX,RCX,RDX, but preserve the rest for code in a Holy C routine.
//You can clobber RAX,RBX,RCX,RDX, but preserve the rest for code in a HolyC routine.
USE64 //Defaults to 64, but this is a good habit.
IMPORT Snd;
MOV RCX,&i[RBP] //You can clobber RAX,RBX,RCX,RDX.
+1 -1
View File
@@ -67,7 +67,7 @@ U0 AsmAndC2()
asm {
LIST
//You can clobber RAX,RBX,RCX,RDX, but preserve the rest for code in a Holy C routine.
//You can clobber RAX,RBX,RCX,RDX, but preserve the rest for code in a HolyC routine.
USE64 //Defaults to 64, but this is a good habit.
MOV RCX,R15 //You can clobber RAX,RBX,RCX,RDX.
//You better preserve the rest.
+1 -1
View File
@@ -42,7 +42,7 @@ _HELLO_WORLD::
CALL PUT_HEX_U8
MOV RAX,CH_SPACE
CALL PUT_CHAR
MOV RAX,'Hello ' //Supports multi-byte char constants
MOV RAX,'Hello ' //Supports multi-byte char consts
CALL PUT_CHAR
//We broke it in two pieces to show different ways.
MOV RSI,MY_WORLD_MSG
+158 -24
View File
@@ -5,44 +5,178 @@
#define BUZZ_SPAN 7
asm {
MSG_BUZZ: DU8 "BUZZ\n\0";
MSG_FIZZ: DU8 "FIZZ\n\0";
MSG_BUZZ_FIZZ: DU8 "BUZZ_FIZZ\n\0";
MSG_NEW_LINE: DU8 "\n\0";
_BUZZ_FIZZ::
ENTER 0 //Always use Enter/Leave
PUSH RSI //See $LK,"CREG_VARS_MASK","MN:CREG_VARS_MASK"$ & $LK,"CREG_NON_PTR_MASK","MN:CREG_NON_PTR_MASK"$
PUSH RDI
MOV RSI,FIZZ_SPAN-RANGE_START%FIZZ_SPAN+1
MOV RDI,BUZZ_SPAN-RANGE_START%BUZZ_SPAN+1
MOV RAX,RANGE_START
MOV DX,(FIZZ_SPAN-RANGE_START%FIZZ_SPAN+1)<<8+
(BUZZ_SPAN-RANGE_START%BUZZ_SPAN+1)
@@05: DEC DH
@@05: CALL &PUT_HEX_U64
PUSH RAX
MOV RAX,CH_SPACE
CALL &PUT_CHAR
DEC RSI
JNZ @@10
MOV DH,FIZZ_SPAN
MOV ESI,MSG_FIZZ
DEC DL
JNZ @@20
MOV DL,BUZZ_SPAN
MOV ESI,MSG_BUZZ_FIZZ
JMP @@20
@@10: DEC DL
MOV RAX,'FIZZ '
CALL &PUT_CHAR
MOV RSI,FIZZ_SPAN
@@10: DEC RDI
JNZ @@15
MOV DL,BUZZ_SPAN
MOV ESI,MSG_BUZZ
JMP @@20
@@15: CALL &PUT_HEX_U64
MOV ESI,MSG_NEW_LINE
@@20: CALL &PUT_STR
MOV RAX,'BUZZ '
CALL &PUT_CHAR
MOV RDI,BUZZ_SPAN
@@15: MOV RAX,'\n'
CALL &PUT_CHAR
POP RAX
INC RAX
CMP RAX,RANGE_END //Actually only a 32-bit instruction.
JBE @@05
POP RDI
POP RSI
LEAVE
RET
}
Call(_BUZZ_FIZZ);
/*
_BUZZ_FIZZ+0x0000 C8000000 ENTER I16 0000
_BUZZ_FIZZ+0x0004 56 PUSH U64 RSI
_BUZZ_FIZZ+0x0005 57 PUSH U64 RDI
_BUZZ_FIZZ+0x0006 BE06000000 MOV U32 ESI,I32 00000006
_BUZZ_FIZZ+0x000B BF07000000 MOV U32 EDI,I32 00000007
_BUZZ_FIZZ+0x0010 B801000000 MOV U32 EAX,I32 00000001
_BUZZ_FIZZ+0x0015 E8EEB92480 CALL I32 PUT_HEX_U64+0x0000
_BUZZ_FIZZ+0x001A 50 PUSH U64 RAX
_BUZZ_FIZZ+0x001B B820000000 MOV U32 EAX,I32 00000020
_BUZZ_FIZZ+0x0020 E847BA2480 CALL I32 PUT_CHAR+0x0000
_BUZZ_FIZZ+0x0025 48FFCE DEC U64 RSI
_BUZZ_FIZZ+0x0028 7514 JNZ I8 _BUZZ_FIZZ+0x003E
_BUZZ_FIZZ+0x002A 48B846495A5A MOV U64 RAX,U64 000000205A5A4946
_BUZZ_FIZZ+0x0030 20000000
_BUZZ_FIZZ+0x0034 E833BA2480 CALL I32 PUT_CHAR+0x0000
_BUZZ_FIZZ+0x0039 BE06000000 MOV U32 ESI,I32 00000006
_BUZZ_FIZZ+0x003E 48FFCF DEC U64 RDI
_BUZZ_FIZZ+0x0041 7514 JNZ I8 _BUZZ_FIZZ+0x0057
_BUZZ_FIZZ+0x0043 48B842555A5A MOV U64 RAX,U64 000000205A5A5542
_BUZZ_FIZZ+0x0049 20000000
_BUZZ_FIZZ+0x004D E81ABA2480 CALL I32 PUT_CHAR+0x0000
_BUZZ_FIZZ+0x0052 BF07000000 MOV U32 EDI,I32 00000007
_BUZZ_FIZZ+0x0057 B80A000000 MOV U32 EAX,I32 0000000A
_BUZZ_FIZZ+0x005C E80BBA2480 CALL I32 PUT_CHAR+0x0000
_BUZZ_FIZZ+0x0061 58 POP U64 RAX
_BUZZ_FIZZ+0x0062 48FFC0 INC U64 RAX
_BUZZ_FIZZ+0x0065 4883F864 CMP U64 RAX,I8 64
_BUZZ_FIZZ+0x0069 76AA JNA I8 _BUZZ_FIZZ+0x0015
_BUZZ_FIZZ+0x006B 5F POP U64 RDI
_BUZZ_FIZZ+0x006C 5E POP U64 RSI
_BUZZ_FIZZ+0x006D C9 LEAVE
_BUZZ_FIZZ+0x006E C3 RET
0000000000000001
0000000000000002
0000000000000003
0000000000000004
0000000000000005
0000000000000006 FIZZ
0000000000000007 BUZZ
0000000000000008
0000000000000009
000000000000000A
000000000000000B
000000000000000C FIZZ
000000000000000D
000000000000000E BUZZ
000000000000000F
0000000000000010
0000000000000011
0000000000000012 FIZZ
0000000000000013
0000000000000014
0000000000000015 BUZZ
0000000000000016
0000000000000017
0000000000000018 FIZZ
0000000000000019
000000000000001A
000000000000001B
000000000000001C BUZZ
000000000000001D
000000000000001E FIZZ
000000000000001F
0000000000000020
0000000000000021
0000000000000022
0000000000000023 BUZZ
0000000000000024 FIZZ
0000000000000025
0000000000000026
0000000000000027
0000000000000028
0000000000000029
000000000000002A FIZZ BUZZ
000000000000002B
000000000000002C
000000000000002D
000000000000002E
000000000000002F
0000000000000030 FIZZ
0000000000000031 BUZZ
0000000000000032
0000000000000033
0000000000000034
0000000000000035
0000000000000036 FIZZ
0000000000000037
0000000000000038 BUZZ
0000000000000039
000000000000003A
000000000000003B
000000000000003C FIZZ
000000000000003D
000000000000003E
000000000000003F BUZZ
0000000000000040
0000000000000041
0000000000000042 FIZZ
0000000000000043
0000000000000044
0000000000000045
0000000000000046 BUZZ
0000000000000047
0000000000000048 FIZZ
0000000000000049
000000000000004A
000000000000004B
000000000000004C
000000000000004D BUZZ
000000000000004E FIZZ
000000000000004F
0000000000000050
0000000000000051
0000000000000052
0000000000000053
0000000000000054 FIZZ BUZZ
0000000000000055
0000000000000056
0000000000000057
0000000000000058
0000000000000059
000000000000005A FIZZ
000000000000005B BUZZ
000000000000005C
000000000000005D
000000000000005E
000000000000005F
0000000000000060 FIZZ
0000000000000061
0000000000000062 BUZZ
0000000000000063
0000000000000064
*/
+2 -2
View File
@@ -14,7 +14,7 @@ PUT_DEC_U64::
//We'll move backward
MOV U8 [RSI],0 //Terminator
OR RAX,RAX //Special case -- zero
TEST RAX,RAX //Special case -- zero
JNZ @@05
DEC RSI
MOV U8 [RSI],'0'
@@ -27,7 +27,7 @@ PUT_DEC_U64::
ADD RDX,'0'
DEC RSI
MOV U8 [RSI],DL
OR RAX,RAX
TEST RAX,RAX
JNZ @@10
@@15: CALL &PUT_STR
+6 -6
View File
@@ -139,14 +139,14 @@
#define IC_OUT_U16 0x75
#define IC_OUT_U32 0x76
#define IC_GET_FLAGS 0x77
#define IC_SET_FLAGS 0x78
#define IC_GET_RFLAGS 0x77
#define IC_SET_RFLAGS 0x78
#define IC_GET_RAX 0x79
#define IC_SET_RAX 0x7A
#define IC_GET_BASE_PTR 0x7B
#define IC_SET_BASE_PTR 0x7C
#define IC_GET_STK_PTR 0x7D
#define IC_SET_STK_PTR 0x7E
#define IC_GET_RBP 0x7B
#define IC_SET_RBP 0x7C
#define IC_GET_RSP 0x7D
#define IC_SET_RSP 0x7E
#define IC_RIP 0x7F
#define IC_RDTSC 0x80
+28
View File
@@ -0,0 +1,28 @@
//This shows the $LK,"Carry","MN:Carry"$ function.
//It's tricky to use.
U0 BigCnt()
{
U64 lo=0,hi=0;
while (hi<0x10) {
lo+=1<<58;
hi+=Carry;
"%016X %016X\n",hi,lo;
}
}
BigCnt;
PressAKey;
U0 BigShift()
{
U64 lo=1,hi=0;
while (lo||hi) {
hi<<=1;
lo<<=1;
hi+=Carry;
"%016X %016X\n",hi,lo;
}
}
BigShift;
+13 -13
View File
@@ -15,23 +15,23 @@ U0 RankOut(I64 i)
class Test1Struct
{
I64 age printf_str "%2d" dft_val 38;
I64 age print_str "%2d" dft_val 38;
I64 color dft_val RED; //Accepts expressions
I64 rank printf_str "%1d" dft_val 6/2 output_fun &RankOut;
I64 rank print_str "%1d" dft_val 6/2 output_fun &RankOut;
};
class Test2Struct
{
I64 age printf_str "%2d" dft_val 38 percentile 54.20;
I64 rank printf_str "%1d" dft_val 5;
I64 serial_num printf_str "%6d" dft_val 123456;
I64 age print_str "%2d" dft_val 38 percentile 54.20;
I64 rank print_str "%1d" dft_val 5;
I64 serial_num print_str "%6d" dft_val 123456;
};
U0 DumpStruct(U8 *class_name,U8 *data)
{
U0 DumpStruct(U8 *_d,U8 *class_name=lastclass)
{//lastclass is keyword
CHashClass *tempc=HashFind(class_name,Fs->hash_table,HTT_CLASS);
U8 *printf_str;
U8 *print_str;
I64 *q,dft_val;
U0 (* fp_output_fun)(I64 i);
F64 percentile;
@@ -43,10 +43,10 @@ U0 DumpStruct(U8 *class_name,U8 *data)
//All our items are I64's. If you want, you can check
//the data type of the member var. See $LK,"ClassRep","MN:ClassRep"$().
q=data+ml->offset;
q=_d+ml->offset;
if (printf_str=MemberMetaData("printf_str",ml))
"" printf_str,*q;
if (print_str=MemberMetaData("print_str",ml))
"" print_str,*q;
//This is slightly ambiguous -- if no meta is present it will return zero.
if (dft_val=MemberMetaData("dft_val",ml))
@@ -71,11 +71,11 @@ Test1Struct t1;
t1.age=44;
t1.rank=3;
DumpStruct("Test1Struct",&t1);
DumpStruct(&t1);
Test2Struct t2;
t2.age=22;
t2.rank=2;
t2.serial_num=55555;
DumpStruct("Test2Struct",&t2);
DumpStruct(&t2);
+7 -7
View File
@@ -3,18 +3,18 @@ F64 glbl;
F64 CompileDemo(U8 *st)
{
I64 type;
U8 *code;
U8 *ex;
CLex *lx=LexNew(st,LF_DONT_FREE_BUF);
F64 result=0;
Lex(lx); //Gotta get it started
"Compile \"%s\"\n",st;
do {
if (code=CmpExpression(lx,&type)) {
if (ex=LexExpression2Bin(lx,&type)) {
if (type!=IT_F64)
result=ToF64(Call(code));
result=ToF64(Call(ex));
else
result=Call(code)(F64);
ExpressionDel(code);
result=Call(ex)(F64);
ExpressionBinDel(ex);
}
"result=%9.4f\n",result;
if (lx->token==';')
@@ -30,8 +30,8 @@ CompileDemo("glbl=1;glbl*2;glbl/3;Sin(glbl)");
//This is just like you typed-it on
//the cmd line.
ExePutS(
ExePrint(
"I64 i;"
"for (i=0;i<10;i++) "
" \"%d\n\",i;"
" \"%%d\n\",i;"
);
+3 -3
View File
@@ -11,9 +11,9 @@
is stored in the lower 32-bits. The upper
32-bits hold the num of days since Christ.
$LK,"PrintF","MN:PrintF"$() and the file datetimes use
$LK,"Print","MN:Print"$() and the file datetimes use
this format, otherwise you might want to
use $LK,"GetTimeStamp","MN:GetTimeStamp"$() for a higher frequency
use $LK,"GetTSC","MN:GetTSC"$() for a higher frequency
timing, divide by $LK,"time_stamp_freq","MN:time_stamp_freq"$,
but this num is tied to your CPU's
clock frequency which is inexact when
@@ -21,7 +21,7 @@
*/
CDate cdt=GetCurTimeDate;
CDate cdt=GetDateTime;
I64 i;
for (i=0;i<DF_NUM;i++)
+1 -1
View File
@@ -27,7 +27,7 @@ Bool Quit()
while (TRUE) {
"%S %S?","ST_EXIT","ST_YES_NO";
st=MGetS;
i=DefineMatch(st,"ST_NO_YES_LST",LEF_IGNORE_CASE);
i=DefineMatch(st,"ST_NO_YES_LST",LMF_IGNORE_CASE);
if (i>=0) {
result=i;
break;
+10 -10
View File
@@ -7,15 +7,15 @@ U8 *tSCB(CDoc *,CDocEntry *,CTask *mem_task)
U8 *st=MAlloc(64,mem_task);
CDate cdt=tS*CDATE_FREQ;
//Doesn't have to be fixed width!!
SPrintF(st,"%d=%h11T",cdt,cdt);
SPrint(st,"%d=%h11T",cdt,cdt);
return st;
}
U8 *CurTimeCB(CDoc *,CDocEntry *,CTask *mem_task)
{
U8 *st=MAlloc(64,mem_task);
CDate cdt=GetCurTimeDate;
SPrintF(st,"%h0D %h0T",cdt,cdt);
CDate cdt=GetDateTime;
SPrint(st,"%h0D %h0T",cdt,cdt);
return st;
}
@@ -32,10 +32,10 @@ U0 DoIt()
Bool old_preempt=Preempt(OFF);
DocBottom(bdoc); //Ins at the bottom
DocPutS(bdoc,"$$FG,RED$$$$CM+BY+LX,5,-3$$");
DocPrint(bdoc,"$$FG,RED$$$$CM+BY+LX,5,-3$$");
// The $LK,"DocPutS","MN:DocPutS"$() routine returns the addr of the last entry.
doc_e=DocPutS(bdoc,"$$TX+TC,\" \"$$");
// The $LK,"DocPrint","MN:DocPrint"$() routine returns the addr of the last entry.
doc_e=DocPrint(bdoc,"$$TX+TC,\" \"$$");
// The TC flag is "has tag callback".
// Flags are explained here:
@@ -45,7 +45,7 @@ U0 DoIt()
// $LK,"ST_DOC_FLAGS","FF:::/TempleOS/Adam/Doc/Doc.CPP,ST_DOC_FLAGS"$
doc_e->tag_cb=&tSCB;
DocPutS(bdoc,"$$FG$$");
DocPrint(bdoc,"$$FG$$");
//$BK,1$WARNING:$BK,0$ If you use the put_doc you
//run the risk of the user pressing
@@ -53,10 +53,10 @@ U0 DoIt()
//of which will crash. So, you might want
//to use the border_doc.
DocPutS(pdoc,"$$FG,LTRED$$");
doc_e=DocPutS(pdoc,"$$TX+TC,\" \"$$");
DocPrint(pdoc,"$$FG,LTRED$$");
doc_e=DocPrint(pdoc,"$$TX+TC,\" \"$$");
doc_e->tag_cb=&CurTimeCB;
DocPutS(pdoc,"$$FG$$");
DocPrint(pdoc,"$$FG$$");
Preempt(old_preempt);
+2 -2
View File
@@ -50,11 +50,11 @@ U0 DataDemo()
"However, changes happen immediately,\n"
"so it's tricky.\n\n";
//Use <CTRL-L> for the $$DA,$$ format.
doc_e=DocPutS(doc,"$$DA-T+RD+UD-I64+U32,32,\"%12d\"$$\n");
doc_e=DocPrint(doc,"$$DA-T+RD+UD-I64+U32,32,\"%%12d\"$$\n");
doc_e->data=&i;
StrCpy(buf,"Terry");
doc_e=DocPutS(doc,"$$DA-P+RD+UD,7,\"Str:%s\"$$\n");
doc_e=DocPrint(doc,"$$DA-P+RD+UD,7,\"Str:%%s\"$$\n");
doc_e->data=buf;
if (unlock)
+3 -3
View File
@@ -12,11 +12,11 @@ documentation.
DefineLoad("COMPANY","Trivial Solutions");
"Company: $$TX+D,\"\",\"COMPANY\"$$\n";
DefinePrintF("COMPANY_TIME","%T",GetCurTimeDate);
DefinePrint("COMPANY_TIME","%T",GetDateTime);
#exe {
StreamPrintF(
"#define COMPANY_AGE %h56D\n",GetCurTimeDate-A2Date("8/1/2003"));
StreamPrint(
"#define COMPANY_AGE %h56D\n",GetDateTime-A2Date("8/1/2003"));
};
Binary file not shown.
+22 -22
View File
@@ -1,42 +1,42 @@
class DStruct
class FDStruct
{
//Use <CTRL-L> and select "Data" to generate the fmtstrs
//The number is the field from after the ':' to the end.
// See $LK,"Data Tag Width","FA:::/TempleOS/Adam/Doc/DocPlain.CPP,DataTagWidth"$.
F64 num1 fmtstr "$$DA-T,32,\"F64 1:%12.8f\"$$\n";
F64 num2 fmtstr "$$DA-T,32,\"F64 2:%12e\"$$\n";
I64 num3 fmtstr "$$DA-T,32,\"I64 1:0x%016X\"$$\n";
I64 num4 fmtstr "$$DA-T,32,\"I64 2:%12d\"$$\n";
U8 name[32] fmtstr "$$DA-P,31,\"Name :%s\"$$\n";
F64 num1 fmtstr "$$DA-T,32,\"F64 1:%12.8f\"$$\n";
F64 num2 fmtstr "$$DA-T,32,\"F64 2:%12e\"$$\n";
I64 num3 fmtstr "$$DA-T,32,\"I64 1:0x%016X\"$$\n";
I64 num4 fmtstr "$$DA-T,32,\"I64 2:%12d\"$$\n";
U8 name[32] fmtstr "$$DA-P,31,\"Name :%s\"$$\n";
CDate datetime fmtstr "$$DA-T,32,\"Date :%8D\"$$\n";
};
U0 FormDemo()
{
DStruct gtl;
FDStruct fds;
CDate cdt;
gtl.num1=12.3e-4; //Set defaults
gtl.num2=4.5e3;
gtl.num3=0x1234;
gtl.num4=-567;
StrCpy(&gtl.name,"John");
cdt=GetCurTimeDate;
gtl.datetime=cdt;
if (DocFormDo(&gtl,"DStruct")) {
"#1=%e\n",gtl.num1;
"#2=%e\n",gtl.num2;
"#3=%d\n",gtl.num3;
"#4=%d\n",gtl.num4;
"Name=%s\n",gtl.name;
"Date=%D\n",gtl.datetime;
fds.num1=12.3e-4; //Set defaults
fds.num2=4.5e3;
fds.num3=0x1234;
fds.num4=-567;
StrCpy(&fds.name,"John");
cdt=GetDateTime;
fds.datetime=cdt;
if (DocFormDo(&fds)) {
"#1=%e\n",fds.num1;
"#2=%e\n",fds.num2;
"#3=%d\n",fds.num3;
"#4=%d\n",fds.num4;
"Name=%s\n",fds.name;
"Date=%D\n",fds.datetime;
} else
"Cancel\n";
"\n\nClassRep Example\n";
ClassRep("DStruct",&gtl);
ClassRep(&fds);
//See also $LK,"ClassRepD","MN:ClassRepD"$().
}
+1 -1
View File
@@ -7,7 +7,7 @@ I64 PopUpFreq()
{ //See also $LK,"PopUpRangeI64","MN:PopUpRangeI64"$()
I64 i;
CDoc *doc=DocNew;
DocPutS(doc,"$$TX+CX,\"Set Freq\"$$\n" //Centered text
DocPrint(doc,"$$TX+CX,\"Set Freq\"$$\n" //Centered text
"$$CM+LX,2,4$$$$BT,\"100 Hz\",100$$"
"$$CM+LX,18,0$$$$BT,\"200 Hz\",200$$"
"$$CM+LX,2,4$$$$BT,\"400 Hz\",400$$"
Binary file not shown.
+24 -24
View File
@@ -1,7 +1,7 @@
/*
This uses DocPutS/DocPrintF because updates
This uses $LK,"DocPrint","MN:DocPrint"$() because updates
to within a tree while a tree is collapsed get
messed-up if "live"(like using ordinary PrintF/PutS.)
messed-up if "live" (like using ordinary Print.)
The insert point is confused by hiding of
data in collapsed trees. Therefore, the window main
Doc is taken off-line by disabling preemption so there
@@ -9,33 +9,33 @@ are no screen updates until all data has been inserted.
There is a special Doc function which is also
available to take an Doc off-line. See $LK,"DocInsSafe","MN:DocInsSafe"$.
For this example, however, I wanted to use DocPrintF
For this example, however, I wanted to use DocPrint
and disabled Preemption myself.
*/
U0 TreeSub(CDoc *doc,CDirEntry *tempm)
U0 TreeSub(CDoc *doc,CDirEntry *tempde)
{
CDirEntry *tempm1;
while (tempm) {
tempm1=tempm->next;
if (tempm->attr & _ATTR_DIR) {
DocPutS(doc,"$$TR,\"\"$$");
DocPrintF(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
tempm->name,tempm->full_name);
if (tempm->sub) {
DocPutS(doc,"$$ID,+2$$");
TreeSub(doc,tempm->sub);
DocPutS(doc,"$$ID,-2$$");
CDirEntry *tempde1;
while (tempde) {
tempde1=tempde->next;
if (tempde->attr & _ATTR_DIR) {
DocPrint(doc,"$$TR,\"\"$$");
DocPrint(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
tempde->name,tempde->full_name);
if (tempde->sub) {
DocPrint(doc,"$$ID,+2$$");
TreeSub(doc,tempde->sub);
DocPrint(doc,"$$ID,-2$$");
}
} else {
DocPrintF(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
tempm->name,tempm->full_name);
DocPrint(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
tempde->name,tempde->full_name);
}
//Note there is also a routine
//to delete an entire CDirEntry tree.
//See $LK,"CDirLstDel","MN:CDirLstDel"$().
CDirEntryDel(tempm);
tempm=tempm1;
//See $LK,"DirLstDel","MN:DirLstDel"$().
DirEntryDel(tempde);
tempde=tempde1;
}
}
@@ -43,11 +43,11 @@ U0 TreeDemo()
{
I64 fuf_flags=0;
CDoc *doc=DocNew;
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
DocPutS(doc,"$$TR-C+AL,\"\"$$\n");
DocPutS(doc,"$$ID,+2$$");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
DocPrint(doc,"$$TR-C+AL,\"\"$$\n");
DocPrint(doc,"$$ID,+2$$");
TreeSub(doc,FilesFind("/TempleOS/*",fuf_flags));
DocPutS(doc,"$$ID,-2$$");
DocPrint(doc,"$$ID,-2$$");
DocInsDoc(DocPut,doc);
DocDel(doc);
}
+2 -2
View File
@@ -48,12 +48,12 @@ U0 UnusedDefineScan()
while (temph!=tempht) {
if (temph->type&HTT_DEFINE_STR) {
progress1++;
if (FileOcc(temph->str,"/TempleOS/"FILENAME_MASK_TXT,"+l-i")==1) {
if (FileOcc(temph->str,"/TempleOS/*","+l-i+T")==1) {
doc=DocNew;
old_put_doc=DocPut;
old_display_doc=DocDisplay;
Fs->put_doc=Fs->display_doc=doc;
Grep(temph->str,"/TempleOS/"FILENAME_MASK_TXT,"+l-i");
Grep(temph->str,"/TempleOS/*","+l-i+T");
Fs->put_doc=old_put_doc;
Fs->display_doc=old_display_doc;
doc_e=doc->root.next;
+2 -2
View File
@@ -28,7 +28,7 @@ U0 WriteAcct()
acctnum=PmtI64("Acct #",-1);
if (0<=acctnum<DB_MAX_ACCT) {
MemSet(&a,0,BLK_SIZE);
if (DocFormDo(&a,"Acct")) {
if (DocFormDo(&a)) {
f=FOpen(DB_FILENAME,"w+");
FWBlks(f,&a,acctnum*DB_ACCT_BLKS,DB_ACCT_BLKS);
FClose(f);
@@ -47,7 +47,7 @@ U0 ReadAcct()
f=FOpen(DB_FILENAME,"r");
FRBlks(f,&a,acctnum*DB_ACCT_BLKS,DB_ACCT_BLKS);
FClose(f);
ClassRep("Acct",&a);
ClassRep(&a);
}
}
@@ -8,10 +8,10 @@ U0 RawAccess(I64 drv_let=0)
PrtRep;
PressAKey;
ClassRep("CPrt",p);
ClassRep(p);
PressAKey;
ClassRep("CBlkDev",bdev);
ClassRep(bdev);
PressAKey;
//Temporarily change partition range to full device.
+21 -21
View File
@@ -4,29 +4,29 @@ hold the file until you are done. The $LK,"CDoc","MN:CDoc"$
framework is convenient for this.
*/
U0 TreeSub(CDoc *doc,CDirEntry *tempm)
U0 TreeSub(CDoc *doc,CDirEntry *tempde)
{
CDirEntry *tempm1;
while (tempm) {
tempm1=tempm->next;
if (tempm->attr & _ATTR_DIR) {
DocPutS(doc,"$$TR,\"\"$$");
DocPrintF(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
tempm->name,tempm->full_name);
if (tempm->sub) {
DocPutS(doc,"$$ID,+2$$");
TreeSub(doc,tempm->sub);
DocPutS(doc,"$$ID,-2$$");
CDirEntry *tempde1;
while (tempde) {
tempde1=tempde->next;
if (tempde->attr & _ATTR_DIR) {
DocPrint(doc,"$$TR,\"\"$$");
DocPrint(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
tempde->name,tempde->full_name);
if (tempde->sub) {
DocPrint(doc,"$$ID,+2$$");
TreeSub(doc,tempde->sub);
DocPrint(doc,"$$ID,-2$$");
}
} else {
DocPrintF(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
tempm->name,tempm->full_name);
DocPrint(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
tempde->name,tempde->full_name);
}
//Note there is also a routine
//to delete an entire CDirEntry tree.
//See $LK,"CDirLstDel","MN:CDirLstDel"$().
CDirEntryDel(tempm);
tempm=tempm1;
//See $LK,"DirLstDel","MN:DirLstDel"$().
DirEntryDel(tempde);
tempde=tempde1;
}
}
@@ -34,11 +34,11 @@ U0 FPrintFDemo(U8 *output_filename=NULL)
{
I64 fuf_flags=0;
CDoc *doc=DocNew;
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
DocPutS(doc,"$$TR-C+AL,\"\"$$\n");
DocPutS(doc,"$$ID,+2$$");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
DocPrint(doc,"$$TR-C+AL,\"\"$$\n");
DocPrint(doc,"$$ID,+2$$");
TreeSub(doc,FilesFind("/TempleOS/*",fuf_flags));
DocPutS(doc,"$$ID,-2$$");
DocPrint(doc,"$$ID,-2$$");
DocRecalc(doc);
if (output_filename) {
StrCpy(doc->filename.name,output_filename);
+3 -3
View File
@@ -5,11 +5,11 @@ $WW,0$*/
U0 Main()
{
I64 i,cnt=0;
CDirEntry *tempm=FilesFind("::/TempleOS/*",FUF_RECURSE),
**a=FilesOrder(tempm,&cnt);
CDirEntry *tempde=FilesFind("::/TempleOS/*",FUF_RECURSE),
**a=FilesOrder(tempde,&cnt);
for (i=0;i<cnt;i++) {
"%08X %s\n",a[i]->cluster,a[i]->full_name;
CDirEntryDel(a[i]);
DirEntryDel(a[i]);
}
Free(a);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+108 -31
View File
@@ -112,7 +112,7 @@ class Monster
Bool dead,pad[7];
} monsters[NUM_MONSTERS];
U0 FPSTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
U0 CFTransform(CDC *dc,I64 *x,I64 *y,I64 *z)
{
I64 zz;
GrRot(dc->r,x,y,z);
@@ -146,27 +146,26 @@ U0 DrawIt(CTask *task,CDC *dc)
I64 i,j,*r1,*r2,*r3,*s2w,xx,yy,zz,x,y,x1,y1,z1,
c,x1w,y1w,x1h,y1h,xh,yh,zh,
cx=task->win_pixel_width/2,
cy=task->win_pixel_height/2,
_man_xx=man_xx,_man_yy=man_yy;
U8 *inter;
F64 tt,_man_é=man_é;
cy=task->win_pixel_height/2;
U8 *temps;
F64 tt;
CD3I32 poly[4];
DCAllocDepthBuf(dc);
MemSet(panels_processed_bitmap,0,(map_width*map_height+7)>>3);
//World to screen
GrRotZEqu(dc->r,_man_é+ã/2);
GrRotZEqu(dc->r,man_é+ã/2);
GrRotXEqu(dc->r,ã/2);
GrSetRotMat(dc,dc->r);
xh=-_man_xx/SCREEN_SCALE; yh=-_man_yy/SCREEN_SCALE; zh=0;
xh=-man_xx/SCREEN_SCALE; yh=-man_yy/SCREEN_SCALE; zh=0;
GrRot(dc->r,&xh,&yh,&zh);
GrSetTranslation(dc->r,xh,yh,zh);
//Screen to world
s2w=GrRotX(-ã/2,task);
GrRotZEqu(s2w,-_man_é-ã/2);
GrRotZEqu(s2w,-man_é-ã/2);
xh=0; yh=0; zh=SCREEN_SCALE;
GrRot(s2w,&xh,&yh,&zh);
@@ -176,7 +175,7 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->ls.x=xx; dc->ls.y=yy; dc->ls.z=zz;
dc->flags|=DCF_TRANSFORMATION;
dc->transform=&FPSTransform;
dc->transform=&CFTransform;
dc->x=cx;
dc->y=cy;
r1=GrRotX(-ã/2,task);
@@ -189,20 +188,20 @@ U0 DrawIt(CTask *task,CDC *dc)
r3=GrRotX(-ã/2,task);
GrScaleMatEqu(r3,PLANT_SCALE);
x1h=_man_xx+yh*PLOT_GRID_WIDTH/2+xh*(PLOT_GRID_HEIGHT-1);
y1h=_man_yy-xh*PLOT_GRID_WIDTH/2+yh*(PLOT_GRID_HEIGHT-1);
x1h=man_xx+yh*PLOT_GRID_WIDTH/2+xh*(PLOT_GRID_HEIGHT-1);
y1h=man_yy-xh*PLOT_GRID_WIDTH/2+yh*(PLOT_GRID_HEIGHT-1);
xh>>=1; yh>>=1;
for (j=0;j<PLOT_GRID_HEIGHT*2;j++) {
x1w=x1h;
y1w=y1h;
for (i=0;i<PLOT_GRID_WIDTH*4;i++) {
xx=x1w/SCREEN_SCALE; yy=y1w/SCREEN_SCALE;
x=xx*SCREEN_SCALE-_man_xx; y=yy*SCREEN_SCALE-_man_yy;
x=xx*SCREEN_SCALE-man_xx; y=yy*SCREEN_SCALE-man_yy;
if (1<=xx<map_width-1 && 1<=yy<map_height-1 &&
!LBts(panels_processed_bitmap,yy*map_width+xx)) {
if ((c=map[yy*map_width+xx]) &&
LOS(xx*SCREEN_SCALE+SCREEN_SCALE/2,yy*SCREEN_SCALE+SCREEN_SCALE/2,
_man_xx,_man_yy)) {
man_xx,man_yy)) {
if (c==YELLOW)
dc->color=RED;
else
@@ -226,14 +225,14 @@ U0 DrawIt(CTask *task,CDC *dc)
z1=0;
GrTransform(dc,&x1,&y1,&z1);
if (z1>0)
SpritePlotRotMat3b(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<5>",5$,r3);
SpritePlotRotMat3B(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<5>",5$,r3);
} else if (c==YELLOW) {
x1=x+SCREEN_SCALE/2;
y1=y+SCREEN_SCALE/2;
z1=0;
GrTransform(dc,&x1,&y1,&z1);
if (z1>0)
SpritePlotRotMat3b(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<6>",6$,r3);
SpritePlotRotMat3B(dc,x+SCREEN_SCALE/2,y+SCREEN_SCALE/2,0,$IB,"<6>",6$,r3);
}
if (!map[(yy+1)*map_width+xx]) {
@@ -313,21 +312,21 @@ U0 DrawIt(CTask *task,CDC *dc)
for (i=0;i<NUM_MONSTERS;i++) {
x=monsters[i].x;
y=monsters[i].y;
if (LOS(x,y,_man_xx,_man_yy)) {
x-=_man_xx;
y-=_man_yy;
if (LOS(x,y,man_xx,man_yy)) {
x-=man_xx;
y-=man_yy;
xx=x;
yy=y;
zz=0;
GrTransform(dc,&xx,&yy,&zz);
if (zz>0) {
if (monsters[i].dead)
SpritePlotRotMat3b(dc,x,y,0,$IB,"<2>",2$,r2);
SpritePlotRotMat3B(dc,x,y,0,$IB,"<2>",2$,r2);
else {
tt=Tri(tT,1.0);
inter=SpriteInterpolate($IB,"<3>",3$,$IB,"<4>",4$,tt);
SpritePlotRotMat3b(dc,x,y,0,inter,r1);
Free(inter);
temps=SpriteInterpolate($IB,"<3>",3$,$IB,"<4>",4$,tt);
SpritePlotRotMat3B(dc,x,y,0,temps,r1);
Free(temps);
}
}
}
@@ -356,13 +355,13 @@ U0 DrawIt(CTask *task,CDC *dc)
if (!monsters[i].dead)
GrPlot3(dc,2*(monsters[i].x/SCREEN_SCALE),2*(map_height-1-monsters[i].y/SCREEN_SCALE),0);
dc->color=LTCYAN;
GrPlot3(dc,2*(_man_xx/SCREEN_SCALE),2*(map_height-1-_man_yy/SCREEN_SCALE),0);
GrPlot3(dc,2*(man_xx/SCREEN_SCALE),2*(map_height-1-man_yy/SCREEN_SCALE),0);
if (tf) {
dc->color=LTRED;
if (Blink)
GrPutS(dc,cx-(FONT_WIDTH*14)/2,cy-FONT_HEIGHT/2,"Game Completed");
GrPrint(dc,cx-(FONT_WIDTH*14)/2,cy-FONT_HEIGHT/2,"Game Completed");
tt=tf;
} else {
dc->color=LTGREEN;
@@ -370,7 +369,7 @@ U0 DrawIt(CTask *task,CDC *dc)
GrLine(dc,cx,cy-5,cx,cy+5);
tt=tT;
}
GrPrintF(dc,0,0,"Enemy:%d Time:%3.2f Best:%3.2f",monsters_left,tt-t0,best_score);
GrPrint(dc,0,0,"Enemy:%d Time:%3.2f Best:%3.2f",monsters_left,tt-t0,best_score);
Free(s2w);
}
@@ -542,6 +541,7 @@ U0 CastleFrankenstein()
SettingsPush; //See $LK,"SettingsPush","MN:SettingsPush"$
Fs->text_attr=RED<<4+WHITE;
Preempt(OFF);
WinBorder;
WinMax;
WordStat;
Init;
@@ -591,7 +591,84 @@ fs_done:
}
CastleFrankenstein;
+    <<<< ,,,$8888$$$$444 4 ( ( ((0,0T0T0TLTL,L,L,404P4P4PHPH0H0H0808L8L8LDLD4D4D4<4<H<H<H@H@8@T@l@l4lLlLˆLˆLˆ$ˆ$€$€$€0€0l0p4„4„(„H€HpHpDp8p8€8€8€D€DtHtDt<t<|<x@|@|DxD„ „„tppp\\\\llhlll````ddd h hXTPPPLLL(@@8HHHH8888DD D D <Z,u @ ZDD<DDD\D\DdT0T8THL0LLd d hh88x8|8|4x4tt$t@8HLL,L4L<LZ<HñÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
+
 
 
<
<<
< 
,,,
$8
88
8$
$$
$4
44
4 (
( (
(0
,0T0
T0TL
TL,L
,L,4
04P4
P4PH
PH0H
0H08
08L8
L8LD
LD4D
4D4<
4<H<
H<H@
H@8@
T@l@
l4lL
lLˆL
ˆLˆ$
ˆ$€$
€$€0
€0l0
p4„4
„(„H
€HpH
pDp8
p8€8
€8€D
€DtH
tDt<
t<|<
x@|@
|DxD
„ „
„t
pp
p\
\\
\l
lh
ll
l`
``
`d
dd
h h
XT
PP
PL
LL
(@@
8H
HH
H8
88
8D
D D
D < Z,u
@ Z
DD<
DDD\
D\DdT0T8THL0LLd d hh88x8|8|4x4tt$t@8HLL,L4L<LZ<HñÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
tÿÿÿöÿÿÿtÿÿÿ
¿ÿÿÿöÿÿÿ¿ÿÿÿƒÿÿÿ
@@ -620,7 +697,7 @@ CastleFrankenstein;


 $%*$*+'&('()&(( $++
0/.112-,7 765343! 3 45833!839;:7;766;;1␍Z<HñÿÿÿöÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿöÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
0/.112-,7 765343! 3 45833!839;:7;766;;1␍Z<HñÿÿÿöÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿöÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
tÿÿÿöÿÿÿtÿÿÿ
¿ÿÿÿöÿÿÿ¿ÿÿÿƒÿÿÿ
@@ -645,7 +722,7 @@ CastleFrankenstein;


 $%*$*+'&('()&(( $++
0/.112-,7 765343! 3 45833!839;:7;766;;1␍Z<HñÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿöÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
0/.112-,7 765343! 3 45833!839;:7;766;;1␍Z<HñÿÿÿñÿÿÿØÿÿÿìÿÿÿØÿÿÿûÿÿÿ¿ÿÿÿ¿ÿÿÿØÿÿÿØÿÿÿìÿÿÿöÿÿÿƒÿÿÿçÿÿÿƒÿÿÿûÿÿÿƒÿÿÿƒÿÿÿ
tÿÿÿöÿÿÿtÿÿÿ
¿ÿÿÿöÿÿÿ¿ÿÿÿƒÿÿÿ
@@ -670,18 +747,18 @@ CastleFrankenstein;


 $%*$*+'&('()&(( $++
0/.112-,7 765343! 3 45833!839;:7;766;;1␍,ÎÿÿÿÎÿÿÿûÿÿÿçÿÿÿûÿÿÿçÿÿÿµÿÿÿ�ÿÿÿƒÿÿÿ�ÿÿÿâÿÿÿµÿÿÿâÿÿÿûÿÿÿÎÿÿÿûÿÿÿÎÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿµÿÿÿûÿÿÿ�ÿÿÿûÿÿÿ�ÿÿÿâÿÿÿûÿÿÿµÿÿÿâÿÿÿ�ÿÿÿµÿÿÿâÿÿÿµÿÿÿâÿÿÿ�ÿÿÿ�ÿÿÿûÿÿÿµÿÿÿûÿÿÿâÿÿÿµÿÿÿûÿÿÿâÿÿÿ�ÿÿÿûÿÿÿ 
0/.112-,7 765343! 3 45833!839;:7;766;;1␍,ÎÿÿÿÎÿÿÿûÿÿÿçÿÿÿûÿÿÿçÿÿÿµÿÿÿ�ÿÿÿƒÿÿÿ�ÿÿÿâÿÿÿµÿÿÿâÿÿÿûÿÿÿÎÿÿÿûÿÿÿÎÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿûÿÿÿçÿÿÿûÿÿÿµÿÿÿûÿÿÿ�ÿÿÿûÿÿÿ�ÿÿÿâÿÿÿûÿÿÿµÿÿÿâÿÿÿ�ÿÿÿµÿÿÿâÿÿÿµÿÿÿâÿÿÿ�ÿÿÿ�ÿÿÿûÿÿÿµÿÿÿûÿÿÿâÿÿÿµÿÿÿûÿÿÿâÿÿÿ�ÿÿÿûÿÿÿ 


  ␍␍ ␍ 
 

 ␍
␍÷ÿÿÿ÷ÿÿÿñÿÿÿ÷ÿÿÿ ôÿÿÿ ÷ÿÿÿ øÿÿÿçÿÿÿìÿÿÿçÿÿÿìÿÿÿçÿÿÿøÿÿÿøÿÿÿçÿÿÿðÿÿÿçÿÿÿðÿÿÿçÿÿÿøÿÿÿçÿÿÿçÿÿÿ   ␍ ␍ 
␍÷ÿÿÿ÷ÿÿÿñÿÿÿ÷ÿÿÿ ôÿÿÿ ÷ÿÿÿ øÿÿÿçÿÿÿìÿÿÿçÿÿÿìÿÿÿçÿÿÿøÿÿÿøÿÿÿçÿÿÿðÿÿÿçÿÿÿðÿÿÿçÿÿÿøÿÿÿçÿÿÿçÿÿÿ   ␍ ␍ 
   


   ␍ ␍␍(Øÿÿÿ(ØÿÿÿØÿÿÿØÿÿÿìÿÿÿÎÿÿÿÎÿÿÿìÿÿÿ‚‚ìÿÿÿ‚ìÿÿÿìÿÿÿ‚öÿÿÿâÿÿÿ‚
   ␍ ␍␍(Øÿÿÿ(ØÿÿÿØÿÿÿØÿÿÿìÿÿÿÎÿÿÿÎÿÿÿìÿÿÿ‚‚ìÿÿÿ‚ìÿÿÿìÿÿÿ‚öÿÿÿâÿÿÿ‚
âÿÿÿ‚ìÿÿÿ  


Binary file not shown.
+4 -1
View File
@@ -1,5 +1,8 @@
//Practice tracing circles
//Giotto, a famous artist, drew a freehand circle as a portfolio for a job.
AcctRegSetDftEntry("TempleOS/CircleTrace","F64 best_score=999;\n");
AcctRegExeBranch("TempleOS/CircleTrace");
@@ -17,7 +20,7 @@ U0 SongTask(I64)
U0 DrawIt(CTask *task,CDC *)
{
U8 buf[128];
SPrintF(buf,"Error:%6.3f Time:%6.3f Score:%6.3f Best:%8.3f",avg_error,elapsed_time,score,best_score);
SPrint(buf,"Error:%6.3f Time:%6.3f Score:%6.3f Best:%8.3f",avg_error,elapsed_time,score,best_score);
PlotWinStr(task,buf,BLACK<<4+WHITE,0,0);
}
Binary file not shown.
Binary file not shown.
+20 -20
View File
@@ -5,17 +5,18 @@
//See $LK,"ST_RAINBOW_10","FF:::/TempleOS/Adam/Gr/GrScreen.CPP,ST_RAINBOW_10"$
U0 ShowDigit(U8 ch)
U0 PrintDigit(U8 ch)
{
//The %Z code displays a Define subentry
"$$FG,%Z$$%d$$FG$$",ch-'0',"ST_RAINBOW_10",ch-'0';
if ('0'<=ch<='9')
"$$FG,%Z$$%d$$FG$$",ch-'0',"ST_RAINBOW_10",ch-'0';
}
U0 ShowPattern(U8 *st)
U0 PrintPattern(U8 *st)
{
U8 ch;
while (ch=*st++)
ShowDigit(ch);
PrintDigit(ch);
NewLine;
}
@@ -33,12 +34,11 @@ U0 Digits()
"Try to remember the digits and enter them. "
"They are colored based on electrical "
"engineering color codes.\n";
for (i=0;i<10;i++) {
for (i=0;i<10;i++)
"$$FG,%Z$$%d: %Z\n",i,"ST_RAINBOW_10",i,i,"ST_RAINBOW_10";
}
"$$FG$$\n"; //set to default background
if (!PressAKey) goto dg_done;
ch=PressAKey;
if (ch==CH_ESC||ch==CH_SHIFT_ESC) goto dg_done;
while (TRUE) {
restart:
num=0;
@@ -49,25 +49,25 @@ restart:
"$$WW,1$$$$BD,DKGRAY$$$$FD,WHITE$$\n";
"Pattern\nLength:%d\n\n",num+1;
answer[num++]=RandU32%10+'0';
ShowPattern(answer);
if (!PressAKey) goto dg_done;
PrintPattern(answer);
ch=PressAKey;
if (ch==CH_ESC||ch==CH_SHIFT_ESC) goto dg_done;
DocClear;
"$$WW,1$$$$BD,DKGRAY$$$$FD,WHITE$$\n";
"Guess\nLength:%d\n\n",num;
for (i=0;i<num;i++) {
ch=GetChar(,FALSE);
if (ch==CH_SHIFT_ESC || ch==CH_ESC)
return;
ShowDigit(ch);
if (ch==CH_ESC||ch==CH_SHIFT_ESC) goto dg_done;
PrintDigit(ch);
if (ch!=answer[i]) {
Snd(0);
"\nScore:%d\n",num;
ShowPattern(answer);
Beep;
Beep;
if (!PressAKey) goto dg_done;
goto restart;
PrintPattern(answer);
Beep; Beep;
ch=PressAKey;
if (ch==CH_ESC||ch==CH_SHIFT_ESC)
goto dg_done;
else
goto restart;
}
}
}
+85 -3
View File
@@ -433,7 +433,89 @@ dg_done:
}
DunGen;
£|˜˜øÿÿÿ˜˜´´´øÿÿÿ´øÿÿÿ˜øÿÿÿ¤¤ œ ° ° °üÿÿÿ°üÿÿÿœüÿÿÿœüÿÿÿœœ¬¬¬¬    ¨¤$Ì$Ì$Ì@Ì@¤@¤@¤(¨(È(È(È<È<¨<¨<¨,¨,Ä,Ä,Ä8Ä8¬8¬8¬0¬0À0À0À4À4°4Ì4ä4ä(ä@ä@@@øøø$ø$ä$è(ü(üü<ø<è<è8è,è,ø,ø,ø8ø8ì<ì8ì0ì0ô0ð4ô4ô8ð8üüüìèøÿÿÿèèÔÔÔøÿÿÿÔøÿÿÿäøÿÿÿäøÿÿÿà ä äüÿÿÿäüÿÿÿØüÿÿÿØüÿÿÿØ Ø Ü Ü ÜààÐÌÈüÿÿÿÈ È Ä Ä Äüÿÿÿ 4�4Œ,Œ<Œ<€<€<€,€,ˆ,ˆ,ˆ8ˆ8„8„8„0˜4˜L”LœLœLœXœX”X”X”P˜P˜T¼ôÿÿÿ¼0¼8¼P¼P¼X°Ä,Ä8Rýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²%þÿÿÿëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
£
|˜
˜øÿÿÿ˜
˜´
´´øÿÿÿ
´øÿÿÿ˜øÿÿÿ
¤¤
œ °
° °üÿÿÿ
°üÿÿÿœüÿÿÿ
œüÿÿÿœ
œ¬
¬¬
¬ 
  
 ¨
¤$Ì$
Ì$Ì@
Ì@¤@
¤@¤(
¨(È(
È(È<
È<¨<
¨<¨,
¨,Ä,
Ä,Ä8
Ä8¬8
¬8¬0
¬0À0
À0À4
À4°4
Ì4ä4
ä(ä@
ä@@
@
ø
øø$
ø$ä$
è(ü(
üü<
ø<è<
è8è,
è,ø,
ø,ø8
ø8ì<
ì8ì0
ì0ô0
ð4ô4
ô8ð8
üü
üì
èøÿÿÿè
èÔ
ÔÔøÿÿÿ
Ôøÿÿÿäøÿÿÿ
äøÿÿÿà
ä äüÿÿÿ
äüÿÿÿØüÿÿÿ
ØüÿÿÿØ
Ø Ü
Ü Ü
àà
ÐÌ
ÈüÿÿÿÈ
È Ä
Ä Äüÿÿÿ
 4�4
Œ,Œ<
Œ<€<
€<€,
€,ˆ,
ˆ,ˆ8
ˆ8„8
„8„0
˜4˜L
”LœL
œLœX
œX”X
”X”P
˜P˜T
¼ôÿÿÿ¼0
¼8¼P
¼P¼X°Ä,Ä8Rýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²%þÿÿÿëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
@@ -469,9 +551,9 @@ DunGen;
ÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿJ$ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿ   ÿÿÿ    ÿÿ      ÿÿÿ    ÿÿ   ÿÿ  ÿÿÿÿÿÿ      ÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿ     ÿÿÿ    ÿÿ    ÿÿÿ    ÿÿ    ÿÿ  ÿÿÿÿÿÿ       ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ' ìÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿJ$ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿ    ÿÿÿÿÿÿÿ   ÿÿÿ    ÿÿ      ÿÿÿ    ÿÿ   ÿÿ  ÿÿÿÿÿÿ      ÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿ     ÿÿÿ    ÿÿ    ÿÿÿ    ÿÿ    ÿÿ  ÿÿÿÿÿÿ       ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ' ìÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
òþÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ b ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²'$ìÿÿÿäÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²öÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
òþÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ b ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²'$ìÿÿÿäÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²öÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
+88 -49
View File
@@ -89,16 +89,16 @@ I64 num_panels;
Panel *panel_root;
U8 *panels_processed_bitmap;
F64 game_t0,v_grid_size,span_factor,è,é1,é2,speed;
F64 game_t0,è,é1,é2,speed;
I64 x,y,z,game_score;
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;
F64 update_done_time[MP_MAX_PROCESSORS];
I64 strip_width[MP_MAX_PROCESSORS];
Bool app_done;
} mp;
@@ -401,8 +401,30 @@ U0 DrawIt(CTask *,CDC *dc)
GrBlot(dc,0,0,main_dc);
}
/*
/*$SP,"",2$
$SP,"<2>",2$
$SP,"<3>",3$
@@ -424,24 +446,35 @@ U0 DrawIt(CTask *,CDC *dc)
Cores render strips. The strips are wider toward the horizon by span_factor
and overlap +/- 15%. The cores check the panel map array
and render the panel for each square and mark-it done.
Cores render strips that +/- 15%. The cores check the panel map array
and render the panel for each square, marking-it done.
The depth buf is not locked in the graphic routines
so we get some glitches.
*/
I64 update_jiffy_limit;
U0 MPDrawIt(CTask *task,CDC *dc)
{
//This is identical to the previous routine but is run by core#1
I64 i,j,ww,hh,*s2w,x1,y1,z1, xx,yy,
xh,yh,zh, yh2,xh2, reg x1w, reg y1w, x1h,y1h,
I64 j,strip_width,*s2w,x1,y1,z1, xx,yy,
xh,yh,zh,yh2,xh2,x1h,y1h,x1wa,y1wa,x1wb,y1wb,
x3,y3,z3,
cx=task->win_pixel_width>>1,
cy=task->win_pixel_height>>1;
F64 h_grid_size,t=tT;
Panel reg *tempp;
xx=x/(MAP_SCALE*COORDINATE_SCALE);
@@ -497,7 +530,6 @@ U0 MPDrawIt(CTask *task,CDC *dc)
yy+=y3;
}
h_grid_size=4.0*v_grid_size*(Gs->num+span_factor)/span_factor;
if (Gs->num&1) { //alternate left-right,right-left
yh2=-yh;
xh2=-xh;
@@ -506,11 +538,11 @@ U0 MPDrawIt(CTask *task,CDC *dc)
xh2=xh;
}
ww=h_grid_size;
hh=1.30*v_grid_size; //Cores overlap 15% on each side of strip.
//Calc starting point.
x1h=xx<<8+0.5*yh2*h_grid_size+xh*v_grid_size*(Gs->num+1.15);
y1h=yy<<8-0.5*xh2*h_grid_size+yh*v_grid_size*(Gs->num+1.15);
x1wa=xx<<8+xh*strip_height>>1/1.3*(Gs->num+1.15);
y1wa=yy<<8+yh*strip_height>>1/1.3*(Gs->num+1.15);
x1wb=0;
y1wb=0;
xh=-xh; //Back to front to help with depth.
yh=-yh;
@@ -518,14 +550,11 @@ U0 MPDrawIt(CTask *task,CDC *dc)
//Take half steps to cover whole grid.
xh>>=1; yh>>=1;
xh2>>=1; yh2>>=1;
ww<<=1;
hh<<=1;
for (j=0;j<hh;j++) {
x1w=x1h;
y1w=y1h;
for (i=0;i<ww;i++) {
x1=x1w>>8; y1=y1w>>8;
for (strip_width=0;sys_jiffies<update_jiffy_limit;strip_width++) {
x1h=x1wa;
y1h=y1wa;
for (j=0;j<strip_height && sys_jiffies<update_jiffy_limit;j++) {
x1=x1h>>8; y1=y1h>>8;
if (0<=x1<MAP_WIDTH && 0<=y1<MAP_HEIGHT) {
if ((tempp=panels[y1][x1*2]) && !LBts(panels_processed_bitmap,tempp->num)) {
if (tempp->cnt>8*(1.1-Gs->idle_factor)) {
@@ -535,14 +564,22 @@ U0 MPDrawIt(CTask *task,CDC *dc)
tempp->cnt++;
}
}
x1w-=yh2;
y1w+=xh2;
x1h+=xh;
y1h+=yh;
}
x1wb-=yh2;
y1wb+=xh2;
if (strip_width&1) {
x1wa-=x1wb;
y1wa-=y1wb;
} else {
x1wa+=x1wb;
y1wa+=y1wb;
}
x1h+=xh;
y1h+=yh;
}
Free(s2w);
mp.update_done_time[Gs->num]=Limit(tT-t,.001,0.5);
mp.strip_width[Gs->num]=strip_width;
LBtr(&mp.update_not_done_flags,Gs->num);
}
@@ -660,12 +697,13 @@ U0 DrawHorizon(CDC *dc)
U0 BSPEagleDive()
{
CDC *dc=DCAlias(main_dc,Fs);
F64 max_t;
I64 i,xx,yy,height,bkcolor,
cx=Fs->win_pixel_width>>1,
cy=Fs->win_pixel_height>>1;
F64 min_strip_width;
Fish *tempf;
update_jiffy_limit=sys_jiffies+JIFFY_FREQ/40;
MemSet(panels_processed_bitmap,0,(num_panels+7)>>3);
xx=x/(MAP_SCALE*COORDINATE_SCALE);
@@ -705,18 +743,10 @@ U0 BSPEagleDive()
while (mp.update_not_done_flags)
Sleep(1);
max_t=mp.update_done_time[0];
for (i=1;i<mp.mp_cnt;i++)
max_t=Max(max_t,mp.update_done_time[i]);
//Adjust size of updated grid.
v_grid_size *=0.90+0.10*(0.65/Fs->win_max_refresh)/max_t;
v_grid_size=Limit(v_grid_size,20,200);
//Regulate how much grid expands in the distance.
if (mp.mp_cnt>1)
span_factor*=0.90+0.10*mp.update_done_time[mp.mp_cnt-1]/mp.update_done_time[0];
span_factor=Limit(span_factor,.30,3.0);
min_strip_width=MAX_F64;
for (i=0;i<mp.mp_cnt;i++)
min_strip_width=Min(min_strip_width,32.0*mp.strip_width[i]/(i+32.0));
strip_height=LimitI64(strip_height*Limit(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);
@@ -729,19 +759,19 @@ U0 BSPEagleDive()
dc->flags&=~DCF_TRANSFORMATION;
GrLine3(dc,cx+5,cy,0,cx-5,cy,0);
GrLine3(dc,cx,cy+5,0,cx,cy-5,0);
GrPrintF(dc,0,0,"é1:%5.1f è:%5.1f é2:%5.1f Box:%5.1f",
é1*180/ã,è*180/ã,é2*180/ã,v_grid_size);
GrPrintF(dc,0,FONT_HEIGHT,"x:%5.1f y:%5.1f z:%5.1f height:%3d score:%d high:%d",
GrPrint(dc,0,0,"é1:%5.1f è:%5.1f é2:%5.1f Strip:%5d",
é1*180/ã,è*180/ã,é2*180/ã,strip_height);
GrPrint(dc,0,FONT_HEIGHT,"x:%5.1f y:%5.1f z:%5.1f height:%3d score:%d high:%d",
ToF64(x)/COORDINATE_SCALE,ToF64(y)/COORDINATE_SCALE,ToF64(z)/COORDINATE_SCALE,
height,game_score,best_score);
if (game_over && Blink) {
dc->color=RED;
GrPutS(dc,(Fs->win_pixel_width-9*FONT_WIDTH)/2,
GrPrint(dc,(Fs->win_pixel_width-9*FONT_WIDTH)/2,
(Fs->win_pixel_height-FONT_HEIGHT)/2,"Game Over");
} else if (tT-game_t0<5.0 && Blink) {
dc->color=WHITE;
GrPutS(dc,(Fs->win_pixel_width-10*FONT_WIDTH)/2,
GrPrint(dc,(Fs->win_pixel_width-10*FONT_WIDTH)/2,
(Fs->win_pixel_height-FONT_HEIGHT)/2,"Catch Fish");
}
//We made an alias of this we don't want freed.
@@ -774,6 +804,7 @@ U0 AnimateTask(I64)
z+=z1;
Free(s2w);
x1=x/COORDINATE_SCALE; y1=y/COORDINATE_SCALE; z1=z/COORDINATE_SCALE;
if (z1<WATER_ELEVATION*MAP_SCALE) {
speed=0.5;
tempf=fish_root.next;
@@ -807,6 +838,7 @@ U0 AnimateTask(I64)
U0 MPEnd()
{
update_jiffy_limit=0;
mp.app_not_done_flags=1<<mp.mp_cnt-1-1;
mp.app_done=TRUE;
//Wait for all cores to exit
@@ -853,8 +885,7 @@ U0 Init(I64 _mp_cnt)
Fs->win_max_refresh=30.0;
v_grid_size=64.0;
span_factor=1.0;
strip_height=128;
è =-90.0*ã/180.0;
é1= 0.0*ã/180.0;
é2= 0.0*ã/180.0;
@@ -973,4 +1004,12 @@ U0 EagleDive(I64 _mp_cnt=MP_MAX_PROCESSORS)
}
EagleDive;
.¨¢¢¨¢¨¢¨˜˜¢ˆ¢ˆxx¢h¢hXX¢H¢H88¢(¢(¢¨¨""2¨2¨BBR¨R¨bbr¨r¨‚‚’¨’!r8P"!t2R!v,T!N*p@!L.lD!L4hH!Tx&!Xz !\|!ZDt�àÿÿÿýÿÿÿýÿÿÿ""ÿÿÿÿ+ÿÿÿÿ+ & & üÿÿÿ üÿÿÿáÿÿÿáÿÿÿ)
�
àÿÿÿýÿÿÿ
ýÿÿÿ"
"ÿÿÿÿ+
ÿÿÿÿ+ &
&
 üÿÿÿ
üÿÿÿáÿÿÿ
á˙˙˙):_ˇ‘é˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Line truncated
+12 -8
View File
@@ -163,7 +163,7 @@ U0 DrawIt(CTask *task,CDC *dc)
tempo=obj_root.next;
while (tempo!=&obj_root) {
if (tempo->flags&OF_ACTIVE && tempo->flags&OF_SHIP) {
SpritePlotRotZ3b(dc,tempo->x,tempo->y,0,imgs[tempo->player][tempo->type],tempo->é+ã/2);
SpritePlotRotZ3B(dc,tempo->x,tempo->y,0,imgs[tempo->player][tempo->type],tempo->é+ã/2);
if (Blink) {
dc->color=BLACK;
GrLine(dc,tempo->x+5,tempo->y,tempo->x+5+10,tempo->y);
@@ -198,7 +198,7 @@ U0 DrawIt(CTask *task,CDC *dc)
tempo=obj_root.next;
while (tempo!=&obj_root) {
if (tempo->flags&OF_ACTIVE && !(tempo->flags&OF_SHIP))
SpritePlotRotZ3b(dc,tempo->x,tempo->y,0,imgs[tempo->player][tempo->type],tempo->é+ã/2);
SpritePlotRotZ3B(dc,tempo->x,tempo->y,0,imgs[tempo->player][tempo->type],tempo->é+ã/2);
if (tempo->flags&OF_SHOOTING) {
dc->color=LTRED;
GrLine(dc,tempo->x,tempo->y,tempo->target_x,tempo->target_y,3);
@@ -221,20 +221,20 @@ U0 DrawIt(CTask *task,CDC *dc)
}
dc->color=YELLOW;
GrPrintF(dc,-task->win_scroll_x,-task->win_scroll_y,"Game Speed: %5.2f",game_speed);
GrPrint(dc,-task->win_scroll_x,-task->win_scroll_y,"Game Speed: %5.2f",game_speed);
dc->color=LTCYAN;
GrPrintF(dc,-task->win_scroll_x,-task->win_scroll_y+ FONT_HEIGHT,"Player 1: %d",num_alive[0]);
GrPrint(dc,-task->win_scroll_x,-task->win_scroll_y+ FONT_HEIGHT,"Player 1: %d",num_alive[0]);
dc->color=LTPURPLE;
GrPrintF(dc,-task->win_scroll_x,-task->win_scroll_y+2*FONT_HEIGHT,"Player 2: %d",num_alive[1]);
GrPrint(dc,-task->win_scroll_x,-task->win_scroll_y+2*FONT_HEIGHT,"Player 2: %d",num_alive[1]);
if ((!num_alive[0]||!num_alive[1]) && Blink) {
if (!num_alive[1]) {
dc->color=LTGREEN;
GrPutS(dc,task->win_pixel_width>>1 -(FONT_WIDTH*14)/2-task->win_scroll_x,
GrPrint(dc,task->win_pixel_width>>1 -(FONT_WIDTH*14)/2-task->win_scroll_x,
task->win_pixel_height>>1-FONT_HEIGHT/2-task->win_scroll_y,"Game Completed");
} else {
dc->color=LTRED;
GrPutS(dc,task->win_pixel_width>>1 -(FONT_WIDTH*9)/2-task->win_scroll_x,
GrPrint(dc,task->win_pixel_width>>1 -(FONT_WIDTH*9)/2-task->win_scroll_x,
task->win_pixel_height>>1-FONT_HEIGHT/2-task->win_scroll_y,"Game Over");
}
}
@@ -766,4 +766,8 @@ nv_done:
}
FlatTops;
r&úÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿ ÿ ÿ ÿ ÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿr&úÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍ÿ␍␍ÿ␍␍ÿ␍␍ÿ␍␍ÿ␍ÿ␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿb %üÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿb %üÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍ÿÿÿ␍␍ÿÿÿÿ␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0þÿÿÿÿÿÿÿ 0þÿÿÿÿÿÿÿ␍
r&úÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ  ÿ ÿ ÿ ÿ ÿ ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿr&úÿÿÿéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍␍ÿ␍␍ÿ␍␍ÿ␍␍ÿ␍␍ÿ␍ÿ␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿb %üÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿ ÿÿÿÿ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿb %üÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ␍␍ÿÿÿ␍␍ÿÿÿÿ␍␍␍␍ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0
þÿÿÿ
ÿÿÿÿ 0
þÿÿÿ
ÿÿÿÿ␍
+1 -1
View File
@@ -39,7 +39,7 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->color=YELLOW;
if (crash)
GrPutS(dc,w>>1-FONT_WIDTH*4,(h-FONT_HEIGHT)>>1,"Game Over");
GrPrint(dc,w>>1-FONT_WIDTH*4,(h-FONT_HEIGHT)>>1,"Game Over");
Preempt(old_preempt);
}
+1 -1
View File
@@ -80,7 +80,7 @@ U0 PlaceSpring(MyMass *tempm1,MyMass *tempm2)
MySpring *temps=CAlloc(sizeof(MySpring));
temps->end1=tempm1;
temps->end2=tempm2;
temps->constant=10000;
temps->const=10000;
temps->rest_len=100;
QueIns(temps,ode->last_spring);
}
+9 -4
View File
@@ -16,10 +16,14 @@ I16 stk_dir[STK_SIZE];
U0 DrawIt(CTask *task,CDC *)
{
I64 i,j;
for (j=0;j<TEXT_ROWS;j++)
for (i=0;i<TEXT_COLS;i++)
PlotWinU8(task,text[j][i],i,j);
MemCpy(gr_text_base+TEXT_COLS,text,(TEXT_ROWS-1)*TEXT_COLS*sizeof(U32));
// You can copy it this way, if you like:
// I64 i,j;
// for (j=0;j<TEXT_ROWS;j++)
// for (i=0;i<TEXT_COLS;i++)
// PlotWinU8(task,text[j][i],i,j);
PlotWinStr(task,"Draw a maze with left button.",ATTR>>8,0,0);
PlotWinStr(task,"Solve maze starting at right click.",ATTR>>8,0,1);
}
@@ -75,6 +79,7 @@ U0 Maze()
SettingsPush; //See $LK,"SettingsPush","MN:SettingsPush"$
WinMax;
WinBorder;
WordStat;
DocCursor;
DocClear;
+2 -2
View File
@@ -27,7 +27,7 @@ U0 DrawFrame(CTask *task,CDC *dc)
GrRect(dc,cx-2,cy-2,5,5);
}
dc->color=BLACK;
GrPutS(dc,cx+10,cy,"Press '1'");
GrPrint(dc,cx+10,cy,"Press '1'");
dc->color=LTRED;
GrRect(dc,cx-20,cy+60,41,21);
@@ -40,7 +40,7 @@ U0 DrawFrame(CTask *task,CDC *dc)
GrRect(dc,cx-2,cy+100-2,5,5);
}
dc->color=BLACK;
GrPutS(dc,cx+10,cy+100,"Press '2'");
GrPrint(dc,cx+10,cy+100,"Press '2'");
dc->color=LTRED;
GrLine(dc,cx+400,cy+100,cx-250,cy+200);
+3 -3
View File
@@ -238,14 +238,14 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->color=RED;
t=tf-t0;
if (Blink)
GrPutS(dc,(task->win_pixel_width-FONT_WIDTH*14)>>1-task->win_scroll_x,
GrPrint(dc,(task->win_pixel_width-FONT_WIDTH*14)>>1-task->win_scroll_x,
(task->win_pixel_height-FONT_HEIGHT)>>1-task->win_scroll_y,
"Game Completed");
} else {
dc->color=BLACK;
t=tT-t0;
}
GrPrintF(dc,-task->win_scroll_x,-task->win_scroll_y,"Time:%7.2fs Best:%7.2fs",t,best_score);
GrPrint(dc,-task->win_scroll_x,-task->win_scroll_y,"Time:%7.2fs Best:%7.2fs",t,best_score);
}
@@ -520,4 +520,4 @@ rh_done:
}
RawHide;
òöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿböÿÿÿôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÂöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
òöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿböÿÿÿôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÂöÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -74,7 +74,7 @@ U0 DrawIt(CTask *task,CDC *dc)
ode->drag_v2=0.01; //Let hose settle during start-up
ode->drag_v3=0.0001;
dc->color=RED;
GrPutS(dc,(GR_WIDTH-FONT_WIDTH*6)>>1,GR_HEIGHT>>1,"Squirt");
GrPrint(dc,(GR_WIDTH-FONT_WIDTH*6)>>1,GR_HEIGHT>>1,"Squirt");
return;
} else {
ode->drag_v2=0.0005;
@@ -96,7 +96,7 @@ U0 DrawIt(CTask *task,CDC *dc)
dx=tempm->x-tempm1->x;
dy=tempm->y-tempm1->y;
nozzle_é=Wrap(Arg(dx,dy));
SpritePlotRotZ3b(dc,tempm->x,tempm->y,0,$IB,"<2>",2$,nozzle_é);
SpritePlotRotZ3B(dc,tempm->x,tempm->y,0,$IB,"<2>",2$,nozzle_é);
dc->color=BLACK;
GrCircle(dc,tempm->x,tempm->y,tempm->radius);
dc->color=GREEN;
@@ -217,7 +217,7 @@ MySpring PlaceSpring(MyMass *tempm1,MyMass *tempm2)
MySpring *temps=CAlloc(sizeof(MySpring));
temps->end1=tempm1;
temps->end2=tempm2;
temps->constant=20000;
temps->const=20000;
QueIns(temps,ode->last_spring);
return temps;
}
@@ -420,4 +420,4 @@ sq_done: //Don't goto out of try
}
Squirt;
R÷ÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2 ÿÿÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿJýÿÿÿýÿÿÿÿÿÿ ÿÿ ÿ ÿÿ  ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
R÷ÿÿÿìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2 ÿÿÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿJýÿÿÿýÿÿÿÿÿÿ ÿÿ ÿ ÿÿ  ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+115 -12
View File
@@ -164,7 +164,7 @@ U0 DrawIt(CTask *task,CDC *dc)
dc->color=LTCYAN;
else
dc->color=CYAN;
SpritePlotRotMat3b(dc,tempp->x,tempp->y,0,$IB,"<2>",2$,r);
SpritePlotRotMat3B(dc,tempp->x,tempp->y,0,$IB,"<2>",2$,r);
tempp=tempp->next;
}
@@ -172,7 +172,7 @@ U0 DrawIt(CTask *task,CDC *dc)
GrIdentEqu(r);
GrRotYEqu(r,king_é+ã/2);
GrRotXEqu(r,ã/6);
SpritePlotRotMat3b(dc,king_x,king_y,0,$IB,"<1>",1$,r);
SpritePlotRotMat3B(dc,king_x,king_y,0,$IB,"<1>",1$,r);
dc->pen_width=1;
dc->color=WHITE;
@@ -183,13 +183,13 @@ U0 DrawIt(CTask *task,CDC *dc)
if (tf) {
dc->color=LTRED;
if (Blink)
GrPutS(dc,w/2-(FONT_WIDTH*14)/2,h/2+FONT_HEIGHT,"Game Completed");
GrPrint(dc,w/2-(FONT_WIDTH*14)/2,h/2+FONT_HEIGHT,"Game Completed");
tt=tf;
} else {
tt=tT;
}
dc->color=LTBLUE;
GrPrintF(dc,0,0,"Freezing Peasants:%d Time:%3.2f Best:%3.2f",
GrPrint(dc,0,0,"Freezing Peasants:%d Time:%3.2f Best:%3.2f",
not_stopped_cnt,tt-t0,best_score);
Preempt(old_preempt);
@@ -529,12 +529,115 @@ ws_done:
}
Wenceslas;
yþÿÿÿÚÿÿÿÊÿÿÿþÿÿÿÚÿÿÿ äÿÿÿÖÿÿÿ
ÐÿÿÿúÿÿÿÖÿÿÿôÿÿÿìÿÿÿüÿÿÿØÿÿÿúÿÿÿðÿÿÿüÿÿÿðÿÿÿÖÿÿÿüÿÿÿÔÿÿÿòÿÿÿæÿÿÿÒÿÿÿöÿÿÿÂÿÿÿþÿÿÿÔÿÿÿòÿÿÿ¼ÿÿÿþÿÿÿÎÿÿÿ ¼ÿÿÿþÿÿÿÔÿÿÿÊÿÿÿþÿÿÿØÿÿÿäÿÿÿÚÿÿÿÀÿÿÿþÿÿÿÎÿÿÿ´ÿÿÿÊÿÿÿªÿÿÿÿÿÿøÿÿÿÈÿÿÿ²ÿÿÿ¬ÿÿÿÆÿÿÿ
ÿÿÿÌÿÿÿ ÌÿÿÿüÿÿÿÔÿÿÿèÿÿÿÚÿÿÿÖÿÿÿ* ðÿÿÿüÿÿÿðÿÿÿðÿÿÿèÿÿÿþÿÿÿòÿÿÿüÿÿÿæÿÿÿþÿÿÿæÿÿÿàÿÿÿþÿÿÿèÿÿÿüÿÿÿòÿÿÿæÿÿÿðÿÿÿþÿÿÿâÿÿÿàÿÿÿàÿÿÿÞÿÿÿÞÿÿÿâÿÿÿÞÿÿÿÞÿÿÿýÿÿÿäÿÿÿâÿÿÿþÿÿÿäÿÿÿüÿÿÿèÿÿÿüÿÿÿèÿÿÿüÿÿÿòÿÿÿäÿÿÿêÿÿÿæÿÿÿþÿÿÿîÿÿÿìÿÿÿòÿÿÿxþÿÿÿèÿÿÿüÿÿÿòÿÿÿðÿÿÿèÿÿÿðÿÿÿüÿÿÿðÿÿÿþÿÿÿòÿÿÿüÿÿÿæÿÿÿþÿÿÿæÿÿÿàÿÿÿæÿÿÿðÿÿÿãöÿÿÿðÿÿÿøÿÿÿ
ôÿÿÿðÿÿÿòÿÿÿîÿÿÿêÿÿÿ öÿÿÿæÿÿÿúÿÿÿæÿÿÿöÿÿÿèÿÿÿøÿÿÿæÿÿÿæÿÿÿøÿÿÿîÿÿÿþÿÿÿòÿÿÿ  þÿÿÿöÿÿÿôÿÿÿîÿÿÿðÿÿÿðÿÿÿþÿÿÿ üÿÿÿþÿÿÿäÿÿÿþÿÿÿäÿÿÿîÿÿÿäÿÿÿöÿÿÿöÿÿÿöÿÿÿðÿÿÿøÿÿÿüÿÿÿüÿÿÿðÿÿÿ
ðÿÿÿøÿÿÿúÿÿÿþÿÿÿúÿÿÿúÿÿÿðÿÿÿüÿÿÿúÿÿÿ
üÿÿÿüÿÿÿøÿÿÿúÿÿÿøÿÿÿúÿÿÿðÿÿÿòÿÿÿìÿÿÿôöÿÿÿðÿÿÿøÿÿÿ
ôÿÿÿðÿÿÿòÿÿÿîÿÿÿêÿÿÿ öÿÿÿæÿÿÿúÿÿÿæÿÿÿöÿÿÿèÿÿÿøÿÿÿæÿÿÿæÿÿÿøÿÿÿîÿÿÿþÿÿÿòÿÿÿ  þÿÿÿöÿÿÿôÿÿÿîÿÿÿäÿÿÿúÿÿÿâÿÿÿúÿÿÿèÿÿÿúÿÿÿöÿÿÿòÿÿÿîÿÿÿöÿÿÿúÿÿÿöÿÿÿøÿÿÿðÿÿÿöÿÿÿäÿÿÿôÿÿÿôÿÿÿüÿÿÿêÿÿÿþÿÿÿþÿÿÿüÿÿÿôÿÿÿ ôÿÿÿöÿÿÿòÿÿÿâÿÿÿþÿÿÿúÿÿÿöÿÿÿòÿÿÿüÿÿÿøÿÿÿðÿÿÿøÿÿÿ
y
þÿÿÿÚÿÿÿ
Êÿÿÿ
þÿÿÿÚÿÿÿ äÿÿÿ
Öÿÿÿ
Ðÿÿÿ
úÿÿÿÖÿÿÿôÿÿÿìÿÿÿ
üÿÿÿØÿÿÿúÿÿÿðÿÿÿ
üÿÿÿðÿÿÿÖÿÿÿ
üÿÿÿÔÿÿÿòÿÿÿæÿÿÿ
ÒÿÿÿöÿÿÿÂÿÿÿ
þÿÿÿÔÿÿÿòÿÿÿ¼ÿÿÿ
þÿÿÿÎÿÿÿ ¼ÿÿÿ
þÿÿÿÔÿÿÿÊÿÿÿ
þÿÿÿØÿÿÿäÿÿÿ
ÚÿÿÿÀÿÿÿ
þÿÿÿÎÿÿÿ´ÿÿÿ
Êÿÿÿªÿÿÿ
ÿÿÿøÿÿÿÈÿÿÿ
²ÿÿÿ¬ÿÿÿ
Æÿÿÿ
ÿÿÿ
Ìÿÿÿ Ìÿÿÿ
üÿÿÿÔÿÿÿèÿÿÿÚÿÿÿ
Öÿÿÿ*
ðÿÿÿüÿÿÿ
ðÿÿÿ
ðÿÿÿèÿÿÿ
þÿÿÿòÿÿÿüÿÿÿæÿÿÿ
þÿÿÿæÿÿÿàÿÿÿ
þÿÿÿèÿÿÿüÿÿÿòÿÿÿ
æÿÿÿðÿÿÿ
þÿÿÿâÿÿÿàÿÿÿ
àÿÿÿÞÿÿÿ
Þÿÿÿâÿÿÿ
ÞÿÿÿÞÿÿÿ
ýÿÿÿäÿÿÿâÿÿÿ
þÿÿÿäÿÿÿüÿÿÿèÿÿÿ
üÿÿÿèÿÿÿüÿÿÿòÿÿÿ
äÿÿÿêÿÿÿ
æÿÿÿþÿÿÿîÿÿÿ
ìÿÿÿòÿÿÿx
þÿÿÿèÿÿÿüÿÿÿòÿÿÿ
ðÿÿÿèÿÿÿ
ðÿÿÿüÿÿÿ
ðÿÿÿ
þÿÿÿòÿÿÿüÿÿÿæÿÿÿ
þÿÿÿæÿÿÿàÿÿÿ
æÿÿÿðÿÿÿã
öÿÿÿðÿÿÿ
øÿÿÿ
ôÿÿÿ
ðÿÿÿòÿÿÿ
îÿÿÿ
êÿÿÿ
öÿÿÿæÿÿÿ
úÿÿÿæÿÿÿöÿÿÿèÿÿÿ
øÿÿÿæÿÿÿ
æÿÿÿ
øÿÿÿîÿÿÿ
þÿÿÿòÿÿÿ 
þÿÿÿöÿÿÿ
ôÿÿÿîÿÿÿ
ðÿÿÿ
ðÿÿÿþÿÿÿ
üÿÿÿþÿÿÿäÿÿÿ
þÿÿÿäÿÿÿîÿÿÿ
äÿÿÿöÿÿÿöÿÿÿ
öÿÿÿðÿÿÿøÿÿÿ
üÿÿÿüÿÿÿðÿÿÿ
ðÿÿÿøÿÿÿ
úÿÿÿ
þÿÿÿúÿÿÿúÿÿÿ
ðÿÿÿüÿÿÿ
úÿÿÿ
üÿÿÿ
üÿÿÿøÿÿÿ
úÿÿÿøÿÿÿúÿÿÿðÿÿÿ
òÿÿÿìÿÿÿô
öÿÿÿðÿÿÿ
øÿÿÿ
ôÿÿÿ
ðÿÿÿòÿÿÿ
îÿÿÿ
êÿÿÿ
öÿÿÿæÿÿÿ
úÿÿÿæÿÿÿöÿÿÿèÿÿÿ
øÿÿÿæÿÿÿ
æÿÿÿ
øÿÿÿîÿÿÿ
þÿÿÿòÿÿÿ 
þÿÿÿöÿÿÿ
ôÿÿÿîÿÿÿ
äÿÿÿ
úÿÿÿâÿÿÿúÿÿÿ
èÿÿÿúÿÿÿöÿÿÿ
òÿÿÿîÿÿÿöÿÿÿúÿÿÿ
öÿÿÿøÿÿÿðÿÿÿ
öÿÿÿäÿÿÿôÿÿÿôÿÿÿ
üÿÿÿêÿÿÿþÿÿÿþÿÿÿ
üÿÿÿôÿÿÿ
ôÿÿÿöÿÿÿ
òÿÿÿâÿÿÿ
þÿÿÿ
úÿÿÿ
öÿÿÿ
òÿÿÿüÿÿÿ
øÿÿÿðÿÿÿøÿÿÿ
ôÿÿÿ
�����b������h������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Line truncated
�����b������h������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Line truncated
+4 -4
View File
@@ -17,7 +17,7 @@ U0 DrawIt(CTask *task,CDC *dc)
cy=task->win_pixel_height>>1;
Bool snd_on=FALSE;
dc->color=BLACK;
GrPutS(dc,0,0,"Protect your base.");
GrPrint(dc,0,0,"Protect your base.");
GrRect(dc,cx-BASE_SIZE,cy-BASE_SIZE,BASE_SIZE*2,BASE_SIZE*2);
dc->color=CYAN;
GrRect(dc,cx-BASE_SIZE+2,cy-BASE_SIZE+2,BASE_SIZE*2-4,BASE_SIZE*2-4);
@@ -144,17 +144,17 @@ U0 Whap()
springs[0].end1=&balls[1];
springs[0].end2=&balls[2];
springs[0].rest_len=15;
springs[0].constant=10000;
springs[0].const=10000;
QueIns(&springs[0],ode->last_spring);
springs[1].end1=&balls[1];
springs[1].end2=&balls[3];
springs[1].rest_len=15;
springs[1].constant=10000;
springs[1].const=10000;
QueIns(&springs[1],ode->last_spring);
springs[2].end1=&balls[2];
springs[2].end2=&balls[3];
springs[2].rest_len=sqrt2*15;
springs[2].constant=10000;
springs[2].const=10000;
QueIns(&springs[2],ode->last_spring);
collision_t=0;
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -55,7 +55,7 @@ on and off within your programs, leaving
ones which need initialization on the code heap.
You can't dynamically initialize data heap
glbls--they are constants. This might be a silly
glbls--they are consts. This might be a silly
point, but might result in odd differences, perhaps
from the order things are evaluated.
@@ -68,7 +68,7 @@ because they don't take-up room in the .BIN.Z file.
Test g2[]={
{10,"name1"},
{(tT%10.0)*100,"name2"}, //No dynamic initialization--converted to a constant
{(tT%10.0)*100,"name2"}, //No dynamic initialization--converted to a const
{30,"name3"}
};
@@ -79,7 +79,7 @@ U0 Main2()
{
static Test s2[]={
{10,"static1"},
{(tT%10.0)*100,"static2"}, //No dynamic initialization--converted to a constant
{(tT%10.0)*100,"static2"}, //No dynamic initialization--converted to a const
{30,"static3"}
};
D(s2,sizeof(s2));
+8 -7
View File
@@ -1,21 +1,22 @@
CDC *dc;
U0 DrawIt(CTask *,CDC *)
{
{//This technique is weird, but clever. In Box() we
//created an alias of the system $LK,"gr_dc2","MN:gr_dc2"$.
dc->pen_width=2;
dc->color=RED;
GrLine3(dc,-100,-100,-100, -100, 100,-100);
GrLine3(dc,-100, 100,-100, 100, 100,-100);
GrLine3(dc, 100, 100,-100, 100,-100,-100);
GrLine3(dc,-100, 100,-100, 100, 100,-100);
GrLine3(dc, 100, 100,-100, 100,-100,-100);
GrLine3(dc, 100,-100,-100, -100,-100,-100);
GrLine3(dc,-100,-100, 100, -100, 100, 100);
GrLine3(dc,-100, 100, 100, 100, 100, 100);
GrLine3(dc, 100, 100, 100, 100,-100, 100);
GrLine3(dc,-100, 100, 100, 100, 100, 100);
GrLine3(dc, 100, 100, 100, 100,-100, 100);
GrLine3(dc, 100,-100, 100, -100,-100, 100);
GrLine3(dc,-100,-100, 100, -100,-100,-100);
GrLine3(dc,-100, 100, 100, -100, 100,-100);
GrLine3(dc, 100, 100, 100, 100, 100,-100);
GrLine3(dc, 100,-100, 100, 100,-100,-100);
GrLine3(dc, 100, 100, 100, 100, 100,-100);
GrLine3(dc, 100,-100, 100, 100,-100,-100);
}
U0 Box()
Binary file not shown.
+2 -2
View File
@@ -24,7 +24,7 @@ U0 Cartesian()
first=TRUE;
dc->color=BLACK;
for (x=-h;x<=h;x++) {
y=-ExePrintF("ToF64(%s);",st)(F64);
y=-ExePrint("ToF64(%s);",st)(F64);
if (!first)
GrLine(dc,x-1+h,y_last+v,x+h,y+v);
y_last=y;
@@ -44,5 +44,5 @@ U0 Cartesian()
Cartesian;
/*$WW,1$
For better performance, compile the expression entered by the user one time with $LK,"CmpExpression","MN:CmpExpression"$() and use $LK,"Call","MN:Call"$(). See $LK-A,"::/TempleOS/Demo/CompileDemo.CPP"$.
For better performance, compile the expression entered by the user one time with $LK,"LexExpression2Bin","MN:LexExpression2Bin"$() and use $LK,"Call","MN:Call"$(). See $LK-A,"::/TempleOS/Demo/CompileDemo.CPP"$.
*/
+1 -1
View File
@@ -33,7 +33,7 @@ U0 ShowTree(CDC *dc,Node *tempn,I64 *_node_x,I64 *_tree_x,I64 y)
dc->color=BLUE;
*_node_x=*_tree_x;
GrPrintF(dc,*_node_x,y,"%d",tempn->n);
GrPrint(dc,*_node_x,y,"%d",tempn->n);
*_tree_x+=X_SPACING;
if (tempn->right) {
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -2
View File
@@ -54,8 +54,12 @@ U0 FESave(Bool pmt)
I64 i,j,k=0;
for (i=0;i<256;i++) {
for (j=0;j<FONT_HEIGHT;j++)
DocPrintF(doc,"0x%02X,",gr_font[k++]);
DocPutS(doc,"\n");
DocPrint(doc,"0x%02X,",gr_font[k++]);
if (Bt(safe_dollar_chars_bitmap,i))
DocPrint(doc,"//%c",i);
else if (i=='$$')
DocPrint(doc,"//$$$$",i);
DocPrint(doc,"\n");
}
Fs->draw_it=NULL;
DocWrite(doc,pmt);
Binary file not shown.
+2 -2
View File
@@ -38,7 +38,7 @@ U0 Init(CDC *dc)
GrLine(dc,w/2-3,h/2-scale*i,w/2+3,h/2-scale*i);
if (i) {
dc->color=DKGRAY;
GrPrintF(dc,w/2+5,h/2-scale*i-FONT_HEIGHT/2,"%5.1f",ToF64(i));
GrPrint(dc,w/2+5,h/2-scale*i-FONT_HEIGHT/2,"%5.1f",ToF64(i));
}
}
for (i=-4;i<=4;i++) {
@@ -46,7 +46,7 @@ U0 Init(CDC *dc)
GrLine(dc,w/2+scale*i,h/2-3,w/2+scale*i,h/2+3);
if (i) {
dc->color=DKGRAY;
GrPrintF(dc,w/2+scale*i-7*FONT_WIDTH/2,h/2+5+FONT_HEIGHT,"%5.1f*T",ToF64(i));
GrPrint(dc,w/2+scale*i-7*FONT_WIDTH/2,h/2+5+FONT_HEIGHT,"%5.1f*T",ToF64(i));
}
}
}
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
U0 PanText()
{
I64 i;
for (i=0;i<=7;i++) {
gr_pan_text_x=i;
Sleep(30);
}
i--;
for (;i>=-7;i--) {
gr_pan_text_x=i;
Sleep(30);
}
i++;
for (;i<=0;i++) {
gr_pan_text_x=i;
Sleep(30);
}
for (i=0;i<=7;i++) {
gr_pan_text_y=i;
Sleep(30);
}
i--;
for (;i>=-7;i--) {
gr_pan_text_y=i;
Sleep(30);
}
i++;
for (;i<=0;i++) {
gr_pan_text_y=i;
Sleep(30);
}
}
PanText;
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -86,9 +86,9 @@ U0 Draw()
GrLine(dc,0,cy,w,cy);
GrLine(dc,cx,0,cx,h);
for (i=0;i<NUM_ZEROS;i++)
GrPutS(dc,cx+zeros[i].x-FONT_WIDTH/2,cy-zeros[i].y-FONT_HEIGHT/2,"o");
GrPrint(dc,cx+zeros[i].x-FONT_WIDTH/2,cy-zeros[i].y-FONT_HEIGHT/2,"o");
for (i=0;i<NUM_POLES;i++)
GrPutS(dc,cx+poles[i].x-FONT_WIDTH/2,cy-poles[i].y-FONT_HEIGHT/2,"x");
GrPrint(dc,cx+poles[i].x-FONT_WIDTH/2,cy-poles[i].y-FONT_HEIGHT/2,"x");
DCDel(dc);
}
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -76,7 +76,7 @@ U0 DrawIt(CTask *task,CDC *dc)
ls.x=-(ipx-task->win_pixel_left-task->win_scroll_x-cx);
ls.y=-(ipy-task->win_pixel_top-task->win_scroll_y-cy);
ls.z=GR_WIDTH/8;
d=1<<16/P3I32Norm(&ls);
d=1<<16/D3I32Norm(&ls);
ls.x*=d;
ls.y*=d;
ls.z*=d;
@@ -151,7 +151,7 @@ U0 DrawIt(CTask *task,CDC *dc)
//See $LK-A,"::/TempleOS/Demo/Graphics/SpritePlot3D.CPP"$.
//for a CSprite example.
//See $LK,"CSpriteMesh","MN:CSpriteMesh"$() for a fancy example.
//See $LK,"SpriteMesh","MN:SpriteMesh"$() for a fancy example.
U0 Main()
{
Binary file not shown.
+2 -2
View File
@@ -32,10 +32,10 @@ U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
GrLine(dc,c->left+2*SLIDER_SPACING+1,c->top+SLIDER_SPACING,
c->left+2*SLIDER_SPACING+1,c->top+SLIDER_SPACING+SLIDER_RANGE-1);
dc->color=LTRED;
GrPrintF(dc,c->left+1*SLIDER_SPACING+0-FONT_WIDTH/2,
GrPrint(dc,c->left+1*SLIDER_SPACING+0-FONT_WIDTH/2,
c->top+SLIDER_SPACING+SLIDER_RANGE+3,
"%d",s->left_pos*10/SLIDER_RANGE);
GrPrintF(dc,c->left+2*SLIDER_SPACING+1-FONT_WIDTH/2,
GrPrint(dc,c->left+2*SLIDER_SPACING+1-FONT_WIDTH/2,
c->top+SLIDER_SPACING+SLIDER_RANGE+3,
"%d",s->right_pos*10/SLIDER_RANGE);
GrRect(dc,c->left+1*SLIDER_SPACING+0-3,c->top+SLIDER_SPACING+SLIDER_RANGE-1-s->left_pos-2,7,5);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -38,10 +38,10 @@ U0 DrawSliderCtrl(CDC *dc,CCtrl *c)
GrLine(dc,c->left+2*SLIDER_SPACING+1,c->top+SLIDER_SPACING,
c->left+2*SLIDER_SPACING+1,c->top+SLIDER_SPACING+SLIDER_RANGE-1);
dc->color=LTRED;
GrPrintF(dc,c->left+1*SLIDER_SPACING+0-FONT_WIDTH/2,
GrPrint(dc,c->left+1*SLIDER_SPACING+0-FONT_WIDTH/2,
c->top+SLIDER_SPACING+SLIDER_RANGE+3,
"%d",s->left_pos*10/SLIDER_RANGE);
GrPrintF(dc,c->left+2*SLIDER_SPACING+1-FONT_WIDTH/2,
GrPrint(dc,c->left+2*SLIDER_SPACING+1-FONT_WIDTH/2,
c->top+SLIDER_SPACING+SLIDER_RANGE+3,
"%d",s->right_pos*10/SLIDER_RANGE);
GrRect(dc,c->left+1*SLIDER_SPACING+0-3,c->top+SLIDER_SPACING+SLIDER_RANGE-1-s->left_pos-2,7,5);
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@ U0 DrawIt(CTask *,CDC *dc)
I64 i,j;
U16 *ptr=gr_win_z_buf;
dc->color=BLACK;
GrPutS(dc,0,0,"Move the windows around and watch.");
GrPrint(dc,0,0,"Move the windows around and watch.");
for (i=0;i<TEXT_ROWS;i++)
for (j=0;j<TEXT_COLS;j++) {
dc->color=*ptr++&15;
Binary file not shown.
+6 -6
View File
@@ -15,26 +15,26 @@ U0 TimeIns()
CPURep;
//Measure Loop Overhead
start1=GetTimeStamp;
start1=GetTSC;
for (i=0;i<SAMPLE_SIZE;i++) {
}
end1=GetTimeStamp;
end1=GetTSC;
overhead_time=end1-start1;
//Measure remainder...
start2=GetTimeStamp;
start2=GetTSC;
for (i=0;i<SAMPLE_SIZE;i++)
temp=i%0x400;
end2=GetTimeStamp;
end2=GetTSC;
test_time=end2-start2;
"Remainder Version #1 Cycles\t: %10.5f\n",
ToF64(test_time-overhead_time)/SAMPLE_SIZE;
//Measure remainder...
start2=GetTimeStamp;
start2=GetTSC;
for (i=0;i<SAMPLE_SIZE;i++)
temp=i&0x3FF;
end2=GetTimeStamp;
end2=GetTSC;
test_time=end2-start2;
"Remainder Version #2 Cycles\t: %10.5f\n",
ToF64(test_time-overhead_time)/SAMPLE_SIZE;
+10 -10
View File
@@ -88,10 +88,10 @@ U0 Main()
coordinates[i]=RandU32;
//Measure Loop Overhead
start=GetTimeStamp;
start=GetTSC;
for (i=SAMPLE_SIZE-1;i>=0;i--) {
}
end=GetTimeStamp;
end=GetTSC;
overhead_time=end-start;
"$$FG,RED$$Overhead Cycles :%10.5f$$FG$$\n",
ToF64(overhead_time)/SAMPLE_SIZE;
@@ -101,10 +101,10 @@ U0 Main()
// compiler code.)
d1=Sin(1.0);
fsum=0;
start=GetTimeStamp;
start=GetTSC;
for (i=SAMPLE_SIZE-1;i>=0;i--)
fsum+=d1*coordinates[i&65535];
end=GetTimeStamp;
end=GetTSC;
test_time=end-start;
"Float Sum :%X\n",ToI64(fsum);
"$$FG,RED$$Float Cycles :%10.5f$$FG$$\n",
@@ -114,30 +114,30 @@ U0 Main()
//Measure fixed point arithmetic
d2=Sin(1.0)*0x100000000;
sum=0;
start=GetTimeStamp;
start=GetTSC;
for (i=SAMPLE_SIZE-1;i>=0;i--) {
temp=d2*coordinates[i&65535];
sum+=temp.i32[1];
}
end=GetTimeStamp;
end=GetTSC;
test_time=end-start;
"Fixed-Point Sum :%X\n",sum;
"$$FG,RED$$Fixed-Point Cycles :%10.5f$$FG$$\n",
ToF64(test_time)/SAMPLE_SIZE;
//Measure fixed point arithmetic
start=GetTimeStamp;
start=GetTSC;
sum=AsmFixedPt;
end=GetTimeStamp;
end=GetTSC;
test_time=end-start;
"Asm Fixed-Point Sum :%X\n",sum;
"$$FG,RED$$Asm Fixed-Point Cycles:%10.5f$$FG$$\n",
ToF64(test_time)/SAMPLE_SIZE;
//Measure float arithmetic
start=GetTimeStamp;
start=GetTSC;
sum=AsmFloat;
end=GetTimeStamp;
end=GetTSC;
test_time=end-start;
"Asm Float Sum :%X\n",sum;
"$$FG,RED$$Asm Float Cycles :%10.5f$$FG$$\n",
+1 -1
View File
@@ -37,7 +37,7 @@ U0 GrDemo()
GrDemo;
/* Program Output$HL,0$$WW+H,1$$FD,1$
/* Program Output (Not VMware)$HL,0$$WW+H,1$$FD,1$
8 Cores 2.660GHz
$FG,2$Rate:$FG,4$369.7 FPS$FG$ $FG,2$Load@60Hz:$FG,4$ 16.2%$FG$
+4 -4
View File
@@ -62,17 +62,17 @@ U0 TimeIns()
old_irq=IntEntrySet(I_F_UNARY_MINUS,F_UNARY_MINUS_INT,IDTET_TRAP);
//Measure interrupt time
start=GetTimeStamp;
start=GetTSC;
for (i=0;i<SAMPLE_SIZE;i++)
UnaryMinusInt(ã);
end=GetTimeStamp;
end=GetTSC;
"Interrupt Cycles: %10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
//Measure call time
start=GetTimeStamp;
start=GetTSC;
for (i=0;i<SAMPLE_SIZE;i++)
UnaryMinusCall(ã);
end=GetTimeStamp;
end=GetTSC;
"Call Cycles: %10.5f\n",ToF64(end-start)/SAMPLE_SIZE;
Preempt(old_preempt);
Loaded 100 of 547 files, more files were not shown because too many files have changed in this diff. Show more