Mail Archives: djgpp/1998/11/15/16:00:23
Message-Id: | <199811152033.UAA07034@remus.clara.net>
|
From: | "Arthur" <arfa AT clara DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | RE: Coding problems from an extreme C newbie...
|
Date: | Sun, 15 Nov 1998 20:32:50 -0000
|
X-Priority: | 3 (Normal)
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2173.0
|
In-Reply-To: | <364ef136.878047@news.flash.net>
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
Importance: | Normal
|
Reply-To: | djgpp AT delorie DOT com
|
> Well, thanks for solving my problems so far, but here's another one.
> Is there any way to check if a certain spirite is in a certain
> location? I.e.: If blue.pcx is at 0,0 ,do this, or if red.pcx is at
> 20,20, do this.
I'm not sure what you mean:
/* Code Begins */
BITMAP *red, *blue;
int x1, y1, x2, y2;
/* Load bitmaps here */
/* Set x1, y1, x2, y2 */
draw_sprite(screen, red, x1, y1);
draw_sprite(screen, blue, x1, y1);
if((x1 == 0) && (y1 == 0)) /* Red sprite at (0,0) - do stuff */
if((x2 == 20)&& (y2 == 20))/* Blue sprite at (20,20) - do stuff */
/* Code Ends */
Is this what you mean?
James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819
- Raw text -