I am trying to add OS5 hi-res support to a project (in gcc/pilrc) that
already supports Sony hi-res.  When I run in the simulator, some (not all)
of my bitmaps are corrupted.  Sometimes there is random garbage introduced
to the bitmaps, sometimes the image is shifted to the right (and the right
edge wraps around to the left side).

The bitmaps are declared in pilrc as
BITMAPCOLOR ID MY_BMP_ID "foo.bmp" COMPRESS

When I open the bitmaps on a hi-res device in OS5, I do this:
bitmapHandle=DmGetResource('Tbmp', MY_BMP_ID);
tempPtr=MemHandleLock(bitmapHandle);
bitmapPtr=BmpCreateBitmapV3(tempPtr, kDensityDouble, BmpGetBits(tempPtr),
0);

I can use WinDrawBitmap to write tempPtr to the screen and it seems fine
(although twice as big as it should be); it's only with the double-density
version that I have problems.  Anyone seen this before or have any
suggestions?  Is there any other way to draw my 320x320 bitmap to the screen
without creating a V3 bitmap?  Am I right in thinking that older devices
(i.e. Sony Clie) can't read V3 bitmaps?

Thanks,
-Ben




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to