ScummVM API documentation
room.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 MUTATIONOFJB_ROOM_H
23 #define MUTATIONOFJB_ROOM_H
24 
25 #include "common/scummsys.h"
26 #include "common/array.h"
27 #include "graphics/surface.h"
28 #include "graphics/managed_surface.h"
29 
30 namespace Graphics {
31 class Screen;
32 }
33 
34 namespace MutationOfJB {
35 
36 class EncryptedFile;
37 class Game;
38 struct Static;
39 
40 class Room {
41 public:
42  friend class RoomAnimationDecoderCallback;
43  friend class GuiAnimationDecoderCallback;
44 
45  Room(Game *game, Graphics::Screen *screen);
46  bool load(uint8 roomNumber, bool roomB);
47  void drawObjectAnimation(uint8 objectId, int animOffset);
48 
56  void drawObject(uint8 objectId, uint8 overrideFrame = 0);
57  void drawBitmap(uint8 bitmapId);
58 
65  void drawStatic(Static *stat);
66  void drawFrames(int fromFrame, int toFrame, const Common::Rect &area = Common::Rect(), uint8 threshold = 0xFF);
67  void initialDraw();
68  void redraw(bool useBackgroundBuffer = true);
69 private:
70  Game *_game;
71  Graphics::Screen *_screen;
72  Graphics::ManagedSurface _background;
74  Common::Array<int> _objectsStart;
75 };
76 
77 }
78 
79 #endif
Definition: managed_surface.h:51
Definition: game.h:50
Definition: rect.h:144
Definition: atari-screen.h:60
Definition: screen.h:48
Definition: gamedata.h:213
Definition: animationdecoder.h:36
Definition: room.h:40
Definition: formatinfo.h:28