Mail Archives: djgpp/1999/05/19/16:35:26
El día Wed, 19 May 1999 00:31:36 -0500, "Roy Taylor"
<rtaylor AT nextsteps DOT com> escribió:
>I have run into a tricky problem while writing a polygon draw function. It
>seems to work fine in real mode under my MS compiler (but that won't cut it
That just shows how bad MS is :-)
[...]
> for(i=0;i<=200;i++)
> {
> ScreenClip.Start[i]=0;ScreenClip.End[i]=320;
> }
You are overrunning the array, which only has 200 positions. You are
writing from 0 to 200, that is, 201 values; the six Point objects are
declared just below the HLineList, so when you do this you overwrite
the points, thus getting incorrect values.
BTW: the values you get are the same each time you run this program,
povided you don't change any compiler options.
Regards,
GUILLE
----
Guillermo Rodriguez Garcia
XXguille AT XXiies DOT XXes (ya sabes :-)
- Raw text -