Removed love.joystick.getBall and love.joystick.getBallCount (issue #648)

This commit is contained in:
Alex Szpakowski
2013-06-30 16:59:28 -03:00
parent 01666f6c29
commit 3b3c5c3711
4 changed files with 0 additions and 44 deletions
-24
View File
@@ -146,11 +146,6 @@ int Joystick::getAxisCount(int index)
return verifyJoystick(index) ? SDL_JoystickNumAxes(joysticks[index]) : 0;
}
int Joystick::getBallCount(int index)
{
return verifyJoystick(index) ? SDL_JoystickNumBalls(joysticks[index]) : 0;
}
int Joystick::getButtonCount(int index)
{
return verifyJoystick(index) ? SDL_JoystickNumButtons(joysticks[index]) : 0;
@@ -194,25 +189,6 @@ int Joystick::getAxes(lua_State *L)
return num;
}
int Joystick::getBall(lua_State *L)
{
int index = luaL_checkint(L, 1) - 1;
int ball = luaL_checkint(L, 2) - 1;
if (!verifyJoystick(index))
return 0;
if (ball >= getBallCount(index))
return 0;
int dx, dy;
SDL_JoystickGetBall(joysticks[index], ball, &dx, &dy);
lua_pushnumber(L, dx);
lua_pushnumber(L, dy);
return 2;
}
bool Joystick::isDown(int index, int *buttonlist)
{
if (!verifyJoystick(index))