1. get_mouse() in mode 19

hi.  I need to get the mouse coordinates in 320x200x256 color mode.  I do
a x1=get_mouse() and check to see if x1 is a sequence then get x1[2] and
x1[3] for the x and y coordinates.  How come my x coordinates are twice
what they should be? (i.e. at 100,50 x1[2]=200) the y is correct and
ranges from 0-200, but x ranges from 0 to 640 by 2's.

Do I have a kludged mouse.e or is it supposed to work like that and not
mentioned in the manual? (I'm using 1.5 and I too think the FUPHORIA is a
STOOPID and malevolent thing to do to us when we try to play with an alpha
(or any) release. GR!)

Michael Packard
Lord Generic Productions
(writing another game)

new topic     » topic index » view message » categorize

2. Re: get_mouse() in mode 19

Michael Packard wrote:
>
> hi.  I need to get the mouse coordinates in 320x200x256 color mode.  I do
> a x1=get_mouse() and check to see if x1 is a sequence then get x1[2] and
> x1[3] for the x and y coordinates.  How come my x coordinates are twice
> what they should be? (i.e. at 100,50 x1[2]=200) the y is correct and
> ranges from 0-200, but x ranges from 0 to 640 by 2's.
>
> Do I have a kludged mouse.e or is it supposed to work like that and not
> mentioned in the manual? (I'm using 1.5 and I too think the FUPHORIA is a
> STOOPID and malevolent thing to do to us when we try to play with an alpha
> (or any) release. GR!)
>
> Michael Packard
> Lord Generic Productions
> (writing another game)

You just need to divide the x position by 2, nothing wrong with your
mouse... Unless we both have something wrong with our mouses ;)

--Mark

new topic     » goto parent     » topic index » view message » categorize

3. Re: get_mouse() in mode 19

On Thu, 11 Dec 1997, Tuxedo Mask wrote:

> Michael Packard wrote:
> >
> > hi.  I need to get the mouse coordinates in 320x200x256 color mode.  I do
> > a x1=get_mouse() and check to see if x1 is a sequence then get x1[2] and
> > x1[3] for the x and y coordinates.  How come my x coordinates are twice
> > what they should be? (i.e. at 100,50 x1[2]=200) the y is correct and
> > ranges from 0-200, but x ranges from 0 to 640 by 2's.
> >
> > Do I have a kludged mouse.e or is it supposed to work like that and not
> > mentioned in the manual? (I'm using 1.5 and I too think the FUPHORIA is a
> > STOOPID and malevolent thing to do to us when we try to play with an alpha
> > (or any) release. GR!)
> >
> > Michael Packard
> > Lord Generic Productions
> > (writing another game)
>
> You just need to divide the x position by 2, nothing wrong with your
> mouse... Unless we both have something wrong with our mouses ;)

I KNOW I need to divide it by two.  I'm asking is it supposed to work like
this? If so, WHY?!? Why would the y be reported correctly and x be
doubled?  And if it's supposed to be like this why isn't it mentioned in
the manual?  Or has the manual been updated and my printed copy is out of
date? (a real possibility as I printed it the day I downloaded the
shareware version of 1.4 well over a year ago, in the dark ages, 5months
BOZ (Before OidZone))

If anyone is interested, I'm writing a loderunner clone, or rather a level
editor for the loderunner clone I'm going to write tomorrow.  If anyone is
familiar with the classic game and wants to design some levels, let me
know.  The levels will be in ascii format so people can email and trade
them.

new topic     » goto parent     » topic index » view message » categorize

4. Re: get_mouse() in mode 19

Michael Packard wrote:
>
> I KNOW I need to divide it by two.  I'm asking is it supposed to work like
> this? If so, WHY?!? Why would the y be reported correctly and x be
> doubled?  And if it's supposed to be like this why isn't it mentioned in
> the manual?  Or has the manual been updated and my printed copy is out of
> date? (a real possibility as I printed it the day I downloaded the
> shareware version of 1.4 well over a year ago, in the dark ages, 5months
> BOZ (Before OidZone))

There is still no mention of the probem in the 2.0 library reference,
but I don't think the problem is Euphoria.  I think the problem is with
the actual mouse driver.  I've had to divide the mousex value by two
when using other languages, such as Pascal.  So if we need someone to
blame, it's not Euphoria, but rather whoever wrote the first mouse
driver for mode 19, probably MS.  It seems they were too lazy to divide
the x value by two themselves for some strange reason.  It is possible
to set the limits of the box the mouse rolls around in, but setting
maximum x to 320 limits the mouse to the left half of the screen.

> If anyone is interested, I'm writing a loderunner clone, or rather a level
> editor for the loderunner clone I'm going to write tomorrow.  If anyone is
> familiar with the classic game and wants to design some levels, let me
> know.  The levels will be in ascii format so people can email and trade
> them.

I'm interested.  I found a nice shareware loderunner clone a few months
ago called SCAV, but it only had four levels.  I was also thinking about
writing my own loderunner clone in Javascript and using it to spice up
my webpage.  I never got around to starting the graphics though.

Warning!  Shameless plug ahead:

