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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef AGS_ENGINE_AC_OVERLAY_H
24 #define AGS_ENGINE_AC_OVERLAY_H
25 
26 #include "ags/engine/ac/runtime_defines.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 wii, int fontid, int clr, const char *text);
42 int  Overlay_GetX(ScriptOverlay *scover);
43 void Overlay_SetX(ScriptOverlay *scover, int newx);
44 int  Overlay_GetY(ScriptOverlay *scover);
45 void Overlay_SetY(ScriptOverlay *scover, int newy);
46 int  Overlay_GetValid(ScriptOverlay *scover);
47 ScriptOverlay *Overlay_CreateGraphical(int x, int y, int slot, int transparent);
48 ScriptOverlay *Overlay_CreateTextual(int x, int y, int width, int font, int colour, const char *text);
49 
50 int  find_overlay_of_type(int type);
51 void remove_screen_overlay(int type);
52 // Calculates overlay position in screen coordinates
53 void get_overlay_position(const ScreenOverlay &over, int *x, int *y);
54 int  add_screen_overlay(int x, int y, int type, Shared::Bitmap *piccy, bool alphaChannel = false);
55 int  add_screen_overlay(int x, int y, int type, Shared::Bitmap *piccy, int pic_offx, int pic_offy, bool alphaChannel = false);
56 void remove_screen_overlay_index(int over_idx);
57 // Creates and registers a managed script object for existing overlay object
58 ScriptOverlay *create_scriptobj_for_overlay(ScreenOverlay &over);
59 void recreate_overlay_ddbs();
60 
61 } // namespace AGS3
62 
63 #endif
64