Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/src/world_entities/questGUI/quest.cc @ 10620

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

merged branche gui

File size: 2.2 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 "event_handler.h"
25
26#include "state.h"
27
28#include "util/loading/load_param.h"
29#include "util/loading/factory.h"
30
31#include "graphics_engine.h"
32#include "camera.h"
33#include "sound_engine.h"
34
35#include "sound_source.h"
36
37#include "glgui.h"
38#include "menu/glgui_imagebutton.h"
39#include "glgui_multiline_text.h"
40#include <glgui_image.h>
41
42
43#include "shell_command.h"
44
45
46
47
48ObjectListDefinition(Quest);
49
50Quest::Quest(const TiXmlElement* root)
51{
52  this->registerObject(this, Quest::_objectList);
53 
54  this->Status = false;
55
56  if( root != NULL)
57    this->loadParams(root);
58
59}
60
61
62/**
63 * deconstructor
64 */
65Quest::~Quest () 
66{
67}
68
69
70
71
72/**
73 * loads the xml tagsthis->questDescription
74 * @param root: root xml tag for this element
75 */
76 
77void Quest::loadParams(const TiXmlElement* root)
78{
79   LoadParam(root, "quest-name", this, Quest, setQuestName)
80       .describe("sets the name of a quest");
81   LoadParam(root, "quest-description", this, Quest, setQuestDescription)
82       .describe("sets the description of a quest");
83   LoadParam(root, "quest-picture", this, Quest, setQuestPicture)
84       .describe("sets the picture of a quest");
85   LoadParam(root, "quest-difficulty", this, Quest, setQuestDifficulty)
86       .describe("sets the difficulty of a quest");
87   LoadParam(root, "quest-persons", this, Quest, setQuestPersons)
88       .describe("sets the number of persons needed for a quest");
89   LoadParam(root, "reward-description", this, Quest, setRewardDescription)
90       .describe("sets the description of a reward");
91   LoadParam(root, "reward-picture", this, Quest, setRewardPicture)
92       .describe("sets the Picture of a reward");
93   
94}
95
96void Quest::setQuestActive()
97{
98  this->Status = true;
99}
100
101void Quest::setQuestInactive()
102{
103  this->Status = false;
104}
105
106const bool Quest::getQuestStatus()
107{
108  return this->Status;
109}
Note: See TracBrowser for help on using the repository browser.