Sign in to follow this  
Guest bartels

MAKE_SPRITE and scaling.

Recommended Posts

Edit: This is now working with the expected desired scale of 1.0. I am guessing this is scaling the sprite relative to the background. But still the reverse of what I would think.I cannot seem to find the reasoning behind the scale factors, and what they are scaling to what.For example, I have some .bmp's like this:mask1 - 97 pixels wide x 90 pixels highsprite1 - 145 pixels squarebackground - 145 pixels squareand for example this:MAKE_SPRITE( attitude_sprite_inner, // Name BMP_GAUGE_ATTITUDE_CARD1, // Res_ID attitude_sprite_horiz_list, // Next list attitude_fail, // Failure record IMAGE_USE_TRANSPARENCY | IMAGE_BILINEAR_COLOR, 0, // ASI flags 24, 25, // Mask x,y on BG 72, 73, // Sprite x,y center on bg 0.8, 0.8, // Sprite scaling factors // X Source_var, callback, scale MODULE_VAR_NONE, NULL, 0, // Y Source_var, callback, scale ATTITUDE_INDICATOR_PITCH_DEGREES, attitude_sprite_inner_cb, 2.0, // O Source_var, callback, scale ATTITUDE_INDICATOR_BANK_DEGREES, NULL, -1)While my sprite and background are the same width, so I felt I should use a scaling factor of 1, it comes out to small. And I find decreasing the scale factor below 1 makes the sprite larger, while increasing it above 1 makes it smaller. This is counter intuitive.Can anyone explain this to me, and how I can calculate an appropriate scale?Patrick

Share this post


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

As far as I recall, it is exactly as you describe; you can recscale the sprite, but it is exactly the 1/(scale factor) as you might expect.

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