Mail Archives: djgpp/2000/01/04/21:44:38
From: | hellbaron <hellknightNOheSPAM AT hotbot DOT com DOT invalid>
|
Subject: | How to optimize this mouse function..
|
Newsgroups: | comp.os.msdos.djgpp
|
Message-ID: | <210046ed.e1267171@usw-ex0101-007.remarq.com>
|
Lines: | 37
|
Bytes: | 1168
|
X-Originating-Host: | 132.248.237.8
|
Organization: | http://www.remarq.com: The World's Usenet/Discussions Start Here
|
X-Wren-Trace: | eMzpwcDZntSfhN3IxYfDzNnXyOnBx5jYxtSNzMrVld2QmMKfltSXkJOahpE=
|
Date: | Tue, 04 Jan 2000 16:51:24 -0800
|
NNTP-Posting-Host: | 10.0.2.7
|
X-Complaints-To: | wrenabuse AT remarq DOT com
|
X-Trace: | WReNphoon2 947033708 10.0.2.7 (Tue, 04 Jan 2000 16:55:08 PST)
|
NNTP-Posting-Date: | Tue, 04 Jan 2000 16:55:08 PST
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I've been working on a big graphix project all week, everything is
going ok, exept for this mouse function. The thing is, I would like to
save some valuable time when executing this function by eliminating the
delay(50), but I just cant seem to be able to substitute it with
anything else, I tried with a simple if, but it just doesnt work..
Please help me out!!, any feedback will be greatly apriciated, thanx in
advance to anyone who replies to this message, and here is the function:
void PlotMouse()
{
int x, y, px, py, ox, oy;
char back[16][16];
ReadMouse();
ox = MouseX;
oy = MouseY;
for (x=MouseX, px=0; x<MouseX+16; x++, px++)
for (y=MouseY, py=0; y<MouseY+16; y++, py++)
{
back[px][py] = getpixel(x,y);
if (cursor[(py*16)+px] != 0)
putpixel(x, y, (cursor[(py*16)+px]));
}
delay(50);
//ReadMouse();
//if ((ox != MouseX) || (oy != MouseY))
for (x=ox, px=0; x<ox+16; x++, px++)
for (y=oy, py=0; y<oy+16; y++, py++)
putpixel(x, y, back[px][py]);
}
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
- Raw text -