SDL iPhone Landscape

Hello everyone,
I know that landscape mode is suppose to be available soon, but does anyone
have anything in beta? I want to start my game in landscape and leave it
there. I have already starting rotating all of my images in, as I think it
will slow the game down to use something like rotozoomSurface to rotate the
screens on the fly.
Rick

If you’ve already rotated your game’s images, all you need to do now
is translate from one coordinate system to another. Something like
this:

temp = x
x = y
y = -x

Depending, of course, on which orientation you are using.On Wed, Feb 10, 2010 at 12:13 AM, Rick Page wrote:

Hello everyone,
I know that landscape mode is suppose to be available soon, but does anyone
have anything in beta? I want to start my game in landscape and leave it
there. I have already starting rotating all of my images in, as I think it
will slow the game down to use something like rotozoomSurface to rotate the
screens on the fly.
Rick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

That is what I am starting to do. I just have a lot of images to
rotate. The big issue I am running into is the game that I am porting
is using BFont. Just in case anyone is not familiar with it, here it
is in a nutshell. BFont is used to take an image with all of numbers
and letters in the alphabet. I am not sure if it can handle multiple
languages. Anyways, you send it a text string and it grabs the images
of each character and blits it onto a surface. The problem is trying
to get it to rotate the character before blitting it, and getting it
to move along the y axis and not the x axis. I have tried modifying
the BFont.c code, but have had no success.
Any suggestions would be great.
RickSent from my iPhone

On Feb 10, 2010, at 12:09 PM, Donny Viszneki <donny.viszneki at gmail.com> wrote:

If you’ve already rotated your game’s images, all you need to do now
is translate from one coordinate system to another. Something like
this:

temp = x
x = y
y = -x

Depending, of course, on which orientation you are using.

On Wed, Feb 10, 2010 at 12:13 AM, Rick Page <@Rick_Page> wrote:

Hello everyone,
I know that landscape mode is suppose to be available soon, but
does anyone
have anything in beta? I want to start my game in landscape and
leave it
there. I have already starting rotating all of my images in, as I
think it
will slow the game down to use something like rotozoomSurface to
rotate the
screens on the fly.
Rick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

What we really need is Landscape support in SDL 1.3. It is already on the
feature list, just needs to get some attention from Sam; or any other
volunteer since Sam has a full-time job.> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Cruce
Sent: Wednesday, February 10, 2010 12:23 PM
To: SDL Development List
Subject: Re: [SDL] SDL iPhone Landscape

That is what I am starting to do. I just have a lot of images to
rotate. The big issue I am running into is the game that I am porting
is using BFont. Just in case anyone is not familiar with it, here it
is in a nutshell. BFont is used to take an image with all of numbers
and letters in the alphabet. I am not sure if it can handle multiple
languages. Anyways, you send it a text string and it grabs the images
of each character and blits it onto a surface. The problem is trying
to get it to rotate the character before blitting it, and getting it
to move along the y axis and not the x axis. I have tried modifying
the BFont.c code, but have had no success.
Any suggestions would be great.
Rick

Sent from my iPhone

On Feb 10, 2010, at 12:09 PM, Donny Viszneki <donny.viszneki at gmail.com> wrote:

If you’ve already rotated your game’s images, all you need to do now
is translate from one coordinate system to another. Something like
this:

temp = x
x = y
y = -x

Depending, of course, on which orientation you are using.

On Wed, Feb 10, 2010 at 12:13 AM, Rick Page wrote:

Hello everyone,
I know that landscape mode is suppose to be available soon, but
does anyone
have anything in beta? I want to start my game in landscape and
leave it
there. I have already starting rotating all of my images in, as I
think it
will slow the game down to use something like rotozoomSurface to
rotate the
screens on the fly.
Rick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

i might be wrong, but correct coordinate conversion for a -90* rotation on
the iphone (correspoding to a UIInterfaceOrientationLeft) should be
temp = x
x = y
y = 320 - x

Vittorio

Marie von Ebner-Eschenbachhttp://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html

  • "Even a stopped clock is right twice a day."On Wed, Feb 10, 2010 at 7:09 PM, Donny Viszneki <donny.viszneki at gmail.com>wrote:

If you’ve already rotated your game’s images, all you need to do now
is translate from one coordinate system to another. Something like
this:

temp = x
x = y
y = -x

Depending, of course, on which orientation you are using.

On Wed, Feb 10, 2010 at 12:13 AM, Rick Page wrote:

Hello everyone,
I know that landscape mode is suppose to be available soon, but does
anyone
have anything in beta? I want to start my game in landscape and leave it
there. I have already starting rotating all of my images in, as I think
it
will slow the game down to use something like rotozoomSurface to rotate
the
screens on the fly.
Rick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ok, now I’m getting frustrated. I had this working once, but can’t get
it to work again. I am loading an image and rotating it. Does anyone
see anything obviously wrong with this code?

SDL_Surface *portrait;
SDL_Surface *landscape;

portrait = (SDL_Surface *) IMG_Load(filename);
landscape = rotozoomSurface(portrait, 90, 1, 1);

While single stepping, I see my image gets loaded into portrait. When
I look at landscape, w & h are 1, pitch is 4… Basically it looks
like the rotozoomSurface did not happen. Did I miss a step?
Thanks for y’all help.
RickSent from my iPhone

On Feb 10, 2010, at 1:38 PM, “Vittorio G.” <vitto.giova at yahoo.it> wrote:

i might be wrong, but correct coordinate conversion for a -90*
rotation on the iphone (correspoding to a
UIInterfaceOrientationLeft) should be
temp = x
x = y
y = 320 - x

Vittorio

Marie von Ebner-Eschenbach - “Even a stopped clock is right twice a
day.”

On Wed, Feb 10, 2010 at 7:09 PM, Donny Viszneki <donny.viszneki at gmail.com wrote:
If you’ve already rotated your game’s images, all you need to do now
is translate from one coordinate system to another. Something like
this:

temp = x
x = y
y = -x

Depending, of course, on which orientation you are using.

On Wed, Feb 10, 2010 at 12:13 AM, Rick Page <@Rick_Page> wrote:

Hello everyone,
I know that landscape mode is suppose to be available soon, but
does anyone
have anything in beta? I want to start my game in landscape and
leave it
there. I have already starting rotating all of my images in, as I
think it
will slow the game down to use something like rotozoomSurface to
rotate the
screens on the fly.
Rick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org