pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/input action_axis_event.hxx,NONE,1.1


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/input action_axis_event.hxx,NONE,1.1 button_event.hxx,NONE,1.1 event.hxx,NONE,1.1 move_event.hxx,NONE,1.1
Date: 10 Jul 2002 16:15:31 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv24391

Added Files:
        action_axis_event.hxx button_event.hxx event.hxx 
        move_event.hxx 
Log Message:
event for controller


--- NEW FILE: action_axis_event.hxx ---
//  $Id: action_axis_event.hxx,v 1.1 2002/07/10 16:15:28 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_ACTION_AXIS_EVENT_HXX
#define HEADER_PINGUS_INPUT_ACTION_AXIS_EVENT_HXX

#include "event.hxx"

namespace Input {

  enum Direction { up, down };

  class ActionAxisEvent : public Event {
  
    public:
      Direction dir;
                 
    public:
      ActionAxisEvent (Direction dir_) : dir(dir_) { }
      
      EventType get_type () { return Input::ActionAxisEvent; }
  };

}

#endif

/* EOF */

--- NEW FILE: button_event.hxx ---
//  $Id: button_event.hxx,v 1.1 2002/07/10 16:15:28 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_BUTTON_EVENT_HXX
#define HEADER_PINGUS_INPUT_BUTTON_EVENT_HXX

#include "event.hxx"

namespace Input {

  enum ButtonName { primary, secondary, pause, fast_forward, armageddon, 
escape, action_1, action_2,
                    action_3, action_4, action_5, action_6, action_7, action_8, 
action_9, action_10 };

  enum State { pressed, released };

  class ButtonEvent : public Event {
    public:
      ButtonName name;
      State      state;
      
    public:
      ButtonEvent (ButtonName name_, State state_) : name(name_), state(state_) 
{ }
      
      EventType get_type () { return Input::ButtonEvent; }
  };

}

#endif

/* EOF */

--- NEW FILE: event.hxx ---
//  $Id: event.hxx,v 1.1 2002/07/10 16:15:28 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_EVENT_HXX
#define HEADER_PINGUS_INPUT_EVENT_HXX

namespace Input {

  enum EventType { ButtonEvent, MoveEvent, ActionAxisEvent };

  class Event {
    public:
    
      virtual ~Event () { }
      virtual EventType get_type ()=0;
  };

}

#endif

/* EOF */

--- NEW FILE: move_event.hxx ---
//  $Id: move_event.hxx,v 1.1 2002/07/10 16:15:28 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_MOVE_EVENT_HXX
#define HEADER_PINGUS_INPUT_MOVE_EVENT_HXX

#include "event.hxx"

namespace Input {

  enum Type { pointer, scroll };

  class MoveEvent : public Event {
  
    public:
      Type  type;
      float pos;
           
    public:
      MoveEvent (Type type_, float pos_) : type(type_), pos(pos_) { }
      
      EventType get_type () { return Input::MoveEvent; }
  };

}

#endif

/* EOF */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]