Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/story_entities/story_entity.cc @ 6839

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

trunk: the menu is processing

File size: 1.7 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer:
16*/
17
18
19#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
20
21
22#include "story_entity.h"
23
24#include "load_param.h"
25
26
27using namespace std;
28
29
30/**
31 *  default constructor initializes all needed data
32 */
33StoryEntity::StoryEntity ()
34{
35  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
36
37  this->isInit = false;
38  this->isPaused = false;
39  this->isRunning = false;
40
41  this->storyID = -1;
42  this->description = NULL;
43  this->nextStoryID = WORLD_ID_GAMEEND;
44  this->bMenuEntry = false;
45}
46
47
48/**
49 *  deconstructor
50 */
51StoryEntity::~StoryEntity ()
52{}
53
54
55/**
56 *  loads the Parameters of a Campaign
57 * @param root: The XML-element to load from
58 */
59void StoryEntity::loadParams(const TiXmlElement* root)
60{
61  BaseObject::loadParams(root);
62
63  LoadParam(root, "identifier", this, StoryEntity, setStoryID)
64      .describe("A Unique Identifier for this StoryEntity");
65
66  LoadParam(root, "nextid", this, StoryEntity, setNextStoryID)
67      .describe("Sets the ID of the next StoryEntity");
68
69  LoadParam(root, "description", this, StoryEntity, setDescription)
70      .describe("Sets the description of this StoryEntity");
71
72  LoadParam(root, "menu-entry", this, StoryEntity, addToGameMenu)
73      .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
74
75  PRINTF(4)("Loaded StoryEntity specific stuff\n");
76}
Note: See TracBrowser for help on using the repository browser.