On Thu, 8 Apr 1999, Virtual Overload wrote:
> So you know, I've gotten Double-buffering to work fine with gcc,
> though I don't have much time to give you source or debug your own
> (haven't coded in months now, waaay too busy). Look into the source
> code for Reptoids, if you can't find it, talk to [EMAIL PROTECTED] I
> believe, he has it.
i have the source code to reptoids, however this program only
uses double buffering and bitmaps.
i am using double buffering and trying to draw lines on the
offscreen buffer.
but this does not explain why i get memory errors when i use
exactly the same code to allocate and free the offscreen
buffer.
my suspicion is that the system traps (OS callbacks) for the
PalmIII are out sync somehow - and the sysTraps being
called are not the ones that are supposed to work.
either this - or there are bugs in the PalmIII ROMS.
i wrote a simple C program that outputted the following
constants (enumerated types). (under gcc-linux (0.5.0)).
sysTrapWinGetDrawWindow = 0xa1fe
sysTrapWinSetDrawWindow = 0xa1fd
sysTrapWinCreateOffscreenWindow = 0xa1f7
sysTrapWinInitializeWindow = 0xa1f9
sysTrapWinRemoveWindow = 0xa1fb
sysTrapWinDeleteWindow = 0xa1f8
sysTrapWinGetPattern = 0xa223
sysTrapWinSetPattern = 0xa224
sysTrapWinFillRectangle = 0xa229
sysTrapWinDrawLine = 0xa213
sysTrapWinFillRectangle = 0xa229
sysTrapWinCopyRectangle = 0xa209
can someone check these values?
my suspicion is that gcc maps the incorrect system traps
for each function. if this is the case, when i call
WinSetDrawWindow()
it may actually call
WinGetDrawWindow() - or another system trap that is
defined next to it.
can someone check this out under codewarrior? if this is
all it is, it will be a VERY simple fix.. :)) - then
i just have to modify the header files (enumerated type)
another problem?
my assumption is that the line drawing routines do not
draw directly to the screen buffer. i am assuming that
they draw to the current window (which is set using
WinSetDrawWindow) - has anyone tested this under anything
but gcc? - were they tested when the PalmOS was released?
here is the source code:
--
#include <SysTraps.h>
void
main()
{
printf("sysTrapWinGetDrawWindow = 0x%x\n",
sysTrapWinGetDrawWindow);
printf("sysTrapWinSetDrawWindow = 0x%x\n",
sysTrapWinSetDrawWindow);
printf("sysTrapWinCreateOffscreenWindow = 0x%x\n",
sysTrapWinCreateOffscreenWindow);
printf("sysTrapWinInitializeWindow = 0x%x\n",
sysTrapWinInitializeWindow);
printf("sysTrapWinRemoveWindow = 0x%x\n",
sysTrapWinRemoveWindow);
printf("sysTrapWinDeleteWindow = 0x%x\n",
sysTrapWinDeleteWindow);
printf("sysTrapWinGetPattern = 0x%x\n",
sysTrapWinGetPattern);
printf("sysTrapWinSetPattern = 0x%x\n",
sysTrapWinSetPattern);
printf("sysTrapWinFillRectangle = 0x%x\n",
sysTrapWinFillRectangle);
printf("sysTrapWinDrawLine = 0x%x\n",
sysTrapWinDrawLine);
printf("sysTrapWinFillRectangle = 0x%x\n",
sysTrapWinFillRectangle);
printf("sysTrapWinCopyRectangle = 0x%x\n",
sysTrapWinCopyRectangle);
}
--
az.
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11