Files
TempleOS-Rijn/TempleOS/Demo/Graphics/RotateTank.CPP
T
2018-09-08 21:45:52 +02:00

82 lines
2.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
$SP,"<1>",1$
U0 RotateTank()
{
F64 é,è,ê;
CDC *dc=DCAlias;
DocClear;
DCAllocDepthBuf(dc);
dc->flags|=DCF_TRANSFORMATION;
SetWinHorz(TEXT_COLS/2-12,TEXT_COLS/2+12);
SetWinVert(TEXT_ROWS/2-12,TEXT_ROWS/2+12);
try {
while (!ScanChar) {
DCDepthBufRst(dc);
é=0.25*Sin(tT/10*2*ã)-ã/2;
è=0.4*Sin(tT/5*2*ã);
ê=0.25*Sin(tT/10*2*ã)+ã/2;
GrIdentEqu(dc->r);
GrRotYEqu(dc->r,ê);
GrRotXEqu(dc->r,è);
GrRotZEqu(dc->r,é);
GrSetRotMat(dc,dc->r);
dc->x=Fs->win_pixel_width/2;
dc->y=Fs->win_pixel_height/2;
//This offsets the image Z so that no parts are
//not drawn because they are in front of the screen.
dc->z=GR_Z_ALL;
SpritePlot3(dc,0,0,0,$IB,"<1>",1$);
WinMgrSync;
DCFill;
}
} catch
CatchAll;
DCFill;
DCDel(dc);
}
RotateTank;
²6RF#(ºÿÿÿ#(ºÿÿÿ#ØÿÿÿF#Øÿÿÿd#d#ìÿÿÿœÿÿÿ#ìÿÿÿœÿÿÿ#F2(ºÿÿÿ2(œÿÿÿ2œÿÿÿ2ìÿÿÿºÿÿÿ2ØÿÿÿF2Øÿÿÿd2ìÿÿÿd2P#öÿÿÿP##FØÿÿÿ#FÉÿÿÿ#A#çÿÿÿFÝÿÿÿ(ºÿÿÿÝÿÿÿ(ºÿÿÿÝÿÿÿØÿÿÿFÝÿÿÿØÿÿÿdÝÿÿÿìÿÿÿœÿÿÿÝÿÿÿìÿÿÿœÿÿÿÝÿÿÿFÎÿÿÿ(ºÿÿÿÎÿÿÿ(œÿÿÿÎÿÿÿœÿÿÿÎÿÿÿìÿÿÿºÿÿÿÎÿÿÿØÿÿÿFÎÿÿÿØÿÿÿdÎÿÿÿìÿÿÿdÎÿÿÿPÝÿÿÿöÿÿÿPÝÿÿÿÝÿÿÿFØÿÿÿÝÿÿÿFÉÿÿÿÝÿÿÿÉÿÿÿÝÿÿÿçÿÿÿAÝÿÿÿçÿÿÿÉÿÿÿ#çÿÿÿdÝÿÿÿûÿÿÿ22(ûÿÿÿ(–ûÿÿÿ2–2–(–ûÿÿÿ(

 
 


  
 



  $"$#"!  !"!#"$#! !    "!"%++&%%'&&(''(()),),**,*+-$$-$'()')&3/..232.11523400/3451104-"