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