Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/application.h')
-rw-r--r--src/core/application.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/core/application.h b/src/core/application.h
index 9a531de..5bdc6ef 100644
--- a/src/core/application.h
+++ b/src/core/application.h
@@ -9,6 +9,8 @@
#include "core/cvar.h"
#include "core/netserver.h"
+#include "core/netconnection.h"
+#include "core/gameinterface.h"
namespace core
{
@@ -16,6 +18,12 @@ namespace core
/// cvar to indicate dedicated server status
extern Cvar sv_dedicated;
+/// cvar to indicate private server status
+/**
+ * A private server is a client with server cababilities.
+ */
+extern Cvar sv_private;
+
/// core interface for the client and server Application classes
class Application
{
@@ -35,26 +43,40 @@ public:
/// run a core frame
virtual void frame(float seconds);
- /// a pointer to the current console instance
+ /// a pointer to the current application instance
static Application *instance();
/// quit the application
virtual void quit(int status);
- /// load the game module
- void connect();
+ /// start the server or connect to remote host
+ void connect(std::string const &host);
/// disconnect from the game module
void disconnect();
- /// time the core has been running, in seconds
- float current_time;
+ /// time the has been connected, in seconds
+ float time() const;
- /// global application object
- static Application *application_instance;
+ /// preloaded game object
+ GameInterface *gameinterface_preload;
+
+ /// true if the core is connected to a game module or a remote server
+ bool connected() const;
/// network server instance
NetServer *netserver;
+
+ /// network client to server connection
+ NetConnection netconnection;
+
+ /// global application object
+ static Application *application_instance;
+
+private:
+ /// time the core has been running
+ float game_time;
+
};