Jump to content
Sign in to follow this  
Gridley

SCASM RotatedCall help?

Recommended Posts

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


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites
Guest luissa

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

Share this post


Link to post
Share on other sites

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


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...