ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
overlay.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 AGS_ENGINE_AC_OVERLAY_H
23 #define AGS_ENGINE_AC_OVERLAY_H
24 
25 #include "common/std/vector.h"
26 #include "ags/shared/util/geometry.h"
27 #include "ags/engine/ac/screen_overlay.h"
28 #include "ags/engine/ac/dynobj/script_overlay.h"
29 
30 namespace AGS3 {
31 
32 namespace AGS {
33 namespace Shared {
34 class Bitmap;
35 } // namespace Shared
36 } // namespace AGS
37 
38 using namespace AGS; // FIXME later
39 
40 void Overlay_Remove(ScriptOverlay *sco);
41 void Overlay_SetText(ScriptOverlay *scover, int width, int fontid, int text_color, const char *text);
42 void Overlay_SetText(ScreenOverlay &over, int x, int y, int width, int fontid, int text_color, const char *text);
43 int Overlay_GetX(ScriptOverlay *scover);
44 void Overlay_SetX(ScriptOverlay *scover, int newx);
45 int Overlay_GetY(ScriptOverlay *scover);
46 void Overlay_SetY(ScriptOverlay *scover, int newy);
47 int Overlay_GetValid(ScriptOverlay *scover);
48 ScriptOverlay *Overlay_CreateGraphical(int x, int y, int slot, bool transparent = true, bool clone = false);
49 ScriptOverlay *Overlay_CreateTextual(int x, int y, int width, int font, int colour, const char *text);
50 ScreenOverlay *Overlay_CreateGraphicCore(bool room_layer, int x, int y, int slot, bool transparent = true, bool clone = false);
51 ScreenOverlay *Overlay_CreateTextCore(bool room_layer, int x, int y, int width, int font, int text_color,
52  const char *text, int disp_type, int allow_shrink);
53 
54 ScreenOverlay *get_overlay(int type);
55 // Calculates overlay position in its respective layer (screen or room)
56 Point get_overlay_position(const ScreenOverlay &over);
57 size_t add_screen_overlay(bool roomlayer, int x, int y, int type, int sprnum);
58 size_t add_screen_overlay(bool roomlayer, int x, int y, int type, Shared::Bitmap *piccy, bool has_alpha);
59 size_t add_screen_overlay(bool roomlayer, int x, int y, int type, Shared::Bitmap *piccy, int pic_offx, int pic_offy, bool has_alpha);
60 void remove_screen_overlay(int type);
61 void remove_all_overlays();
62 // Creates and registers a managed script object for // Creates and registers a managed script object for existing overlay object;
63 // optionally adds an internal engine reference to prevent object's disposal
64 ScriptOverlay *create_scriptoverlay(ScreenOverlay &over, bool internal_ref = false);
65 // Restores overlays, e.g. after restoring a game save
66 void restore_overlays();
67 
68 std::vector<ScreenOverlay> &get_overlays();
69 
70 } // namespace AGS3
71 
72 #endif
Definition: achievements_tables.h:27
Definition: vector.h:39
Definition: display_client.h:58
Definition: ags.h:40