mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7435 from Dhilan007/v3-320final
fixed using the incorrect res in test case of 'TextureMemoryAlloc'.
This commit is contained in:
commit
b5a6ccc220
|
@ -1978,36 +1978,20 @@ void TextureMemoryAlloc::updateImage(cocos2d::Ref *sender)
|
|||
switch (tag)
|
||||
{
|
||||
case 0:
|
||||
file = "Images/background.png";
|
||||
file = "Images/test_image.png";
|
||||
break;
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
// android can not pack .gz file into apk file
|
||||
case 1:
|
||||
file = "Images/fire_rgba8888.pvr";
|
||||
file = "Images/test_image_rgba8888.pvr";
|
||||
break;
|
||||
case 2:
|
||||
file = "Images/grossini_pvr_rgba8888.pvr";
|
||||
file = "Images/test_image_rgb888.pvr";
|
||||
break;
|
||||
case 3:
|
||||
file = "Images/grossini_pvr_rgba4444.pvr";
|
||||
file = "Images/test_image_rgba4444.pvr";
|
||||
break;
|
||||
case 4:
|
||||
file = "Images/test_image_a8.pvr";
|
||||
break;
|
||||
#else
|
||||
case 1:
|
||||
file = "Images/test_image_rgba4444.pvr.gz";
|
||||
break;
|
||||
case 2:
|
||||
file = "Images/test_image_rgba4444.pvr.gz";
|
||||
break;
|
||||
case 3:
|
||||
file = "Images/test_image_rgba4444.pvr.gz";
|
||||
break;
|
||||
case 4:
|
||||
file = "Images/test_image_rgba4444.pvr.gz";
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
_background = Sprite::create(file.c_str());
|
||||
|
|
|
@ -1266,31 +1266,17 @@ local function TextureMemoryAlloc()
|
|||
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
|
||||
local file = ""
|
||||
|
||||
if targetPlatform == cc.PLATFORM_OS_ANDROID then
|
||||
if tag == 0 then
|
||||
file = "Images/background.png"
|
||||
if tag == 0 then
|
||||
file = "Images/test_image.png"
|
||||
elseif tag == 1 then
|
||||
file = "Images/fire_rgba8888.pvr"
|
||||
file = "Images/test_image_rgba8888.pvr"
|
||||
elseif tag == 2 then
|
||||
file = "Images/grossini_pvr_rgba8888.pvr"
|
||||
file = "Images/test_image_rgb888.pvr"
|
||||
elseif tag == 3 then
|
||||
file = "Images/grossini_pvr_rgba4444.pvr"
|
||||
file = "Images/test_image_rgba4444.pvr"
|
||||
elseif tag == 4 then
|
||||
file = "Images/test_image_a8.pvr"
|
||||
end
|
||||
else
|
||||
if tag == 0 then
|
||||
file = "Images/background.png"
|
||||
elseif tag == 1 then
|
||||
file = "Images/test_image_rgba4444.pvr.gz"
|
||||
elseif tag == 2 then
|
||||
file = "Images/test_image_rgba4444.pvr.gz"
|
||||
elseif tag == 3 then
|
||||
file = "Images/test_image_rgba4444.pvr.gz"
|
||||
elseif tag == 4 then
|
||||
file = "Images/test_image_rgba4444.pvr.gz"
|
||||
end
|
||||
end
|
||||
|
||||
m_pBackground = cc.Sprite:create(file)
|
||||
ret:addChild(m_pBackground, -10)
|
||||
|
|
Loading…
Reference in New Issue