ScummVM API documentation
global_object.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_GLOBALOBJECT_H
23#define AGS_ENGINE_AC_GLOBALOBJECT_H
24
25namespace AGS3 {
26
27namespace AGS {
28namespace Shared {
29class Bitmap;
30}
31}
32using namespace AGS; // FIXME later
33
34// TODO: merge with other Rect declared in bitmap unit
35struct _Rect {
36 int x1, y1, x2, y2;
37};
38
39// Get object at the given screen coordinates
40int GetObjectIDAtScreen(int xx, int yy);
41// Get object at the given room coordinates
42int GetObjectIDAtRoom(int roomx, int roomy);
43void SetObjectTint(int obj, int red, int green, int blue, int opacity, int luminance);
44void RemoveObjectTint(int obj);
45void SetObjectView(int obn, int vii);
46// Assigns given object to the view's frame, and activates frame (plays linked sound, etc)
47void SetObjectFrame(int obn, int viw, int lop, int fra);
48// Assigns given object to the view's frame
49bool SetObjectFrameSimple(int obn, int viw, int lop, int fra);
50// pass trans=0 for fully solid, trans=100 for fully transparent
51void SetObjectTransparency(int obn, int trans);
52void SetObjectBaseline(int obn, int basel);
53int GetObjectBaseline(int obn);
54void AnimateObject6(int obn, int loopn, int spdd, int rept, int direction, int blocking);
55void AnimateObject4(int obn, int loopn, int spdd, int rept);
56void AnimateObjectImpl(int obn, int loopn, int spdd, int rept, int direction, int blocking, int sframe, int volume = 100);
57void MergeObject(int obn);
58void StopObjectMoving(int objj);
59void ObjectOff(int obn);
60void ObjectOn(int obn);
61int IsObjectOn(int objj);
62void SetObjectGraphic(int obn, int slott);
63int GetObjectGraphic(int obn);
64int GetObjectX(int objj);
65int GetObjectY(int objj);
66int IsObjectAnimating(int objj);
67int IsObjectMoving(int objj);
68void SetObjectPosition(int objj, int tox, int toy);
69void GetObjectName(int obj, char *buffer);
70void MoveObject(int objj, int xx, int yy, int spp);
71void MoveObjectDirect(int objj, int xx, int yy, int spp);
72void SetObjectClickable(int cha, int clik);
73void SetObjectIgnoreWalkbehinds(int cha, int clik);
74void RunObjectInteraction(int aa, int mood);
75int AreObjectsColliding(int obj1, int obj2);
76int GetThingRect(int thing, _Rect *rect);
77int AreThingsOverlapping(int thing1, int thing2);
78
79int GetObjectProperty(int hss, const char *property);
80void GetObjectPropertyText(int item, const char *property, char *bufer);
81
82Shared::Bitmap *GetObjectImage(int obj, bool *is_original = nullptr);
83
84} // namespace AGS3
85
86#endif
Definition: allegro_bitmap.h:44
Definition: global_object.h:35