1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-17 15:06:29 +00:00
C02/include/x16/mouse.h02

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-03-29 18:56:57 +00:00
/* Mouse Control Functions *
* for Commander X16 Computer */
/* Mouse Mode constants for mcnfg() */
#define MHIDE $00 //Hide Mouse
#define MSHOW $01 //Show Mouse - Default Cursor
#define MCSTM $FF //Show Mouse - Custom Cursor
/* Mouse Button bitmasks for mouseb *
* 0 means button not supported */
#define MBLEFT $01 //Left Mouse Button
#define MBMIDL $03 //Middle Mouse Button
#define MBRGHT $02 //Right Mouse Button
/* Mouse Scale Factor constants for mcnfgs() */
#define MSNONE $00 //Do Not Change Resolution
#define MSLOW $01 //Low Resolution (320x240)
#define MSHIGH $02 //High Resolution (640x480)
/* Mouse Status Variables *
* Set by mread() */
int mousex; //Mouse X Position
int mousey; //Mouse Y Position
char mouseb; //Mouse Button Status
/* Configure Mouse *
* Args: char mode - Mouse Mode *
* #MHIDE - Hide Mouse *
* #MSHOW - Show Mouse *
* #MCSTM - Show (Custom) *
* Returns: $00 - Success *
* $FF - Mouse Not Present */
char mcnfg();
/* Configure Mouse and Select Scale *
* Args: char mode - Mouse Mode *
* #MHIDE - Hide Mouse *
* #MSHOW - Show Mouse *
* #MCSTM - Show (Custom) *
* char scale - Scale Factor *
* #MSNONE - No Change *
* #MSLOW - 320x200 *
* #MSHIGH - 640x480 *
* Returns: $00 - Success *
* $FF - Mouse Not Present */
char mcnfgs();
/* Read Mouse *
* Sets: mousex, mousey, mouseb *
* Returns: $00 - Success *
* $FF - Mouse Not Present */
char mread();
/* Scan Mouse *
* Retrieves mouse state for mread() *
* Does not need to be called unless *
* the entire default interrupt *
* routine is replaced. */
char mscan();