ScummVM API documentation
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
30namespace AGS3 {
31
32namespace AGS {
33namespace Shared {
34class Bitmap;
35} // namespace Shared
36} // namespace AGS
37
38using namespace AGS; // FIXME later
39
40void Overlay_Remove(ScriptOverlay *sco);
41void Overlay_SetText(ScriptOverlay *scover, int width, int fontid, int text_color, const char *text);
42void Overlay_SetText(ScreenOverlay &over, int x, int y, int width, int fontid, int text_color, const char *text);
43int Overlay_GetX(ScriptOverlay *scover);
44void Overlay_SetX(ScriptOverlay *scover, int newx);
45int Overlay_GetY(ScriptOverlay *scover);
46void Overlay_SetY(ScriptOverlay *scover, int newy);
47int Overlay_GetValid(ScriptOverlay *scover);
48ScriptOverlay *Overlay_CreateGraphical(int x, int y, int slot, bool transparent = true, bool clone = false);
49ScriptOverlay *Overlay_CreateTextual(int x, int y, int width, int font, int colour, const char *text);
50ScreenOverlay *Overlay_CreateGraphicCore(bool room_layer, int x, int y, int slot, bool transparent = true, bool clone = false);
51ScreenOverlay *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
54ScreenOverlay *get_overlay(int type);
55// Calculates overlay position in its respective layer (screen or room)
56Point get_overlay_position(const ScreenOverlay &over);
57size_t add_screen_overlay(bool roomlayer, int x, int y, int type, int sprnum);
58size_t add_screen_overlay(bool roomlayer, int x, int y, int type, Shared::Bitmap *piccy, bool has_alpha);
59size_t add_screen_overlay(bool roomlayer, int x, int y, int type, Shared::Bitmap *piccy, int pic_offx, int pic_offy, bool has_alpha);
60void remove_screen_overlay(int type);
61void 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
64ScriptOverlay *create_scriptoverlay(ScreenOverlay &over, bool internal_ref = false);
65// Restores overlays, e.g. after restoring a game save
66void restore_overlays();
67
68std::vector<ScreenOverlay> &get_overlays();
69
70} // namespace AGS3
71
72#endif
Definition: vector.h:39
Definition: display_client.h:58