Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Need help with arrays Date: Wed, 19 Aug 1998 09:49:05 +0100 Organization: Sony Computer Entertainment Europe Lines: 26 Message-ID: <35DA9181.1C5AD2D8@scee.sony.co.uk> References: <6rcfhe$l2e4@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en When you say it doesn't work, do you mean it's crashing or you get strange results? Comments: 1) As everyone else has stated, use u_shorts instead of u_longs. 2) The following two lines are equivalent, but the second is easier to read (in my humble opinion): memcpy( scr+(counter*320), line+(rand()%320), 640 ); memcpy( scr[counter], &line[rand()%320], 640 ); 3) LoadImage should be: LoadImage( &screen, scr ); not: LoadImage( &screen, *scr ); Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe One thing that makes me believe in UFOs is, sometimes I lose stuff. - Jack Handy