Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

network: MultiPlayerWorld does load again

File size: 1.7 KB
Line 
1/*
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.
10
11   ### File Specific:
12   main-programmer: Patrick Boenzli
13*/
14
15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
16
17#include "single_player_world.h"
18#include "single_player_world_data.h"
19
20#include "state.h"
21#include "class_list.h"
22
23#include "load_param.h"
24#include "fast_factory.h"
25#include "factory.h"
26
27#include "world_entity.h"
28#include "npcs/npc_test1.h"
29
30
31using namespace std;
32
33//! This creates a Factory to fabricate a SinglePlayerWorld
34CREATE_FACTORY(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);
35
36
37
38SinglePlayerWorld::SinglePlayerWorld(const TiXmlElement* root)
39  : GameWorld(root)
40{
41  this->setClassID(CL_SINGLE_PLAYER_WORLD, "SinglePlayerWorld");
42  this->setName("SinglePlayerWorld uninitialized");
43
44  this->dataTank = new SinglePlayerWorldData();
45
46  this->loadParams(root);
47}
48
49
50/**
51 *  remove the SinglePlayerWorld from memory
52 *
53 *  delete everything explicitly, that isn't contained in the parenting tree!
54 *  things contained in the tree are deleted automaticaly
55 */
56SinglePlayerWorld::~SinglePlayerWorld ()
57{
58  PRINTF(3)("SinglePlayerWorld::~SinglePlayerWorld() - deleting current world\n");
59
60  if( this->dataTank)
61    delete this->dataTank;
62}
63
64
65/**
66 * loads the parameters of a SinglePlayerWorld from an XML-element
67 * @param root the XML-element to load from
68 */
69void SinglePlayerWorld::loadParams(const TiXmlElement* root)
70{
71  static_cast<GameWorld*>(this)->loadParams(root);
72
73  PRINTF(4)("Loaded SinglePlayerWorld specific stuff\n");
74}
75
Note: See TracBrowser for help on using the repository browser.