Sign in to follow this  
Guest

Learning Scasm code --- Anybody solve this one

Recommended Posts

Hi allI have recently started to try to learn coding Scasm by hand, by trial and error!!!!I am baffled by the Texpoly command!I understand that the bitmap offset co ordinates are linked to the points co ordinates, this was a break through, but it is the effect on the bitmap with the offset cordinates, I don't understand, esspecially when the numbers exceed the size of the bitmap. A larger size, say 800x800 seems to reduce the resolution of the bitmap, which in some intances looks better. Even when I get a result I like, I still don't understand how, even though I know how I got their!!! TexPoly( m 0 32766 0 -100 1 bx by ; 1The 'm' stands for Manual, I think, although I could stand to be corrected on that. I take it that {0,32766(maxium in Fs)0,-100) may have replaced the 1,2,3,4 that can be used with the 'ab'or 'at' flags.I am learning, trial and error, here. It would be nice to understand something from all this.Also, What might the advantage be to using this command. The Graphics frontend that has created the *.sca file which I am modifying, just draws the polygon using the points command and then uses the loadbitmap command.I have read the 2.85 Scasm doc's and also Matt's tutorial @combatflight.de, which as been immeasurable, and I couldn't have done without it. I have also downloaded his editor, which is very useful in starting novices off. (Even with his 'Texpoly' template I still fail to grasp this concept)Thank you in advance, for anybody that can unmuddle me, I doubt I am the first or the last.RegardsDave

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Dave,This is how the [tt]TexPoly[/tt] command works.First you make a point list with the points command.[tt]Points( 0-100 0 0 ; 0-100 100 0 ; 1 100 100 0 ; 2 100 0 0 ; 3[/tt]Then you load the bitmap you want to use:[tt]LoadBitmap( 0 6 EF 0 0 0 test.bmp )[/tt]Now are going to make a polygon with those points and the bitmap, using the [tt]TexPoly[/tt] command. Let's say we want the upper right quarter of the texture on the polygon, then I would use:[tt]TexPoly( a0 128 1281 128 2552 255 2553 255 128 )[tt]The [tt]a[/tt] specifies which side of the polygon should be drawn. a is the one that is facing away from the [tt]RefPoint[/tt], while [tt]ai[/tt] is the other side (facing to the [tt]RefPoint[/tt]). You can also use the [tt]m[/tt] as you did in your piece of code, if you want to specify the direction vector by hand, but I think most the the time the [tt]a[/tt] and [tt]ai[/tt] work just as good.Than the mapping of the texture on the points. For each point number you give the coordinates on the textures. No mather what the size of the texture is, the lower left corner is always 0,0 and the upper right one is always 255,255. If you exceed the numbers the bitmap will be repeated on the polygon.I hope this helps you a bit :).Arno


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

Share this post


Link to post
Share on other sites

Hi ArnoThanks for your reply.I think the command is a lot more simple than I thought, although I think you can do a lot more complex things than you suggest.Can I use this command to originate a bitmap in a certain direction ?, if for instance, the bitmap has lines that you may wish to align it, ie a taxiway, runway!!May be there is a rotate command, I think!My main concern is manipulating the bitmap and its resolution, the repeating of bitmaps is not totally realistic in my opinion.Thanks again for your support. It it wasn't for others helping we couldn't asspire to design.Kind regards Dave

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