#include "Library.h"
short int CursourPostion;
short int ControlCode;
string BoxType;
string Line[4];
int main()
{
Area S;
S.PostionId[1] = 9;
Entity Character;
Character.EntityPostion = 1;
Character.Move();
}
#ifndef LIBRARY_H_INCLUDED
#define LIBRARY_H_INCLUDED
#include <iostream>
#include <cstdlib>
#include <windows.h>
#include <fstream>
#include <time.h>
#include <conio.h>
using namespace std;
void Controls();
void ErrorCode();
void GameShutDown();
extern short int ControlCode;
extern short int CursourPostion;
extern string BoxType;
extern string Line[4];
class Entity
{
public:
string Name;
int EntityPostion;
void Move();
};
class Attack
{
public:
string Name;
string Description;
string Type;
int TypeSystemInfo;
int power;
void CreateArea();
};
class Area
{
public:
int Id;
int PostionId[9];
void CreateArea();
};
#endif // LIBRARY_H_INCLUDED
#include "Library.h"
void ShowTextBox()
{
int LineLength;
cout << " 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" << endl;
if(BoxType == "Basic")
{
cout << " .........................." << endl;
LineLength = 24 - Line[1].length();
cout << " ."; cout << Line[1]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 1){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
cout << " .........................." << endl;
LineLength = 24 - Line[2].length();
cout << " ."; cout << Line[2]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 2){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
LineLength = 24 - Line[3].length();
cout << " ."; cout << Line[3]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 3){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
LineLength = 24 - Line[4].length();
cout << " ."; cout << Line[4]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 4){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
cout << " .........................." << endl;
cout << S.PostionId;
Sleep(5000);
}
else if(BoxType == "Answer")
{
cout << " .........................." << endl;
LineLength = 24 - Line[7].length();
cout << " ."; cout << Line[7]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 1){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
cout << " .........................." << endl;
LineLength = 24 - Line[8].length();
cout << " ."; cout << Line[8]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 2){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
LineLength = 24 - Line[9].length();
cout << " ."; cout << Line[9]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 3){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
LineLength = 24 - Line[10].length();
cout << " ."; cout << Line[10]; if(LineLength < 24){while(LineLength > 0){cout << " "; LineLength = LineLength - 1;}}else{} cout << "."; if(CursourPostion == 4){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);cout << "<" << endl;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7);}else{cout << " " << endl;}
cout << " .........................." << endl;
}
}