aboutsummaryrefslogtreecommitdiff
path: root/Source/Pad.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-05-01 23:05:51 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-05-01 23:05:51 +0200
commit83b4684d7cb9934371909b522d6daa0f16cc0396 (patch)
tree39fa1ca99061b12203dae50898a2b3dec3b5f276 /Source/Pad.c
parent8629c228db1fe1f206d409356ad75995060a0ca8 (diff)
downloadairport-83b4684d7cb9934371909b522d6daa0f16cc0396.tar.gz
* Added some comments on System.
* New routine PadOneKeySinglePress() and PadTwoKeySinglePress(). * Temp waypoints now turn red when colliding with an aircraft or with a previously existing waypoint. * When loading files, GPU operation is finishedbefore calling fopen. Also, I_MASK is disabled just in case. * For PLT files, actual tile needs to be set instead of parking number.
Diffstat (limited to 'Source/Pad.c')
-rw-r--r--Source/Pad.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Pad.c b/Source/Pad.c
index 7fc08a2..2a84304 100644
--- a/Source/Pad.c
+++ b/Source/Pad.c
@@ -177,6 +177,16 @@ bool PadTwoKeyPressed(unsigned short key)
return (bool)( pad2 & key );
}
+bool PadOneKeySinglePress(unsigned short key)
+{
+ return (bool)( !(previous_pad1 & key) && (pad1 & key) );
+}
+
+bool PadTwoKeySinglePress(unsigned short key)
+{
+ return (bool)( !(previous_pad2 & key) && (pad2 & key) );
+}
+
bool PadOneKeyRepeat(unsigned short key, uint8_t time)
{
uint8_t key_index = PadGetKeyIndex(key);