cocos2dがRetinaDisplay(HighRez)対応していた 2010/10/11

cocos2dです。cocos2dがリティナに対応しているようなので、つくりかけのものに適応しはじめているところです。
現時点でのバージョンは、v0.99.5-beta3 です。



ポイント、ピクセルという概念で値を設定していくようです。
ポイントベースの場合は、480×320で設定できるので、960×640を意識せず、High Rezではないiphone/ipod touchに対応できます。値をかえずよいということのですね。

Device Points Pixels
iPhone 3GS or older 480×320 480×320
iPhone4 in LowRes mode 480×320 480×320
iPhone4 in HighRes mode 480×320 960×640
iPad 1024×768 1024×768
Mac W x H W x H
Point vs. Pixel


ピクセルベースでつくっていたので、いろいろ面倒なことになってしまってます...
Orz...

自分メモ
ディレクターにrunWithSceneを設定する順番で、みためが変わってしまう(High Resではないということ)ようなので、順番を注意する必要があります。
applicationDidFinishLaunchingで、RetinaDisplay mode オンリーの場合
{
/*
!!ここでrunWithSceneしてはだめ!!
[[CCDirector sharedDirector] runWithScene: [HelloWorld scene]];
*/


// Add this code in your Application Delegate, right after initializing the director

// Director Initialization
[director setOpenGLView:view];

// Enables High Res mode on iPhone 4 and maintains low res on all other devices
// Don't add if you don't want to enable HighRes mode on iPhone4
if ([UIScreen instancesRespondToSelector:@selector(scale)])
[director setContentScaleFactor:[[UIScreen mainScreen] scale]];

/*
ここでrunWithScene!!
*/
[[CCDirector sharedDirector] runWithScene: [HelloWorld scene]];
}

: