Path: chuka.playstation.co.uk!news From: Steve Parnell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Boundaries still don't work Date: Sun, 01 Nov 1998 12:33:42 +0000 Organization: Architectronics Lines: 23 Message-ID: <363C5526.A8093E1A@parny.force9.co.uk> References: <363BB11F.2BD02604@aol.com> Reply-To: steve@parny.force9.co.uk NNTP-Posting-Host: 442.hiper01.shef.dialup.force9.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (WinNT; I) Omar Metwally wrote: > > I tried to put boundaries to the screen, and it failed. Craig told me to > put: > > if (TestSprite.x > (320-17) > TestSprite.x=320-17; > if(TestSprite.y > (240-17)) > TestSprite.y = 240-17; > > Well, this worked, but only for the bottom and the right side of the > screen. What about the top and left side of the screen??? How about: if(TestSprite.x < 0) TestSprite.x = 0; if(TestSprite.y < 0) TestSprite.y = 0; -- Steev