ScummVM API documentation
screen.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 PINK_SCREEN_H
23#define PINK_SCREEN_H
24
25#include "common/array.h"
26#include "common/rect.h"
27#include "common/system.h"
28
29#include "graphics/macgui/macwindowmanager.h"
30#include "graphics/screen.h"
31
32namespace Graphics {
33 class MacMenu;
34}
35
36namespace Pink {
37
38class Actor;
39class ActionCEL;
40class ActionSound;
41class ActionText;
42class PinkEngine;
43
44class Screen {
45public:
46 Screen(PinkEngine *vm);
47 ~Screen();
48
49 void update();
50 bool processEvent(Common::Event &event);
51
52 void setPalette(const byte *palette);
53
54 void addTextAction(ActionText *action);
55 void removeTextAction(ActionText *action);
56
57 void addSprite(ActionCEL *sprite);
58 void removeSprite(ActionCEL *sprite);
59
60 void addDirtyRect(const Common::Rect &rect);
61 void addDirtyRects(ActionCEL *sprite);
62
63 void addSound(ActionSound *sound) { _sounds.push_back(sound); };
64 void removeSound(ActionSound *sound);
65
66 void addTextWindow(Graphics::MacTextWindow *window);
67 void removeTextWindow(Graphics::MacTextWindow *window);
68
69 void clear();
70
71 void pause(bool pause);
72 bool isMenuActive();
73
74 void saveStage();
75 void loadStage();
76
77 Actor *getActorByPoint(Common::Point point);
78
79 Graphics::MacWindowManager &getWndManager() { return *_wm; };
80
81 void draw(bool blit = true);
82
83 const Graphics::Font *getTextFont() { return _textFont; }
84
85private:
86 void mergeDirtyRects();
87 void drawRect(const Common::Rect &rect);
88
89private:
90 Graphics::Screen _surface;
94 Common::Array<ActionCEL *> _savedSprites;
96 Common::Array<ActionText *> _textActions;
98 bool _textRendered;
99
100 const Graphics::Font *_textFont;
101 bool _textFontCleanup;
102};
103
104} // End of namespace Pink
105
106
107#endif
Definition: font.h:83
Definition: mactextwindow.h:30
Definition: macwindowmanager.h:149
Definition: screen.h:47
Definition: action_cel.h:32
Definition: action_sound.h:30
Definition: action_text.h:35
Definition: actor.h:39
Definition: pink.h:104
Definition: screen.h:44
Definition: formatinfo.h:28
Definition: events.h:218
Definition: rect.h:144
Definition: rect.h:536