Last active
February 17, 2018 03:54
-
-
Save mach-kernel/340a6dc9bb18ff92c47f173a2e37afed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(kDown & (KEY_UP)) //Detects if the UP D-PAD button was pressed. | |
{ | |
for (int current = offs; current <= YEAR_OFFSET; ++current) { | |
if (current == UNUSED_OFFSET) continue; | |
bufs[current]++; | |
if (bufs[current] == maxValue[current]) { | |
bufs[current] = minValue[current]; | |
} | |
else { break; } | |
} | |
} | |
if(kDown & (KEY_DOWN)) //Detects if the DOWN D-PAD button was pressed. | |
{ | |
for (int current = offs; current >= SECONDS_OFFSET; --current) { | |
if (current == UNUSED_OFFSET) continue; | |
bufs[current]--; | |
if (bufs[current] < minValue[current] || bufs[current] >= maxValue[current]) { | |
bufs[current] = maxValue[current] - 1; | |
} | |
else { break; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment