-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.cpp
More file actions
152 lines (130 loc) · 3.69 KB
/
Copy pathfunctions.cpp
File metadata and controls
152 lines (130 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
* functions.cpp
*
* Created on: Jan 7, 2013
* Author: Mindofbeholder & xBollinger
*/
#include <iostream>
#include <cstdlib>
#include <string>
#include <windows.h> // for resizing the window
using namespace std;
/*****************************
* Used in inserting a pause *
*****************************/
void pause(){
system("PAUSE");
}
/*******************************************
* Used in clearing out the console screen *
*******************************************/
void clear(){
system("CLS");
}
/***************************************
* A function that allows the designer *
* to create a choice that does have *
* an effect on future aspects of the *
* story. *
***************************************/
int twoChoice(string descript, string opOne, string opTwo){
int choice =0;
start:
cout << descript;
cout << "\n";
cout << "\n";
cout << "1. " << opOne;
cout << "\n";
cout << "2. " << opTwo;
cout << "\n";
cin >> choice;
if(choice > 2){
goto start;
}
return choice;
}
/*************************************************
* A function that allows the designer to create *
* a choice that has no effect on the story *
*************************************************/
void noEffect(string descript, string opOne, string opTwo, string answerOne, string answerTwo){
int choice =0;
cout << descript;
cout << "\n";
cout << "\n";
cout << "1. " << opOne;
cout << "\n";
cout << "2. " << opTwo;
cout << "\n";
start:
cin >> choice;
switch (choice){
case 1:
cout << answerOne;
break;
case 2:
cout << answerTwo;
break;
default:
goto start;
break;
}
clear();
}
/*************************************
* Used for resizing the game window *
*************************************/
void resize(int Width, int Height)
{
_COORD coord;
coord.X = Width;
coord.Y = Height;
_SMALL_RECT Rect;
Rect.Top = 0;
Rect.Left = 0;
Rect.Bottom = Height - 1;
Rect.Right = Width - 1;
HANDLE Handle = GetStdHandle(STD_OUTPUT_HANDLE); // Get Handle
SetConsoleScreenBufferSize(Handle, coord); // Set Buffer Size
SetConsoleWindowInfo(Handle, TRUE, &Rect); // Set Window Size
}
/***********************
* Displays "GotMilk?" *
***********************/
void title(){
cout<<" _____ _ __ __ _ _ _ ___ ";
cout << endl;
cout<<" / ____| | | | \\/ (_) | | |__ \\ ";
cout << endl;
cout<<"| | __ ___ | |_ | \\ / |_| | | __ ) |";
cout << endl;
cout<<"| | |_ |/ _ \\| __| | |\\/| | | | |/ // / ";
cout << endl;
cout<<"| |__| | (_) | |_ | | | | | | <|_| ";
cout << endl;
cout<<" \\_____|\\___/ \\__| |_| |_|_|_|_|\\_(_) ";
cout << endl;
cout << endl;
}
/**********************************************************************************
* Credit Sequence that displays "Coded by: Mindofbeholder Written by: xBollinger *
**********************************************************************************/
void credits(){
cout<<" __ . . . . . . ._. . . . ";
cout << endl;
cout<<"/ ` _ _| _ _| |_ . * |\\/|*._ _| _ |,|_ _ |_ _ | _| _ ._.";
cout << endl;
cout<<"\\__.(_)(_](/,(_] [_)\\_| * | ||[ )(_](_)| [_)(/,[ )(_)|(_](/,[ ";
cout << endl;
cout<<" ._| ";
cout << endl;
cout<<". . , , . .__ .. ";
cout << endl;
cout<<"| |._.*-+--+- _ ._ |_ . * \\./[__) _ ||*._ _ _ ._.";
cout << endl;
cout<<"|/\\|[ | | | (/,[ ) [_)\\_| * /'\\[__)(_)|||[ )(_](/,[ ";
cout << endl;
cout<<" ._| ._| ";
cout << endl;
cout << endl;
}