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 void SetObjectFrame(int obn, int viw, int lop, int fra);
47 // pass trans=0 for fully solid, trans=100 for fully transparent
48 void SetObjectTransparency(int obn, int trans);
49 void SetObjectBaseline(int obn, int basel);
50 int GetObjectBaseline(int obn);
51 void AnimateObjectEx(int obn, int loopn, int spdd, int rept, int direction, int blocking);
52 void AnimateObject(int obn, int loopn, int spdd, int rept);
53 void AnimateObjectImpl(int obn, int loopn, int spdd, int rept, int direction, int blocking, int sframe, int volume = 100);
54 void MergeObject(int obn);
55 void StopObjectMoving(int objj);
56 void ObjectOff(int obn);
57 void ObjectOn(int obn);
58 int IsObjectOn(int objj);
59 void SetObjectGraphic(int obn, int slott);
60 int GetObjectGraphic(int obn);
61 int GetObjectX(int objj);
62 int GetObjectY(int objj);
63 int IsObjectAnimating(int objj);
64 int IsObjectMoving(int objj);
65 void SetObjectPosition(int objj, int tox, int toy);
66 void GetObjectName(int obj, char *buffer);
67 void MoveObject(int objj, int xx, int yy, int spp);
68 void MoveObjectDirect(int objj, int xx, int yy, int spp);
69 void SetObjectClickable(int cha, int clik);
70 void SetObjectIgnoreWalkbehinds(int cha, int clik);
71 void RunObjectInteraction(int aa, int mood);
72 int AreObjectsColliding(int obj1, int obj2);
73 int GetThingRect(int thing, _Rect *rect);
74 int AreThingsOverlapping(int thing1, int thing2);
75 
76 int GetObjectProperty(int hss, const char *property);
77 void GetObjectPropertyText(int item, const char *property, char *bufer);
78 
79 Shared::Bitmap *GetObjectImage(int obj, int *isFlipped);
80 
81 } // namespace AGS3
82 
83 #endif
Definition: achievements_tables.h:27
Definition: allegro_bitmap.h:44
Definition: global_object.h:35
Definition: ags.h:40