Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F126922
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/util/joystick.h b/util/joystick.h
index 88d2c4d7..c7fdb776 100644
--- a/util/joystick.h
+++ b/util/joystick.h
@@ -1,53 +1,64 @@
-#ifndef _paintown_joystick
-#define _paintown_joystick
+#ifndef _paintown_joystick_h
+#define _paintown_joystick_h
#include <vector>
struct JoystickInput{
JoystickInput():
left(false),
right(false),
up(false),
down(false),
button1(false),
button2(false),
button3(false),
button4(false){
}
JoystickInput(const JoystickInput & copy):
left(copy.left),
right(copy.right),
up(copy.up),
down(copy.down),
button1(copy.button1),
button2(copy.button2),
button3(copy.button3),
button4(copy.button4){
}
bool left;
bool right;
bool up;
bool down;
bool button1;
bool button2;
bool button3;
bool button4;
};
class Joystick{
public:
virtual void poll() = 0;
virtual JoystickInput readAll() = 0;
virtual bool pressed() = 0;
virtual ~Joystick();
static Joystick * create();
+ enum Key{
+ Up = 0,
+ Down,
+ Left,
+ Right,
+ Button1,
+ Button2,
+ Button3,
+ Button4,
+ };
+
protected:
Joystick();
};
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jun 11, 1:36 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69278
Default Alt Text
(1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline