Re: [cc65] Mouse API

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2006-03-11 12:39:55
Hi!

On Fri, Mar 10, 2006 at 12:53:11PM -0500, Daniel Covington wrote:
> I know that the mouse cursur screen coordinates are in a structure but Im
> not sure what the syntax is to access them believe me I've looked in a lot of
> places to find out but to no avail. I need those coordinates then I will
> divide by 8 for both x and y and get the cursur coordinates.

I'm not sure what exactly is your question (and it sounds as if it is more a
general C, than a cc65 question). You may want to have a look at the
mousedemo.c sample program. It shows how to load the driver, how to determine
a button press and how to access the mouse position.

> 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.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Mar 11 12:40:05 2006

This archive was generated by hypermail 2.1.8 : 2006-03-11 12:40:09 CET