Merge pull request #422 from minggo/iss625

[android] fixed #625
This commit is contained in:
minggo 2011-07-26 20:56:27 -07:00
commit b4cb43913b
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,8 @@ do
fi
done
# remove test_image_rgba4444.pvr.gz
rm -f $TESTS_ROOT/assets/Images/test_image_rgba4444.pvr.gz
# build
pushd $ANDROID_NDK_ROOT

View File

@ -609,7 +609,12 @@ void TexturePVRRGBA4444GZ::onEnter()
TextureDemo::onEnter();
CCSize s = CCDirector::sharedDirector()->getWinSize();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// android can not pack .gz file into apk file
CCSprite *img = CCSprite::spriteWithFile("Images/test_image_rgba4444.pvr");
#else
CCSprite *img = CCSprite::spriteWithFile("Images/test_image_rgba4444.pvr.gz");
#endif
img->setPosition(ccp( s.width/2.0f, s.height/2.0f));
addChild(img);
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();