ScummVM API documentation
bellbot_script.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_BELLBOT_SCRIPT_H
23#define TITANIC_BELLBOT_SCRIPT_H
24
25#include "titanic/true_talk/tt_npc_script.h"
26
27namespace Titanic {
28
29class BellbotScript : public TTnpcScript {
30private:
31 static uint _oldId;
32 TTmapEntryArray _states;
33 TTmapEntryArray _preResponses;
34 TTsentenceEntries _sentences[20];
35 TTcommonPhraseArray _phrases;
36 int _array[150];
37 bool _responseFlag;
38 bool _room107First;
39private:
43 void setupSentences();
44
48 int addLocation();
49
53 int getStateDialogueId() const;
54
58 void setValue23(uint id);
59
63 int preprocess(const TTroomScript *roomScript, const TTsentence *sentence);
64
68 bool better(const TTsentence *sentence, uint id1, uint id2);
69
70 bool randomResponse0(const TTroomScript *roomScript, uint id);
71 bool randomResponse1(const TTroomScript *roomScript, uint id);
72 bool randomResponse2(const TTroomScript *roomScript, uint id);
73 void randomResponse3(const TTroomScript *roomScript, uint id);
74 void randomResponse4(const TTroomScript *roomScript, uint id);
75
76 int checkCommonSentences(const TTroomScript *roomScript, const TTsentence *sentence);
77 bool checkCommonWords(const TTroomScript *roomScript, const TTsentence *sentence);
78
79 uint getRoomDialogueId(const TTroomScript *roomScript);
80
84 bool addRoomDescription(const TTroomScript *roomScript);
85public:
86 BellbotScript(int val1, const char *charClass, int v2,
87 const char *charName, int v3, int val2);
88
92 int process(const TTroomScript *roomScript, const TTsentence *sentence) override;
93
97 ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override;
98
99 int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
100 uint tag1, uint tag2, uint remainder) override;
101
105 int updateState(uint oldId, uint newId, int index) override;
106
110 int preResponse(uint id) override;
111
115 int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override;
116
120 bool randomResponse(uint index) override;
121};
122
123} // End of namespace Titanic
124
125#endif /* TITANIC_BELLBOT_SCRIPT_H */
Definition: bellbot_script.h:29
bool randomResponse(uint index) override
int preResponse(uint id) override
ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override
int updateState(uint oldId, uint newId, int index) override
int process(const TTroomScript *roomScript, const TTsentence *sentence) override
int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override
Definition: script_support.h:189
Definition: script_support.h:159
Definition: tt_npc_script.h:88
Definition: tt_room_script.h:61
Definition: script_support.h:90
Definition: tt_sentence.h:49