Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/presentation/src/world_entities/questGUI/quest.cc @ 10772

Last change on this file since 10772 was 10618, checked in by bknecht, 17 years ago

merged cleanup into trunk (only improvements)

File size: 1.9 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: Andreas Hejj
15
16*/
17
18
19#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
20
21#include "debug.h"
22#include "quest.h"
23
24#include "util/loading/load_param.h"
25#include "util/loading/factory.h"
26
27#include "glgui.h"
28
29
30
31
32
33ObjectListDefinition(Quest);
34
35Quest::Quest(const TiXmlElement* root)
36{
37  this->registerObject(this, Quest::_objectList);
38 
39  this->status = false;
40
41  if( root != NULL)
42    this->loadParams(root);
43
44}
45
46
47/**
48 * deconstructor
49 */
50Quest::~Quest () 
51{
52}
53
54
55
56
57/**
58 * loads the xml tagsthis->questDescription
59 * @param root: root xml tag for this element
60 */
61 
62void Quest::loadParams(const TiXmlElement* root)
63{
64   LoadParam(root, "quest-name", this, Quest, setQuestName)
65       .describe("sets the name of a quest");
66   LoadParam(root, "quest-description", this, Quest, setQuestDescription)
67       .describe("sets the description of a quest");
68   LoadParam(root, "quest-picture", this, Quest, setQuestPicture)
69       .describe("sets the picture of a quest");
70   LoadParam(root, "quest-difficulty", this, Quest, setQuestDifficulty)
71       .describe("sets the difficulty of a quest");
72   LoadParam(root, "quest-persons", this, Quest, setQuestPersons)
73       .describe("sets the number of persons needed for a quest");
74   LoadParam(root, "reward-description", this, Quest, setRewardDescription)
75       .describe("sets the description of a reward");
76   LoadParam(root, "reward-picture", this, Quest, setRewardPicture)
77       .describe("sets the Picture of a reward");
78   
79}
80
81void Quest::setQuestActive()
82{
83  this->status = true;
84}
85
86void Quest::setQuestInactive()
87{
88  this->status = false;
89}
Note: See TracBrowser for help on using the repository browser.