[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input joystick_axis.cxx,NONE,1.1 joys
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input joystick_axis.cxx,NONE,1.1 joystick_axis.hxx,NONE,1.1 |
Date: |
4 Jul 2002 14:03:45 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv31216
Added Files:
joystick_axis.cxx joystick_axis.hxx
Log Message:
implements a joystick axis
--- NEW FILE: joystick_axis.cxx ---
// $Id: joystick_axis.cxx,v 1.1 2002/07/04 14:03:43 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <ClanLib/Display/Input/input.h>
#include <ClanLib/Display/Input/inputdevice.h>
#include <ClanLib/Display/Input/inputaxis.h>
#include "joystick_axis.hxx"
namespace Input
{
JoystickAxis::JoystickAxis(int id_, int axis_, float angle_) : id(id_),
axis(axis_), angle(angle_) { }
float
JoystickAxis::get_pos ()
{
return CL_Input::joysticks[id]->get_axis(axis)->get_pos();
}
float
JoystickAxis::get_angle ()
{
return angle;
}
void
JoystickAxis::update(float)
{
}
}
/* EOF */
--- NEW FILE: joystick_axis.hxx ---
// $Id: joystick_axis.hxx,v 1.1 2002/07/04 14:03:43 torangan Exp $
//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_PINGUS_INPUT_JOYSTICK_AXIS_HXX
#define HEADER_PINGUS_INPUT_JOYSTICK_AXIS_HXX
#include "axis.hxx"
namespace Input
{
class JoystickAxis : Axis {
private:
int id;
int axis;
float angle;
float pos;
public:
JoystickAxis(int id_, int axis_, float angle_);
virtual float get_pos ();
virtual float get_angle ();
virtual void update (float delta);
};
}
#endif
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input joystick_axis.cxx,NONE,1.1 joystick_axis.hxx,NONE,1.1,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input button_axis.cxx,NONE,1.1 button_axis.hxx,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input pointer.hxx,1.2,1.3
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input button_axis.cxx,NONE,1.1 button_axis.hxx,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input pointer.hxx,1.2,1.3
- Index(es):