Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/story_entities/single_player_world.cc @ 6407

Last change on this file since 6407 was 6407, checked in by patrick, 18 years ago

network: the worlds get loaded again in the new framework

File size: 1.7 KB
RevLine 
[4555]1/*
[1853]2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
[1855]10
11   ### File Specific:
12   main-programmer: Patrick Boenzli
[1853]13*/
14
[3590]15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
16
[6358]17#include "single_player_world.h"
[6404]18#include "single_player_world_data.h"
[3608]19
[4347]20#include "state.h"
[6358]21#include "class_list.h"
[4347]22
[4726]23#include "load_param.h"
[4940]24#include "fast_factory.h"
[4261]25#include "factory.h"
[4245]26
[6360]27#include "world_entity.h"
28#include "npcs/npc_test1.h"
[4504]29
[4747]30
[6358]31using namespace std;
[4820]32
[6358]33//! This creates a Factory to fabricate a SinglePlayerWorld
[6360]34CREATE_FACTORY(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);
[5915]35
[5996]36
[5205]37
[6358]38SinglePlayerWorld::SinglePlayerWorld(const TiXmlElement* root)
39  : GameWorld(root)
[4010]40{
[6402]41  this->setClassID(CL_SINGLE_PLAYER_WORLD, "SinglePlayerWorld");
[6374]42  this->setName("SinglePlayerWorld uninitialized");
43
[6407]44  this->dataTank = new SinglePlayerWorldData();
45
[4261]46  this->loadParams(root);
[4010]47}
48
[6358]49
[4555]50/**
[6358]51 *  remove the SinglePlayerWorld from memory
[6150]52 *
53 *  delete everything explicitly, that isn't contained in the parenting tree!
54 *  things contained in the tree are deleted automaticaly
[4838]55 */
[6358]56SinglePlayerWorld::~SinglePlayerWorld ()
[1872]57{
[6358]58  PRINTF(3)("SinglePlayerWorld::~SinglePlayerWorld() - deleting current world\n");
59}
[3677]60
[5115]61
[3526]62/**
[6358]63 * loads the parameters of a SinglePlayerWorld from an XML-element
[4978]64 * @param root the XML-element to load from
65 */
[6358]66void SinglePlayerWorld::loadParams(const TiXmlElement* root)
[4261]67{
[6364]68  static_cast<GameWorld*>(this)->loadParams(root);
[4261]69
[6376]70  PRINTF(4)("Loaded SinglePlayerWorld specific stuff\n");
[6358]71}
[4834]72
Note: See TracBrowser for help on using the repository browser.