PDA

View Full Version : Could some one show me how to use the resource manager in Clanlib 3.x?



Trollger
02-10-2014, 04:13 AM
Hi all, I am having trouble figuring out how to get the new clanlib resource manager to work. I made the class

clan::ResourceManager resources;

but it only has one method that would appear to be useful set_cache. I am not sure what it does...

Is this not the way I am supposed to load an xml file to manage my resources? I just want to load a sprite from this xml file

<?xml version="1.0" encoding="iso-8859-1"?>
<resources>
<sprite name="Knight">
<image file="../Media/Units/Knight.png">
</image>
</sprite>
</resources>

Could any one at least point me in the right direction? Thanks.

rombust
02-10-2014, 05:14 PM
Humm .......\ClanLib\Documentation\Overview\resource_ma nagement.h is out of date.

I personally can't help at the moment, maybe someone else can. (Lack of time)

Have a look at Examples/Game/SpritesRTS inside ClanLib 3.0 Examples.

Also look at other examples that use resources - Comparing with the ClanLib 2.x examples

I'm sure someone described ClanLib 3.0 resources somewhere, but I can't remember where.