PDA

View Full Version : Creation of CollisionOutline by using a Resource/Sprite



Nipsky
09-01-2007, 07:14 AM
Hey guys!

At the Moment I'm trying to find a way for my application to create a CollisionOutline for a specific CL_Sprite depending on its first frame but neither of my ideas is working...
The points are:

I have no chance to create it by using my Sprite because there is no constructor available for this way
Stuff like
m_outline = new CL_CollisionOutline(m_sprite->get_frame_pixeldata(0)); (getting the image of the first frame the sprite, I want to create the outline for, owns) doesn't work either
It seems the path, the first image the sprite is created from, isn't stored anywhere (well, I could eventually do this myself in my code but this feels like a nasty way around the problem)
I couldn't figure out how to easily get the path of the sprite, I'm referring to in my question, which is specified in my resources.xml
I couldn't figure out how the "create by resource" constructor of CL_CollisionOutline works, because it seems, that it's nowhere documented what I have to put in my resource.xml


...or am I suffering from a fundamental design flaw? ;)
btw: I'm using the official ClanLib 0.8

Nipsky
09-22-2007, 10:08 PM
Hmm... hasn't anybody ever encountered one of these problems? How do you manage your Outlines and especially their loading when you use a big number of sprites - do you do everything "manually" (in terms of coding)?
This problem is really blocking all my effort regarding the use of ClanLib *sigh*