Path: chuka.playstation.co.uk!scea!wal From: wal@blarg.net (wayne a. lee) Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: Source Date: Tue, 22 Jul 1997 01:54:43 -0700 Organization: SCEA Net Yaroze News Lines: 33 Message-ID: References: <33D43C27.40C1@earthlink.net> NNTP-Posting-Host: ppp026-sf5.sirius.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Yet Another NewsWatcher 2.4.0 I admit I haven't actually tried running this source code, but I did notice that there's no space allocated for the GsGLINE structure. You have: > GsGLINE *sp; //Line drawing function,the sp bites! which just declares sp as a pointer to a GsGLINE structure, but it's not intialized to point to anything. Instead of using a pointer, try writing this: GsGLINE sp; // sp is not a pointer now but an actual GsGLINE struct and replace sp->attribute = 0; sp->x0 = rand()%640; sp->y0 = rand()%480; // etc... with this sp.attribute = 0; sp.x0 = rand()%640; sp.y0 = rand()%480; // etc... Finally, change GsSortGLine(sp,&WorldOT[TheBuff],0); to GsSortGLine(&sp,&WorldOT[TheBuff],0); -- wayne a. lee