diff options
| author | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 11:54:32 +0000 |
|---|---|---|
| committer | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 11:54:32 +0000 |
| commit | dcf0153b0c4cee132a3ce21bab2b222ed3703bc5 (patch) | |
| tree | d542a47c303632dd99df43af72eee0335e9528d1 /Source/Support.cpp | |
| parent | 507a7479adb2cab5218bbb64950b739dcd79b6d5 (diff) | |
| download | blackshades-dcf0153b0c4cee132a3ce21bab2b222ed3703bc5.tar.gz | |
input -- only thing that should be missing is the rest of the keysyms
git-svn-id: svn://svn.icculus.org/blackshades/trunk@46 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/Support.cpp')
| -rw-r--r-- | Source/Support.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp index e07c86e..3ce608e 100644 --- a/Source/Support.cpp +++ b/Source/Support.cpp @@ -19,33 +19,35 @@ void Microseconds(UnsignedWide *microTickCount) void GetMouse(Point *p) { -STUB_FUNCTION; -} - -void GetKeys(unsigned long *keys) -{ -STUB_FUNCTION; + int x; + int y; + + SDL_GetMouseState(&x, &y); + + p->h = x; + p->v = y; } int Button(void) { -STUB_FUNCTION; - return 0; + return (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(1)); } void InitMouse() { -STUB_FUNCTION; +// STUB_FUNCTION; } void MoveMouse(int xcoord, int ycoord, Point *mouseloc) { -STUB_FUNCTION; + SDL_WarpMouse(xcoord, ycoord); + SDL_PumpEvents(); + GetMouse(mouseloc); } void DisposeMouse() { -STUB_FUNCTION; +// STUB_FUNCTION; } #ifndef O_BINARY |
