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 
33 namespace Wintermute {
34 
37 public:
38 
40  class Effect3DParam {
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 
52  Effect3DParam();
53  Effect3DParam(const char *paramName);
54  ~Effect3DParam();
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.c_str(); }
63 
64  bool persist(BasePersistenceManager *persistMgr);
65 
66  private:
67  void setDefaultValues();
68  ParamType _type;
69  Common::String _paramName;
70  bool _initialized;
71 
72  Common::String _valString;
73  int32 _valInt;
74  float _valFloat;
75  DXVector4 _valVector;
76  bool _valBool;
77  };
78 
79 
82  ~Effect3DParams();
83 
84  bool persist(BasePersistenceManager *persistMgr);
85  void clear();
86  void setParam(const char *paramName, ScValue *val);
87  void setParam(const char *paramName, DXVector4 Val);
88 
89 private:
90  Effect3DParam *getParamByName(const char *paramName);
92 };
93 
94 } // namespace Wintermute
95 
96 #endif
Definition: script_value.h:42
Definition: str.h:59
Definition: base_persistence_manager.h:56
Definition: coll_templ.h:63
Definition: 3deffect_params.h:36
Definition: 3deffect_params.h:40
Definition: xmath.h:79
Definition: achievements_tables.h:27