Clint Thompson Posted January 24, 2019 Share Posted January 24, 2019 Currently I'm cheating but maybe I'll have no choice in the end and posting here in case others need it for reference. *by cheating I mean using two graphics of the same image - one being flipped and the other remaining the same but obviously this is a huge waste of space. Condition: This may actually be part of the problem but if so, would like to know why or how to fix it: the graphic is 16bit at a lovely 128 pixels wide by 224 pixels high boasting 12 silky smooth frames of crescent fresh eye candy which works surprisingly well - no joke, I'm surprised but pleased all the same. I've verified it's setup as no_clut in assets and no_clut in rapinit but when using the is_normal or is_flipped flag, it only pushes the graphic over like an offset on the screen but doesn't actually flip the image. I can't remember but thought I've done it before in the past but it doesn't seem to be working now. Looking in the Rb+ quick reference guide it mentions adding x amount of pixels to mirror the image with _width but since it doesn't give a direct example, I'm not sure how to actually do it in the code or elsewhere. Mind you, I'm not setting anything up in the basic file, it's starting off with the screen setup directly from rapinit.s with both images active - one normal, one flipped - but maybe it has to be setup differently. Question: If I have a WALLS sprite as an animated graphic, can I list it twice in rapinit.s (one after the other) and if so, can either of them be flipped/mirrored or would they have to remain identical of each other since it's pulling the same asset - in this case walls.bmp. The idea is to mirror the wall on each side of the screen with one being flipped while having the benefit of using the same asset. or Must I use/change additional sprites used/needed from 1 to 2 and then call it and flip it in the basic file so it'll work? Quote Link to comment Share on other sites More sharing options...
ggn Posted January 24, 2019 Share Posted January 24, 2019 Hi, Attached is a modified project from the ones rb+ is shipped (pack). It contains a 16bpp image just to prove that flipping works. Also, it scrolls upwards because I added animation and told it that each frame is 352*2 bytes further from the previous. First of all, flipping works in 16bpp images, so you probably need to double check your settings. Secondly, you don't need to add any offset to your x coordinate when flipping. It's done for you behind the scenes. As for your question: Yes, you can define multiple objects that have the same source address. That's how (for example) F.A.C.T.S. demo draws so many sprites in the first part - they're all the same! Hope this helps. pack.zip 1 Quote Link to comment Share on other sites More sharing options...
Clint Thompson Posted January 26, 2019 Author Share Posted January 26, 2019 (edited) Ok, so I did get it finally after multiple attempts at changing stuff around and noticed where I was wrong but question why it's different and how it could be affecting other things negatively in the stuff I've been doing this entire time. Why is it that a 16bit image is being called upon as gfx_clut16 in assets but no_clut in rapinit instead of no_clut in assets and what is the actual difference? (other than the fact that it wasn't working before in regards to flipping lol) Also, doing it this way, flipped displays the image as normal and vice versa. I don't really care and as long as it works it works but seems ass backwards =) Edited January 26, 2019 by Clint Thompson Quote Link to comment Share on other sites More sharing options...
ggn Posted January 26, 2019 Share Posted January 26, 2019 Why is it that a 16bit image is being called upon as gfx_clut16 in assets but no_clut in rapinit instead of no_clut in assets and what is the actual difference? (other than the fact that it wasn't working before in regards to flipping lol) Also, doing it this way, flipped displays the image as normal and vice versa. I don't really care and as long as it works it works but seems ass backwards =) From the standard assets.txt template: ' - For graphics conversion you can use "gfx_clut" or "gfx_noclut" to convert a .BMP file into jaguar raw format and optionally export the paletter or not (clut=yes, noclut=no). ' This applies to 1-, 2-, 4- and 8-bit graphics only. ' For 16-bit and 24-bit graphics no clut is created (because there isn't a need for one). Which means "whether you use _clut/_noclut in 16 or 24bpp mode it won't matter". I simply left the option in so people won't be confused in the case of switching asset bitplanes (say you had a 16bpp object that you converted to 4bpp later on). Sadly it seems to confuse people in other ways Quote Link to comment Share on other sites More sharing options...
Clint Thompson Posted January 26, 2019 Author Share Posted January 26, 2019 From the standard assets.txt template: ' - For graphics conversion you can use "gfx_clut" or "gfx_noclut" to convert a .BMP file into jaguar raw format and optionally export the paletter or not (clut=yes, noclut=no). ' This applies to 1-, 2-, 4- and 8-bit graphics only. ' For 16-bit and 24-bit graphics no clut is created (because there isn't a need for one). Which means "whether you use _clut/_noclut in 16 or 24bpp mode it won't matter". I simply left the option in so people won't be confused in the case of switching asset bitplanes (say you had a 16bpp object that you converted to 4bpp later on). Sadly it seems to confuse people in other ways It was only confusing to me because flipping wouldn't work the other way haha =) but either way, it's sorted now and working. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.