Obligatory ascii art introduction
parent
79cb99638b
commit
0143979e12
|
@ -28,13 +28,13 @@ std::map<std::string, std::string> parseArgs(int argc, char* argv[]) {
|
|||
std::string first = (equals == -1) ? arg : arg.substr(0, equals);
|
||||
|
||||
if (args.count(first)) {
|
||||
std::cout << Log::err << "Duplicate argument " << first << "." << Log::endl;
|
||||
std::cerr << "Duplicate argument '" << first << "'" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
if (equals == -1) args.emplace(first, "");
|
||||
else {
|
||||
if (equals == arg.length() - 1) {
|
||||
std::cout << Log::err << "Empty equals-assignment " << first << "." << Log::endl;
|
||||
std::cerr << "Empty argument '" << first << "'" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
args.emplace(first, arg.substr(equals + 1, arg.length()));
|
||||
|
@ -76,6 +76,18 @@ int StartGame(int argc, char* argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
// Obligatory ASCII Art is obligatory.
|
||||
Log::clear();
|
||||
std::cout << "\n"
|
||||
"\t\t▒███████▒▓█████ ██▓███ ██░ ██ ▄▄▄ \n"
|
||||
"\t\t▒ ▒ ▒ ▄▀░▓█ ▀ ▓██░ ██▒▓██░ ██▒▒████▄ \n"
|
||||
"\t\t░ ▒ ▄▀▒░ ▒███ ▓██░ ██▓▒▒██▀▀██░▒██ ▀█▄ \n"
|
||||
"\t\t ▄▀▒ ░▒▓█ ▄ ▒██▄█▓▒ ▒░▓█ ░██ ░██▄▄▄▄██ \n"
|
||||
"\t\t▒███████▒░▒████▒▒██▒ ░ ░░▓█▒░██▓ ▓█ ▓██▒\n"
|
||||
"\t\t░▒▒ ▓░▒░▒░░ ▒░ ░▒▓▒░ ░ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░\n"
|
||||
"\t\t░ ▒ ▒ ░ ▒ ░ ░ ░░▒ ░ ▒ ░▒░ ░ ▒ ▒▒ ░\n"
|
||||
"\t\t ░ ░ ░ ░ ░░ ░ ░ ░ ▒ \n" << std::endl;
|
||||
|
||||
//Start the game
|
||||
switch (mode) {
|
||||
default: {
|
||||
|
|
|
@ -20,7 +20,9 @@ Client::Client(uptr<LocalServerInstance> localServer, glm::vec2 dimensions) :
|
|||
}
|
||||
|
||||
void Client::init() {
|
||||
if (localServer != nullptr) localServer->start();
|
||||
std::cout << Log::info << "Starting Zepha Client." << Log::endl;
|
||||
|
||||
// if (localServer != nullptr) localServer->start();
|
||||
|
||||
std::unique_ptr<Scene> scene = std::make_unique<MainMenuScene>(state);
|
||||
sceneManager.setScene(std::move(scene));
|
||||
|
|
|
@ -16,6 +16,8 @@ Server::Server(const std::string& path, unsigned short port, const std::string&
|
|||
world.init();
|
||||
config.init();
|
||||
|
||||
std::cout << Log::info << "Server started successfully." << Log::endl;
|
||||
std::cout << Log::info << "Listening for clients." << Log::endl;
|
||||
while (alive) update();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,13 @@ namespace Log {
|
|||
static const char* info = "[INFO] ";
|
||||
static const char* err = "[ERR!] ";
|
||||
static const char* endl = "\n";
|
||||
|
||||
static void clear() { auto s = system("cls"); }
|
||||
#else
|
||||
static const char* info = "\033[36m[INFO] ";
|
||||
static const char* err = "\033[31m[ERR!] ";
|
||||
static const char* endl = "\033[0m\n";
|
||||
|
||||
static void clear() { auto s = system("clear"); }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@ void NetHandler::initServer(unsigned short port, short max_clients) {
|
|||
return;
|
||||
}
|
||||
|
||||
std::cout << Log::info << "Server Started. Listening for clients." << Log::endl;
|
||||
std::cout << Log::info << "Starting Zepha Server." << Log::endl;
|
||||
}
|
||||
|
||||
void NetHandler::initClient(Address hostAddress, int attempts, int timeout) {
|
||||
|
|
Loading…
Reference in New Issue