Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-06 21:49:14 +0000
committerStijn Buys <ingar@osirion.org>2008-02-06 21:49:14 +0000
commit598dba9d17838e92f89bcd3ec78c69cc4ce50044 (patch)
tree08a818d6f4dc6a605baa8ddced6165b7bc72ba1f /src
parent884667848ecf043dd2d8c5421250c88931151bd1 (diff)
minor cleanups
Diffstat (limited to 'src')
-rw-r--r--src/core/application.cc10
-rw-r--r--src/core/cvar.cc3
-rw-r--r--src/core/func.cc2
-rw-r--r--src/filesystem/file.cc2
-rw-r--r--src/filesystem/path.cc6
-rw-r--r--src/render/render.cc4
6 files changed, 14 insertions, 13 deletions
diff --git a/src/core/application.cc b/src/core/application.cc
index a5d2937..e444b14 100644
--- a/src/core/application.cc
+++ b/src/core/application.cc
@@ -15,7 +15,7 @@
namespace core
{
-// --------------- function repository ------------------------------
+// --------------- engine functions ------------------------------
extern "C" void func_print(std::stringstream &args)
{
char text[MAXCMDSIZE];
@@ -52,12 +52,12 @@ extern "C" void func_disconnect(std::stringstream &args)
Application::instance()->disconnect();
}
-extern "C" void func_listfunc(std::stringstream &args)
+extern "C" void func_list_func(std::stringstream &args)
{
func::list();
}
-extern "C" void func_listcvar(std::stringstream &args)
+extern "C" void func_list_var(std::stringstream &args)
{
cvar::list();
}
@@ -131,8 +131,8 @@ void Application::init()
func::add("connect", func_connect);
func::add("disconnect", func_disconnect);
- func::add("listcvar", func_listcvar);
- func::add("listfunc", func_listfunc);
+ func::add("list_var", func_list_var);
+ func::add("list_func", func_list_func);
if (game())
game()->connected = false;
diff --git a/src/core/cvar.cc b/src/core/cvar.cc
index f7402ab..ce31a49 100644
--- a/src/core/cvar.cc
+++ b/src/core/cvar.cc
@@ -156,12 +156,11 @@ Cvar find(const char *name)
void list()
{
- con_print << "Registered variables:" << std::endl;
-
std::map<std::string, Cvar>::iterator it;
for (it = registry.begin(); it != registry.end(); it++) {
con_print << " "<< (*it).first << " " << (*it).second->text() << std::endl;
}
+ con_print << registry.size() << " registered variables." << std::endl;
}
} // namespace cvar
diff --git a/src/core/func.cc b/src/core/func.cc
index 064f77d..02e7f7d 100644
--- a/src/core/func.cc
+++ b/src/core/func.cc
@@ -43,11 +43,11 @@ Func find(const std::string &functionname)
void list()
{
- con_print << "Registered functions:" << std::endl;
std::map<std::string, Func>::iterator it;
for (it = registry.begin(); it != registry.end(); it++) {
con_print << " " << (*it).first << std::endl;
}
+ con_print << registry.size() << " registered functions." << std::endl;
}
} // namespace func
diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc
index 1203d5a..f05e60c 100644
--- a/src/filesystem/file.cc
+++ b/src/filesystem/file.cc
@@ -69,5 +69,5 @@ void File::open(const char * filename, ios_base::openmode mode) {
}
}
-} // namespace common
+} // namespace filesystem
diff --git a/src/filesystem/path.cc b/src/filesystem/path.cc
index 44423b0..096825c 100644
--- a/src/filesystem/path.cc
+++ b/src/filesystem/path.cc
@@ -18,13 +18,15 @@ void Path::create(std::string path)
tmp = tmp.substr(0, tmp.size() - 1);
if (!sys::mkdir(tmp.c_str()))
- con_warn << "could not create directory " << tmp << std::endl;
+ // FIXME check error value
+ con_warn << "Could not create directory " << tmp << std::endl;
else
- con_debug << "directory created " << tmp << std::endl;
+ con_debug << "Directory created " << tmp << std::endl;
}
bool Path::exists(std::string path)
{
+ // FIXME make it work
return false;
}
diff --git a/src/render/render.cc b/src/render/render.cc
index 4f959dc..fa26021 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -14,7 +14,7 @@ GLuint textures[32];
void init()
{
- con_print << "Initializing render..." << std::endl;
+ con_print << "Initializing renderer..." << std::endl;
con_print << " Renderer: " << gl::renderer() << std::endl;
con_print << " Vendor: " << gl::vendor() << std::endl;
@@ -28,7 +28,7 @@ void init()
void shutdown()
{
- con_print << "Shutting down render..." << std::endl;
+ con_print << "Shutting down renderer..." << std::endl;
}
}