Just finished a game for iPad and iPhone in landscape mode. I pulled down the Sparrow+SupportPadResolution.h file. Then added this to my appDelegate.
float stageWidth;
float stageWidth;
float stageHeight;
if ([SPUtils isDevicePad] == NO) {
stageWidth = 480;
stageHeight = 320;
} else {
stageWidth = 1024;
stageHeight = 768;
}
Game *game = [[Game alloc] initWithWidth:stageHeight height:stageWidth];
Then in the implementation of Game I added the following code for my background:
// mContents is the main sprite, all the game's displayPbjects
// are children of it. Since the game is played in landscape
// format, it is rotated by 90 degrees.
mContents = [[SPSprite alloc] init];
mContents.rotation = SP_D2R(-90);
mContents.x = 0;
if ([SPUtils isDevicePad] == NO) {
mContents.y = 480;
stageWidth = 480;
stageHeight = 320;
} else {
mContents.y = 1024;
stageWidth = 1024;
stageHeight = 768;
}
[self addChild:mContents]; // self is the stage
[mContents release];
To add sprites in Landscape mode I then implemented the following:
playFieldSprite = [[SPSprite sprite] init];
playFieldSprite.rotation = SP_D2R(-90);
playFieldSprite.x = 0;
if ([SPUtils isDevicePad] == NO) {
playFieldSprite.y=480;;
} else {
playFieldSprite.y=1024;
}
// add the playing field to the stage
[self addChild:playFieldSprite];
... and added sprites as follows:
[playFieldSprite addChild:(SPDisplayObject *)];