PocketMatrix forums

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

Smartphone GD questions

Birdiestyle · 11 Aug 2004, 01:21 UTC
Ok, Im getting close on my Smartphone port, but have run into a few things:

1. I just converted the project from GD2.05 to 3.01 and now I dont seem to be hitting the KeyDown() function. I can hold Home down and it will eventually
register and exit my program and then when I come back in, it works that whole instance of the program, but if I exit again and bring it up, its back to no keys? Any ideas??

2. On both 2.05 and 3.01 I have code that once I blit an image to the screen it makes a dancing shadow type effect over part of the screen(it has jagged edges almost like a stereo spectrum analyzer). It seems to also do some kind of opacity on some colors as well. My simplest example I am doing to create this is I create a surface from a PNG and then set the
ColorKey for Transparency in CreateSysMemSurfaces.

Then I call:
Code:
pBackBuffer -> FillRect(NULL,RGB(255,255,255),0,NULL);
pBackBufer ->BltFast(39,38,&m;_gsTable,NULL,GDBLTFAST_KEYSRC,NULL);


It appears to work fine if I use a different background color, some work some don't?

Any ideas??


Thanks !!!!

Birdie

Oh, Im testing on an MPX-200.
Birdiestyle · 11 Aug 2004, 22:21 UTC
Ok, the key input part was my fault. I have CGapiApplication::Run() overridden and didnt realize that the GapiInput is handled differently now....

But Im still stumped on the bad drawing?

Oh, and I used to start drawing at negative coordinates, and it would draw the image off of the screen on Pocket PC, but now that I converted to 3.0 it doesnt draw the image at all. Is there a way to change that or do I have to do the clipping by hand?


Thanks....

B
If you want clipping you have to enable clipping on a specific surface. Use CGapiSurface::SetClipper(NULL) to set a clipper on the entire surface. GapiDraw 2.01 did not have a built-in clipper.

As for the "spectrum-analyzer" blit it sounds kind of weird. Do you mean that it alters behaviour between frames?
Birdiestyle · 12 Aug 2004, 13:26 UTC
Yes, each time a swap happens it changes(I'd guess), thus giving it that effect.. It seems to be a light haze over the images that is based off of the background color... but if I do a fill of say
the color of like RGB(0,92,98) it seems to work fine for the same images, no spectrum type shadows and the images that have been blitted down seem to be discolored at all...Though then I can blt another image over top on that color and get the same thing...

I'll keep looking, probably something like I did for the input.... or I have a bum smartphone, since it must have never come up before....??

Thanks

B
Birdie, can you post some screenshots of the problem? I'm porting one of our games over to the Smartphone and haven't encountered any problems at all.
Birdiestyle · 12 Aug 2004, 15:04 UTC
Interesting... Once I use Zoomin to take the screenshot, the screenshot is exactly what it's
supposed to look like, yet the spectrum fog is still
on the Smartphone.. Hmmmm.... Maybe I do just have a wacky phone???


Thanks Johan, clipping worked flawlessly.. Silly me
thinking that just the stuff in the readme.txt was all
I'd have to change.
You might use the built in screenshot capability of GapiDraw to take the screenie. Then you can be sure of grabbing exactly whats on the screen.
Birdiestyle · 12 Aug 2004, 18:08 UTC
Hmmmm... The bitmap GD creates, if you view it on the phone, does the same thing, but if you then copy it to the desktop it looks normal.. So must be the phone,
there isn't palette/color limitations is there?