From: Tobias Leich Date: Mon, 9 Nov 2009 19:17:28 +0000 (+0100) Subject: migrate JoyAxisEvent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6769c3a1695991332d89032ca6c0ebcd13d73947;p=sdlgit%2FSDL_perl.git migrate JoyAxisEvent --- diff --git a/src/Core/objects/Event.xs b/src/Core/objects/Event.xs index 185150a..a8f3b1f 100644 --- a/src/Core/objects/Event.xs +++ b/src/Core/objects/Event.xs @@ -203,6 +203,66 @@ event_jaxis ( event, ... ) OUTPUT: RETVAL +Uint8 +event_jaxis_type ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyAxisEvent * a = &(event->jaxis); + + if( items > 1 ) + { + a->type = SvIV( ST(1) ); + } + + RETVAL = a->type; + OUTPUT: + RETVAL + +Uint8 +event_jaxis_which ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyAxisEvent * a = &(event->jaxis); + + if( items > 1 ) + { + a->which = SvIV( ST(1) ); + } + + RETVAL = a->which; + OUTPUT: + RETVAL + +Uint8 +event_jaxis_axis ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyAxisEvent * a = &(event->jaxis); + + if( items > 1 ) + { + a->axis = SvIV( ST(1) ); + } + + RETVAL = a->axis; + OUTPUT: + RETVAL + +Sint16 +event_jaxis_value ( event, ... ) + SDL_Event *event + CODE: + SDL_JoyAxisEvent * a = &(event->jaxis); + + if( items > 1 ) + { + a->value = SvIV( ST(1) ); + } + + RETVAL = a->value; + OUTPUT: + RETVAL + SDL_JoyBallEvent * event_jball ( event, ... ) SDL_Event * event