Hi all, This is my first post appologies if I'm on the wrong forum or anything else.
I'm writing a Palm OS game (right forum so far I take it?). In this game I want to draw several elipse segments on the screen. I can't find any functions in PalmOS itself to draw these and so I assume that I need to access the screen directly and write my own elipse segment routines (based on bresenham). I have already double buffered my app using WinCreateOffscreenWindow to create the buffer. So the problem is really how to access the bits of the buffer. In OS 3.5 and above I can use WinGetBitmap and BmpGetBits to access the buffer memory. However, this does not work pre 3.5. Jason Goldmans' example (here http://jasongoldman.com/palm/programming/subroutines-screenpoke.html) says to get this pointer from the displayAddrV20 member of the WinHandle. This causes the following error in Code Warrior: Error : illegal use of incomplete struct/union/class 'struct WindowType' GamePage.cpp line 193 bufferPtr = (u1*)fScreenBuffer->displayAddrV20; This seems to be because the WinHandle struct is opaque in the headers for the Palm OS 4.0 SDK. Looking in the OS 4.0 readme and other docs it seems that this is deliberate to force people to move to using the access functions (in this case WinGetBitmap and BmpGetBits). Now, looking at the WinHandle typedef I find that defining ALLOW_ACCESS_TO_INTERNALS_OF_WINDOWS will make the struct non-opaque again. So, I define this at the top of my cpp file and still get the same error. Looking at the headers some more I find that in the file BuildDefaults.h ALLOW_ACCESS_TO_INTERNALS_OF_WINDOWS and a number of similar defines are defined if DO_NOT_ALLOW_ACCESS_TO_INTERNALS_OF_STRUCTS is not defined (double negative?). Re-reading the OS 4.0 docs it says that I should #define DO_NOT_ALLOW_ACCESS_TO_INTERNALS_OF_STRUCTS to turn on the checks. I haven't defined this anywhere. I have specifically defined one of the ALLOW_ACCESS_TO_INTERNALS_OF_WINDOWS and undefined DO_NOT_ALLOW_ACCESS_TO_INTERNALS_OF_STRUCTS. I have even removed the line: #ifndef DO_NOT_ALLOW_ACCESS_TO_INTERNALS_OF_STRUCTS (and the #endif) in BuildDefaults.h (and included BuildDefaults.h at the top of my .cpp) yet I still see this error. What am I doing wrong? How can I get at the screen buffer? This is the first time that I've used Code Warrior, is there some cleaning step that I have to perform to re-compile the header? Thanks in advance, Idries <<...>> -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
