From dcf0153b0c4cee132a3ce21bab2b222ed3703bc5 Mon Sep 17 00:00:00 2001 From: relnev Date: Wed, 8 Jan 2003 11:54:32 +0000 Subject: 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 --- Source/Support.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'Source/Support.cpp') 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 -- cgit v1.2.3