ScummVM API documentation
te_scene_warp.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TETRAEDGE_TE_TE_SCENE_WARP_H
23 #define TETRAEDGE_TE_TE_SCENE_WARP_H
24 
25 #include "tetraedge/te/te_camera.h"
26 #include "tetraedge/te/te_warp.h"
27 #include "tetraedge/te/te_warp_bloc.h"
28 
29 namespace Tetraedge {
30 
31 class TePickMesh;
32 
33 class TeSceneWarp {
34  friend class TeSceneWarpXmlParser;
35 
36 public:
37  class Animation {
38  public:
39  Animation() : _fps(0) {}
40  Common::String _name;
41  float _fps;
42  };
43  class Exit {
44  public:
45  Exit() : _nbWarpBlock(0), _markerId(0), _camAngleX(0.0f), _camAngleY(0.0f) {}
46  Common::String _name;
47  Common::String _linkedWarp;
48  unsigned long _markerId;
49  int _nbWarpBlock;
50  float _camAngleX;
51  float _camAngleY;
52  Common::List<TeWarpBloc> _warpBlocs;
54  };
55  class Object {
56  public:
57  Object() : _markerId(0) {}
58  Common::String _name;
59  Common::String _str2;
60  unsigned long _markerId;
62  };
63  class WarpEvent {
64  public:
65  Common::String _name;
67  };
68 
69  TeSceneWarp();
70  ~TeSceneWarp();
71 
72  //void activeMarker(const Common::String &s1, const Common::String &s2) // unused
73  //Common::String addMarkerToAnimation(const Common::String &animName); // unused
74  void close();
75  //void createExit(); // unused
76  const Animation *getAnimation(const Common::String &name);
77  const Exit *getExit(const Common::String &linkedWarp);
78  const Object *getObject(const Common::String &name);
79  const WarpEvent *getWarpEvent(const Common::String &name); // TODO: what's the right return type?
80  bool load(const Common::Path &name, TeWarp *warp, bool flag);
81  //void moveIndicator(const Common::String &, const Common::String &, const TeVector2s32 &)); // unused
82  //void popBlockToExit(const Common::String &name, TePickMesh *mesh); // unused
83  //void pushBlockToExit(const Common::String &name, TePickMesh *mesh); // unused
84  //void removeExit(const Common::String &name); // unused
85  void render(const TeCamera &cam1, const TeCamera &cam2, const Common::String &str1, const Common::String &str2);
86  //void save(); // unused
87 
88  void addObject(const Object &obj) { _objects.push_back(obj); }
89  void addExit(const Exit &exit) { _exits.push_back(exit); }
90  void addAnimation(const Animation &anim) { _animations.push_back(anim); }
91  void addWarpEvent(const WarpEvent &event) { _warpEvents.push_back(event); }
92 
93 private:
94  Common::List<Object> _objects;
95  Common::List<Exit> _exits;
96  Common::List<Animation> _animations;
97  Common::List<WarpEvent> _warpEvents;
98  Common::Path _name;
99  TeWarp *_warp;
100  int _numExitsCreated;
101 };
102 
103 } // end namespace Tetraedge
104 
105 #endif // TETRAEDGE_TE_TE_SCENE_WARP_H
Definition: te_camera.h:38
Definition: str.h:59
Definition: detection.h:27
Definition: te_scene_warp.h:43
Definition: list.h:44
Definition: path.h:52
Definition: te_scene_warp.h:37
Definition: te_warp.h:38
Definition: te_scene_warp.h:33
Definition: te_scene_warp.h:63
Definition: te_scene_warp_xml_parser.h:30
Definition: te_scene_warp.h:55