SDL_JoystickGetAxis.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_JoystickGetAxis" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_JoystickGetAxis- Get the current state of an axis
- .SH "SYNOPSIS"
- .PP
- fB#include "SDL&.h"
- .sp
- fBSint16 fBSDL_JoystickGetAxisfPfR(fBSDL_Joystick *joystick, int axisfR);
- .SH "DESCRIPTION"
- .PP
- fBSDL_JoystickGetAxisfP returns the current state of the given fBaxisfR on the given fBjoystickfR&.
- .PP
- On most modern joysticks the X axis is usually represented by fBaxisfR 0 and the Y axis by fBaxisfR 1&. The value returned by fBSDL_JoystickGetAxisfP is a signed integer (-32768 to 32768) representing the current position of the fBaxisfR, it maybe necessary to impose certain tolerances on these values to account for jitter&. It is worth noting that some joysticks use axes 2 and 3 for extra buttons&.
- .SH "RETURN VALUE"
- .PP
- Returns a 16-bit signed integer representing the current position of the fBaxisfR&.
- .SH "EXAMPLES"
- .PP
- .PP
- .nf
- f(CWSint16 x_move, y_move;
- SDL_Joystick *joy1;
- &.
- &.
- x_move=SDL_JoystickGetAxis(joy1, 0);
- y_move=SDL_JoystickGetAxis(joy1, 1);fR
- .fi
- .PP
- .SH "SEE ALSO"
- .PP
- fIfBSDL_JoystickNumAxesfPfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00