//main.cpp #include #include "Dialogues.h" #include "Fights.h" #include #include using namespace std; int main() { Dialogues dialogue; dialogue.WelcomeScreenAct1(); dialogue.CreationScreen(); dialogue.SwampPath(); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //dialogues.cpp #include #include #include "Dialogues.h" #include "Fights.cpp" #include using namespace std; void Dialogues::GameOver() { cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******** ****** ****** ********* ** ** ********"; cout << "******** *************** ** ***** ******* ** ************* ********"; cout << "******** ************** **** **** * ***** * ** ************* ********"; cout << "******** ************* ****** *** ** *** ** ** ************* ********"; cout << "******** ************ ** *** * *** ** ****** ********"; cout << "******** ***** ** ********** ** **** **** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ** ********** ** *********** ** ** ********"; cout << "********************************************************************** ********"; cout << "********************************************************************** ********"; cout << "******** ** ********** ** ** ******* ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ********** ** *************** ******* *** ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ******** ** ******* ******** ********"; cout << "******** ******** *** ****** *** *************** ********** ********"; cout << "******** ******** **** **** **** *************** ** ******************"; cout << "******** ******** ***** ** ***** *************** **** ****************"; cout << "******** ****** ****** *** ****** **** ********"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; } void Dialogues::WelcomeScreenAct1() { string line; cout << "Welcome to the game! Thanks for playing, hope you enjoy!(Alpha Version 0.3)"; cin.get(); ifstream GameTitle; GameTitle.open("Game_Title_Art.txt"); while(getline(GameTitle, line)) { cout << line; } GameTitle.close(); cin.get(); system("cls"); cout << "\n\n********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "*************** ************************************ ******************"; cout << "************* **** ******************************** ******************"; cout << "************ ****** ****************************** * ******************"; cout << "************ ****** ***************** ************** ******************"; cout << "************ ****** ***** ****** ************** ******************"; cout << "************ *** *********** ************** ******************"; cout << "************ ****** ** ********* *********** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** *** *********** ************** ******************"; cout << "************ ****** ***** ****** ********* *************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******************************** Waking up ***********************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cin.get(); system("CLS"); } Dialogues::Dialogues() { } void Dialogues::CreationScreen() { { string name; int age, gender; bool classselect = true; cout << "You wake up in a forest next to a swamp surrounded by thick bushes and trees.\n"; cout << "You feel a bumb on your head as if you were hit with something.\nYou try to remember who you are...\n"; cout << "You look up to the sky, it's almost midnight, the moon is shining brightly,\nyou have to find shelter.\n\n\n"; while(classselect == true) { cin.get(); cout << "\n\n\nWhat is your name?\n"; getline(cin, name); cout << "\nWell " << name << " , How old are you?\n"; cin >> age; cout << "\nWhat is your gender?\n\n[1]Male\n[2]Female\n"; cin >> gender; if(gender == 1) { char answer1; system("cls"); cout << "\nIs this the correct information?\n"; cout << "Name: " << name << "\nage: " << age << "\nGender: Male\n"; cout << "[y/n]\n"; cin >> answer1; if(answer1 == 'y') { cout << "Good! Let's go on further!\n"; classselect = false; cin.get(); system("cls"); } if(answer1 == 'n') { classselect = true; cout << "Well let's go back to the creating screen again..."; cin.get(); system("cls"); } else { break; } } } } } void Dialogues::SwampPath() { int swampPath, housetrystart=1, vinesstart=1; system("cls"); cout << "Choose the path you wanna go:\n\n"; cout << "[1] An abandoned house with lights coming out of it's windows.\n"; cout << "[2] A path leading somewhere (blocked by vines)\n"; cin >> swampPath; system("CLS"); if(swampPath == 1 && housetrystart == 1) { cout << "You approach the house\nas you hear loud grunting noises coming out of the inside,\nyou come in and open the squeacking door,\nthe noise stops and you encounter a gigantic rat!\n"; } if(swampPath == 2 && vinesstart == 1) { cout << "You go up to the path,\nyou can hear screams from far away and the smell of burning wood,\nyou try to get past the vines, but they are too strong for you,\nyou need something sharp, you go back to the swamp.\n"; cin.ignore(); cin.get(); Dialogues::SwampPath(); } } #include #include #include "Dialogues.h" #include "Fights.cpp" #include using namespace std; void Dialogues::GameOver() { cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******** ****** ****** ********* ** ** ********"; cout << "******** *************** ** ***** ******* ** ************* ********"; cout << "******** ************** **** **** * ***** * ** ************* ********"; cout << "******** ************* ****** *** ** *** ** ** ************* ********"; cout << "******** ************ ** *** * *** ** ****** ********"; cout << "******** ***** ** ********** ** **** **** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ** ********** ** *********** ** ** ********"; cout << "********************************************************************** ********"; cout << "********************************************************************** ********"; cout << "******** ** ********** ** ** ******* ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ********** ** *************** ******* *** ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ******** ** ******* ******** ********"; cout << "******** ******** *** ****** *** *************** ********** ********"; cout << "******** ******** **** **** **** *************** ** ******************"; cout << "******** ******** ***** ** ***** *************** **** ****************"; cout << "******** ****** ****** *** ****** **** ********"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; } void Dialogues::WelcomeScreenAct1() { string line; cout << "Welcome to the game! Thanks for playing, hope you enjoy!(Alpha Version 0.3)"; cin.get(); ifstream GameTitle; GameTitle.open("Game_Title_Art.txt"); while(getline(GameTitle, line)) { cout << line; } GameTitle.close(); cin.get(); system("cls"); cout << "\n\n********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "*************** ************************************ ******************"; cout << "************* **** ******************************** ******************"; cout << "************ ****** ****************************** * ******************"; cout << "************ ****** ***************** ************** ******************"; cout << "************ ****** ***** ****** ************** ******************"; cout << "************ *** *********** ************** ******************"; cout << "************ ****** ** ********* *********** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** *** *********** ************** ******************"; cout << "************ ****** ***** ****** ********* *************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******************************** Waking up ***********************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cin.get(); system("CLS"); } Dialogues::Dialogues() { } void Dialogues::CreationScreen() { { string name; int age, gender; bool classselect = true; cout << "You wake up in a forest next to a swamp surrounded by thick bushes and trees.\n"; cout << "You feel a bumb on your head as if you were hit with something.\nYou try to remember who you are...\n"; cout << "You look up to the sky, it's almost midnight, the moon is shining brightly,\nyou have to find shelter.\n\n\n"; while(classselect == true) { cin.get(); cout << "\n\n\nWhat is your name?\n"; getline(cin, name); cout << "\nWell " << name << " , How old are you?\n"; cin >> age; cout << "\nWhat is your gender?\n\n[1]Male\n[2]Female\n"; cin >> gender; if(gender == 1) { char answer1; system("cls"); cout << "\nIs this the correct information?\n"; cout << "Name: " << name << "\nage: " << age << "\nGender: Male\n"; cout << "[y/n]\n"; cin >> answer1; if(answer1 == 'y') { cout << "Good! Let's go on further!\n"; classselect = false; cin.get(); system("cls"); } if(answer1 == 'n') { classselect = true; cout << "Well let's go back to the creating screen again..."; cin.get(); system("cls"); } else { break; } } } } } void Dialogues::SwampPath() { int swampPath, housetrystart=1, vinesstart=1; system("cls"); cout << "Choose the path you wanna go:\n\n"; cout << "[1] An abandoned house with lights coming out of it's windows.\n"; cout << "[2] A path leading somewhere (blocked by vines)\n"; cin >> swampPath; system("CLS"); if(swampPath == 1 && housetrystart == 1) { cout << "You approach the house\nas you hear loud grunting noises coming out of the inside,\nyou come in and open the squeacking door,\nthe noise stops and you encounter a gigantic rat!\n"; } if(swampPath == 2 && vinesstart == 1) { cout << "You go up to the path,\nyou can hear screams from far away and the smell of burning wood,\nyou try to get past the vines, but they are too strong for you,\nyou need something sharp, you go back to the swamp.\n"; cin.ignore(); cin.get(); Dialogues::SwampPath(); } } #include #include #include "Dialogues.h" #include "Fights.cpp" #include using namespace std; void Dialogues::GameOver() { cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******** ****** ****** ********* ** ** ********"; cout << "******** *************** ** ***** ******* ** ************* ********"; cout << "******** ************** **** **** * ***** * ** ************* ********"; cout << "******** ************* ****** *** ** *** ** ** ************* ********"; cout << "******** ************ ** *** * *** ** ****** ********"; cout << "******** ***** ** ********** ** **** **** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ******** ** ********** ** *********** ** ************* ********"; cout << "******** ** ********** ** *********** ** ** ********"; cout << "********************************************************************** ********"; cout << "********************************************************************** ********"; cout << "******** ** ********** ** ** ******* ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ********** ** *************** ******* *** ********"; cout << "******** ******** ** ********** ** *************** ***** ***** ********"; cout << "******** ******** ** ******** ** ******* ******** ********"; cout << "******** ******** *** ****** *** *************** ********** ********"; cout << "******** ******** **** **** **** *************** ** ******************"; cout << "******** ******** ***** ** ***** *************** **** ****************"; cout << "******** ****** ****** *** ****** **** ********"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; } void Dialogues::WelcomeScreenAct1() { string line; cout << "Welcome to the game! Thanks for playing, hope you enjoy!(Alpha Version 0.3)"; cin.get(); ifstream GameTitle; GameTitle.open("Game_Title_Art.txt"); while(getline(GameTitle, line)) { cout << line; } GameTitle.close(); cin.get(); system("cls"); cout << "\n\n********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "*************** ************************************ ******************"; cout << "************* **** ******************************** ******************"; cout << "************ ****** ****************************** * ******************"; cout << "************ ****** ***************** ************** ******************"; cout << "************ ****** ***** ****** ************** ******************"; cout << "************ *** *********** ************** ******************"; cout << "************ ****** ** ********* *********** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** ** ************ ************** ******************"; cout << "************ ****** *** *********** ************** ******************"; cout << "************ ****** ***** ****** ********* *************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "******************************** Waking up ***********************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cout << "********************************************************************************"; cin.get(); system("CLS"); } Dialogues::Dialogues() { } void Dialogues::CreationScreen() { { string name; int age, gender; bool classselect = true; cout << "You wake up in a forest next to a swamp surrounded by thick bushes and trees.\n"; cout << "You feel a bumb on your head as if you were hit with something.\nYou try to remember who you are...\n"; cout << "You look up to the sky, it's almost midnight, the moon is shining brightly,\nyou have to find shelter.\n\n\n"; while(classselect == true) { cin.get(); cout << "\n\n\nWhat is your name?\n"; getline(cin, name); cout << "\nWell " << name << " , How old are you?\n"; cin >> age; cout << "\nWhat is your gender?\n\n[1]Male\n[2]Female\n"; cin >> gender; if(gender == 1) { char answer1; system("cls"); cout << "\nIs this the correct information?\n"; cout << "Name: " << name << "\nage: " << age << "\nGender: Male\n"; cout << "[y/n]\n"; cin >> answer1; if(answer1 == 'y') { cout << "Good! Let's go on further!\n"; classselect = false; cin.get(); system("cls"); } if(answer1 == 'n') { classselect = true; cout << "Well let's go back to the creating screen again..."; cin.get(); system("cls"); } else { break; } } } } } void Dialogues::SwampPath() { int swampPath, housetrystart=1, vinesstart=1; system("cls"); cout << "Choose the path you wanna go:\n\n"; cout << "[1] An abandoned house with lights coming out of it's windows.\n"; cout << "[2] A path leading somewhere (blocked by vines)\n"; cin >> swampPath; system("CLS"); if(swampPath == 1 && housetrystart == 1) { cout << "You approach the house\nas you hear loud grunting noises coming out of the inside,\nyou come in and open the squeacking door,\nthe noise stops and you encounter a gigantic rat!\n"; } if(swampPath == 2 && vinesstart == 1) { cout << "You go up to the path,\nyou can hear screams from far away and the smell of burning wood,\nyou try to get past the vines, but they are too strong for you,\nyou need something sharp, you go back to the swamp.\n"; cin.ignore(); cin.get(); Dialogues::SwampPath(); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //dialogues.h #ifndef DIALOGUES_H #define DIALOGUES_H #include "Fights.cpp" class Dialogues { public: void GameOver(); Dialogues(); void WelcomeScreenAct1(); void StoryStart(); void CreationScreen(); void SwampPath(); }; #endif // DIALOGUES_H /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //fights.cpp #include #include #include "Dialogues.h" #include using namespace std; void RatFight() { cout << "What do you do?"; cout << "[1]Fight!\n"; cout << "[2]Run!"; }