delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/26/05:14:51

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GRID and SNAP for Mouse
Date: Wed, 22 Jan 1997 23:41:57 GMT
Organization: Southwest Missouri State University
Lines: 19
Message-ID: <32e6a4a0.3746393@ursa.smsu.edu>
References: <Pine DOT LNX DOT 3 DOT 93 DOT 970120075559 DOT 8267A-100000 AT capslock DOT com>
NNTP-Posting-Host: forseti.i139.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Mon, 20 Jan 1997 12:58:23 GMT, root <root AT capslock DOT com> wrote:


>Blit your own mouse pointer onto the screen.  Read the mouse co-ords,
>multiply by 10, then blit your pointer.  You might want to lower the mouse
>sensitivity or threshold first so that the mouse doesn't wizz off the
>screen now though.

One way to do this that won't change the speed of your mouse is to:

1) Decide how many blocks you want horizontally and vertically.
2) Read the mouse coords, modulo the number from step one.
    This will give you the block number to use.  Do this for both the horizontal

    and vertical.
3) Multiply the block number by the pixel size of the block.  This will give you

    the pixel offset to display the block.  Do this for the horizontal and the
    vertical.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019