Since CoCos v0.99.4 added support for Retina Display (iPhone4) I have been trying to get my Full Screen background to display in my game. Problem is I can not get it to show on the device. It builds and runs fine but never picks up the high res file I have in my resources directory in xCode (3.2.3). I have one file at normal res 480x320 named "BG2.png" and one file at 960x640 named "BG2@2x.png".
I looked at the High Res Test in the new Coco v0.99.4 which I am using with xCode to build the project. Here is what I have in my .m file...
-(id) init {
if((self = [super init])) {
CGSize size = [[CCDirector sharedDirector] winSize];
CCSprite *bg = [CCSprite spriteWithFile:@"BG2.png"];
[self addChild:bg z:0];
bg.position = ccp(size.width/2, size.height/2);
In AppDelagate when I add add this everything gets tiny on the screen but it does not call the @2x high res file... ? However if I make the BG.png file into a 960x640 file it appears correctly but of course I want CoCos/xCode to intelligently choose the right file:
[director setContentScaleFactor:[[UIScreen mainScreen] scale]];
Do I need to do something else beyond this? Do I need to reference a class somewhere? I looked in the High Res Test example and it was not very clear what I might need. Anyone get this going and if so what did they do to make it work? I am sure it is some obvious step I have missed. Thanks in advance for any help and yes I love CoCos2D for iPhone!