aboutsummaryrefslogtreecommitdiffstats
path: root/src/YetiHack.cpp
diff options
context:
space:
mode:
authorRay Hogenson <rayhogenson@gmail.com>2012-03-26 15:35:21 -0800
committerRay Hogenson <rayhogenson@gmail.com>2012-03-26 15:35:21 -0800
commitd14fe2cacf42657ed2ddbe80fa0c372e1adfd201 (patch)
tree38f8dfdca7a1af13208313dec97f73b860d23587 /src/YetiHack.cpp
parentadc79032764885b4701e33a874487ebd74d9657d (diff)
downloadyetihack-d14fe2cacf42657ed2ddbe80fa0c372e1adfd201.tar.zst
added a help menu
Diffstat (limited to 'src/YetiHack.cpp')
-rw-r--r--src/YetiHack.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/YetiHack.cpp b/src/YetiHack.cpp
index c49cc9f..41a4d63 100644
--- a/src/YetiHack.cpp
+++ b/src/YetiHack.cpp
@@ -19,6 +19,7 @@ bool smessage(int, string);
vector<int> turns(int);
const char* convert(int);
void menu(bool);
+void help();
void endCurses()
{
@@ -326,11 +327,12 @@ const char* convert(int a)
void menu(bool immortal)
{
int a = 100;
- startCurses();
+ erase();
char input;
addstr("Welcome to yetihack!\n");
addstr("\t1. Arcade mode (classic)\n");
addstr("\t2. Story mode\n");
+ addstr("\t3. Help\n");
addstr("Select an option to proceed: ");
refresh();
echo();
@@ -378,10 +380,35 @@ void menu(bool immortal)
erase();
story();
break;
+ case '3':
+ erase();
+ help();
+ break;
}
addstr(convert(a));
}
+void help()
+{
+ addstr("To begin, choose story mode.\n");
+ addstr("Then, enjoy the first story prompt.\n");
+ addstr("You are the @.\n");
+ addstr("Move the @ with the number pad.\n");
+ addstr("Note that num lock must be on to move the @\n");
+ addstr("Avoid the y characters, they are yetis.\n");
+ addstr("New yetis will spawn every once in a while.\n");
+ addstr("At the beginning of each round, a message will tell you how many turns you need to survive.\n");
+ addstr("After that, press enter to go to the next round.\n");
+ addstr("Good luck.\n");
+ addstr("Press enter to return to the menu.\n");
+ refresh();
+ char input;
+ do
+ {
+ input = getch();
+ } while (input != '\n');
+}
+
int main(int argc, char* argv[])
{
/*startCurses();
@@ -391,13 +418,17 @@ int main(int argc, char* argv[])
int a = input;
addstr(convert(a));
}*/
+ startCurses();
bool immortal = false;
if (argc > 1 && strcmp(argv[1],"-c") == 0)
{
immortal = true;
}
srand(time(0));
- menu(immortal);
+ while(true)
+ {
+ menu(immortal);
+ }
endCurses();
return 0;
}