May 30, 200521 yr I've got a decompiled (BGLanalyze) bridge object that I'd like to rotate 19 degrees counter clockwise. I'm trying to use SCASMs RotatedCall function to no avail. Can anyone lend a little hand-holding? Should this call be using instead of, or before PerspectiveCall and ShadowCall? Never tried this before..so thanks in advance!Best,sg [email protected] | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)
May 31, 200521 yr Hello,Here is a typical SCASM sequenceArea()PerspectiveCall( :pcall )Jump( :end):pcall;; here goes the drawing instructions or a call to a library; note that it should be terminated by a Return so that code; returns to the intruction after the PerspectiveCall();Return:endEndANormally : means a label to the EndA so that the previous code can appear as: Area()PerspectiveCall( :pcall )Jump( : ):pcall;; here goes the drawing instructions or a call to a library; note that it should be terminated by a Return so that code; returns to the intruction after the PerspectiveCall();ReturnEndAThe first thing thing that we have to do in the drawing part is to define the center of coordinates and the scale. This is done with the RefPoint(). Here is how it looks after the RefPoint():Area()PerspectiveCall( :pcall )Jump( : ):pcallRefPoint( 7 :ret ... );;list of materials and textures, list of points and list of triangles;:retReturnEndAIn addition to define the center of coordinates and the scale, the RefPoint() performs a test. The test is, more or less, "if the viewer is not very far from the center of coordinates, the next instruction is the one that follows the RefPoint; otherwise a jump to the label that is defined in the RefPoint()". It should be clear that if we are very distant from the object and we want to exit the drawing routine, the jump should be to a Return. That is why I placed the label to point to the Return command that I already had.At this stage comes the rotation. To rotate the object -19 degree use thisArea()PerspectiveCall( :pcall )Jump( : ):pcallRefPoint( 7 :ret ... )RotatedCall( :code_to_rotate 0 0 -19 )Return:code_to_rotate ;;list of materials and textures, list of points and list of triangles;:retReturnEndAHope this is useful,Luis
May 31, 200521 yr Author That helped tremendously! I was putting the RotatedCall in the wrong place in my code - moved to after the RefPoint and everything looks perfect!THANKS!sg [email protected] | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)
Create an account or sign in to comment