PocketMatrix forums

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

The ripple effect sample for PocketFrog 0.7.0 avaliable

Many thanks, I have downloaded & will study at the weekend.
Woo-Hoo! Someone used the file exchange!

Sniffle. My little boy has grown up :)

Thanks for the sample, I too will check it out this weekend in detail. Any objection with me adding it as a sample for the next PF revision (whenever that is)?
Hey Conan, does that mean there's THREE of us still looking at PF now?!? ;)
Sure, it is my pleasure to contribute to the PocketFrog.
During my working, I found 2 bugs in the PF0.6.0. I will check the PF0.7.0. If the bugs exist in new version, I will inform you.

My device is HP525, with sh3,133cpu and 256 colors LCD.
In the HP525, when you switch to other window and come back, the game crash. The reason is the Suspend & Resume of GAPI is not properly called.
After I fixed this bug, I can switch to the game. But the color looks ugly. I fixed this by call the display->SetupPalette() again in the setfocus() function.
I guess that there are many more silently reading away based on Invincible's evidence where a complete PF based game just turned up without any prior notice.

At the moment I still see PF as the best of the game toolkits though I'm happy to believe that GapiDraw is better supported & faster. PF still seems to have more features & given the fact that I went to the trouble of getting a 3D engine working in PF it will take a lot to move me.

I also think that PF is better for a complete beginner who just wants to do games & not be a total C++ guru
Yes, please send me those details. I know I didn't fix them (wasn't even aware of them), and 0.6.0 as I recall was the last revision before I took over, so it's almost certainly still there. If you can send me a private message (or eMail, I don't mind) giving me the details I'll definitely get that done and released, that sounds relatively important.

Conan, I agree with you mostly. I don't think I'd say PF is the best library, I think for a number of reasons GapiDraw has that title now, but I'm not keen on leaving PF either. The two things I outlined in a previous post (image loader and DirectX) are the two strikes I think PF has against it, otherwise I still love it to death. If those two issues were resolved (well, only the image loader is an issue per se) you would have to tear me kicking and screaming from PF too.

I think I'm going to look at libpng as time allows though, sbl offered to lend a hand (he's probably going to end up regretting that :) ) so maybe that'll work out too.

I ran into some very annoying problems working with GD last night (not problems with the library, just my unfamiliarity with it) and it's those kinds of time-killers that I don't encounter with PF because I'm comfortable with it.

Argh, I hate difficult decisions.
First, you can reproduce the crash bug like this: (suppose you are using the blit sample in PF0.7.0)

* Add this line into your StylusUp() function, it brings up a new window:
Code:
CreateProcess(TEXT("peghelp.exe"), TEXT("file:piehelp.htm"), NULL, NULL, FALSE, 0, NULL, NULL, NULL, NULL);

Please make sure that the piehelp.htm exists in your windows folder. Otherwise you can use other htm file here.

* Run the demo on ppc, tap on it, the new window pops up. Close the window, then the game crashes... I remember that an old post mentioned this bug but without any fix.
It is because the GXResume() is not called after SetFocus(). You can know that by outputing some log information. The m_suspendCount in GAPILibrary is 4 when the GAPILibrary::Resume() is called, which prevent executing the GXResume().



My modification is quite simple, just like some hack:(

* I removed the PocketPC::Suspend(), PocketPC::Resume() from the Game::OnActivate() function

* I modified Game::OnSetFocus() and Game::OnKillFocus() like this:
Code:
LRESULT Game::OnSetFocus( UINT msg, WPARAM wparam, LPARAM lparam, BOOL& bHandled )
{
PocketPC::Resume();
DisplayDevice *p = m_display.get();
if( p )
p->SetupPalette();//restore the palette
return OnActivate( WM_ACTIVATE, WA_ACTIVE, 0, bHandled );
}

LRESULT Game::OnKillFocus( UINT msg, WPARAM wparam, LPARAM lparam, BOOL& bHandled )
{
PocketPC::Suspend();
return OnActivate( WM_ACTIVATE, WA_INACTIVE, 0, bHandled );
}

* I modified the display.h, change the SetupPallete() to be a public function

* I modified the display.cpp add 2 lines

Code:
bool DisplayDevice::SetupPalette()
{
if(m_driver->GetPixelDepth() != 8 )//Added by Invincible
return false;
...
...


You can also find this quick and dirty fix here:
http://www.omnytex.com/pf/fileexchange/ ... d=fus&fky=
fzammetti wrote:
Hey Conan, does that mean there's THREE of us still looking at PF now?!? ;)

Hey Frank,

I'm still around, and I'm using PF for my next game too, though I just moved last week and haven't had much time lately to work on it.

Anyway, as I get caught up on all these posts, it seems you guys have done a phenominal job with PF and I can't wait to give it a try.

Keep up the great work!

-John
Invincible,

Thanks for the code!! That solved my crashing issue when my game lost focus. Saves me from tracking it down. I'm glad I checked here first.

Hayden
Thanks for all that feedback guys. Will make sure the problem is not there in 0.8.

Concerning the palettized device, the 525, I am glad that someone finally tested it =) I will consider putting this code in PHAL now. =)
thanks invincible for the bug report/fix. i expecienced the same bug whenever the battery low popup message appears (ie. the app loses its focus)

fileexchange is free for all? i can i upload some stuff too? :)