ScummVM API documentation
objectstate.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 GRIM_OSTATE_H
23 #define GRIM_OSTATE_H
24 
25 #include "common/endian.h"
26 
27 #include "engines/grim/pool.h"
28 #include "engines/grim/bitmap.h"
29 
30 namespace Grim {
31 
32 class SaveGame;
33 
34 class ObjectState : public PoolObject<ObjectState> {
35 public:
36  enum Position {
37  OBJSTATE_BACKGROUND = 0,
38  OBJSTATE_UNDERLAY = 1,
39  OBJSTATE_OVERLAY = 2,
40  OBJSTATE_STATE = 3
41  };
42 
43  ObjectState(int setupID, ObjectState::Position pos, const char *bitmap, const char *zbitmap, bool visible);
44  ObjectState();
45  ~ObjectState();
46 
47  static int32 getStaticTag() { return MKTAG('S', 'T', 'A', 'T'); }
48 
49  void saveState(SaveGame *savedState) const;
50  bool restoreState(SaveGame *savedState);
51 
52  int getSetupID() const { return _setupID; }
53  Position getPos() const { return _pos; }
54  void setPos(Position position) { _pos = position; }
55 
56  const Common::String &getBitmapFilename() const;
57 
58  void setActiveImage(int val);
59  void draw();
60 
61 private:
62  bool _visibility;
63  int _setupID;
64  Position _pos;
65  Bitmap::Ptr _bitmap, _zbitmap;
66 };
67 
68 } // end of namespace Grim
69 
70 #endif
Definition: str.h:59
Definition: objectstate.h:34
Definition: savegame.h:33
Definition: actor.h:33
#define MKTAG(a0, a1, a2, a3)
Definition: endian.h:188
Definition: pool.h:42