Movement with left/right arrow keys.

Movement is hardcoded but it works.
Also fixed some typos that gave me a hard time figuring out why
movement was giving all sort of crazy problems. Very bad typos,
see gameplaysceneclassic.cpp, inputbag.cpp, inputbag.hpp and key.hpp
if you want to get goosebumps.
This commit is contained in:
King_DuckZ 2014-02-25 00:36:33 +01:00
parent 597607366e
commit ab31e94bf0
10 changed files with 116 additions and 6 deletions

View file

@ -3,6 +3,7 @@
#include "inputdevicetype.hpp"
#include <memory>
#include <ciso646>
namespace cloonel {
struct Key;
@ -12,8 +13,8 @@ namespace cloonel {
enum ActionStateType {
ActionState_Released,
ActionState_Pressed,
ActionState_JustPressed,
ActionState_JustReleased
ActionState_JustReleased,
ActionState_JustPressed
};
InputBag ( void );
@ -31,6 +32,9 @@ namespace cloonel {
const std::unique_ptr<LocalData> m_localdata;
};
bool IsPressed ( const InputBag& parInput, int parAction );
inline bool IsReleased ( const InputBag& parInput, int parAction ) { return not IsPressed(parInput, parAction); }
} //namespace cloonel
#endif