Resources folder structure

Hi,

I would like to structure my Resources folder llike this one:

Resources
* hd

* GameResources
> * game_sprite1.png
> * game_sprite2.png
* LobbyResources
> * lobby_sprinte1.png
> * lobby_sprinte2.png
* sd
* GameResources
> * game_sprite1.png
> * game_sprite2.png
* LobbyResources
> * lobby_sprinte1.png
> * lobby_sprinte2.png

Is it possible?

I have tried with :

//AppDelegate.cpp
CCFileUtils::sharedFileUtils()->setResourceDirectory(“hd”);
CCFileUtils::sharedFileUtils()->setResourceDirectory(“hd/GameResources”);
CCFileUtils::sharedFileUtils()->setResourceDirectory(“hd/LobbyResources”);

//GameLayer.cpp
CCSprite* pSprite = CCSprite::create(“game_sprite1.png”);

But this code crashes crashes.
Also, I have tried with:
CCSprite* pSprite = CCSprite::create(“GameResources/game_sprite1.png”);

But it does not work.
Any Idea?

Cheers

I think, you try with CCSprite* pSprite = CCSprite::create(“lobby_sprinte1.png”);

Thank you for your answer Mai Dung.
But I am sure y tried with:
CCSprite* pSprite = CCSprite::create(“game_sprite1.png”);
And after checking that it crashes, I tried with
CCSprite* pSprite = CCSprite::create(“GameResources/game_sprite1.png”);

What version are you using? I’m on v2.x (probably v2.2) and it has no CCFileUtils::setResourceDirectory() method. Instead it has CCFileUtils::setSearchPaths() and CCFileUtils::addSearchPath() and AFAIK they do what you need.