OVERRiDE Posted March 18 Share Posted March 18 Hi Guys, I am getting back to playing with JagStudio, and I am having some issues when setting is_flipped on a sprite. Not sure if this is user error, a *nuance* of the Jag hardware, or perhaps an issue in the API. What I am trying to do is create a scrolling background layer. My idea is simply to use a single sprite ( 1024x256 BMP, 24bpp ), and alternate between the flipped and non-flipped version to create a seamless, scrolling layer with a single texture. Currently it is working, but I have two problems The flipped texture is corrupted, as if the pixels are being shifted vertically in a non-uniform fashion. The API documentation indicates the flipped sprite will have its x-coordinate offset by the width of the texture. But if this was the case, I would expect that if I have both instances of this sprite at the same origin, they would be displayed exactly next to each other. If there was no offset on the x-axis, I would expect that I would need to set the x position of the 2nd instance to be the x position of the first instance plus the width of the sprite to achieve the same result. However, neither of these seems to actually be true. To achieve this expected result, I have to set the x-coordinate of the 2nd sprite by 176 ( random number achieved by trial and error ) Here is a screenshot of the current result - the right side of the screen is the original sprite, the left side of the screen is the mirrored, "flipped" sprite. Attaching the source so anyone interested can examine. Any input appreciated! shooter.zip Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.