Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3472 was 3472, checked in by patrick, 19 years ago

orxonox/trunk: redesigning directory structure - created story_entities dir, moved important classes

File size: 4.1 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#include "story_entity.h"
20
21
22using namespace std;
23
24
25
26StoryEntity::StoryEntity () {}
27StoryEntity::~StoryEntity () {}
28
29
30/**
31    \brief sets the story ID
32
33    sets the story id of the current entity, this enables it to be identified in a
34    global context.
35*/
36void StoryEntity::setStoryID(int storyID)
37{
38  this->storyID = storyID;
39}
40
41
42/**
43    \brief this reads the story id of the current entity
44    \returns the story entity id
45*/
46int StoryEntity::getStoryID()
47{
48  return this->storyID;
49}
50
51
52/**
53    \brief sets the id of the next story entity
54   
55    StoryEntities can choose their following entity themselfs. the entity id defined here
56    will be startet after this entity ends. this can be convenient if you want to have a
57    non linear story with switches.
58*/
59void StoryEntity::setNextStoryID(int nextStoryID)
60{
61  this->nextStoryID = nextStoryID;
62}
63
64/**
65    \brief gets the story id of the current entity
66    \returns story id
67*/
68int StoryEntity::getNextStoryID()
69{
70  return this->nextStoryID;
71}
72
73
74/**
75    \brief initialize the entity before use.
76    \returns an error code if not able to apply.
77
78    After execution of this function, the Entity is ready to be played/executed,
79    this shifts the initialisation work before the execution - very important...
80*/
81ErrorMessage StoryEntity::init()
82{}
83
84
85/**
86    \brief loads the current entity
87
88    this is here to enable you loading maps into the entities. for all other actions you
89    should take the init() function.
90*/
91ErrorMessage StoryEntity::load()
92{}
93
94/**
95    \brief starts the entity with the choosen id. only for entities with lists.
96    \param story id
97    \returns error code if this action has caused a error
98
99    this simply starts the story with the id storyID. the story with the choosen id has
100    to be part of the current entity else, this doesn't make sense. this is used for
101    campaigns or the GameLoader, they have lists of Campaigns/Worlds with their own
102    storyID.
103*/
104ErrorMessage StoryEntity::start(int storyID)
105{}
106
107
108/**
109    \brief starts the current entity
110    \returns error code if this action has caused a error   
111*/
112ErrorMessage StoryEntity::start()
113{}
114
115
116/**
117    \brief pause the current entity
118    \returns error code if this action has caused a error
119
120    this pauses the current entity or passes this call forth to the running entity.
121*/
122ErrorMessage StoryEntity::pause()
123{}
124
125
126/**
127    \brief resumes a pause
128    \returns error code if this action has caused a error
129
130    this resumess the current entity or passes this call forth to the running entity.
131*/
132ErrorMessage StoryEntity::resume()
133{}
134
135
136/**
137    \brief stops the current entity
138    \returns error code if this action has caused a error
139
140    ATTENTION: this function shouldn't call other functions, or if so, they must return
141    after finishing. If you ignore or forget to do so, the current entity is not able to
142    terminate and it will run in the background or the ressources can't be freed or even
143    worse: are freed and the program will end in a segmentation fault!
144    hehehe, all seen... :)
145*/
146ErrorMessage StoryEntity::stop()
147{}
148
149
150/**
151    \brief destroys and cleans up the current entity.
152
153    this cleans up ressources before the deconstructor is called. for terminating
154    the entity please use the stop() function.
155*/
156ErrorMessage StoryEntity::destroy()
157{}
158
159
160/**
161    \brief this displays the load screen
162
163    it will need some time to load maps or things like that. to inform the user about
164    progress and to just show him/her something for the eyes, put here this stuff
165*/
166void StoryEntity::displayLoadScreen()
167{}
168
169
170/**
171    \brief undisplay the load screen
172
173    the load process has terminated, you now can release the load screen and start this
174    entity.
175*/
176void StoryEntity::releaseLoadScreen()
177{}
Note: See TracBrowser for help on using the repository browser.