TempleOSTS_131005.ISO
This commit is contained in:
1 parent
1343005a29
commit
2d2a65d572
547 files changed
+33608
-12549
No files matched your search
@@ -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.
@@ -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"$.
|
||||
*/
|
||||
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user