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
|
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM,LPARAM);
using namespace std;
//FOR RACE CHOICE
int a = 1,
b = 0,
//FOR WEAPON CHOICE
c = 1,
d = 0;
string name,
gender2;
//ARRAYS
string RACE[10] = {"Breton", "Imperial", "Nord", "Redguard", "Altmer", "Bosmer", "Dunmer", "Orc", "Argonian", "Khajiit" },
WEAPON[6] = {"Dagger", "Sword", "Spear", "Axe", "Club", "Bow"};
char gender,
choice;
int main(void){
cout<<"Welcome to Corey and Rachel's Test Game :]" << endl;
cout<<endl;
//BEGINNING OF PLAYERS NAME CHOICE
cout<<"Please input your characters name..." << endl;
cout<<endl;
cin>>name;
cout<<endl;
cout<<"Is " << name << " the correct name you wanted?\n Enter y (for yes) or n (for no)..." << endl;
cout<<endl;
cin>>choice;
cout<<endl;
while(choice !='n' && choice !='y'){
cout<<"Sorry, please use lower case y or n" <<endl;
cout<<endl;
cin>>choice;
cout<<endl;
}
while(choice=='n' ){
cout<<"Please input your characters name..." << endl;
cout<<endl;
cin>>name;
cout<<endl;
cout<<"Is " << name << " the correct name you wanted? Please enter y or n" << endl;
cout<<endl;
cin>>choice;
}
//BEGINNING OF PLAYER'S CHARACTER'S GENDER CHOICE
cout<<"What is your gender? m (for male) f (for female)\n\n";
cin>>gender;
while(gender !='m' && gender !='f'){
cout<<"Sorry, please use lower case letters\n\n";
cin>>gender;
}
cout<<endl;
if(gender=='m'){
gender2="male";
}
if(gender=='f'){
gender2="female";
}
//BEGINNING OF PLAYERS CHARACTERS RACE CHOICE
cout<<"Please choose your race by entering the correspondoing number\n\n";
//FOR loop to display classes with buttons to choose which one you want
for(int i = 0; i < 10; ++i){
HWND hWnd = CreateWindow("className","title",WS_VISIBLE | WS_CHILD, (80*i+10), 10, 80, 25,NULL,NULL,HINSTANCE,NULL);
HWND handles[10];
handles[i] = CreateWindow("button",RACE[i].c_str(),WS_VISIBLE | WS_CHILD,(80*i+10),10,80,25,hWnd,NULL,hInstance,NULL);
a++;
}
cout<<endl;
cin>>b;
while( b<1 || b>10 ){
cout<<"\nSorry, you need to enter 1 - 10 for the corresponding class\n\n";
cin>>b;
}
|