Hi everyone!
I'm new to the forums, altough not new to allegro. I just started using Allegro 5 for iOS and i'm new to iOS programming in general (been a windows programmer always).
Now i have a question regarding the screen orientation:
I set these display options and flags before creating the display, and i've set the orientation to "landscape left" in Xcode.
al_set_new_display_option(ALLEGRO_SUPPORTED_ORIENTATIONS,ALLEGRO_DISPLAY_ORIENTATION_LANDSCAPE, ALLEGRO_REQUIRE); al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW);
The question is, do i have to use ALLEGRO_TRANSFORM and rotate all of the bitmaps i'm drawing to get them to the right position, or is there another way?
| <- the bitmap
[ ] <- iphone
[ |] <- the bitmap goes there
[- ] <- where i want it to go
P.S. What tags can i use here, so i can show the attached pictures?
Yeah, I believe you want to rotate the screen using a global transform. You should only need to set it up once (and in some of the display events).
Okay that was fast ! Have my thanks!
If you've done it right you shouldn't have to use any ALLEGRO_TRANSFORM for screen orientation on iOS. But that may be a 5.1 feature... are you using 5.0 or 5.1?
I'm on Allegro 5.1 and i'm building for iOS 6.1.
This is my source:
And like i said, the orientation is set to "Landscape Left" in Xcode project settings under "Supported Interface Orientations".
The global transformation method should work, but i'm too interested in hearing what the alternative could be
EDIT: So i got it to work under iOS 5.1 with the same source code. So it must be with the view controllers. I read that shouldAutorotateToInterfaceOrientation is deprecated in iOS 6.0.