Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/story_entities/single_player_world.cc @ 9716

Last change on this file since 9716 was 9716, checked in by bensch, 18 years ago

more renamings

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