File: SetMouseMac.cpp

package info (click to toggle)
between 6%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,532 kB
  • sloc: cpp: 28,110; php: 718; ansic: 638; objc: 245; sh: 236; makefile: 97; perl: 67
file content (40 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Jason Rohrer
// SetMouseMac.cpp

/**
*
*	implementation of SetMouse on Mac
*	This uses a hack that may not be supported in later OSs (e.g., OSX)
*
*	Created 1-14-2000
*	Mods:
*/



#include <MacTypes.h>
#include "SetMouse.h"

void SetMouse (int x, int y) {
	Point base;
	// This routine donated to MacMAME by John Stiles
	// Picked up for RadiosGL from the Mac GLQuake site
    Point *RawMouse   = (Point*) 0x82C;
    Point *MTemp      = (Point*) 0x828;
    Ptr    CrsrNew    = (Ptr)    0x8CE;
    Ptr    CrsrCouple = (Ptr)    0x8CF;
    
	base.v = y;
	base.h = x;
	LocalToGlobal(&base);
	
    *RawMouse = base;
    *MTemp    = base;
    *CrsrNew  = *CrsrCouple;
	}
	
// do nothing, these are needed in windows only	
void CaptureMouse() {
	}
void ReleaseMouse() {
	}