I have a "problem" creating rotating (device orientation) applications, mainly text. The problem is not really to rotate the text, but to place it always in the same relative screen position regrdless of the device orientation.
So I have created a code to print text with a rotating angle (just 0º, 90º, 180º and 270º) and relative positions.
A few considerations:
-The font must be png+alpha (load my fonts in source to check)
-It uses font kerning. Not implemented (yet?) with fixed space/kerning.
-R_Fonts uses sprite id 1000+font id.
-Any font r_loaded is loaded also as standar font.
-My program "almost" work, at least with the supplied font. I have tested with other fonts, and although they work, results are not as accurate. But for me, it is enough.
In the supplied example, use LEFT & RIGHT cursor key to "rotate" screen.
X & Y coordinates are relative. If you use R_PRINT("Text",10,10,angle) it will be always printed in top-left 10,10 coordinate, independent of device rotation.
POSITIVE X (+X) MEANS RELATIVE TO LEFT EDGE, -X RELATIVE TO RIGHT EDGE, 0=CENTERED IN HORIZONTAL
POSITIVE X (+Y) MEANS RELATIVE TO TOP EDGE, -Y RELATIVE TO BOTTON EDGE, 0=CENTERED IN VERTICAL
X=0 & Y=0 CENTERED IN THE CENTER

So, R_PRINT ("Text",-10,1) will be printed with text finishing at 10 pixels of right border, even if you rotate the screen.
Hell, run the example and watch what I mean.
You can also "rotate" a pixel/coordinate, so you can draw your sprites in a rotating enviorment.
Commands:
R_LOADFONT: LOAD A FONT AS STD. FONT AND R_FONT
R_SETFONT: SET FONT NUMBER TO BE USED
R_PRINT: PRINT TEXT$ AT COORDS X,Y WITH ANGLE. COORDINATES ARE RELATIVE COORDS.
R_CONVERT: ROTATE A X,Y COORD. RESULTING COORDS ARE IN R_X & R_Y
v 1.0:
http://www.ampostata.org/GLB/rPRINT.rarThe code is in no way "clean", or perfect, but currently it works. I will update it. Also, if someone update it, let me know to update mine.