Jump to content
Sign in to follow this  
Guest Claviateur

Code Question

Recommended Posts

Guest Claviateur

Hi,Thanks to Arno's Bumpy tool I am trying to generate a SCA file to harden the surface of my photogrid. However there is one detail that I have in my original photogrid code and that is the TransformCall command that shifts the grid in the sea nad brings it back on land therefore avoiding autogen exclusion. So my quest now is to make the SCA generated by Bumpy includes the same extra code as the original photogrid so the hardening of the surface will match the shifting of the photogrid.I tried to copy the Variables section from my original SCA into the Bumpy one but while compiling it with FreeSC (FSC) and scasm too, I got errors. Here is the SCA generated by Bumpy and followed by the original one with the portion code of the photogrid :Header( 1 35:29:5.942381 32:09:6.057058 37:29:33.202709 33:29:14.797966 )LatRange( 32:09:6.057058 35:29:5.942381 )Area( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-6340 -6340-3170 -6340-3170 -9510)Jump( :st ):1SenseBorder( :2-6340 -6340-3170 -9510-6340 -9510)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 19020 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 -63400 -63400 -9510)Jump( :st ):1SenseBorder( :2-3170 -63400 -9510-3170 -9510)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 19020 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-6340 -3170-3170 -3170-3170 -6340)Jump( :st ):1SenseBorder( :2-6340 -3170-3170 -6340-6340 -6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 -31700 -31700 -6340)Jump( :st ):1SenseBorder( :2-3170 -31700 -6340-3170 -6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :10 -31703170 -31703170 -6340)Jump( :st ):1SenseBorder( :20 -31703170 -63400 -6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 00 00 -3170)Jump( :st ):1SenseBorder( :2-3170 00 -3170-3170 -3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 6340 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :10 03170 03170 -3170)Jump( :st ):1SenseBorder( :20 03170 -31700 -3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 6340 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 31700 31700 0)Jump( :st ):1SenseBorder( :2-3170 31700 0-3170 0)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 6340 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :13170 31703170 00 0)Jump( :st ):1SenseBorder( :20 31703170 31700 0)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 6340 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :13170 31706340 31706340 0)Jump( :st ):1SenseBorder( :23170 31706340 03170 0)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 6340 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-6340 6340-3170 6340-3170 3170)Jump( :st ):1SenseBorder( :2-6340 6340-3170 3170-6340 3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 63400 63400 3170)Jump( :st ):1SenseBorder( :2-3170 63400 3170-3170 3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :10 63403170 63403170 3170)Jump( :st ):1SenseBorder( :20 63403170 31700 3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :13170 63406340 63406340 3170)Jump( :st ):1SenseBorder( :23170 63406340 31703170 3170)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 12680 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-6340 9510-3170 9510-3170 6340)Jump( :st ):1SenseBorder( :2-6340 9510-3170 6340-6340 6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 12680 19020 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :1-3170 95100 95100 6340)Jump( :st ):1SenseBorder( :2-3170 95100 6340-3170 6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 19020 0 )EndAArea( b 33:49:2.241296 35:29:23.355961 20 ) RefPoint( rel : [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )SenseBorder( :10 95103170 95103170 6340)Jump( :st ):1SenseBorder( :20 95103170 63400 6340)Jump( :st ):2Jump( : ):stSurfaceType( 0 6340 19020 0 )EndA---Now here is the code from the original SCA containing the photogridArea( b 33:49:2.241296 35:29:23.355961 20 ) Uvar( $Lat0 33:49:2.241296 )Uvar( $Lon0 35:29:23.355961 ) Uvar( $Scale 0.304800 ) Uvar( $Lat1 33:49:2.241296 )Uvar( $Lon1 35:26:53.146721 ) Uvar( $DX [111120 / $Scale * cos($Lat1) * [$Lon0 - $Lon1] ] )Uvar( $DY [111120 / $Scale * [$Lat1 - $Lat0] ] ) RefPoint( rel :TagPhotoGrid [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 6000 )TransformCall( :rot [$DX] 89 [$DY] 0 0 0 0 0 0 ) Jump( : ):rot LoadBitmap( 0 128 0 0 0 0 olba0000.bmp ) Points( 0 -6340 0 -9510 -3170 0 -9510 -3170 0 -6340 -6340 0 -6340 ) TexPoly( 0 32767 0 0 0 0 0 1 255 0 2 255 255 3 0 255 ) LoadBitmap( 0 128 0 0 0 0 olba0001.bmp ) Points( 0 -3170 0 -9510 erc...ThanksMichel

Share this post


Link to post
Share on other sites

Maybe not the solution you are looking for, but why not calculate the answers of the calculations (DX, DY, etc) and then just hardcode them into the commands? Then it should work.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest Claviateur

Hi Arno,Thats very true, It might work this way, I will try thatThanks :)Michel

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...