CompuServe Thread

Forum unknown · Programming

#AreaFill

7 messages in this thread
#35152From: john samuelsOct 3, 1986 11:44 PM
Help! Help! I'm trying to use the AreaMove, AreaDraw, AreaFill stuff as described in the ROM KERNAL MANUAL using Aztec C with 512K. Everything goes well 'til I close my window. The RKM says to FreeRaster so I have this as the first line of my clean-up routine: FreeRaster(myplane,320L,200L); (where previously I have: PLANEPTR myplane; myplane = AllocRaster(320L,200L); When the Amiga hits that line (FreeRaster) the GURU comes a' callin'. (at least I think that's the culprit). Can anyone please help me out of my stupidity attack here??? Thanks in advance… John
#35158From: Ray LarsonOct 4, 1986 12:28 AM
John; Try freeing the plane before you close the window. I can't be sure without seeing the actual code, but if the plane is a tmpras attached to the window, you may be losing the pointer to it when you close the window. Ray
#35214From: john samuelsOct 4, 1986 8:35 AM
Ray, Thanks for your response… I am trying to FreeRaster() before I close ANYTHING else down. It's the last thing I'm "opening" and so it's the first thing I try to close. Any other suggestions??? John
#35272From: Ray LarsonOct 4, 1986 9:48 PM
O.K., I've found that sometimes adding a little extra space in the AllocRaster call, and in the FreeRaster call works. I've used AllocRaster(width+24L,height+24L); and FreeRaster(PTR,width+24L,height+24L); I'm not really sure WHY, but this worked for me. I suspect it provides some padding. I borrowed the idea from some of -=RJM=-'s code.
#35272From: Ray LarsonOct 4, 1986 9:48 PM
O.K., I've found that sometimes adding a little extra space in the AllocRaster call, and in the FreeRaster call works. I've used AllocRaster(width+24L,height+24L); and FreeRaster(PTR,width+24L,height+24L); I'm not really sure WHY, but this worked for me. I suspect it provides some padding. I borrowed the idea from some of -=RJM=-'s code.
#35214From: john samuelsOct 4, 1986 8:35 AM
Ray, Thanks for your response… I am trying to FreeRaster() before I close ANYTHING else down. It's the last thing I'm "opening" and so it's the first thing I try to close. Any other suggestions??? John
#35158From: Ray LarsonOct 4, 1986 12:28 AM
John; Try freeing the plane before you close the window. I can't be sure without seeing the actual code, but if the plane is a tmpras attached to the window, you may be losing the pointer to it when you close the window. Ray