From 3d2805802722dec1632f841e1af3004ee14eb1a0 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Thu, 26 Feb 2015 22:16:45 -0500 Subject: [PATCH] Added in a variation of the "Humans do it better" cheat code. --- src/Starfighter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Starfighter.cpp b/src/Starfighter.cpp index 9f9c8a1..f948c2b 100644 --- a/src/Starfighter.cpp +++ b/src/Starfighter.cpp @@ -26,6 +26,7 @@ int main(int argc, char *argv[]) defineGlobals(); // Must do this first! bool cheatAttempt = false; + int cheatCount = 0; if (argc > 1) { @@ -55,6 +56,14 @@ int main(int argc, char *argv[]) {printf("No Audio\n"); engine.useAudio = false;} if (strcmp(argv[i], "-mono") == 0) {printf("Mono sound output\n"); engine.useAudio = true;} + if ((strcmp(argv[i], "humans") == 0) && (cheatCount == 0)) + cheatCount = 1; + if ((strcmp(argv[i], "do") == 0) && (cheatCount == 1)) + cheatCount = 2; + if ((strcmp(argv[i], "it") == 0) && (cheatCount == 2)) + cheatCount = 3; + if ((strcmp(argv[i], "better") == 0) && (cheatCount == 3)) + {printf("Humans do it better! Cheats enabled.\n"); engine.cheat = true;} } atexit(cleanUp);