[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
Pete's QBASIC Site • Does
Page 1 of 1

Does

Posted: Sun May 17, 2009 10:48 am
by floogle11
Does any body have a way so you can use the mouse and make a gun follow it?

Posted: Sun May 17, 2009 11:30 am
by burger2227
I gather that you don't want to use the arrow? You want a gun instead?

Just use a standard Absolute mouse routine. The MouseDriver SUB passes variables AX, BX, CX, DX and EX. It may also have LB for left button and RB for right button. All are integers.

AX sets the mouse functions.
BX returns the button presses like RB and LB
CX returns or sets the column graphics coordinate
DX returns or sets the row graphics coordinate
EX = 1 initializes the mouse (use once at program start!)

AX: 0 = set/reset mouse; 1 = cursor on; 2 = cursor off; 3 = monitor moves and buttons; 4 = move mouse.
There are other functions to limit the mouse area and speed.

You can place a part of the gun image at a current mouse position without the cursor. If you PUT the image, you must stay within the screen maximums and minimums!

Posted: Sun Aug 09, 2009 4:21 pm
by coma8coma1
you might also mention that when you're going to be doing your own mouse cursor you have to be careful not to draw on the screen while the mouse cursor is ON or you risk graphical glitches at and around teh cursor.

whenever you draw, 1. first turn off the mouse cursor, 2. draw your background or whatever, and then 3. turn the mouse back on. failure to do this will screw up your graphics. it's as simple as putting the mouse off call at the beginning and mouse on call at the end of every graphics routine ;) -coma8coma1