Mail Archives: djgpp/1997/05/16/19:32:24
From: | "Helix" <maciek AT compmore DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Thanks, HELP! mouse problems
|
Date: | 16 May 1997 21:00:07 GMT
|
Organization: | Computers & More Inc.
|
Lines: | 30
|
Message-ID: | <01bc6257$9ed88cc0$LocalHost@stachowiak>
|
NNTP-Posting-Host: | port17.compmore.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
First of all I would like to thank all the people who helped me out last
time on my tile based game question. I got a new hard drive and forgot to
copy all the letters from it, therefore I did not have the return address
and could not thank them.
I ended up creating a array of values, where each value represented a
terrain. Using this I could redraw only certain squares when the character
moved. (not the whole map)
Second, I've come across another snag. It concerns using the mouse routines
in Allegro.
if ((mouse_b & 1) & (mouse_x > fx) & (mouse_x < lx) & (mouse_y > fy) &
(mouse_y < ly))
CityBackPix();
This is a sample from my code, It basically says that if the mouse pointer
is within a certain range and the mouse button is pressed do the
CityBackPic function. The problem is that it only works if I also press
some button on the keyboard. Because I have other if statements in a
do-while loop I have to press one of them along with the mouse button to
complete the loop and execute the function. When I only want to be able to
press the button and have the function come up.
Again if anyone can help me, please e-mail me!
P.S. I'm using the Allegro game libraries, and djgpp as my compiler.
(Although it probably does not make a difference).
maciek AT compmore DOT net
- Raw text -