pull/18/head
Jesse Vincent 9 years ago
parent e78b1bea6a
commit ca403359c4

@ -6,10 +6,6 @@
boolean key_was_pressed (byte keyState) { boolean key_was_pressed (byte keyState) {
return (! key_was_not_pressed(keyState)); return (! key_was_not_pressed(keyState));
} }
boolean key_was_not_pressed (byte keyState) { boolean key_was_not_pressed (byte keyState) {
@ -18,29 +14,22 @@ boolean key_was_not_pressed (byte keyState) {
} else { } else {
return true; return true;
} }
} }
boolean key_is_pressed (byte keyState) { boolean key_is_pressed (byte keyState) {
if ( keyState & B00000001 && keyState & B00000010 ) { if ( keyState & B00000001 && keyState & B00000010 ) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
boolean key_is_not_pressed (byte keyState) { boolean key_is_not_pressed (byte keyState) {
return !key_is_pressed(keyState); return !key_is_pressed(keyState);
} }
boolean key_toggled_on(byte keyState) { boolean key_toggled_on(byte keyState) {
if (key_is_pressed(keyState) && key_was_not_pressed(keyState)) { if (key_is_pressed(keyState) && key_was_not_pressed(keyState)) {
return true; return true;
} else { } else {
return false; return false;

Loading…
Cancel
Save