ScummVM API documentation
hotspot.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_HOTSPOT_H
23#define AGS_ENGINE_AC_HOTSPOT_H
24
25#include "ags/engine/ac/dynobj/script_hotspot.h"
26
27namespace AGS3 {
28
29// Asserts the hotspot ID is valid in the current room,
30// if not then prints a warning to the log; returns assertion result
31bool AssertHotspot(const char *apiname, int hot_id);
32void Hotspot_SetEnabled(ScriptHotspot *hss, int newval);
33int Hotspot_GetEnabled(ScriptHotspot *hss);
34int Hotspot_GetID(ScriptHotspot *hss);
35ScriptHotspot *GetHotspotAtRoom(int x, int y);
36ScriptHotspot *GetHotspotAtScreen(int xx, int yy);
37int Hotspot_GetWalkToX(ScriptHotspot *hss);
38int Hotspot_GetWalkToY(ScriptHotspot *hss);
39void Hotspot_GetName(ScriptHotspot *hss, char *buffer);
40const char *Hotspot_GetName_New(ScriptHotspot *hss);
41bool Hotspot_IsInteractionAvailable(ScriptHotspot *hhot, int mood);
42void Hotspot_RunInteraction(ScriptHotspot *hss, int mood);
43
44int Hotspot_GetProperty(ScriptHotspot *hss, const char *property);
45void Hotspot_GetPropertyText(ScriptHotspot *hss, const char *property, char *bufer);
46const char *Hotspot_GetTextProperty(ScriptHotspot *hss, const char *property);
47bool Hotspot_SetProperty(ScriptHotspot *hss, const char *property, int value);
48bool Hotspot_SetTextProperty(ScriptHotspot *hss, const char *property, const char *value);
49
50// Gets hotspot ID at the given room coordinates;
51// if hotspot is disabled or non-existing, returns 0 (no area)
52int get_hotspot_at(int xpp, int ypp);
53
54} // namespace AGS3
55
56#endif