ScummVM API documentation
true_talk_npc.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 TITANIC_TRUE_TALK_NPC_H
23#define TITANIC_TRUE_TALK_NPC_H
24
25#include "titanic/npcs/character.h"
26#include "titanic/messages/messages.h"
27#include "titanic/true_talk/tt_talker.h"
28
29namespace Titanic {
30
31enum NpcFlag {
32 NPCFLAG_SPEAKING = 1, NPCFLAG_IDLING = 2, NPCFLAG_START_IDLING = 4,
33 NPCFLAG_DOORBOT_IN_HOME = 8, NPCFLAG_MOVING = 0x10000, NPCFLAG_MOVE_START = 0x20000,
34 NPCFLAG_MOVE_LOOP = 0x40000, NPCFLAG_MOVE_FINISH = 0x80000,
35 NPCFLAG_MOVE_LEFT = 0x100000, NPCFLAG_MOVE_RIGHT = 0x200000,
36 NPCFLAG_MOVE_END = 0x400000, NPCFLAG_PECKING = 0x800000,
37 NPCFLAG_CHICKEN_OUTSIDE_CAGE = 0x1000000, NPCFLAG_TAKE_OFF = 0x2000000,
38 NPCFLAG_SUMMON_BELLBOT = 0x4000000, NPCFLAG_DOORBOT_INTRO = 0x8000000
39};
40
41class CViewItem;
42
43class CTrueTalkNPC : public CCharacter {
44 DECLARE_MESSAGE_MAP;
45 bool TextInputMsg(CTextInputMsg *msg);
46 bool TrueTalkGetAssetDetailsMsg(CTrueTalkGetAssetDetailsMsg *msg);
47 bool DismissBotMsg(CDismissBotMsg *msg);
48 bool TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg);
49 bool TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg);
50 bool MovieEndMsg(CMovieEndMsg *msg);
51 bool NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg);
52 bool TimerMsg(CTimerMsg *msg);
53 bool NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg);
54protected:
55 int _assetNumber;
56 CString _assetName;
57 int _fieldE4;
58 uint _npcFlags;
59 uint _speechDuration;
60 uint _startTicks;
61 int _fieldF4;
62 int _fieldF8;
63 int _speechTimerId;
64 int _field104;
65protected:
66 void processInput(CTextInputMsg *msg, CViewItem *view);
67public:
68 int _speechCounter;
69public:
70 CLASSDEF;
72
76 void save(SimpleFile *file, int indent) override;
77
81 void load(SimpleFile *file) override;
82
86 void setView(CViewItem *view);
87
92
96 void performAction(bool startTalking, CViewItem *view = nullptr);
97};
98
99} // End of namespace Titanic
100
101#endif /* TITANIC_TRUE_TALK_NPC_H */
Definition: character.h:29
Definition: messages.h:277
void startTalking(CTrueTalkNPC *npc, uint id, CViewItem *view=nullptr)
Definition: messages.h:321
Definition: messages.h:326
Definition: messages.h:329
Definition: string.h:40
Definition: messages.h:389
Definition: messages.h:190
Definition: messages.h:398
Definition: true_talk_npc.h:43
void performAction(bool startTalking, CViewItem *view=nullptr)
void load(SimpleFile *file) override
void startTalker(CViewItem *view)
void save(SimpleFile *file, int indent) override
void setView(CViewItem *view)
Definition: messages.h:400
Definition: view_item.h:32
Definition: simple_file.h:49