From bbbeefc6a18e787e25c0e02907a5088712827e5a Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 17 Nov 2012 16:48:05 +0000 Subject: [PATCH] Replace a few one line MACT mouse functions with macros that do the same thing git-svn-id: https://svn.eduke32.com/eduke32@3199 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/jmact/mouse.c | 15 --------------- polymer/eduke32/source/jmact/mouse.h | 6 +++--- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/polymer/eduke32/source/jmact/mouse.c b/polymer/eduke32/source/jmact/mouse.c index 81d0f861b..e3b939f00 100644 --- a/polymer/eduke32/source/jmact/mouse.c +++ b/polymer/eduke32/source/jmact/mouse.c @@ -70,20 +70,5 @@ int32_t MOUSE_GetButtons(void) } -int32_t MOUSE_ClearButton(int32_t b) -{ - return (mouseb &= ~b); -} -void MOUSE_ClearAllButtons(void) -{ - mouseb = 0; -} - - -void MOUSE_GetDelta(int32_t*x, int32_t*y) -{ - readmousexy(x,y); -} - diff --git a/polymer/eduke32/source/jmact/mouse.h b/polymer/eduke32/source/jmact/mouse.h index ac7790b3d..3244c52f4 100644 --- a/polymer/eduke32/source/jmact/mouse.h +++ b/polymer/eduke32/source/jmact/mouse.h @@ -46,9 +46,9 @@ void MOUSE_Shutdown( void ); //void MOUSE_ShowCursor( void ); //void MOUSE_HideCursor( void ); int32_t MOUSE_GetButtons( void ); -int32_t MOUSE_ClearButton( int32_t b ); -void MOUSE_ClearAllButtons(void); -void MOUSE_GetDelta( int32_t*x, int32_t*y ); +#define MOUSE_ClearButton(b) (mouseb &= ~b) +#define MOUSE_ClearAllButtons() mouseb = 0 +#define MOUSE_GetDelta(x, y) readmousexy(x,y) #ifdef EXTERNC };