zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Gamestate_II.hxx
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ZENI_GAMESTATE_II_HXX
19 #define ZENI_GAMESTATE_II_HXX
20 
21 #include <Zeni/Gamestate_II.h>
22 
23 namespace Zeni {
24 
25  const int & Gamestate_II::get_joyball_min() const {
26  return m_joyball_min;
27  }
28 
29  const int & Gamestate_II::get_joyball_max() const {
30  return m_joyball_max;
31  }
32 
33  const float & Gamestate_II::get_joystick_min() const {
34  return m_joystick_min;
35  }
36 
37  const float & Gamestate_II::get_joystick_max() const {
38  return m_joystick_max;
39  }
40 
41  const int & Gamestate_II::get_mouse_min() const {
42  return m_mouse_min;
43  }
44 
45  const int & Gamestate_II::get_mouse_max() const {
46  return m_mouse_max;
47  }
48 
50  return m_firing_missed_events;
51  }
52 
54  if(min < 0)
55  m_joyball_min = 0;
56  else
57  m_joyball_min = min;
58  }
59 
61  if(max < 1)
62  m_joyball_max = 1;
63  else
64  m_joyball_max = max;
65  }
66 
67  void Gamestate_II::set_joystick_min(const float &min) {
68  if(min < 0.0f)
69  m_joystick_min = 0.0f;
70  else
71  m_joystick_min = min;
72  }
73 
74  void Gamestate_II::set_joystick_max(const float &max) {
75  if(max < 0.0f)
76  m_joystick_max = 0.0f;
77  else
78  m_joystick_max = max;
79  }
80 
81  void Gamestate_II::set_mouse_min(const int &min) {
82  if(min < 0)
83  m_mouse_min = 0;
84  else
85  m_mouse_min = min;
86  }
87 
88  void Gamestate_II::set_mouse_max(const int &max) {
89  if(max < 1)
90  m_mouse_max = 1;
91  else
92  m_mouse_max = max;
93  }
94 
95  void Gamestate_II::set_firing_missed_events(const bool &firing) {
96  m_firing_missed_events = firing;
97  }
98 
99 }
100 
101 #endif
void set_mouse_min(const int &min)
Should be (0, inf) and less than max.
const int & get_mouse_min() const
GLclampf f
Definition: glew.h:3390
const float & get_joystick_max() const
const float & get_joystick_min() const
void set_mouse_max(const int &max)
Should be (1, inf) and greater than min.
const int & get_joyball_max() const
void set_joyball_min(const int &min)
Should be (0, inf) and less than max.
const int & get_mouse_max() const
void set_joystick_min(const float &min)
Should be [0.0, 1.0) and less than max.
void set_joyball_max(const int &max)
Should be (1, inf) and greater than min.
const bool & is_firing_missed_events() const
void set_joystick_max(const float &max)
Should be (0.0, 1.0] and greater than min.
const int & get_joyball_min() const
#define min(x, y)
Definition: os.h:75
#define max(x, y)
Definition: os.h:79
void set_firing_missed_events(const bool &firing)
true if missed events should be handled normally; false if they should be discarded ...