Changeset 4

User picture

Author: Kelwing

(2009/09/08 21:22) Over 2 years ago

Added linux support

Affected files

Updated trunk/main.cpp Download diff

34
5
#include <iostream>
5
#include <iostream>
6
#include <time.h>
6
#include <time.h>
7
#include <string>
7
#include <string>
8
#include <cstdlib>
8
#include "player.h"
9
#include "player.h"
9
#include "enemy.h"
10
#include "enemy.h"
10
11
...
...
78
        case 1:
79
        case 1:
79
            fight(newplayer, newenemy);
80
            fight(newplayer, newenemy);
80
            break;
81
            break;
81
        case 2:
82
        case 2: // Anyone want to help me implement an item shop?
82
            cout << "Not implemented." << endl;
83
            cout << "Not implemented." << endl;
83
            break;
84
            break;
84
        case 3:
85
        case 3: // I don't know why I didn't just change this sooner.
85
            cout << "Not implemented." << endl;
86
            cont = 'n';
86
            break;
87
            break;
87
        default:
88
        default:
88
            cout << "Error: Invalid menu choice." << endl;
89
            cout << "Error: Invalid menu choice." << endl;
...
...
92
        cin >> cont;
93
        cin >> cont;
93
    }
94
    }
94
    cout << "I'm ridin on a dolphin, doin flips and shit. The dolphins splashin gettin everybody all wet, but this ain't sea world, this is real as
it gets. I'm on a boat motherfucker don't you ever forget." << endl;
95
    cout << "I'm ridin on a dolphin, doin flips and shit. The dolphins splashin gettin everybody all wet, but this ain't sea world, this is real as
it gets. I'm on a boat motherfucker don't you ever forget." << endl;
96
    #ifdef WIN32 // Pause waits for user input before closing.
95
    system("pause");
97
    system("pause");
98
    #else
99
    cout << "\nWill automatically close in 5 seconds." << endl;
100
    system("sleep 5");
101
    #endif
102
    // I will remove this whole thing once i'm not too lazy to make a cross platform, pure C++ pause.
96
    return 0;
103
    return 0;
97
}
104
}