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?
HUD/Font Aspect Ratio theory
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.
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
#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: Select all
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 ...
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
-
- Posts: 75
- Joined: Mon Sep 19, 2005 5:41 am