Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Big Problem!!!! PLEASE HELP Date: Wed, 17 Feb 1999 12:52:35 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 35 Message-ID: <36CABB93.F129A77C@ndirect.co.uk> References: <36C69821.64DD0473@yahoo.com> <36C9B001.91B95293@vmlabs.com> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: th-usr01-55.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) With that syntax, the add should happen before the type casting, so that should be ok - unless PlayerAdd is already a u_long *. Herbs Scott Cartier wrote: > I'm not sure of my C order-of-operations, but you might need to change > it to "+1" instead of "+4". Since you're casting it to a u_long > pointer, adding 4 actually adds "4 * sizeof(u_long *)" which would be > 16 bytes. Since you only want to skip the first four bytes you'd need > to change it to a one. > > Again, I'm not sure if it will do the add before or after the type > casting. If it adds first then you're probably correct the way you > have it. > > Scott > > > I am trying to display a normal sprite in a game but it just locks up > > when the program runs. By putting some printf's in i found it locked up > > when it reached the following line of code: > > > > GsGetTimInfo ((u_long *)(PlayerAdd+4),&tim_data3); > > > > I have looked at this for hours and hours and found nothing wrong, i > > have declared everything and set it all up correct but still no luck. > > > > Please can somebody help me!! > > > > Thanx!!