ScummVM API documentation
particle_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_GAME_PARTICLE_XML_PARSER_H
23 #define TETRAEDGE_GAME_PARTICLE_XML_PARSER_H
24 
25 #include "tetraedge/game/in_game_scene.h"
26 #include "tetraedge/te/te_xml_parser.h"
27 
28 namespace Tetraedge {
29 
31 public:
32  CUSTOM_XML_PARSER(ParticleXmlParser) {
33  XML_KEY(particle)
34  XML_KEY(name)
35  XML_PROP(value, true)
36  KEY_END()
37  XML_KEY(texture)
38  XML_PROP(value, true)
39  KEY_END()
40  XML_KEY(position)
41  XML_PROP(x, true)
42  XML_PROP(y, true)
43  XML_PROP(z, true)
44  KEY_END()
45  XML_KEY(direction)
46  XML_PROP(x, true)
47  XML_PROP(y, true)
48  XML_PROP(z, true)
49  KEY_END()
50  XML_KEY(size)
51  XML_PROP(value, true)
52  KEY_END()
53  XML_KEY(volumesize)
54  XML_PROP(x, true)
55  XML_PROP(y, true)
56  XML_PROP(z, true)
57  KEY_END()
58  XML_KEY(startcolor)
59  XML_PROP(r, true)
60  XML_PROP(g, true)
61  XML_PROP(b, true)
62  XML_PROP(a, true)
63  KEY_END()
64  XML_KEY(endcolor)
65  XML_PROP(r, true)
66  XML_PROP(g, true)
67  XML_PROP(b, true)
68  XML_PROP(a, true)
69  KEY_END()
70  XML_KEY(colortime)
71  XML_PROP(value, true)
72  KEY_END()
73  XML_KEY(time)
74  XML_PROP(value, true)
75  KEY_END()
76  XML_KEY(period)
77  XML_PROP(value, true)
78  KEY_END()
79  XML_KEY(particleperperiod)
80  XML_PROP(value, true)
81  KEY_END()
82  XML_KEY(startloop)
83  XML_PROP(value, true)
84  KEY_END()
85  XML_KEY(enabled)
86  XML_PROP(value, true)
87  KEY_END()
88  XML_KEY(gravity)
89  XML_PROP(value, true)
90  KEY_END()
91  XML_KEY(randomdirection)
92  XML_PROP(value, true)
93  KEY_END()
94  XML_KEY(orientation)
95  // Can either be x/y/z or "value" (which is y)
96  XML_PROP(x, false)
97  XML_PROP(y, false)
98  XML_PROP(z, false)
99  XML_PROP(value, false)
100  KEY_END()
101  KEY_END()
102  } PARSER_END()
103 
104  bool parserCallback_particle(ParserNode *node);
105  bool parserCallback_name(ParserNode *node);
106  bool parserCallback_texture(ParserNode *node);
107  bool parserCallback_position(ParserNode *node);
108  bool parserCallback_direction(ParserNode *node);
109  bool parserCallback_size(ParserNode *node);
110  bool parserCallback_volumesize(ParserNode *node);
111  bool parserCallback_startcolor(ParserNode *node);
112  bool parserCallback_endcolor(ParserNode *node);
113  bool parserCallback_colortime(ParserNode *node);
114  bool parserCallback_time(ParserNode *node);
115  bool parserCallback_period(ParserNode *node);
116  bool parserCallback_particleperperiod(ParserNode *node);
117  bool parserCallback_startloop(ParserNode *node);
118  bool parserCallback_enabled(ParserNode *node);
119  bool parserCallback_gravity(ParserNode *node);
120  bool parserCallback_randomdirection(ParserNode *node);
121  bool parserCallback_orientation(ParserNode *node);
122 
123 public:
124  InGameScene *_scene;
125 };
126 
127 } // end namespace Tetraedge
128 
129 #endif // TETRAEDGE_GAME_PARTICLE_XML_PARSER_H
Definition: detection.h:27
Definition: xmlparser.h:145
Definition: te_xml_parser.h:38
Definition: particle_xml_parser.h:30
Definition: in_game_scene.h:48