From f46be446304dcb2d609fcd2648fd36d3f2fda054 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 28 Sep 2008 18:02:06 +0000 Subject: intro module groundworks --- src/game/intro/intro.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/game/intro/intro.cc (limited to 'src/game/intro/intro.cc') 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() +{ +} + +} + -- cgit v1.2.3