Skip to content

Commit

Permalink
Added the ability to press 'x' to buy autoclickers
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebby37 committed Jun 3, 2021
1 parent 7e73b87 commit 85f155f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
make clean
make
Lemon_Clicker_NDS.nds
Lemon-Clicker-NDS.nds
5 changes: 3 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int main(void) {
}

// Collision code for clicking the lemon
if (((held & KEY_TOUCH) && (touch.px >= 40) && (touch.py >= 32) && (touch.px <= 176) && (touch.py <= 156)) || (held & KEY_A) || (held & KEY_B)) {
if (((held & KEY_TOUCH) && (touch.px >= 40) && (touch.py >= 32) && (touch.px <= 176) && (touch.py <= 156)) || (held & KEY_A)) {
lemon_pressed = true;
NF_SpriteFrame(GameScreen, 0, lemon_pressed);
if (lemon_canGivePoints) {
Expand All @@ -129,7 +129,7 @@ int main(void) {
}

// Collision code for clicking the autoclicker button
if ((held & KEY_TOUCH) && (touch.px >= 192) && (touch.py >= 0) && (touch.px <= 256) && (touch.py <= 64)) {
if (((held & KEY_TOUCH) && (touch.px >= 192) && (touch.py >= 0) && (touch.px <= 256) && (touch.py <= 64)) || (held & KEY_X)) {
autoButton_pressed = true;
NF_SpriteFrame(GameScreen, 1, autoButton_pressed);
if (autoButton_canGiveClicks && points >= 100) {
Expand Down Expand Up @@ -179,6 +179,7 @@ int main(void) {
globalTimer += 1;
}
saveGame();
exit(0);
return 0;
}

Expand Down

0 comments on commit 85f155f

Please sign in to comment.