ScummVM API documentation
mob.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 PRINCE_MOB_H
23#define PRINCE_MOB_H
24
25#include "common/scummsys.h"
26#include "common/rect.h"
27#include "common/str.h"
28#include "common/stream.h"
29
30#include "prince/common.h"
31
32namespace Prince {
33
34class Mob {
35public:
36
37 Mob() : _name(""), _examText(""), _visible(false), _type(0), _mask(0), _examDirection(kDirL), _useDirection(kDirL) {}
38
39 bool loadFromStream(Common::SeekableReadStream &stream);
40
41 // Used instead of offset in setData and getData
42 enum AttrId {
43 kMobVisible = 0,
44 kMobExamX = 14,
45 kMobExamY = 16,
46 kMobExamDir = 18
47 };
48
49 void setData(AttrId dataId, uint16 value);
50 uint16 getData(AttrId dataId);
51
52 bool _visible;
53 uint16 _type;
54 uint16 _mask;
55 Common::Rect _rect;
56
57 Common::Point _examPosition;
58 Direction _examDirection;
59
60 Common::Point _usePosition;
61 Direction _useDirection;
62
63 Common::String _name;
64 Common::String _examText;
65};
66
67} // End of namespace Prince
68
69#endif
Definition: stream.h:745
Definition: str.h:59
Definition: mob.h:34
Definition: rect.h:144
Definition: rect.h:536