ScummVM API documentation
talk.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 HOPKINS_TALK_H
23 #define HOPKINS_TALK_H
24 
25 #include "common/scummsys.h"
26 #include "common/path.h"
27 
28 namespace Hopkins {
29 
30 class HopkinsEngine;
31 
32 #define MIN_LETTERS_PER_LINE 65
33 
34 class TalkManager {
35 private:
36  HopkinsEngine *_vm;
37 
38  Common::Path _questionsFilename;
39  Common::Path _answersFilename;
40  byte *_characterBuffer;
41  byte *_characterPalette;
42  size_t _characterSize;
43  int _dialogueMesgId1, _dialogueMesgId2;
44  int _dialogueMesgId3, _dialogueMesgId4;
45  int _paletteBufferIdx;
46 
47  void getStringFromBuffer(int srcStart, Common::Path &dest, const char *srcData);
48  int dialogQuestion(bool animatedFl);
49  int dialogAnswer(int idx, bool animatedFl);
50  void searchCharacterPalette(int startIdx, bool dark);
51  void dialogWait();
52  void dialogTalk();
53  void dialogEndTalk();
54  void startCharacterAnim0(int startIndedx, bool readOnlyFl);
55  void initCharacterAnim();
56  void clearCharacterAnim();
57  bool searchCharacterAnim(int idx, const byte *bufPerso, int animId, int bufferSize);
58  int countBoxLines(int idx, const Common::Path &file);
59  void dialogAnim();
60  void displayBobDialogAnim(int idx);
61 
62 public:
63  byte *_characterAnim;
64  byte *_characterSprite;
65 
67 
68  void startStaticCharacterDialogue(const Common::Path &filename);
69  void startAnimatedCharacterDialogue(const Common::Path &filename);
70  void animateObject(const Common::Path &filename);
71  void handleAnswer(int zone, int verb);
72  void handleForestAnswser(int zone, int verb);
73 };
74 
75 } // End of namespace Hopkins
76 
77 #endif /* HOPKINS_TALK_H */
Definition: path.h:52
Definition: talk.h:34
Definition: anim.h:30
Definition: hopkins.h:77