aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/hopkins.cpp18
-rw-r--r--engines/hopkins/hopkins.h3
-rw-r--r--engines/hopkins/objects.cpp24
-rw-r--r--engines/hopkins/script.cpp152
-rw-r--r--engines/hopkins/talk.cpp7
-rw-r--r--engines/hopkins/talk.h3
6 files changed, 101 insertions, 106 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index fee7b2a927..a45e757c5f 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -55,11 +55,11 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
_saveLoadManager = new SaveLoadManager(this);
_scriptManager = new ScriptManager(this);
_soundManager = new SoundManager(this);
-
- _talkManager.setParent(this);
+ _talkManager = new TalkManager(this);
}
HopkinsEngine::~HopkinsEngine() {
+ delete _talkManager;
delete _soundManager;
delete _scriptManager;
delete _saveLoadManager;
@@ -1902,7 +1902,7 @@ void HopkinsEngine::bombExplosion() {
}
_globals->_introSpeechOffFl = true;
- _talkManager.startStaticCharacterDialogue("vire.pe2");
+ _talkManager->startStaticCharacterDialogue("vire.pe2");
_globals->_introSpeechOffFl = false;
_objectsManager->setBobAnimation(7);
@@ -1971,7 +1971,7 @@ void HopkinsEngine::handleConflagration() {
_eventsManager->refreshScreenAndEvents();
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("SVGARD1.pe2");
+ _talkManager->startAnimatedCharacterDialogue("SVGARD1.pe2");
_globals->_introSpeechOffFl = false;
for (int cpt = 0; cpt <= 49; cpt++)
@@ -2096,7 +2096,7 @@ void HopkinsEngine::playEnding() {
while (_objectsManager->getBobAnimDataIdx(6) != 54);
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("GM4.PE2");
+ _talkManager->startAnimatedCharacterDialogue("GM4.PE2");
_globals->_disableInventFl = true;
_objectsManager->stopBobAnimation(6);
_objectsManager->stopBobAnimation(10);
@@ -2114,7 +2114,7 @@ void HopkinsEngine::playEnding() {
while (_objectsManager->getBobAnimDataIdx(7) != 65);
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("DUELB4.PE2");
+ _talkManager->startAnimatedCharacterDialogue("DUELB4.PE2");
_eventsManager->mouseOff();
_globals->_disableInventFl = true;
@@ -2123,14 +2123,14 @@ void HopkinsEngine::playEnding() {
while (_objectsManager->getBobAnimDataIdx(7) != 72);
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("DUELH1.PE2");
+ _talkManager->startAnimatedCharacterDialogue("DUELH1.PE2");
do
_eventsManager->refreshScreenAndEvents();
while (_objectsManager->getBobAnimDataIdx(7) != 81);
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("DUELB5.PE2");
+ _talkManager->startAnimatedCharacterDialogue("DUELB5.PE2");
do
_eventsManager->refreshScreenAndEvents();
@@ -2181,7 +2181,7 @@ void HopkinsEngine::playEnding() {
_objectsManager->stopBobAnimation(7);
_objectsManager->setBobAnimation(8);
_globals->_introSpeechOffFl = true;
- _talkManager.startAnimatedCharacterDialogue("GM5.PE2");
+ _talkManager->startAnimatedCharacterDialogue("GM5.PE2");
_globals->_disableInventFl = true;
do
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index e4ebb96d11..c6e2224e3e 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -157,8 +157,7 @@ public:
SaveLoadManager *_saveLoadManager;
ScriptManager *_scriptManager;
SoundManager *_soundManager;
-
- TalkManager _talkManager;
+ TalkManager *_talkManager;
public:
HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc);
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index ecbad01445..e158e5e997 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -1773,7 +1773,7 @@ void ObjectsManager::handleCityMap() {
if (_vm->_globals->_saveData->_data[svBankAttackAnimPlayedFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall1PlayedFl]) {
_vm->_globals->_saveData->_data[svCopCall1PlayedFl] = 1;
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("APPEL1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("APPEL1.pe2");
_vm->_globals->_introSpeechOffFl = false;
mouseButton = 0;
}
@@ -1781,7 +1781,7 @@ void ObjectsManager::handleCityMap() {
if (_vm->_globals->_saveData->_data[svFreedHostageFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall2PlayedFl]) {
_vm->_globals->_saveData->_data[svCopCall2PlayedFl] = 1;
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("APPEL2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("APPEL2.pe2");
_vm->_globals->_introSpeechOffFl = false;
mouseButton = 0;
_vm->_eventsManager->_curMouseButton = 0;
@@ -2002,9 +2002,9 @@ void ObjectsManager::PARADISE() {
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager->_scrollStatus = 0;
}
- _vm->_talkManager.REPONSE(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
+ _vm->_talkManager->REPONSE(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
} else {
- _vm->_talkManager.REPONSE2(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
+ _vm->_talkManager->REPONSE2(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
}
_vm->_eventsManager->changeMouseCursor(4);
if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesManager->ZONEP[_zoneNum]._enabledFl) {
@@ -2571,7 +2571,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_globals->_saveData->_data[svField173] = 1;
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("flicspe1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("flicspe1.pe2");
_vm->_globals->_introSpeechOffFl = false;
if (_vm->_globals->_censorshipFl)
@@ -2682,7 +2682,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_eventsManager->refreshScreenAndEvents();
while (getBobAnimDataIdx(8) != 3);
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("GM3.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GM3.PE2");
stopBobAnimation(8);
_vm->_globals->_saveData->_data[svField333] = 1;
_vm->_globals->_disableInventFl = false;
@@ -2692,14 +2692,14 @@ void ObjectsManager::handleSpecialGames() {
void ObjectsManager::BOB_VIVANT(int idx) {
int startPos = 10 * idx;
- if (!READ_LE_UINT16(_vm->_talkManager._characterAnim + startPos + 4))
+ if (!READ_LE_UINT16(_vm->_talkManager->_characterAnim + startPos + 4))
return;
- int xp = READ_LE_INT16(_vm->_talkManager._characterAnim + startPos);
- int yp = READ_LE_INT16(_vm->_talkManager._characterAnim + startPos + 2);
- int spriteIndex = _vm->_talkManager._characterAnim[startPos + 8];
+ int xp = READ_LE_INT16(_vm->_talkManager->_characterAnim + startPos);
+ int yp = READ_LE_INT16(_vm->_talkManager->_characterAnim + startPos + 2);
+ int spriteIndex = _vm->_talkManager->_characterAnim[startPos + 8];
- _vm->_graphicsManager->fastDisplay(_vm->_talkManager._characterSprite, xp, yp, spriteIndex);
+ _vm->_graphicsManager->fastDisplay(_vm->_talkManager->_characterSprite, xp, yp, spriteIndex);
}
void ObjectsManager::VBOB(byte *src, int idx, int xp, int yp, int frameIndex) {
@@ -3247,7 +3247,7 @@ void ObjectsManager::sceneSpecialIni() {
_vm->_globals->_disableInventFl = false;
_vm->_graphicsManager->_noFadingFl = true;
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("MAGE1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MAGE1.pe2");
_vm->_graphicsManager->_noFadingFl = true;
_vm->_globals->_disableInventFl = false;
}
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 6e1e4eb6fc..ab4dcbcb11 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -518,26 +518,26 @@ int ScriptManager::handleOpcode(byte *dataP) {
break;
case 7:
- _vm->_talkManager.startAnimatedCharacterDialogue("rueh1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("rueh1.pe2");
break;
case 8:
- _vm->_talkManager.startAnimatedCharacterDialogue("ruef1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("ruef1.pe2");
break;
case 10:
- _vm->_talkManager.startAnimatedCharacterDialogue("bqeflic1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("bqeflic1.pe2");
break;
case 11:
- _vm->_talkManager.startAnimatedCharacterDialogue("bqeflic2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("bqeflic2.pe2");
break;
case 12:
_vm->_fontManager->hideText(9);
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_eventsManager->refreshScreenAndEvents();
- _vm->_talkManager.startAnimatedCharacterDialogue("bqetueur.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("bqetueur.pe2");
break;
case 13:
@@ -622,56 +622,56 @@ int ScriptManager::handleOpcode(byte *dataP) {
break;
case 16:
- _vm->_talkManager.startAnimatedCharacterDialogue("ftoubib.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("ftoubib.pe2");
break;
case 17:
- _vm->_talkManager.startAnimatedCharacterDialogue("flic2b.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("flic2b.pe2");
break;
case 18:
- _vm->_talkManager.startAnimatedCharacterDialogue("fjour.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("fjour.pe2");
break;
case 20:
- _vm->_talkManager.startAnimatedCharacterDialogue("PUNK.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("PUNK.pe2");
break;
case 21:
- _vm->_talkManager.startAnimatedCharacterDialogue("MEDLEG.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MEDLEG.pe2");
break;
case 22:
- _vm->_talkManager.animateObject("CADAVRE1.pe2");
+ _vm->_talkManager->animateObject("CADAVRE1.pe2");
break;
case 23:
- _vm->_talkManager.startStaticCharacterDialogue("CHERCHE1.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("CHERCHE1.pe2");
break;
case 25:
- _vm->_talkManager.startAnimatedCharacterDialogue("AGENT1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("AGENT1.pe2");
break;
case 26:
- _vm->_talkManager.startAnimatedCharacterDialogue("AGENT2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("AGENT2.pe2");
break;
case 27:
if (_vm->_globals->_saveData->_data[svField94] != 1 || _vm->_globals->_saveData->_data[svField95] != 1)
- _vm->_talkManager.startAnimatedCharacterDialogue("STANDAR.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("STANDAR.pe2");
else
- _vm->_talkManager.startAnimatedCharacterDialogue("STANDAR1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("STANDAR1.pe2");
break;
case 29:
_vm->_globals->_disableInventFl = true;
- _vm->_talkManager.animateObject("TELEP.pe2");
+ _vm->_talkManager->animateObject("TELEP.pe2");
_vm->_globals->_disableInventFl = false;
break;
case 32:
- _vm->_talkManager.startAnimatedCharacterDialogue("SAMAN.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("SAMAN.pe2");
break;
case 35:
@@ -683,22 +683,22 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_soundManager->_soundFl);
}
- _vm->_talkManager.startAnimatedCharacterDialogue("PTLAB.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("PTLAB.pe2");
break;
case 36:
if (_vm->_globals->_saveData->_data[svField270] == 2 && _vm->_globals->_saveData->_data[svField94] == 1 && _vm->_globals->_saveData->_data[svField95] == 1)
_vm->_globals->_saveData->_data[svField270] = 3;
if (!_vm->_globals->_saveData->_data[svField270])
- _vm->_talkManager.startStaticCharacterDialogue("PATRON0.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("PATRON0.pe2");
if (_vm->_globals->_saveData->_data[svField270] == 1)
- _vm->_talkManager.startStaticCharacterDialogue("PATRON1.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("PATRON1.pe2");
if (_vm->_globals->_saveData->_data[svField270] == 2)
- _vm->_talkManager.startStaticCharacterDialogue("PATRON2.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("PATRON2.pe2");
if (_vm->_globals->_saveData->_data[svField270] == 3)
- _vm->_talkManager.startStaticCharacterDialogue("PATRON3.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("PATRON3.pe2");
if (_vm->_globals->_saveData->_data[svField270] > 3) {
- _vm->_talkManager.startStaticCharacterDialogue("PATRON4.pe2");
+ _vm->_talkManager->startStaticCharacterDialogue("PATRON4.pe2");
_vm->_globals->_saveData->_data[svField270] = 5;
}
break;
@@ -725,27 +725,27 @@ int ScriptManager::handleOpcode(byte *dataP) {
break;
case 40:
- _vm->_talkManager.startAnimatedCharacterDialogue("MAGE.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MAGE.pe2");
break;
case 41:
- _vm->_talkManager.startAnimatedCharacterDialogue("MORT3.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MORT3.pe2");
break;
case 42:
- _vm->_talkManager.startAnimatedCharacterDialogue("MORT2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MORT2.pe2");
break;
case 43:
- _vm->_talkManager.startAnimatedCharacterDialogue("MORT1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MORT1.pe2");
break;
case 44:
- _vm->_talkManager.startAnimatedCharacterDialogue("MORT3A.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("MORT3A.pe2");
break;
case 45:
- _vm->_talkManager.startAnimatedCharacterDialogue("FEM3.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("FEM3.pe2");
break;
case 46: {
@@ -823,11 +823,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 47:
- _vm->_talkManager.startAnimatedCharacterDialogue("BARMAN.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("BARMAN.pe2");
break;
case 48:
- _vm->_talkManager.startAnimatedCharacterDialogue("SAMAN2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("SAMAN2.pe2");
break;
case 49: {
@@ -923,16 +923,16 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 52:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("GARDE.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GARDE.PE2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 53:
- _vm->_talkManager.startAnimatedCharacterDialogue("GARDE1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GARDE1.pe2");
break;
case 54:
- _vm->_talkManager.startAnimatedCharacterDialogue("GARDE2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GARDE2.pe2");
break;
case 55:
@@ -966,7 +966,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 58:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("Gm1.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("Gm1.PE2");
_vm->_globals->_saveData->_data[svField176] = 1;
_vm->_globals->_saveData->_data[svField270] = 2;
_vm->_globals->_introSpeechOffFl = false;
@@ -1026,11 +1026,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 62:
- _vm->_talkManager.animateObject("SBCADA.pe2");
+ _vm->_talkManager->animateObject("SBCADA.pe2");
break;
case 65:
- _vm->_talkManager.animateObject("ScCADA.pe2");
+ _vm->_talkManager->animateObject("ScCADA.pe2");
break;
case 80: {
@@ -1169,12 +1169,12 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 83:
- _vm->_talkManager.startAnimatedCharacterDialogue("CVIGIL.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL.pe2");
break;
case 84:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("CVIGIL1.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL1.PE2");
_vm->_globals->_introSpeechOffFl = false;
break;
@@ -1197,19 +1197,19 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 86:
if (_vm->_globals->_saveData->_data[svField231] == 1) {
- _vm->_talkManager.startAnimatedCharacterDialogue("chotess1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("chotess1.pe2");
} else {
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("chotesse.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("chotesse.pe2");
_vm->_globals->_introSpeechOffFl = false;
}
break;
case 87:
if (_vm->_globals->_saveData->_data[svField188])
- _vm->_talkManager.startAnimatedCharacterDialogue("stand2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("stand2.pe2");
else
- _vm->_talkManager.startAnimatedCharacterDialogue("stand1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("stand1.pe2");
break;
case 88:
@@ -1343,9 +1343,9 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 94:
if (!_vm->_globals->_saveData->_data[svField228])
- _vm->_talkManager.startAnimatedCharacterDialogue("flicn.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("flicn.pe2");
if (_vm->_globals->_saveData->_data[svField228] == 1)
- _vm->_talkManager.startAnimatedCharacterDialogue("flicn1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("flicn1.pe2");
break;
case 95:
@@ -1379,35 +1379,35 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 98:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("CVIGIL2.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL2.PE2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 100:
- _vm->_talkManager.startAnimatedCharacterDialogue("tourist.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tourist.pe2");
break;
case 101:
- _vm->_talkManager.startAnimatedCharacterDialogue("tahi1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tahi1.pe2");
break;
case 103:
// Dice game
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("tourist1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tourist1.pe2");
_vm->_globals->_introSpeechOffFl = false;
_vm->_animationManager->playAnim2("T421.ANM", 100, 14, 500);
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("tourist2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tourist2.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 104:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("tourist3.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tourist3.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
@@ -1604,57 +1604,57 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 108:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("peche1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("peche1.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 109:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("peche2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("peche2.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 110:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("peche3.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("peche3.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 111:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("peche4.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("peche4.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 112:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("teint1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("teint1.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 113:
- _vm->_talkManager.startAnimatedCharacterDialogue("teint.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("teint.pe2");
break;
case 114:
- _vm->_talkManager.startAnimatedCharacterDialogue("tahibar.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("tahibar.pe2");
break;
case 115:
- _vm->_talkManager.startAnimatedCharacterDialogue("ilebar.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("ilebar.pe2");
break;
case 116:
- _vm->_talkManager.startAnimatedCharacterDialogue("Profred.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("Profred.pe2");
break;
case 170:
- _vm->_talkManager.startAnimatedCharacterDialogue("GRED.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GRED.pe2");
break;
case 171: {
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("gred1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("gred1.pe2");
_vm->_globals->_introSpeechOffFl = false;
_vm->_globals->_checkDistanceFl = true;
_vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0);
@@ -1677,12 +1677,12 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 172:
- _vm->_talkManager.startAnimatedCharacterDialogue("GBLEU.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("GBLEU.pe2");
break;
case 173: {
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("gbleu1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("gbleu1.pe2");
_vm->_globals->_introSpeechOffFl = false;
_vm->_globals->_checkDistanceFl = true;
_vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0);
@@ -1705,7 +1705,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 174:
- _vm->_talkManager.startAnimatedCharacterDialogue("Profbl.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("Profbl.pe2");
break;
case 175:
@@ -1757,19 +1757,19 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 176:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("gred2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("gred2.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 177:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("gbleu2.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("gbleu2.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 200:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("Gm2.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("Gm2.PE2");
_vm->_globals->_introSpeechOffFl = false;
break;
@@ -1787,7 +1787,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 202:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("SVGARD2.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("SVGARD2.PE2");
_vm->_globals->_introSpeechOffFl = false;
break;
@@ -1865,7 +1865,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 207:
- _vm->_talkManager.animateObject("PANNEAU.PE2");
+ _vm->_talkManager->animateObject("PANNEAU.PE2");
break;
case 208: {
@@ -1978,13 +1978,13 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 215:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("aviat.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("aviat.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
case 216:
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("aviat1.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("aviat1.pe2");
_vm->_globals->_introSpeechOffFl = false;
break;
@@ -2051,7 +2051,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager->getBobAnimDataIdx(12) != 6);
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("PRMORT.pe2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("PRMORT.pe2");
_vm->_globals->_introSpeechOffFl = false;
do {
if (_vm->shouldQuit())
@@ -2087,7 +2087,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager->getBobAnimDataIdx(13) != 48);
_vm->_globals->_introSpeechOffFl = true;
- _vm->_talkManager.startAnimatedCharacterDialogue("HRADIO.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("HRADIO.PE2");
_vm->_globals->_introSpeechOffFl = false;
_vm->_graphicsManager->fadeOutLong();
_vm->_objectsManager->stopBobAnimation(13);
@@ -2259,7 +2259,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
}
case 241:
- _vm->_talkManager.startAnimatedCharacterDialogue("RECEP.PE2");
+ _vm->_talkManager->startAnimatedCharacterDialogue("RECEP.PE2");
break;
// Resurrect Samantha's clone
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index 785c1010e9..30148bd401 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -35,7 +35,8 @@
namespace Hopkins {
-TalkManager::TalkManager() {
+TalkManager::TalkManager(HopkinsEngine *vm) {
+ _vm = vm;
_characterBuffer = NULL;
_characterPalette = NULL;
_characterSprite = NULL;
@@ -45,10 +46,6 @@ TalkManager::TalkManager() {
_paletteBufferIdx = 0;
}
-void TalkManager::setParent(HopkinsEngine *vm) {
- _vm = vm;
-}
-
void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) {
Common::String spriteFilename;
diff --git a/engines/hopkins/talk.h b/engines/hopkins/talk.h
index c8985343b9..5a50c83617 100644
--- a/engines/hopkins/talk.h
+++ b/engines/hopkins/talk.h
@@ -65,8 +65,7 @@ public:
byte *_characterAnim;
byte *_characterSprite;
- TalkManager();
- void setParent(HopkinsEngine *vm);
+ TalkManager(HopkinsEngine *vm);
void startStaticCharacterDialogue(const Common::String &filename);
void startAnimatedCharacterDialogue(const Common::String &filename);