ScummVM API documentation
dialog.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 TEENAGENT_DIALOG_H
23#define TEENAGENT_DIALOG_H
24
25#include "common/endian.h"
26#include "common/str.h"
27
28namespace TeenAgent {
29
30// Text Color Symbols
31enum {
32 textColorJohnNoty = 0xd0,
33 textColorCampGuard = 0xd0,
34 textColorShockedCaptain = 0xd0,
35 textColorMark = 0xd1,
36 textColorCredits = 0xd1,
37 textColorBankGuard = 0xd7,
38 textColorGrandpa = 0xd8,
39 textColorMansionGuard = 0xd9,
40 textColorMarkEnd = 0xe3,
41 textColorProfessor = 0xe5,
42 textColorOldLady = 0xe5,
43 textColorAnne = 0xe5,
44 textColorWellEcho = 0xe5,
45 textColorSonny = 0xe5,
46 textColorEskimo = 0xe5,
47 textColorRGBBoss = 0xe7,
48 textColorGoldDriver = 0xe7,
49 textColorFortuneTeller = 0xeb,
50 textColorCaptain = 0xec,
51 textColorMike = 0xef,
52 textColorCook = 0xef,
53 textColorBarman = 0xef
54};
55
56enum CharacterID {
57 kMark = 0,
58 kGoldDriver = 1,
59 kBankGuard = 2,
60 kRGBBoss = 3,
61 kFortuneTeller = 4,
62 kCampGuard = 5,
63 kCaptain = 6,
64 kShockedCaptain = 7,
65 kBarman = 8,
66 kSonny = 9,
67 kGrandpa = 10,
68 kAnne = 11,
69 kWellEcho = 12,
70 kOldLady = 13,
71 kMansionGuard = 14,
72 kJohnNoty = 15,
73 kProfessor = 16,
74 kCook = 17,
75 kEskimo = 18,
76 kMike = 19,
77 kMarkEnd = 20,
78 kCreditsText = 21
79};
80
82 int voiceID;
83 bool male;
84 byte textColor;
85};
86
87static const CharacterDialogData characterDialogData[] = {
88 { 0, true, textColorMark },
89 { 1, true, textColorGoldDriver },
90 { 2, true, textColorBankGuard },
91 { 3, true, textColorRGBBoss },
92 { 0, false, textColorFortuneTeller },
93 { 4, true, textColorCampGuard },
94 { 5, true, textColorCaptain },
95 { 5, true, textColorShockedCaptain }, // Same voice as captain
96 { 6, true, textColorBarman },
97 { 7, true, textColorSonny, },
98 { 8, true, textColorGrandpa },
99 { 1, false, textColorAnne },
100 { 9, true, textColorWellEcho },
101 { 2, false, textColorOldLady },
102 { 10, true, textColorMansionGuard },
103 { 11, true, textColorJohnNoty },
104 { 12, true, textColorProfessor },
105 { 13, true, textColorCook },
106 { 14, true, textColorEskimo },
107 { 15, true, textColorMike },
108 { 0, true, textColorMarkEnd }, // Same voice as Mark
109 { 0, true, textColorCredits } // Same voice as Mark
110};
111
112class Scene;
113class TeenAgentEngine;
114
115class Dialog {
116public:
117 Dialog(TeenAgentEngine *vm) : _vm(vm) { }
118
119 uint16 pop(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, CharacterID character1ID, CharacterID character2ID, byte slot1, byte slot2);
120
121 uint16 popMark(Scene *scene, uint16 addr) {
122 return pop(scene, addr, 0, 0, kMark, kMark, 0, 0);
123 }
124
125 void show(uint16 dialogNum, Scene *scene, uint16 animation1, uint16 animation2, CharacterID character1ID, CharacterID character2ID, byte slot1, byte slot2);
126
127 void showMono(uint16 dialogNum, Scene *scene, uint16 animation, CharacterID characterID, byte slot) {
128 show(dialogNum, scene, animation, animation, characterID, characterID, slot, slot);
129 }
130
131 void showMark(uint16 dialogNum, Scene *scene) {
132 show(dialogNum, scene, 0, 0, kMark, kMark, 0, 0);
133 }
134
135private:
136 TeenAgentEngine *_vm;
137
138 void show(Scene *scene, uint32 addr, uint16 animation1, uint16 animation2, CharacterID character1ID, CharacterID character2ID, byte slot1, byte slot2);
139};
140
141} // End of namespace TeenAgent
142
143#endif
Definition: dialog.h:115
Definition: scene.h:129
Definition: teenagent.h:94
Definition: actor.h:32
Definition: dialog.h:81