From 598dba9d17838e92f89bcd3ec78c69cc4ce50044 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 6 Feb 2008 21:49:14 +0000 Subject: minor cleanups --- configure.in | 33 +++++++++++++++++++++++++++++---- osirion.kdevelop.pcs | Bin 298526 -> 298592 bytes osirion.kdevses | 2 +- src/core/application.cc | 10 +++++----- src/core/cvar.cc | 3 +-- src/core/func.cc | 2 +- src/filesystem/file.cc | 2 +- src/filesystem/path.cc | 6 ++++-- src/render/render.cc | 4 ++-- 9 files changed, 44 insertions(+), 18 deletions(-) diff --git a/configure.in b/configure.in index 96b21c8..d59ae64 100644 --- a/configure.in +++ b/configure.in @@ -9,7 +9,7 @@ AM_PROG_LIBTOOL dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, dnl if-not-found, test-parameter) -AC_DEFUN(KDE_FIND_PATH, +AC_DEFUN([KDE_FIND_PATH], [ AC_MSG_CHECKING([for $1]) if test -n "$$2"; then @@ -133,14 +133,39 @@ AC_SUBST(LIBSDL_LIBS) AC_SUBST(LIBSDL_CFLAGS) AC_SUBST(LIBSDL_RPATH) - CXXFLAGS="-pipe $DEBUG_CFLAGS $WARN_CFLAGS $CXXFLAGS" AC_SUBST(CXXFLAGS) +dnl --------------------------------------------------------------- +dnl Installation paths + +test "$prefix" = "NONE" && prefix="/opt/games/$PACKAGE" + +BINDIR="$prefix" +LIBDIR="$prefix/lib" +AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", + [Define this to the path containing the game libraries.] +) + +DATADIR="$prefix/data" +AC_DEFINE_UNQUOTED(DATADIR, "$DATADIR", + [Define this to the path containing the game data.] +) + +AC_SUBST(BINDIR) +AC_SUBST(LIBDIR) +AC_SUBST(DATATDIR) + +dnl --------------------------------------------------------------- +dnl Write makefiles and config.h + AC_OUTPUT(Makefile src/Makefile src/client/Makefile src/core/Makefile \ src/filesystem/Makefile src/game/Makefile src/math/Makefile src/render/Makefile src/server/Makefile \ src/sys/Makefile) +dnl --------------------------------------------------------------- +dnl Configuration summary + AC_MSG_RESULT([ The Osirion Project $VERSION @@ -149,8 +174,8 @@ Configuration summary: flags .............. $CXXFLAGS Installation directories: - prefix ............. $PREFIX - program binaries ... $BINDIR + prefix ............. $prefix + binaries ........... $BINDIR libraries .......... $LIBDIR data ............... $DATADIR ]) diff --git a/osirion.kdevelop.pcs b/osirion.kdevelop.pcs index e70b121..cca6c43 100644 Binary files a/osirion.kdevelop.pcs and b/osirion.kdevelop.pcs differ diff --git a/osirion.kdevses b/osirion.kdevses index cc06cff..95b3884 100644 --- a/osirion.kdevses +++ b/osirion.kdevses @@ -3,7 +3,7 @@ - + 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::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::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; } } -- cgit v1.2.3