1 //=============================================================================
2 //
3 // Adventure Game Studio (AGS)
4 //
5 // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others
6 // The full list of copyright holders can be found in the Copyright.txt
7 // file, which is part of this source code distribution.
8 //
9 // The AGS source code is provided under the Artistic License 2.0.
10 // A copy of this license can be found in the file License.txt and at
11 // http://www.opensource.org/licenses/artistic-license-2.0.php
12 //
13 //=============================================================================
14 //
15 //
16 //
17 //=============================================================================
18 #ifndef __AGS_EE_AC__GLOBALCHARACTER_H
19 #define __AGS_EE_AC__GLOBALCHARACTER_H
20 
21 #include "ac/characterinfo.h"
22 
23 void StopMoving(int chaa);
24 void ReleaseCharacterView(int chat);
25 void MoveToWalkableArea(int charid);
26 void FaceLocation(int cha, int xx, int yy);
27 void FaceCharacter(int cha,int toface);
28 void SetCharacterIdle(int who, int iview, int itime);
29 int  GetCharacterWidth(int ww);
30 int  GetCharacterHeight(int charid);
31 void SetCharacterBaseline (int obn, int basel);
32 // pass trans=0 for fully solid, trans=100 for fully transparent
33 void SetCharacterTransparency(int obn,int trans);
34 void scAnimateCharacter (int chh, int loopn, int sppd, int rept);
35 void AnimateCharacterEx(int chh, int loopn, int sppd, int rept, int direction, int blocking);
36 void SetPlayerCharacter(int newchar);
37 void FollowCharacterEx(int who, int tofollow, int distaway, int eagerness);
38 void FollowCharacter(int who, int tofollow);
39 void SetCharacterIgnoreLight (int who, int yesorno);
40 void MoveCharacter(int cc,int xx,int yy);
41 void MoveCharacterDirect(int cc,int xx, int yy);
42 void MoveCharacterStraight(int cc,int xx, int yy);
43 // Append to character path
44 void MoveCharacterPath (int chac, int tox, int toy);
45 
46 void SetCharacterSpeedEx(int chaa, int xspeed, int yspeed);
47 void SetCharacterSpeed(int chaa,int nspeed);
48 void SetTalkingColor(int chaa,int ncol);
49 void SetCharacterSpeechView (int chaa, int vii);
50 void SetCharacterBlinkView (int chaa, int vii, int intrv);
51 void SetCharacterView(int chaa,int vii);
52 void SetCharacterFrame(int chaa, int view, int loop, int frame);
53 // similar to SetCharView, but aligns the frame to make it line up
54 void SetCharacterViewEx (int chaa, int vii, int loop, int align);
55 void SetCharacterViewOffset (int chaa, int vii, int xoffs, int yoffs);
56 void ChangeCharacterView(int chaa,int vii);
57 void SetCharacterClickable (int cha, int clik);
58 void SetCharacterIgnoreWalkbehinds (int cha, int clik);
59 void MoveCharacterToObject(int chaa,int obbj);
60 void MoveCharacterToHotspot(int chaa,int hotsp);
61 void MoveCharacterBlocking(int chaa,int xx,int yy,int direct);
62 
63 void RunCharacterInteraction (int cc, int mood);
64 int  AreCharObjColliding(int charid,int objid);
65 int  AreCharactersColliding(int cchar1,int cchar2);
66 
67 int  GetCharacterProperty (int cha, const char *property);
68 void SetCharacterProperty (int who, int flag, int yesorno);
69 int  GetPlayerCharacter();
70 void GetCharacterPropertyText (int item, const char *property, char *bufer);
71 
72 int GetCharacterSpeechAnimationDelay(CharacterInfo *cha);
73 int GetCharacterAt (int xx, int yy);
74 
75 void SetActiveInventory(int iit);
76 void AddInventoryToCharacter(int charid, int inum);
77 void LoseInventoryFromCharacter(int charid, int inum);
78 void update_invorder();
79 void add_inventory(int inum);
80 void lose_inventory(int inum);
81 
82 void DisplayThought(int chid, const char *text);
83 void __sc_displayspeech(int chid, const char *text);
84 void DisplaySpeechAt (int xx, int yy, int wii, int aschar, const char*spch);
85 int DisplaySpeechBackground(int charid, const char*speel);
86 
87 #endif // __AGS_EE_AC__CHARACTEREXTRAS_H
88