> > I did not find a way to handle transparency correctly with this > > apprioach, so when I need transparency, I just do a WinDrawBitmap > > from a pre-locked bitmap from resources. > > Doing transparency works for me if I use the following sequence:
no.. no.. no.. ! this is the most horrible possible solution you could ever imagine if you are expecting to get any form of performance out of your game/application. if your just doing a transparent bitmap for a standard form - its fine. but, there is a reason why many games dont show the effect of what was originally mentioned on the Tungsten|W emulator. the *only* WinCopyRectangle() the games do is to the whole screen. the games manipulate the bitmap structure directly (direct access) and, use their own custom implementation of bitmap resources so that transparency can be easily coded into the environment. want to see an example? http://www.ardiri.com/palm/cube3D/ http://www.ardiri.com/palm/burning/ as for handling transparency - why not look up some classic game developer magazines - you'll learn about sprites and masks. using a transparency color means for every pixel thats copied it needs to be compared. if you use a mask + bitmap, you can do this in a simple and quick logical operation. pixel = (old & ~mask) | new; i'm not going to teach you the basics of how to do transparency thats a job for you to figure out on your own. :) if you *must* use the API's - then, why not use the winMask and winOverlay features of WinCopyRectangle()? i did this for some games that didn't need full processing power (remember the G+W games)? but, for anything recent - i wouldnt' touch the API's with a 10 foot pole. they are slow, horrid and, even buggy. -- Aaron Ardiri [EMAIL PROTECTED] http://www.mobilewizardry.com/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
