TempleOSCDV4.12.ISO
This commit is contained in:
1 parent
93ca216483
commit
b84bbff6db
381 files changed
+18356
-18798
No files matched your search
+14
-17
@@ -1,10 +1,14 @@
|
||||
CDC *dc;
|
||||
I64 glbl_r[4][4];
|
||||
|
||||
U0 DrawIt(CTask *,CDC *)
|
||||
{//This technique is weird, but clever. In Box() we
|
||||
//created an alias of the system $LK,"gr.dc2",A="MN:CGrGlbls"$.
|
||||
U0 DrawIt(CTask *,CDC *dc)
|
||||
{
|
||||
I64 *old_r=dc->r;
|
||||
dc->pen_width=2;
|
||||
dc->color=RED;
|
||||
dc->x=200;
|
||||
dc->y=200;
|
||||
dc->flags|=DCF_TRANSFORMATION;
|
||||
DCMat4x4Set(dc,glbl_r); //This assigns to dc->r and sets r_norm.
|
||||
GrLine3(dc,-100,-100,-100, -100, 100,-100);
|
||||
GrLine3(dc,-100, 100,-100, 100, 100,-100);
|
||||
GrLine3(dc, 100, 100,-100, 100,-100,-100);
|
||||
@@ -17,27 +21,21 @@ U0 DrawIt(CTask *,CDC *)
|
||||
GrLine3(dc,-100, 100, 100, -100, 100,-100);
|
||||
GrLine3(dc, 100, 100, 100, 100, 100,-100);
|
||||
GrLine3(dc, 100,-100, 100, 100,-100,-100);
|
||||
dc->r=old_r;
|
||||
}
|
||||
|
||||
U0 Box()
|
||||
{
|
||||
F64 é=0,è=0,ê=0,s=1,s1=1.05;
|
||||
dc=DCAlias(gr.dc2,Fs);
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
DocClear;
|
||||
Fs->draw_it=&DrawIt;
|
||||
|
||||
dc->x=200;
|
||||
dc->y=200;
|
||||
dc->flags|=DCF_TRANSFORMATION;
|
||||
while (!ScanChar) {
|
||||
Mat4x4IdentEqu(dc->r);
|
||||
Mat4x4RotZ(dc->r,é);
|
||||
Mat4x4RotX(dc->r,è);
|
||||
Mat4x4RotZ(dc->r,ê);
|
||||
Mat4x4Scale(dc->r,s);
|
||||
DCMat4x4Set(dc,dc->r);
|
||||
Mat4x4IdentEqu(glbl_r);
|
||||
Mat4x4RotZ(glbl_r,é);
|
||||
Mat4x4RotX(glbl_r,è);
|
||||
Mat4x4RotZ(glbl_r,ê);
|
||||
Mat4x4Scale(glbl_r,s);
|
||||
|
||||
Sleep(20);
|
||||
é+=2*ã/70;
|
||||
@@ -47,7 +45,6 @@ U0 Box()
|
||||
if ( !(0.2<s<1.4) ) s1=1/s1;
|
||||
}
|
||||
SettingsPop;
|
||||
DCDel(dc);
|
||||
}
|
||||
|
||||
Box;
|
||||
Reference in new issue
Block a user