Here's something that I already found after reading just a few lines.
line #254
player.health = player.str * 10;
You already have that declared on line 158, so you're not going to have that declared again.
lines #247 - #267
if(playerexp >= 50)
{
player.lvl++;
player.str++;
player.acc = player.acc + 0;
player.intell++;
player.adrenaline = player.intell * 10;
player.health = player.str * 10;
cout << "Congratulations, you gained a level! You have gained\n";
cout << "1 Strength\n";
cout << "0 Accuracy\n";
cout << "1 Intelligence\n" << endl;
cout << "Your new stats are: " << endl;
cout << "Level: " << player.lvl << endl;
cout << "Strength: " << player.str << endl;
cout << "Accuracy: " << player.acc << endl;
cout << "Intelligence: " << player.intell << endl;
cout << "Health: " << player.health << endl;
cout << "Adrenaline: " << player.adrenaline << endl << endl;
system("PAUSE");
}
I'd just have that be in a module that you'd call at the beginning of the file. It could be in something like functions.cpp. Once you have the module created, you'd replace that code with the following
if neededexp = 0
{
levelup();
}
else
{
neededexp = neededexp - expgained;
}
The repeated battle animations can be cut from this file, and put into a function that would be in functions.cpp
lines #319 - #795
Cut them out of this file entirely, and make them a part of functions.cpp and include them at the beginning of this file. It'll save you a lot of time that way.
With your comments, just have them be like this:
// whatever
and the at the end of the code that is commented
// end whatever
This will make it so that the computer has to read less code, which will optimize loading times.
That's just what I've found just by skimming over your file quickly. #include <functions.cpp>;
should make it so that your load times will be smaller, and it'll also make it so that you don't have to keep repeating the same code over and over.
I hope that I helped you out.
Good luck, man (^_^)