diff --git a/template/AppDelegate.cpp b/template/AppDelegate.cpp index 95a017795b..8c2dc009e8 100644 --- a/template/AppDelegate.cpp +++ b/template/AppDelegate.cpp @@ -28,10 +28,10 @@ bool AppDelegate::initCocos2d() pDirector->setDisplayFPS(true); // set the ResourceEntry - UIImage::setResourceEntry(&cocosTemplateResourceEntry); + CCFileUtils::setResourceEntry(&cocosTemplateResourceEntry); // set the Images ResInfo (name and ResID) - UIImage::setImageResInfo(ResInfo, sizeof(ResInfo) / sizeof(T_ImageResInfo)); + CCFileUtils::setResourceInfo(ResInfo, sizeof(ResInfo) / sizeof(T_ResourceInfo)); // create a scene. it's an autorelease object CCScene *pScene = HelloWorld::scene(); diff --git a/template/HelloWorldScene.cpp b/template/HelloWorldScene.cpp index 4510ae61f2..6b6c1edae5 100644 --- a/template/HelloWorldScene.cpp +++ b/template/HelloWorldScene.cpp @@ -34,8 +34,8 @@ bool HelloWorld::init() // add a "close" icon to exit the progress. it's an autorelease object CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage( - (ResInfo[0]).ImgName.c_str(), - (ResInfo[1]).ImgName.c_str(), + (ResInfo[0]).ResName.c_str(), + (ResInfo[1]).ResName.c_str(), this, menu_selector(HelloWorld::menuCloseCallback) ); pCloseItem->setPosition( ccp(CCDirector::getSharedDirector()->getWinSize().width - 20, 20) ); diff --git a/template/Resource.h b/template/Resource.h index 7022e519ed..9925107702 100644 --- a/template/Resource.h +++ b/template/Resource.h @@ -6,7 +6,7 @@ using namespace cocos2d; -const T_ImageResInfo ResInfo[] = +const T_ResourceInfo ResInfo[] = { { "CloseNormal", COCOST_ID_BITMAP_CloseNormal }, { "CloseSelected", COCOST_ID_BITMAP_CloseSelected },