ScummVM API documentation
te_scene_warp_xml_parser.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_XML_PARSER_H
23 #define TETRAEDGE_TE_TE_SCENE_WARP_XML_PARSER_H
24 
25 #include "tetraedge/te/te_xml_parser.h"
26 #include "tetraedge/te/te_scene_warp.h"
27 
28 namespace Tetraedge {
29 
31 public:
32  enum ObjType {
33  kObjNone,
34  kObjExit,
35  kObjObject
36  };
37 
38  TeSceneWarpXmlParser(TeSceneWarp *sceneWarp, bool flag) : _sceneWarp(sceneWarp),
39  _objType(kObjNone), _flag(flag) {}
40 
41  // Parser
42  CUSTOM_XML_PARSER(TeSceneWarpXmlParser) {
43  XML_KEY(FileFormatVersion)
44  XML_PROP(major, true)
45  XML_PROP(minor, true)
46  KEY_END()
47  XML_KEY(exit)
48  XML_PROP(linkedWarp, true)
49  XML_PROP(nbWarpBlock, true)
50  XML_KEY(camera)
51  XML_PROP(angleX, true)
52  XML_PROP(angleY, true)
53  KEY_END()
54  XML_KEY(marker)
55  XML_PROP(x, true)
56  XML_PROP(y, true)
57  XML_PROP(z, true)
58  KEY_END()
59  XML_KEY(block)
60  XML_PROP(face, true)
61  XML_PROP(offsetX, true)
62  XML_PROP(offsetY, true)
63  KEY_END()
64  KEY_END()
65  XML_KEY(animation)
66  XML_PROP(name, true)
67  XML_PROP(fps, true)
68  KEY_END()
69  XML_KEY(object)
70  XML_PROP(name, true)
71  XML_KEY(marker)
72  XML_PROP(x, true)
73  XML_PROP(y, true)
74  XML_PROP(z, true)
75  KEY_END()
76  KEY_END()
77  } PARSER_END()
78 
79 public:
80  bool parserCallback_FileFormatVersion(ParserNode *node) { return true; }
81  bool parserCallback_exit(ParserNode *node);
82  bool parserCallback_camera(ParserNode *node);
83  bool parserCallback_marker(ParserNode *node);
84  bool parserCallback_block(ParserNode *node);
85  bool parserCallback_object(ParserNode *node);
86  bool parserCallback_animation(ParserNode *node);
87 
88  TeSceneWarp *_sceneWarp;
89  ObjType _objType;
90  bool _flag;
91 };
92 
93 } // end namespace Tetraedge
94 
95 #endif // TETRAEDGE_TE_TE_SCENE_WARP_XML_PARSER_H
Definition: detection.h:27
Definition: xmlparser.h:145
Definition: te_scene_warp.h:33
Definition: te_scene_warp_xml_parser.h:30
Definition: te_xml_parser.h:38