ScummVM API documentation
3deffect_params.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/*
23 * This file is based on WME.
24 * http://dead-code.org/redir.php?target=wme
25 * Copyright (c) 2003-2013 Jan Nedoma and contributors
26 */
27
28#ifndef WINTERMUTE_3D_EFFECT_PARAMS_H
29#define WINTERMUTE_3D_EFFECT_PARAMS_H
30
31#include "engines/wintermute/base/base_game.h"
32
33namespace Wintermute {
34
37public:
38
41 public:
42
43 enum ParamType {
44 EP_UNKNOWN,
45 EP_STRING,
46 EP_FLOAT,
47 EP_INT,
48 EP_BOOL,
49 EP_VECTOR
50 };
51
53 Effect3DParam(const char *paramName);
55
56 void setValue(char *val);
57 void setValue(int val);
58 void setValue(float val);
59 void setValue(bool val);
60 void setValue(DXVector4 val);
61
62 const char *getParamName() const { return _paramName; }
63 ParamType getParamType() { return _type; }
64 const char *getValue() const { return _valString; }
65 void getValue(int &val) { val = _valInt; }
66 void getValue(float &val) { val = _valFloat; }
67 void getValue(bool &val) { val = _valBool; }
68 void getValue(DXVector4 &val) { val = _valVector; }
69
70 bool persist(BasePersistenceManager *persistMgr);
71
72 private:
73 void setDefaultValues();
74 ParamType _type;
75 char * _paramName;
76 bool _initialized;
77
78 char *_valString;
79 int32 _valInt;
80 float _valFloat;
81 DXVector4 _valVector;
82 bool _valBool;
83 };
84
85
89
90 bool persist(BasePersistenceManager *persistMgr);
91 void clear();
92 void setParam(const char *paramName, ScValue *val);
93 void setParam(const char *paramName, DXVector4 Val);
94 Effect3DParam *getParamByName(const char *paramName);
95
96private:
98};
99
100} // namespace Wintermute
101
102#endif
Definition: coll_templ.h:345
Definition: base_persistence_manager.h:43
Definition: 3deffect_params.h:40
Definition: 3deffect_params.h:36
Definition: script_value.h:42
Definition: xmath.h:101