Hi. Woo hoo, first post
Please excuse excessive mirth, we Australians are easily excitable.
I'm trying to work out how to set up a resolution selection mechanism, which automatically scales Sprites to the appropriate size. It seems that Sprites will only scale if you manually re-size the game window by dragging the sides or corners.
I'll use the DarkInvaders example, well, for example, because it's already got some Sprites lined up nicely.
In DarkInvaders.cpp, the screen resolution is set to 1024 x 768 x 32 with:
[/code]
dbSetDisplayMode (1024, 768, 32 );
[code]
Forget the line that sets full screen for now, I'll worry about a Window first.
Everything looks fine, and everything scales evenly if I drag the Window. However, if I wanted to set the resolution to say 1280x960, the Sprites stay the same original size.
I've tried using dbSetDisplayMode by itself, with dbSetWindowSize, and dbSetWindowSize by itself, no dice.
The only way I can see around this would be to scale all sprites manually, by a factor that is relative to the new resolution size. If I develop my interface to a default size of say 1024x768, different resolutions could be measured against this to determine a scale factor.
For example, 1280x960 / 1024x768 = 1.25. Adjusting every Sprite's size by 25% would probably work?
Am I missing something embarrassingly simple here?
I code, I throw a shrimp on the barbie. I am content.