1. First I commented the code about a variable about angle.
// float angle = 0;
int mode = 1;
switch( orientation )
{
case UIDeviceOrientationPortrait: mode=1; break;
case UIDeviceOrientationPortraitUpsideDown: mode=2; break; // angle = 3.1415927f;
case UIDeviceOrientationLandscapeLeft: mode=3; ; break; // angle = 1.5707963f
case UIDeviceOrientationLandscapeRight: mode=4; break; // angle = -1.5707963f;
default: return;
}
2. Second, I commented a line in SetFrameInterval.
// frameInterval = frameInterval;
That's all.
PS: There is a button in Xcode 4.2 named 'Analyze'. I used it to analyze my game project, then Xcode show some warnings. So I corrected them.
The Miracrea Games