[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input inverted_axis.cxx,NONE,1.1 inve
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input inverted_axis.cxx,NONE,1.1 inverted_axis.hxx,NONE,1.1 |
Date: |
5 Jul 2002 09:59:23 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv8342
Added Files:
inverted_axis.cxx inverted_axis.hxx
Log Message:
helper class to invert the grade of another axis
--- NEW FILE: inverted_axis.cxx ---
// $Id: inverted_axis.cxx,v 1.1 2002/07/05 09:59:20 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 "inverted_axis.hxx"
namespace Input
{
InvertedAxis::InvertedAxis(Axis* axis_) : axis(axis_) { }
float
InvertedAxis::get_pos ()
{
return axis->get_pos();
}
float
InvertedAxis::get_angle ()
{
return (static_cast<int>(axis->get_angle()) + 180) % 360;
}
void
InvertedAxis::update(float delta)
{
axis->update(delta);
}
}
/* EOF */
--- NEW FILE: inverted_axis.hxx ---
// $Id: inverted_axis.hxx,v 1.1 2002/07/05 09:59:21 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_INVERTED_AXIS_HXX
#define HEADER_PINGUS_INPUT_INVERTED_AXIS_HXX
#include "axis.hxx"
namespace Input
{
class InvertedAxis : Axis {
private:
Axis* axis;
public:
InvertedAxis(Axis* axis_);
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 inverted_axis.cxx,NONE,1.1 inverted_axis.hxx,NONE,1.1,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_pointer.cxx,NONE,1.1 mouse_pointer.hxx,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input Makefile.am,1.3,1.4
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input mouse_pointer.cxx,NONE,1.1 mouse_pointer.hxx,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input Makefile.am,1.3,1.4
- Index(es):