Mail Archives: djgpp/1999/05/24/01:37:25
I have been making a funky graphics engine which requires the use of
recursive calls. I may be a little rusty from my old comp sci classes, and
am getting some odd errors. The basic deal is this: I send DrawSector a
pointer to the sector to draw, and it draws until it finds a wall that
points to a new sector. It then calls itself passing the pointer to the
new sector. One sector works quite well, and when I link two together, it
still works. So then I rotate the sectors a bit and all of a sudden, the
first recursive call handles a few of the elements of the sector properly
and suddenly goes into fits trying to access random memory. Needless to
say this crashes... I have a feeling it is the cause of a stack overflow
of some sort, but I am not sure. If you have any ideas on how to correct
this they would be greatly appreciated, if not, do you know of a compiler
switch to increase the stack size for functions from within DJGPP,
specifically RHIDE? Any help any of you could offer would be greatly
appreciated.
-Mike
Taylor
- Raw text -