ScummVM API documentation
deskbot_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_DESKBOT_SCRIPT_H
23 #define TITANIC_DESKBOT_SCRIPT_H
24 
25 #include "common/array.h"
26 #include "titanic/true_talk/tt_npc_script.h"
27 
28 namespace Titanic {
29 
30 class DeskbotScript : public TTnpcScript {
31 private:
35  void setupSentences();
36 
40  uint addAssignedRoomDialogue2();
41 
45  void addAssignedRoomDialogue3();
46 
50  uint getStateDialogueId() const;
51 
55  void setCurrentState(uint newId, uint index);
56 
60  int searchQuotes(const TTroomScript *roomScript, const TTsentence *sentence);
61 
65  int checkCommonWords(const TTsentence *sentence);
66 
70  void addAskBreakfast();
71 
75  void addAssignedRoom();
76 protected:
77  static int _oldId;
78  TTupdateStateArray _states;
79  TTsentenceEntries _entries2;
80  TTsentenceEntries _entries3;
81 protected:
85  int preprocess(const TTroomScript *roomScript, const TTsentence *sentence);
86 
91 public:
92  DeskbotScript(int val1, const char *charClass, int v2,
93  const char *charName, int v3, int val2);
94 
98  int process(const TTroomScript *roomScript, const TTsentence *sentence) override;
99 
103  ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override;
104 
105  int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
106  uint tag1, uint tag2, uint remainder) override;
107 
111  int updateState(uint oldId, uint newId, int index) override;
112 
116  int preResponse(uint id) override;
117 
121  uint getDialsBitset() const override;
122 
126  int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override;
127 
131  bool randomResponse(uint index) override;
132 
136  virtual bool isDial0Medium() const;
137 
141  virtual bool isDial0Low() const;
142 
146  bool isDial1Medium() const;
147 
151  virtual bool isDial1Low() const;
152 };
153 
154 } // End of namespace Titanic
155 
156 #endif /* TITANIC_DESKBOT_SCRIPT_H */
int preprocess(const TTroomScript *roomScript, const TTsentence *sentence)
int process(const TTroomScript *roomScript, const TTsentence *sentence) override
virtual bool isDial0Medium() const
Definition: tt_room_script.h:61
Definition: deskbot_script.h:30
int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override
bool randomResponse(uint index) override
Definition: script_support.h:90
Definition: tt_sentence.h:49
Definition: script_support.h:177
Definition: tt_npc_script.h:88
int preResponse(uint id) override
int updateState(uint oldId, uint newId, int index) override
Definition: arm.h:30
bool isDial1Medium() const
virtual bool isDial1Low() const
ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override
uint getDialsBitset() const override
virtual bool isDial0Low() const