I'm just updating my game to run with retina display, i've managed to borrow and iPhone 4 for a day to test it and have fallen short at the first hurdle!
RMPlayerSprite *player = [RMPlayerSprite spriteWithFile:@"playerBlue.png" rect:CGRectMake(0,0,50,60)];
[player setDelegate:self];
[player setScaleX:-1];
[self addChild:player z:50 tag:kPlayerSprite];
This crashes the app, at line addChild:
I'm getting the SIGABRT and
NSAssert( child != nil, @"Argument must be non-nil");
I think what is happening is because there is no playerBlue-hd.png it is failing, I thought that if the HD graphic wasn't present, it fell back onto the previous one?
Only 70% of my game has HD retina graphics at the moment, is there a fix, or something I am doing wrong?
Thanks
EDIT:
2010-12-06 10:40:31.388 Game_CC0.99.5[745:307] cocos2d: CCTexture2D. Can't create Texture. UIImage is nil
2010-12-06 10:40:31.391 Game_CC0.99.5[745:307] cocos2d: Couldn't add image:leftNavItems.png in CCTextureCache
2010-12-06 10:40:31.396 Game_CC0.99.5[745:307] cocos2d: CCFileUtils: Warning HD file not found: leftNavItems-hd.png
I've noticed that this logs out about 20 times previous to the player sprite.
If I turn off retina display, this works 100%, the leftNavItems.png file is definitely there.