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-09-28 18:02:06 +0000
committerStijn Buys <ingar@osirion.org>2008-09-28 18:02:06 +0000
commitf46be446304dcb2d609fcd2648fd36d3f2fda054 (patch)
tree36e194d6e2d9d8fc48d03c4b8bb56d63e12276cf /src/game/intro/intro.cc
parentfd778219e40c5fbb4d0af1839cbc313caaf10d9d (diff)
intro module groundworks
Diffstat (limited to 'src/game/intro/intro.cc')
-rw-r--r--src/game/intro/intro.cc59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/game/intro/intro.cc b/src/game/intro/intro.cc
new file mode 100644
index 0000000..c0ae6da
--- /dev/null
+++ b/src/game/intro/intro.cc
@@ -0,0 +1,59 @@
+/*
+ intro/intro.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "intro/intro.h"
+#include "sys/sys.h"
+
+namespace intro {
+
+Intro::Intro() : core::Module("Introduction")
+{
+ intro_zone = 0;
+}
+
+Intro::~Intro()
+{
+}
+
+void Intro::init()
+{
+ /// intialize a single zone for the introduction
+ intro_zone = new core::Zone("intro");
+ intro_zone->set_name("Introduction");
+ core::Zone::add(intro_zone);
+
+ /// add a planet
+ core::EntityGlobe *planet = new core::EntityGlobe();
+ planet->set_zone(intro_zone);
+ planet->set_name("Planet");
+ planet->set_label("planet");
+ planet->entity_texture.assign("planets/seymour");
+ planet->entity_location.assign(0, -32.0f, 0.0f);
+ planet->entity_radius = 64.0f;
+ planet->entity_rotationspeed = 1.0f;
+
+ module_running = true;
+}
+
+void Intro::player_connect(core::Player *player)
+{
+ player->set_zone(intro_zone);
+}
+
+void Intro::player_disconnect(core::Player *player)
+{
+}
+
+void Intro::frame(float seconds)
+{
+}
+
+void Intro::shutdown()
+{
+}
+
+}
+