PocketMatrix forums

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

Can PocketFrog in window (not full screen)?

Can PocketFrog in window (not full screen)?
If yes, What version? and How to?

Thank you..
Pong.
It is not currently possible to use PocketFrog in "windowed" mode.

I'm not sure it's even possible to do so properly with devices that provide a backbuffer.

In any case, I will investigate the matter for the next release, I think this might be useful to some people.
Thanks for your information.
Does your "windowed" mean full screen with menu bar and/or navigation bar?
I want to write some game that can do full screen with menu bar and/or navigation bar.
I see new GameDraw spec can do it.
But I personly like PocketFrog.
If PocketFrog can do this, it will great.

pong.
Yes, by windowed I mean using all the screen except the menu bar and the navigation bar.

I did a few tests and it seems possible. I will try to implement this next week along a few bug fixes.
Pong,

I guess what you want is direct access to the screenbuffer, which holds the current state of the Pocket PC "desktop".

It is possible in GapiDraw (GameDraw as you call it), since it allows direct access to the primary surface. I also guess it would be easy for Thierry to add it to PocketFrog. However, there are several caveats one has to be aware of:

(1) Not all devices support direct access to the primary surface. An example of this are the older Casio devices (E-125, EM-500) where access to the display has to be double buffered (at least if you follow the GAPI specification). You will never be able to run a "windowed" GAPI application on the E-125 for example (a PDA which is owned by _many_ people out there).
(2) InvalidateRects. If you want to update the display, using GAPI, on WM_PAINT for example, you have to consider the region Windows CE sends to your application. You then have to transform this region to Window coordinates (instead of client), and only paint inside this region. An example of this is a dialog box placed on top of your window which is then moved around. You should not paint over the dialog box.
(3) Threads. If you have a thread continously updating the display you will most probably experience issues if you run in windowed mode. An example of this is the start menu which is very easy to just "paint over".

I would suggest sticking to full screen mode and "switch" to windowed mode whenever the user wants to enter data through a dialog or similar. Hiding/showing the menu bar / title bar dynamically is a trivial task and has recently been covered in the forum:
http://forums.pocketmatrix.com/viewtopic.php?t=5542

/Johan
For Kzinti,
Thank you very much for your help.
If possible, please make it for PocketFrog ver 0.4.5 too.
Now,I not much fully understand new style (OOP/C++) in ver 0.5.

For sbl,
Thank you very much for your useful informations.
With GameDraw, do you mean it cannot do "windowed" in Casio EM500, E125?

Sorry for my bad english.
pong.
PocketFrog 0.5.0 does provide support to directly access the primary surface (DisplayDevice::GetFrontBuffer()). This will even work for the Casio E-125 and should work on the E-115 and EM-500. This was easy to implement as the framebuffer address for these devices is known. This means that if I add support for windowed mode in PocketFrog, it should work with Casio devices.

Now, although DisplayDevice::Update() has a "rect" param to specify the region to update, it is not currently used. Complete support should be in the next release. The situation is the same for Surface::Lock()/Unlock().

Pong: I won't continue supporting the old architecture (0.4.5b). The new one is not that much different then 0.4.5 though... Actually I feel it's much easier to understand and use. What is it that you have trouble with? Perhaps I can help clarify things?
I'm newbie in C++ style. Still not get OOP to good implementation, just follow sample source code. I'm familiar with old C style. I know OOP is good programming style. I will try to learn it more.
Normally, I learn it from sample source code. It will good if you can provide more PocketFrog implementation samples.
Thanks for your help.
pong.
I intend on providing samples soon. I simply wanted to have something out before everybody though PocketFrog was dead.

There is currently one framework sample available called "Blit". It doesn't do much but should be enough to get you started.