Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/core/application.cc
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/core/application.cc')
-rw-r--r--src/core/application.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/core/application.cc b/src/core/application.cc
index 4132c33..1d7ded2 100644
--- a/src/core/application.cc
+++ b/src/core/application.cc
@@ -58,7 +58,7 @@ extern "C" void signal_handler(int signum)
break;
}
}
-#endif
+#endif
/* ---- class Application ------------------------------------------ */
@@ -84,7 +84,7 @@ Application::Application()
sys::signal(SIGWINCH, signal_handler);
#endif
#endif
-
+
}
Application::~Application()
@@ -96,7 +96,7 @@ void Application::init(int count, char **arguments)
{
con_print << "^BInitializing core...\n";
con_debug << " debug messages enabled\n";
-
+
filesystem::init(arguments[0], "base", "");
Loader::load("base");
@@ -162,7 +162,7 @@ void Application::init(int count, char **arguments)
// Initialize win32 socket library
WSADATA wsa_data;
WORD wsa_version = MAKEWORD(2, 0);
- if (WSAStartup(wsa_version, &wsa_data) != 0 ) {
+ if (WSAStartup(wsa_version, &wsa_data) != 0) {
con_warn << "Could not initialize socket library!" << std::endl;
}
#endif
@@ -175,7 +175,7 @@ void Application::init(int count, char **arguments)
func = Func::add("quit", Application::func_quit);
func->set_info("exit the application");
-
+
func = Func::add("load", Application::func_load);
func->set_info("[string] load a game module");
@@ -218,7 +218,7 @@ void Application::shutdown()
Func::remove("say");
Func::remove("help");
Func::remove("quit");
-
+
Func::remove("connect");
Func::remove("disconnect");
Func::remove("load");
@@ -268,7 +268,7 @@ void Application::connect(std::string const &host)
if (application_game) {
disconnect();
}
-
+
if (host.size()) {
notify_connect();
application_game = new GameConnection(host);
@@ -282,7 +282,7 @@ void Application::connect(std::string const &host)
application_game = new GameServer();
if (application_game->running()) {
- con_print << "^BConnected to local game.\n";
+ con_print << "^BConnected to local game.\n";
} else {
delete application_game;
application_game = 0;
@@ -293,7 +293,7 @@ void Application::connect(std::string const &host)
void Application::disconnect()
{
- if(application_game) {
+ if (application_game) {
delete application_game;
application_game = 0;
notify_disconnect();
@@ -310,11 +310,11 @@ void Application::frame(unsigned long timestamp)
if (!connected())
return;
-
- // run a game interface frame
+
+ // run a game interface frame
application_game->frame(timestamp);
-
- if (!application_game->running())
+
+ if (!application_game->running())
disconnect();
}
@@ -345,7 +345,7 @@ void Application::save_config()
for (Cvar::Registry::iterator it = Cvar::registry().begin(); it != Cvar::registry().end(); it++) {
if (((*it).second->flags() & Cvar::Archive) == Cvar::Archive) {
ofs << "# " << (*it).first << " " << (*it).second->info() << std::endl;
- ofs << "set " << (*it).first << " " << (*it).second->str() << std::endl;
+ ofs << "set " << (*it).first << " " << (*it).second->str() << std::endl;
ofs << std::endl;
}
}
@@ -369,18 +369,18 @@ void Application::load_config()
con_print << " reading configuration from " << filename << std::endl;
char line[MAXCMDSIZE];
- while (ifs.getline(line, MAXCMDSIZE-1)) {
+ while (ifs.getline(line, MAXCMDSIZE - 1)) {
if (line[0] && line[0] != '#' && line[0] != ';')
cmd() << line << '\n';
}
-
+
// execute commands in the buffer
CommandBuffer::exec();
}
void Application::load_autoexec()
{
- if (Cvar::sv_dedicated->value())
+ if (Cvar::sv_dedicated->value())
return;
std::string filename(filesystem::writedir());
@@ -391,12 +391,12 @@ void Application::load_autoexec()
con_warn << "Could not read " << filename << std::endl;
std::ofstream ofs(filename.c_str());
-
+
if (!ofs.is_open()) {
con_warn << "Could not write " << filename << std::endl;
return;
}
-
+
ofs << "# autoexec.cfg - osirion client custom settings" << std::endl;
ofs << "# put your custom settings here" << std::endl;
ofs.close();
@@ -405,13 +405,13 @@ void Application::load_autoexec()
} else {
con_print << " reading configuration from " << filename << std::endl;
-
+
char line[MAXCMDSIZE];
- while (ifs.getline(line, MAXCMDSIZE-1)) {
+ while (ifs.getline(line, MAXCMDSIZE - 1)) {
if (line[0] && line[0] != '#' && line[0] != ';')
cmd() << line << '\n';
}
-
+
CommandBuffer::exec();
}
}
@@ -421,9 +421,9 @@ void Application::load_commandline(int count, char **arguments)
if (count < 2)
return;
- for (int i=1; i < count; i++) {
+ for (int i = 1; i < count; i++) {
if (arguments[i][0] == '+') {
- if (i >1)
+ if (i > 1)
cmd() << '\n';
if (arguments[i][1])
@@ -535,7 +535,7 @@ void Application::func_rcon(std::string const &args)
if (rconpassword && rconpassword->str().size()) {
connection()->rcon(args);
} else {
- con_warn << "rconpassword not set!" << std::endl;
+ con_warn << "rconpassword not set!" << std::endl;
}
} else if (server()) {
cmd() << args << "\n";