| View previous topic :: View next topic |
| Author |
Message |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Sun Apr 23, 2006 8:01 am Post subject: HUD/Font Aspect Ratio theory |
|
|
I've got a cross-platform game that was built for 4:3 aspect ratio and am trying to figure out how to best adjust the HUD/Font/Shell/Menuing system to adapt to the 16:9 on PSP.
As a quick hack I just played around with scale the best I could so that fonts and other hud elements were scaled to close to where they should be on screen while at the same time being as little stretched as possible.
Is there some super-simple approach that I am missing to acheive this? Or do I just need two versions of my shell code - one that get's my positions right for 4:3 and another hat gets it right for 16:9? |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Sun Apr 23, 2006 1:07 pm Post subject: |
|
|
best approach is really to use
#ifdef (PSP)
// psp specific stuff to run
#endif
to have full control over seperate versions
of your game ....as for fonts you should simply
change their positioning on the psp x, y axis
ex. | Code: |
FONT* font
#ifdef (WIN)
// win stuff do to
#endif
#ifdef (PSP)
font->f_x = 2;
font->f_y = (SCREEN_HEIGHT - 12);
fntPosition(font, font->f_x, font->f_y);
fntPrintToScreen("Score: %d", s_count);
// and etc...
#endif
// continue your fun ... |
handling different placement of HUD, fonts, and
anything else has more control for you when you
handle yourself ...of course you could be lazy and use
#define to set how you want the app to set screen height
and width but this will make you go around searching for
more problems than you really need _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Sun Apr 23, 2006 1:42 pm Post subject: |
|
|
OK, thanks for the input. This is what I figured, but I wanted to make sure there wasn't something obvious that I was missing before I recode my whole shell/hud.
I see what you mean about coding to width/height relative values, that's a good tip...
Thanks! |
|
| Back to top |
|
 |
|