Let cocos2d-uphone support WVGA
This commit is contained in:
natural-law 2010-10-19 09:12:16 +00:00
parent 0dbda6c32d
commit 7be5cca13a
3 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

@ -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) );

View File

@ -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 },