[cc65] Re: Mouse API

From: Jonathan Graham Harston <jgh1arcade.demon.co.uk>
Date: 2006-03-22 11:48:13
>Message-ID: <20060311113955.GB21214@trixie.musoftware.de>
 
Ullrich von Bassewitz <uz@musoftware.de> wrote:
> > Here is the code I thought would work for this .
> > unsigned int cursx = info.pos.x / 8;
> > unsigned int cursy = info.pos.y / 8;
> 
> Yes, that should work for the C64.
 
Do mouse coordinates start from the top-left like text
coordinates? I thought they started from the bottom-left, like
graphics coordinates. They do on all systems I've ever used. That
would mean you need something like:
 
cursy = maximum_text_y_coord - info.pos.y/8;
 
-- 
J.G.Harston - jgh@arcade.demon.co.uk - mdfs.net/User/JGH
Sheffield Boundary Review at http://mdfs.net/User/JGH/Docs/Politics/ParlReview
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Mar 22 13:00:26 2006

This archive was generated by hypermail 2.1.8 : 2006-03-22 13:00:29 CET