user1280535
user1280535

Reputation: 347

hd images not working

In simulation and on device, there is something that happen with my cocos2d which its strange. I have xcode 4.2, running on simulation ios5 and have cocos2d v1.0.1 .

The app is working great, when all images in HD mode(double size),but without the -hd Then when i have tried to change all images from image.png to image-hd.png, he cant find the image anymore.

I have to say that after i added the -hd ,and before i have cleaned the cache it worked. After the cache was clean, it stopped.

The HD is enabled in my delegate, and it worked in the past as well.

he somehow cant except anymore the HD images.

any idea ?? thanks.

Upvotes: 0

Views: 111

Answers (1)

XBXSlagHeap
XBXSlagHeap

Reputation: 174

This was something that drove me crazy when I updated to v1.0.1. I spent hours trying to understand why it would work sometimes and not other times between projects. Basically all you need to do is make sure that you include the different images named properly in your project. You can't have just the image-hd.png in your project alone or it will fail. You have to include both the image.png and the image-hd.png in your project or it will error as you described. Once you have both or if you're doing both iPhone and iPad, include all 4 types. (image.png, image-hd.png, image-ipad.png, and image-ipadhd.png)

Then in your code only reference the image.png and v1.0.1 will do the rest.

Upvotes: 1

Related Questions