Merge branch 'config' into rebuild

This commit is contained in:
Kayne Ruse
2014-07-03 02:17:44 +10:00
4 changed files with 59 additions and 16 deletions
+1 -5
View File
@@ -21,15 +21,12 @@
*/
#include "server_application.hpp"
#include "SDL/SDL.h"
#include <stdexcept>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
cout << "Beginning server" << endl;
try {
ServerApplication app;
app.Init(argc, argv);
@@ -37,9 +34,8 @@ int main(int argc, char** argv) {
app.Quit();
}
catch(exception& e) {
cerr << "Fatal error: " << e.what() << endl;
cerr << "Fatal exception thrown: " << e.what() << endl;
return 1;
}
cout << "Clean exit" << endl;
return 0;
}
+3 -4
View File
@@ -38,9 +38,9 @@
void ServerApplication::Init(int argc, char** argv) {
//NOTE: I might need to rearrange the init process so that lua & SQL can interact with the map system as needed.
std::cout << "Beginning startup" << std::endl;
std::cout << "Beginning " << argv[0] << std::endl;
//initial setup
//load the prerequisites
config.Load("rsc\\config.cfg");
//-------------------------
@@ -114,7 +114,6 @@ void ServerApplication::Init(int argc, char** argv) {
//debug output
//-------------------------
//TODO: put these outputs into the client too
//TODO: enable/disable these with a switch
#define DEBUG_OUTPUT_VAR(x) std::cout << "\t" << #x << ": " << x << std::endl;
@@ -179,7 +178,7 @@ void ServerApplication::Quit() {
SDLNet_Quit();
SDL_Quit();
std::cout << "Shutdown finished" << std::endl;
std::cout << "Clean exit" << std::endl;
}
//-------------------------