PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Landscape question

I'm almost assuredly going to figure it out in two minute and feel stupid, but...

I'm starting work on a new game and it's the first I'm doing in landscape mode. I've set up my project to use GDDISPMODE_ROTATE90CCW, everything's OK with the set, I think. Here's my problem...

When I do DrawText, the text is displayed rotate as well. What I mean is, the text is not displayed normally left-to-right, as I expect. Instead, it's like the screen is composited and THEN rotated, INCLUDING the text. I haven't blitted anything yet, but I assume the same would happen.

Is my expectation incorrect here, or am I doing something wrong? How can I get text (and presumably images) to display rightside-up when the display is rotated?

Thanks all!

Edit:

I was't sure this was clear, so let me try and clarify... Here's what I see now:

Image

And here's what I expect to see:

Image

In addition, here's my setup code:

Code:
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR pCmdLine, int nCmdShow) {

GDAPPCONFIG config;
ZeroMemory(&config;, sizeof(GDAPPCONFIG));
config.hInstance = hInst;
config.pAppTitle = TEXT("Project");
config.dwWindowIcon = ICO_ICON;
config.dwDisplayMode = GDDISPMODE_ROTATE90CCW;
config.bMinimizedActive = false;
config.dwTargetFPS = 24;
config.dwDisplayWidth = 320;
config.dwDisplayHeight = 240;
config.dwDisplayZoomWidth = 320 * 1;
config.dwDisplayZoomHeight = 240 * 1;
CApp* myGame = new CApp(config);
HRESULT hr = -1;
if (myGame) {
hr = myGame->Run();
delete myGame;
}
return hr;

}


Hope that makes more sense now.
InexorableTash · 27 Jul 2004, 05:44 UTC
Looks rotated 90 degrees to me. If you turn your monitor on its side, it should look as you expect. :)

Seriously, though, I think that it's behaving as designed. You are getting a 90 degree rotation on the desktop because you asked for it. Instead, make it conditional - if _WIN32_WCE then use rotation, otherwise don't use rotation but set the display width and height.

This is definitely a change from how the old GapiDraw 2 LANDSCAPE flags worked; it startled me too, but it makes sense.*

* "<some very complicated explanation> but it makes sense." is something I see in the usability lab as participants try to justify something that took them 60 minutes to figure out. It's painful to hear - I always want to scream "No it doesn't! If it made sense you wouldn't have wasted an hour of your life!!!!". Thank goodness for the one way glass.
Well, that would explain why everyone except ME has the conditional setup stuff anyway :) I'll add that in and it should be fine, your explanation makes sense. Thank you!