ScummVM API documentation
global_character.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_GLOBAL_CHARACTER_H
23#define AGS_ENGINE_AC_GLOBAL_CHARACTER_H
24
25#include "ags/shared/ac/character_info.h"
26
27namespace AGS3 {
28
29void StopMoving(int chaa);
30void ReleaseCharacterView(int chat);
31void MoveToWalkableArea(int charid);
32void FaceLocation(int cha, int xx, int yy);
33void FaceCharacter(int cha, int toface);
34void SetCharacterIdle(int who, int iview, int itime);
35int GetCharacterWidth(int ww);
36int GetCharacterHeight(int charid);
37void SetCharacterBaseline(int obn, int basel);
38// pass trans=0 for fully solid, trans=100 for fully transparent
39void SetCharacterTransparency(int obn, int trans);
40void AnimateCharacter4(int chh, int loopn, int sppd, int rept);
41void AnimateCharacter6(int chh, int loopn, int sppd, int rept, int direction, int blocking);
42void SetPlayerCharacter(int newchar);
43void FollowCharacterEx(int who, int tofollow, int distaway, int eagerness);
44void FollowCharacter(int who, int tofollow);
45void SetCharacterIgnoreLight(int who, int yesorno);
46void MoveCharacter(int cc, int xx, int yy);
47void MoveCharacterDirect(int cc, int xx, int yy);
48void MoveCharacterStraight(int cc, int xx, int yy);
49// Append to character path
50void MoveCharacterPath(int chac, int tox, int toy);
51
52void SetCharacterSpeedEx(int chaa, int xspeed, int yspeed);
53void SetCharacterSpeed(int chaa, int nspeed);
54void SetTalkingColor(int chaa, int ncol);
55void SetCharacterSpeechView(int chaa, int vii);
56void SetCharacterBlinkView(int chaa, int vii, int intrv);
57void SetCharacterView(int chaa, int vii);
58void SetCharacterFrame(int chaa, int view, int loop, int frame);
59// similar to SetCharView, but aligns the frame to make it line up
60void SetCharacterViewEx(int chaa, int vii, int loop, int align);
61void SetCharacterViewOffset(int chaa, int vii, int xoffs, int yoffs);
62void ChangeCharacterView(int chaa, int vii);
63void SetCharacterClickable(int cha, int clik);
64void SetCharacterIgnoreWalkbehinds(int cha, int clik);
65void MoveCharacterToObject(int chaa, int obbj);
66void MoveCharacterToHotspot(int chaa, int hotsp);
67int MoveCharacterBlocking(int chaa, int xx, int yy, int direct);
68
69void RunCharacterInteraction(int cc, int mood);
70int AreCharObjColliding(int charid, int objid);
71int AreCharactersColliding(int cchar1, int cchar2);
72
73int GetCharacterProperty(int cha, const char *property);
74void SetCharacterProperty(int who, int flag, int yesorno);
75int GetPlayerCharacter();
76void GetCharacterPropertyText(int item, const char *property, char *bufer);
77
78int GetCharacterSpeechAnimationDelay(CharacterInfo *cha);
79int GetCharIDAtScreen(int xx, int yy);
80
81void SetActiveInventory(int iit);
82void AddInventoryToCharacter(int charid, int inum);
83void LoseInventoryFromCharacter(int charid, int inum);
84void update_invorder();
85void add_inventory(int inum);
86void lose_inventory(int inum);
87
88void DisplayThought(int chid, const char *text);
89void __sc_displayspeech(int chid, const char *text);
90void DisplaySpeechAt(int xx, int yy, int wii, int aschar, const char *spch);
91int DisplaySpeechBackground(int charid, const char *speel);
92
93} // namespace AGS3
94
95#endif