ScummVM API documentation
doorbot_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_DOORBOT_SCRIPT_H
23 #define TITANIC_DOORBOT_SCRIPT_H
24 
25 #include "common/hashmap.h"
26 #include "titanic/true_talk/tt_npc_script.h"
27 
28 namespace Titanic {
29 
30 class DoorbotScript : public TTnpcScript {
32 private:
33  TTupdateStateArray _states;
34  SentenceEntriesMap _sentences;
35  int _stateIndex;
36  int _doorbotState;
37 private:
41  void setupSentences();
42 
46  int setResponse(int dialogueId, int v34 = -1);
47 
51  int getRoomDialogueId1(const TTroomScript *roomScript);
52 
56  int getRoomDialogueId2(const TTroomScript *roomScript);
57 public:
58  DoorbotScript(int val1, const char *charClass, int v2,
59  const char *charName, int v3, int val2, int v4, int v5, int v6, int v7);
60  ~DoorbotScript() override;
61 
65  int chooseResponse(const TTroomScript *roomScript, const TTsentence *sentence, uint tag) override;
66 
70  int process(const TTroomScript *roomScript, const TTsentence *sentence) override;
71 
75  ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override;
76 
77  int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence,
78  uint tag1, uint tag2, uint remainder) override;
79 
83  bool isQuoteDialled() const override { return true; }
84 
88  int updateState(uint oldId, uint newId, int index) override;
89 
93  int preResponse(uint id) override;
94 
98  uint getDialsBitset() const override;
99 
103  int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override;
104 
108  void setDialRegion(int dialNum, int region) override;
109 
113  bool randomResponse(uint index) override;
114 };
115 
116 } // End of namespace Titanic
117 
118 #endif /* TITANIC_DOORBOT_SCRIPT_H */
ScriptChangedResult scriptChanged(const TTroomScript *roomScript, uint id) override
int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override
bool randomResponse(uint index) override
Definition: tt_room_script.h:61
Definition: doorbot_script.h:30
int updateState(uint oldId, uint newId, int index) override
int chooseResponse(const TTroomScript *roomScript, const TTsentence *sentence, uint tag) override
Definition: tt_sentence.h:49
Definition: script_support.h:177
Definition: tt_npc_script.h:88
int preResponse(uint id) override
Definition: arm.h:30
void setDialRegion(int dialNum, int region) override
bool isQuoteDialled() const override
Definition: doorbot_script.h:83
uint getDialsBitset() const override
int process(const TTroomScript *roomScript, const TTsentence *sentence) override