I've updated my mode X graphics library.  It now supports planar virtual
screens, command lists with the usual copy commands, and also has fancy
palette operations.  I'm really proud of my implementation of command
lists totally in machine code.  Also the pixel() and get_pixel commands
work on virtual screens too.  I missed Robert's contributions page
update last night, so if you can't wait, get it at
http://www.harborside.com/home/x/xseal/euphoria/modex.zip (21k)
Please check it out and let me know what you think.

Thanks!
--
                   _____         _____        _____
    ________      /\    \       /\    \      /\    \
   /   \    \    /  \____\     /  \____\    /  \____\
  /  _  \____\  /   / ___/_   /   /____/   /   / ___/_
 /  / \  |___| /   / /\____\ /    \    \  /   / /\____\
 \  \_/ /    / \   \/ / ___/_\     \    \ \   \/ / ___/_
  \    /____/   \    / /\    \\/\   \    \ \    / /\    \
   \   \    \    \   \/  \____\  \   \    \ \   \/  \____\
    \   \    \    \      /    /   \   \____\ \      /    /
     \   \____\    \    /    /     \  /    /  \    /    /
      \  /    /     \  /    /       \/____/    \  /    /
       \/____/       \/____/xseal at harborside.com\/____/

new topic     » goto parent     » topic index » view message » categorize

5. Re: get_mouse() in mode 19

Michael Packard writes:
> I KNOW I need to divide it by two.  I'm asking is it supposed to work
> like this? If so, WHY?!? Why would the y be reported correctly and x
> be doubled?  And if it's supposed to be like this why isn't it
> mentioned in the manual?

It wasn't supposed to work this way. Something strange
is happening in DOS or the mouse driver. The two
machines that I tried it on both double the x value
in all graphics modes that have 320 pixels left to right,
and work ok in all other VGA or lower modes, even the
ones with 350 pixels across.

I'm going to update the docs on get_mouse()
to warn people that in graphics modes that are 320 pixels
wide, the value reported will be double
what it should be. i.e. divide the x value by 2 and you should
be ok. I don't know why this happens. Does anyone
know of a machine where this *doesn't* happen?

I could do the divide by two in the interpreter, but I might
break some existing code, and I'm still not 100% sure that
it would be the correct thing to do on all machines.

There's also a problem with the mouse in
SVGA modes. People should use one of
the solutions provided by Jiri or Peter Blue
(and one or two others) for SVGA.

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

6. Re: get_mouse() in mode 19

On Fri, 12 Dec 1997, Robert Craig wrote:
> It wasn't supposed to work this way. Something strange
> is happening in DOS or the mouse driver. The two
> machines that I tried it on both double the x value
> in all graphics modes that have 320 pixels left to right,
> and work ok in all other VGA or lower modes, even the
> ones with 350 pixels across.

It does it on all 3 machines I have here.

> I'm going to update the docs on get_mouse()
> to warn people that in graphics modes that are 320 pixels
> wide, the value reported will be double
> what it should be. i.e. divide the x value by 2 and you should
> be ok. I don't know why this happens. Does anyone
> know of a machine where this *doesn't* happen?

pretty weird.  Seems odd that I haven't seen anything posted about this
glaring strangness before now. I'm sure everybody knew this before but me,
divided by 2 and went on without bothering to mention it.  I have no
life, and I like to ask "what the heck?" questions...

> I could do the divide by two in the interpreter, but I might > break
> some existing code, and I'm still not 100% sure that
> it would be the correct thing to do on all machines.

as soon as you did 5000 people would complain about it not working I'm
sure. =)  Documenting the weirdness and blaming it on Bill is reasonable
and sufficient. =)

Thanx
Michael
Loderunner taught me how to swear!  Anyone else?

new topic     » goto parent     » topic index » view message » categorize

7. get_mouse() in mode 19

Michael Packard wrote:

> (I'm using 1.5 and I too think the FUPHORIA is a STOOPID and
>malevolent thing to do to us when we try to play with an alpha
>(or any) release. GR!) =


I also have a GUPHORIA, HUPHORIA, and even an IUPHORIA!

Ad

new topic     » goto parent     » topic index » view message » categorize

8. Re: get_mouse() in mode 19

At 10:54  11/12/97 -0800, you wrote:

>pretty weird.  Seems odd that I haven't seen anything posted about this
>glaring strangness before now. I'm sure everybody knew this before but me,
>divided by 2 and went on without bothering to mention it.  I have no
>life, and I like to ask "what the heck?" questions...

Though this is pointless, this was actually my first question when I joined
the list a year ago. However, no one payed attention to the newbie...  :(


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The Reaper  (J. Lays)   http://www.angelfire.com/nj/reaperlair
reaper at auracom.com      Check out my Euphoria Games page at:
            -= http://www.geocities.com/TimesSquare/Alley/4444/eugames.html
      ........................
     . .. -||..........__......  "Life can be as dark
      . /  ||......../-- \\.::::  As midnight itself.
   . ..|   ||...... /    | |.:::  But even this can not hide
     .|  _-||.......||   / /.:::: Death's pain that is felt."
    ..| |..||...... -\_- \ |\-.:::
     .| |.[< \ .../            \.::
      .||.|||\|\ |  -      - .  \.::::
     ...|.\|| |  \  |        |   |.:::.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu