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
|
#include<iostream>
#include<irrKlang.h>
#include<fstream>
#pragma comment(lib, "irrKlang.lib")
namespace Cory
{
//control for file in and out functions
std::ofstream out;//from the program to the file
std::ifstream in;//from the file to the program
enum undefKeys {ENTER=13, PAGE_UP=73, HOME=71, END=79, PAGE_DOWN=81, UP_ARROW=72, LEFT_ARROW=75, DOWN_ARROW=80, RIGHT_ARROW=77, F1=59, F2=60, F3=61, F4=62, F5=63, F6=64, F7=65, F8=66, F9=67, F10=68, ESC=27, SPACE=32, BACKSPACE=8};//undefined keys
enum Colors {Black=0, Blue, Green, Cyan, Red, Purple, Brown, Grey, Dgrey, Lblue, Lgreen, Lcyan, Lred, Pink, Yellow, White};//The values of the color by std
Colors DEFAULTBGCOLOR = Colors(1);
Colors DEFAULTTEXTCOLOR = Colors(15);
irrklang::ik_f32 volumeLevel[] = {.0f, .1f, .2f, .3f, .4f, .5f, .6f, .7f, .8f, .9f, 1.0f};//Volume Levels
//Use at the beginning of your code
void RESETTEXTCOLOR();
void FIXRNG();
//^^Use at the beginning of your code^^
//Functions
std::string convertInt(int number);
void coutc(std::string output, int TextColor=DEFAULTTEXTCOLOR, int BackgroundColor=DEFAULTBGCOLOR);//colored text out function
void FailSafe(std::string message = "Major Error shutting down");//when program fail please fail correctly
void SetDefaultTextColor(int ColorA, int ColorB);//changing the default text color
void gotoxy(int x,int y);//go to the x and y coordinates given on the program
int rng(int min, int max, int Randomness=5);//Using a complicated method to provide the best results this outputs a random number
double rng(double min, double max, int Randomness=5);//Using a complicated method to provide the best results this outputs a random number
double encrip(double tbe);//tbe is to be encrypted ~ used for encrypting # variables
double decrip(double tbd);//tbd is to be decrypted ~ used for decrypting the # variables encrypted by the function above
char getkey();//wait for the user to hit something on the keyboard and return what they hit
std::string GetLine(std::string &Mstr);//get a line from user input
void pause(std::string message = "Press any key to continue...");//pause system
void clr();//clear screen
void SuperOutput(std::string Output, bool clearAfterwards = true);//super special awesome output
int ChoiceMenu(int NumOfCh, std::string strg[], irrklang::ISoundEngine* Sound, int x=0, int y=0, bool ClearScreen = true, bool ExitAvalable = true);//arrow key choice function with sounds
int ChoiceMenu(int NumOfCh, std::string strg[], int x=0, int y=0, bool ClearScreen = true, bool ExitAvalable = true);//arrow key choice function without sound
}
| |