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>2008-02-16 14:31:02 +0000
committerStijn Buys <ingar@osirion.org>2008-02-16 14:31:02 +0000
commitd198b7b8d9ff713d891f35ab173d1f428f610e7d (patch)
tree6a1f76ee5788ee3dfac858e2c8233207637c01bc /src/core/gameinterface.h
parentd6ee7ec642cc6b3097c8d321a1a00630e24027d1 (diff)
code cleanup
Diffstat (limited to 'src/core/gameinterface.h')
-rw-r--r--src/core/gameinterface.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/core/gameinterface.h b/src/core/gameinterface.h
index 4b18a9e..457df86 100644
--- a/src/core/gameinterface.h
+++ b/src/core/gameinterface.h
@@ -12,14 +12,18 @@
namespace core
{
+/// broadcast a network message to all players
+void message_broadcast(std::string const & message, int ignoreplayer=-1);
+
+/// send a message to a player
+void message_send(Player &player, std::string const & message);
+
/// abstract interface from the core to the game-specific code
-/** The real game class has to derive from this class
- */
class GameInterface
{
public:
/// create a new game
- GameInterface(const char *game_name = 0);
+ GameInterface(const char *gamename = 0);
/// destroy the game
virtual ~GameInterface();
@@ -29,9 +33,6 @@ public:
/// true if the game is ready and running
bool connected;
- /// time the game has been running, in seconds
- float current_time;
-
/// run one frame of the game
/// @param sec time since the previous frame, in seconds
virtual void frame(float seconds) = 0;
@@ -51,9 +52,15 @@ public:
static GameInterface *gameinterface_instance;
/// the name of the game
- std::string name;
+ std::string const & name();
+
+private:
+ std::string game_name;
};
+/// pointer to the current GameInterface
+GameInterface *game();
+
}
#endif // __INCLUDED_CORE_GAMEINTERFACE_H__