Jump to content
IGNORED

Animated Graphic Flipping


Recommended Posts

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?

 

 

 

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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 by Clint Thompson
Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...