Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in33
-rw-r--r--osirion.kdevelop.pcsbin298526 -> 298592 bytes
-rw-r--r--osirion.kdevses2
-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
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
--- a/osirion.kdevelop.pcs
+++ b/osirion.kdevelop.pcs
Binary files differ
diff --git a/osirion.kdevses b/osirion.kdevses
index cc06cff..95b3884 100644
--- a/osirion.kdevses
+++ b/osirion.kdevses
@@ -3,7 +3,7 @@
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="2" >
<Doc0 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/client/video.cc" >
- <View0 Encoding="" line="105" Type="Source" />
+ <View0 Encoding="" Type="Source" />
</Doc0>
<Doc1 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/cvar.cc" >
<View0 Encoding="" line="81" Type="Source" />
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;
}
}