All pastes #232985 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-11-01 18:08 UTC
rendered paste body
#include <iostream>    // Omg the almighty first header file O.o

using namespace std;    // something mirchiss likes xD


// start of the clearscreen code  to use it ---> clrscrn();


void clrscr(void) 
    { // clear screen function  
    COORD                       coordScreen = { 0, 0 };
    DWORD                       cCharsWritten;
    CONSOLE_SCREEN_BUFFER_INFO  csbi;
    DWORD                                       dwConSize;
    HANDLE                      hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    GetConsoleScreenBufferInfo(hConsole, &csbi);
    dwConSize = csbi.dwSize.X * csbi.dwSize.Y;
    FillConsoleOutputCharacter(hConsole, TEXT(' '), 
                               dwConSize, coordScreen, &cCharsWritten);
    GetConsoleScreenBufferInfo(hConsole, &csbi);
    FillConsoleOutputAttribute(hConsole, csbi.wAttributes, 
                               dwConSize, coordScreen, &cCharsWritten);
    SetConsoleCursorPosition(hConsole, coordScreen);
    }
// end 
     
void STSCREEN()   // Start game screen
{
     cout << "Welcome in this town called Urgath";
     cout << "On your left we have a Shop";
     cout << "On your right we have a Blacksmithshop";
     cout << "Or you can walk to the Battle Zone"; 
     cout << "Where you want to go?";
     cout << "1. To the Shop";
     cout << "2. to the Blacksmith Shop";
     cout << "3. to the Battle Zone";
     cin >> input;
     
     switch (input) 
{
            
            case 1:
                 
                 //source code
                 break;
                 
            case 2: 
                                  
                 //source code
                 break;
            
            case 3:
                                  
                 //source code
                 break;
}
                 
}
                 // END OF THE STSCREEN OF THE GAME
                 
                 

       
     
     
int main () {       // the Main fucntion it is oh yes

     cout << "Make a selection";
     cout << "\n";
     cout << " 1. Start Game ";      // option 1
     cout << "\n";
     cout << " 2. Exit";  // option 2
     cout << "\n";
     cout << "Copiright Harmen Laan A.K.A The Tathor";
     cin >> input;
     
     switch (input) {
            
            case 1:
                 clrscrn();
                 STSCREEN()
                 cin.get();
                 break;
            case 2:
                 clrscrn();
                 cout << "Tnx for playing My Little game";
                 cin.get();
                 break;
                 
            default:           
                 cout << "Bad Input you funky guy"; // if you putt bad in put
                 cin.get();
                 break;
  }
  
  return 0;
  
  
}