ScummVM API documentation
objtypes.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 #ifndef SLUDGE_OBJTYPES_H
22 #define SLUDGE_OBJTYPES_H
23 
24 namespace Sludge {
25 
26 class SludgeEngine;
27 
28 struct Combination {
29  int withObj, funcNum;
30 };
31 
32 struct ObjectType {
33  Common::String screenName;
34  int objectNum;
35  byte r, g, b;
36  int numCom;
37  int speechGap, walkSpeed, wrapSpeech, spinSpeed;
38  uint16 flags;
39  Combination *allCombis;
40 };
41 
43 
45 public:
46  ObjectManager(SludgeEngine *vm) : _vm(vm) { init(); }
47  ~ObjectManager();
48 
49  bool init();
50  void kill();
51 
52  ObjectType *findObjectType(int i, bool skipLoad = false);
53  ObjectType *loadObjectType(int i);
54  int getCombinationFunction(int a, int b);
55  void removeObjectType(ObjectType *oT);
56  void saveObjectRef(ObjectType *r, Common::WriteStream *stream);
57  ObjectType *loadObjectRef(Common::SeekableReadStream *stream);
58 
59 private:
60  ObjectTypeList _allObjectTypes;
61  SludgeEngine *_vm;
62 };
63 
64 } // End of namespace Sludge
65 
66 #endif
Definition: str.h:59
Definition: objtypes.h:32
Definition: stream.h:77
Definition: stream.h:745
Definition: objtypes.h:28
Definition: sludge.h:68
Definition: builtin.h:27
Definition: objtypes.h:44