ScummVM API documentation
objects.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 DARKSEED_OBJECTS_H
23 #define DARKSEED_OBJECTS_H
24 
25 #include "common/array.h"
26 #include "common/error.h"
27 #include "common/rect.h"
28 #include "common/serializer.h"
29 
30 namespace Darkseed {
31 
32 enum ObjType {
33  OBJ_21_HEADBAND = 21
34 };
35 
36 class Objects {
37  Common::Array<int16> _objectVar;
38  Common::Array<Common::Point> _moveObjectXY;
39  Common::Array<uint8> _moveObjectRoom;
40 
41 public:
42  Common::Array<int16> _objectRunningCode;
43 
44  static constexpr int MAX_MOVED_OBJECTS = 42;
45  static constexpr int MAX_OBJECTS = 199;
46  Objects();
47  void reset();
48 
50 
51  void setVar(uint16 varIdx, int16 newValue);
52  int16 getVar(uint16 varIdx);
53 
54  int16 getObjectRunningCode(int idx);
55  void setObjectRunningCode(int idx, int16 value);
56 
57  Common::Point getMoveObjectPosition(uint8 objIdx);
58  void setMoveObjectPosition(uint8 objIdx, const Common::Point &newPoint);
59  void setMoveObjectX(uint8 objIdx, int16 xPos);
60  int getEyeDescriptionTosIdx(uint16 objNum);
61 
62  int getMoveObjectRoom(uint16 idx);
63  void setMoveObjectRoom(uint16 idx, uint8 value);
64 
65  const char *getObjectName(int idx);
66 
67  int16 &operator[](uint16 varIdx);
68  const int16 &operator[](uint16 varIdx) const;
69 };
70 
71 } // namespace Darkseed
72 
73 #endif // DARKSEED_OBJECTS_H
Definition: objects.h:36
Definition: error.h:84
Definition: serializer.h:79
Definition: rect.h:45
Definition: adlib_worx.h:27