Xref: news2.mv.net comp.os.msdos.djgpp:3820 From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: mouse problem in allegro Date: Mon, 13 May 1996 19:56:24 +0100 Organization: The University of York, UK Lines: 29 Message-ID: NNTP-Posting-Host: tower.york.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: 004277a AT dragon DOT acadiau DOT ca In-Reply-To: <3196d340.0@131.162.2.91> DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 13 May 1996, Hafiz Awang Pon wrote: > I wrote the program below to learn how to use the mouse routine in allegro: [...] > the thing is that this program works under the dos box in windows but > not in msdos. the problem is that it's not displaying the correct x > and y coords. any ideas why this is happening? Two reasons. A bug in my code, and a bug in your code. My bug is to do with initialising the mouse while in text mode, which will be fixed in the next release of Allegro (probably later this week, as soon as I finish writing up the docs). Your bug is trying to use the mouse in text mode in the first place: I didn't expect people to do this, and probably make all sorts of assumptions that will screw things up. If you add: set_gfx_mode(GFX_VGA, 320, 200, 0, 0); after allegro_init() but before install_mouse(), the problem should go away. /* * Shawn Hargreaves. Why is 'phonetic' spelt with a ph? * Check out Allegro and FED on http://www.york.ac.uk/~slh100/ */