templeos-info/public/Wb/Demo/Graphics/RotateTank.HC

65 lines
2.8 KiB
HolyC
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>",BI=1$
U0 RotateTank()
{
CDC *dc=DCAlias;
DCDepthBufAlloc(dc);
dc->flags|=DCF_TRANSFORMATION;
WinHorz(TEXT_COLS/2-12,TEXT_COLS/2+12);
WinVert(TEXT_ROWS/2-12,TEXT_ROWS/2+12);
DocClear;
try {
while (!ScanChar) {
DCDepthBufRst(dc);
Mat4x4IdentEqu(dc->r);
Mat4x4RotY(dc->r,0.25*Sin(tS/10*2*ã)+ã/2);
Mat4x4RotX(dc->r,0.4*Sin(tS/5*2*ã));
Mat4x4RotZ(dc->r,0.25*Sin(tS/10*2*ã)-ã/2);
Mat4x4Scale(dc->r,0.25+Saw(tS,5));
DCMat4x4Set(dc,dc->r);//Not needed--Sets scale for pen-width
dc->x=Fs->pix_width/2;
dc->y=Fs->pix_height/2;
//Offsets the image Z so that no parts are clipped by
//the conceptual plane of the scrn.
dc->z=GR_Z_ALL;
Sprite3(dc,0,0,0,$IB,"<1>",BI=1$);
Refresh;
DCFill;
}
} catch
PutExcept;
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(ûÿÿÿ(ûÿÿÿ22(ûÿÿÿ(

 
 


  
 



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