ok here is my project here so far:
Main.cpp
#include "Library.h"
void main()
{
//GENERIC WECLOME SCREEN
cout <<"\n\nWelcome to Hollow's Eye\n";
cout << "<Programmed by Ethan Rigel>\n";
cout << "Hollow's Eye a once bountiful and gorgeous land but alas; the\n";
cout << "Mighty Dragon has destroyed and ravaged our once beautiful landscape.\n";
cout << "You must rise against this evil warlord and destroy him to save our land;\n";
cout << "be careful though, for his minions roam the land searching for prey.\n\n";
Wait();
Crossroads();
cout << "\n\nThank you for playing Hollow's Eye. Please play again soon\n\n";
}
Town.cpp
#include "Library.h"
//TOWN
bool Town()
{
int choice = 0;
while (choice != 5)
{
cout << "You walk into town.\n";
cout << "Everywhere you look you see people going about their daily lives.\n";
cout << "To your left you spot an INN and to your right an ARMORY and ITEM SHOP.\n\n";
Wait();
cout << endl;
cout << "What would you like to do\n"
cout << "1: Enter INN\n";
cout << "2: Enter ARMORY\n";
cout << "3: Enter ITEM SHOP\n";
cout << "4: Check Stats\n";
cout << "5: Leave Town\n";
cout << ">";
cin >> choice;
cout << endl;
switch (choice)
{
case 1;
{
//INN();
break;
}
case 2;
{
//ARMORY();
break;
}
case 3;
{
//ITEM SHOP();
break;
}
case 4;
{
//STATS();
break;
}
default: break;
}
}
return true;
}
Library.h
#include <iostream>
using namespace std;
#include "Global.h"
Battle.cpp
//BATTLE
#include "Library.h"
bool Battle()
{
return false;
}
Crossrodas.cpp
#include "Library.h"
//CROSSROADS
// GLOBAL VARIABLES
bool glcomplete = false;
bool fcomplete = false;
bool scomplete = false;
bool gcomplete = false;
bool ccomplete = false;
PLAYER player;
bool Crossroads()
{
//set player default values
cout << "What is your name hero?\n\n";
char name[32];
cout << ">";
cin.getline(name,32,'\n');
player.SetName(name);
cout << "\n";
int choice = 0;
while (choice != 10)
{
cout << "You stand at the center of several roads going off in many directions.\n";
cout << "There is a small town behind you full of shops and people.\n\n";
cout << "Which path do you choose?\n\n";
cout << "1: Town\n";
cout << "2: Summoning Portal\n";
if (!glcomplete)
cout << "3: Grasslands Road (QUEST)\n";
if (glcomplete && !fcomplete)
cout << "4: Forest Road (QUEST)\n";
if (fcomplete && !scomplete)
cout << "5: Swamp Road (QUEST)\n";
if (scomplete && !gcomplete)
cout << "6: Graveyard Road (QUEST)\n";
if (gcomplete && !ccomplete)
cout << "7: Castle Road (QUEST)\n";
cout << "9: View Players Stats\n";
cout << "10: Exit Game\n";
cout << endl;
cout << ">";
cin >> choice;
cin.clear();
cin.ignore(INT_MAX,'\n');
cout << "\n";
switch (choice)
{
case 1:
{
Town(&player);
break;
}
case 2:
{
//determine which level the player is on
int level = 1;
if (glcomplete)
level = 2;
else if (fcomplete)
level = 3;
else if (scomplete)
level = 4;
SummonPortal(&player,level);
break;
}
case 3:
{
if (!glcomplete)
{
if(Grasslands(&player))
glcomplete = true;
}
else
{
cout << "A wandering farmer finds your body and takes you back to town.\n\n";
Wait();
Town(&player);
}
break;
}
case 4:
{
//if (glcomplete && !fcomplete)
//Forest();
break;
}
case 5:
{
//if (fcomplete && !scomplete)
//Swamp();
break;
}
case 6:
{
//if (scomplete && !gcomplete)
//Graveyard();
break;
}
case 7:
{
//if (gcomplete && !ccomplete)
//Castle();
break;
}
case 9:
{
DisplayStats(&player);
break;
}
case 10:
{
//quit
break;
}
default:
{
choice = -1;
}break;
}
}
return true;
}
Helper.cpp
#include "Library.h"
//HELPER FUNCTIONS
void Wait()
{
cout << "Press ENTER to continue\n"
cin.ignore(1);
}
Global.h
#ifndef GLOBAL_DEFINE
#define GLOBAL_DEFINE
// PROTOTYPES
void Wait();
bool Crossroads();
bool Town();
#endif
and these are the erros i get when i try ot compile it:
main.cpp:4: error: '::main' must return 'int'
and just wnna say this is nt even halfway done so if theres anything incomplete thts why and thx for the help in advance :D