From: Kartik Thakore Date: Sun, 8 Nov 2009 02:59:32 +0000 (-0500) Subject: Finish MouseMotionEvent and fixed some tyops X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0b1d5d9c702a92115eda35dd6416fe899407d4d7;p=sdlgit%2FSDL_perl.git Finish MouseMotionEvent and fixed some tyops --- diff --git a/src/Core/objects/ActiveEvent.xs b/src/Core/objects/ActiveEvent.xs index 09c3fa3..6fa0934 100644 --- a/src/Core/objects/ActiveEvent.xs +++ b/src/Core/objects/ActiveEvent.xs @@ -69,7 +69,7 @@ aevent_state ( event, ... ) RETVAL void -uevent_DESTROY(self) +aevent_DESTROY(self) SDL_ActiveEvent *self CODE: safefree( (char *)self ); diff --git a/src/Core/objects/JoyHatEvent.xs b/src/Core/objects/JoyHatEvent.xs index c4801ba..e14c34d 100644 --- a/src/Core/objects/JoyHatEvent.xs +++ b/src/Core/objects/JoyHatEvent.xs @@ -58,6 +58,7 @@ jhevent_which ( event, ... ) Uint8 jhevent_hat ( event, ... ) SDL_JoyHatEvent *event + CODE: if( items > 1 ) { event->hat = SvIV( ST(1) ); @@ -65,7 +66,6 @@ jhevent_hat ( event, ... ) } - CODE: RETVAL = event->hat; OUTPUT: RETVAL diff --git a/src/Core/objects/MouseMotionEvent.xs b/src/Core/objects/MouseMotionEvent.xs index 4836df8..da80e6d 100644 --- a/src/Core/objects/MouseMotionEvent.xs +++ b/src/Core/objects/MouseMotionEvent.xs @@ -45,6 +45,11 @@ Uint8 mmevent_state ( event, ... ) SDL_MouseMotionEvent *event CODE: + if( items > 1 ) + { + event->state = SvIV( ST(1) ); + + } RETVAL = event->state; OUTPUT: RETVAL @@ -53,6 +58,11 @@ Uint16 mmevent_x ( event, ... ) SDL_MouseMotionEvent *event CODE: + if( items > 1 ) + { + event->x = SvIV( ST(1) ); + + } RETVAL = event->x; OUTPUT: RETVAL @@ -61,6 +71,11 @@ Uint16 mmevent_y ( event, ... ) SDL_MouseMotionEvent *event CODE: + if( items > 1 ) + { + event->y = SvIV( ST(1) ); + + } RETVAL = event->y; OUTPUT: RETVAL @@ -69,14 +84,31 @@ Uint16 mmevent_xrel ( event, ... ) SDL_MouseMotionEvent *event CODE: + if( items > 1 ) + { + event->xrel = SvIV( ST(1) ); + + } RETVAL = event->xrel; OUTPUT: RETVAL + Uint16 mmevent_yrel ( event, ... ) SDL_MouseMotionEvent *event CODE: + if( items > 1 ) + { + event->yrel = SvIV( ST(1) ); + + } RETVAL = event->yrel; OUTPUT: RETVAL + +void +mmtevent_DESTROY(self) + SDL_MouseMotionEvent *self + CODE: + safefree( (char *)self );