diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.h | 34 | ||||
-rw-r--r-- | engines/dreamweb/keypad.cpp | 75 | ||||
-rw-r--r-- | engines/dreamweb/newplace.cpp | 22 | ||||
-rw-r--r-- | engines/dreamweb/object.cpp | 11 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 6 | ||||
-rw-r--r-- | engines/dreamweb/print.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/saveload.cpp | 45 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 75 | ||||
-rw-r--r-- | engines/dreamweb/talk.cpp | 10 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 5 | ||||
-rw-r--r-- | engines/tsage/globals.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 411 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.h | 55 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.cpp | 243 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_speakers.h | 32 |
18 files changed, 835 insertions, 200 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index e790baa3e3..67e72ebf7c 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -181,8 +181,6 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _symbolBotX = 0; _symbolBotNum = 0; _symbolBotDir = 0; - _dumpX = 0; - _dumpY = 0; _walkAndExam = 0; _walkExamType = 0; _walkExamNum = 0; diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index a38c08f3d0..7e6ca1ddd7 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -196,6 +196,20 @@ protected: // from keypad.cpp uint8 _pressList[6]; + uint8 _pressed; + uint16 _pressPointer; + uint8 _graphicPress; + uint8 _pressCount; + uint8 _lightCount; + uint8 _folderPage; + uint8 _diaryPage; + uint8 _menuCount; + uint8 _symbolTopX; + uint8 _symbolTopNum; + int8 _symbolTopDir; + uint8 _symbolBotX; + uint8 _symbolBotNum; + int8 _symbolBotDir; // from monitor.cpp char _inputLine[64]; @@ -393,22 +407,6 @@ public: uint8 _watchDump; uint8 _logoNum; uint8 _oldLogoNum; - uint8 _pressed; - uint16 _pressPointer; - uint8 _graphicPress; - uint8 _pressCount; - uint8 _lightCount; - uint8 _folderPage; - uint8 _diaryPage; - uint8 _menuCount; - uint8 _symbolTopX; - uint8 _symbolTopNum; - uint8 _symbolTopDir; - uint8 _symbolBotX; - uint8 _symbolBotNum; - uint8 _symbolBotDir; - uint16 _dumpX; - uint16 _dumpY; uint8 _walkAndExam; uint8 _walkExamType; uint8 _walkExamNum; @@ -489,7 +487,6 @@ public: void showOuterPad(); void dumpKeypad(); void dumpSymbol(); - void dumpSymBox(); void quitSymbol(); void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3); @@ -817,7 +814,9 @@ public: void roomName(); void showIcon(); void eraseOldObs(); + void commandOnlyCond(uint8 command, uint8 commandType); void commandOnly(uint8 command); + void commandWithOb(uint8 command, uint8 type, uint8 index); void blank(); void setTopLeft(); void setTopRight(); @@ -887,7 +886,6 @@ public: void makeMainScreen(); void showWatchReel(); void watchReel(); - void commandWithOb(uint8 command, uint8 type, uint8 index); void examineObText(); void blockNameText(); void personNameText(); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index 30d44d3c73..2a31652ace 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -112,10 +112,7 @@ void DreamWebEngine::loadKeypad() { } void DreamWebEngine::quitKey() { - if (_commandType != 222) { - _commandType = 222; - commandOnly(4); - } + commandOnlyCond(4, 222); if (_mouseButton != _oldButton && (_mouseButton & 1)) _getBack = 1; @@ -177,11 +174,7 @@ void DreamWebEngine::buttonEnter() { } void DreamWebEngine::buttonPress(uint8 buttonId) { - uint8 commandType = 100 + buttonId; - if (_commandType != commandType) { - _commandType = commandType; - commandOnly(buttonId + 4); - } + commandOnlyCond(buttonId + 4, buttonId + 100); if ((_mouseButton & 1) && (_mouseButton != _oldButton)) { _pressed = buttonId; _graphicPress = buttonId + 21; @@ -338,10 +331,7 @@ void DreamWebEngine::nextFolder() { blank(); return; } - if (_commandType != 201) { - _commandType = 201; - commandOnly(16); - } + commandOnlyCond(16, 201); if ((_mouseButton == 1) && (_mouseButton != _oldButton)) { ++_folderPage; folderHints(); @@ -380,10 +370,7 @@ void DreamWebEngine::lastFolder() { blank(); return; } - if (_commandType != 202) { - _commandType = 202; - commandOnly(17); - } + commandOnlyCond(17, 202); if ((_mouseButton == 1) && (_mouseButton != _oldButton)) { --_folderPage; @@ -564,10 +551,7 @@ void DreamWebEngine::quitSymbol() { return; }; - if (_commandType != 222) { - _commandType = 222; - commandOnly(18); - } + commandOnlyCond(18, 222); if (_mouseButton == _oldButton) return; // notqs @@ -584,13 +568,10 @@ void DreamWebEngine::setTopLeft() { return; } - if (_commandType != 210) { - _commandType = 210; - commandOnly(19); - } + commandOnlyCond(19, 210); if (_mouseButton != 0) - _symbolTopDir = 0xFF; + _symbolTopDir = -1; } void DreamWebEngine::setTopRight() { @@ -599,13 +580,10 @@ void DreamWebEngine::setTopRight() { return; } - if (_commandType != 211) { - _commandType = 211; - commandOnly(20); - } + commandOnlyCond(20, 211); if (_mouseButton != 0) - _symbolTopDir = 1; + _symbolTopDir = +1; } void DreamWebEngine::setBotLeft() { @@ -614,13 +592,10 @@ void DreamWebEngine::setBotLeft() { return; } - if (_commandType != 212) { - _commandType = 212; - commandOnly(21); - } + commandOnlyCond(21, 212); if (_mouseButton != 0) - _symbolBotDir = 0xFF; + _symbolBotDir = -1; } void DreamWebEngine::setBotRight() { @@ -629,13 +604,10 @@ void DreamWebEngine::setBotRight() { return; } - if (_commandType != 213) { - _commandType = 213; - commandOnly(22); - } + commandOnlyCond(22, 213); if (_mouseButton != 0) - _symbolBotDir = 1; + _symbolBotDir = +1; } void DreamWebEngine::dumpSymbol() { @@ -672,7 +644,7 @@ void DreamWebEngine::updateSymbolTop() { if (!_symbolTopDir) return; // topfinished - if (_symbolTopDir == (byte)-1) { + if (_symbolTopDir == -1) { // Backward _symbolTopX--; if (_symbolTopX != (byte)-1) { @@ -709,7 +681,7 @@ void DreamWebEngine::updateSymbolBot() { if (!_symbolBotDir) return; // botfinished - if (_symbolBotDir == (byte)-1) { + if (_symbolBotDir == -1) { // Backward _symbolBotX--; if (_symbolBotX != (byte)-1) { @@ -742,13 +714,6 @@ void DreamWebEngine::updateSymbolBot() { } } -void DreamWebEngine::dumpSymBox() { - if (_dumpX != 0xFFFF) { - multiDump(_dumpX, _dumpY, 30, 77); - _dumpX = 0xFFFF; - } -} - void DreamWebEngine::useDiary() { getRidOfReels(); loadIntoTemp("DREAMWEB.G14"); @@ -848,10 +813,7 @@ void DreamWebEngine::dumpDiaryKeys() { } void DreamWebEngine::diaryKeyP() { - if (_commandType != 214) { - _commandType = 214; - commandOnly(23); - } + commandOnlyCond(23, 214); if (!_mouseButton || _oldButton == _mouseButton || @@ -868,10 +830,7 @@ void DreamWebEngine::diaryKeyP() { } void DreamWebEngine::diaryKeyN() { - if (_commandType != 213) { - _commandType = 213; - commandOnly(23); - } + commandOnlyCond(23, 213); if (!_mouseButton || _oldButton == _mouseButton || diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index 248f04a4d9..8083055da6 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -103,10 +103,7 @@ void DreamWebEngine::showCity() { } void DreamWebEngine::lookAtPlace() { - if (_commandType != 224) { - _commandType = 224; - commandOnly(27); - } + commandOnlyCond(27, 224); if (!(_mouseButton & 1) || _mouseButton == _oldButton || @@ -154,7 +151,7 @@ void DreamWebEngine::locationPic() { showFrame(_tempGraphics, 104, 140 + 14, 3, 0); // Currently in this location const uint8 *string = (const uint8 *)_travelText.getString(_destPos); - DreamWebEngine::printDirect(string, 50, 20, 241, 241 & 1); + printDirect(string, 50, 20, 241, 241 & 1); } void DreamWebEngine::showArrows() { @@ -164,10 +161,7 @@ void DreamWebEngine::showArrows() { } void DreamWebEngine::nextDest() { - if (_commandType != 218) { - _commandType = 218; - commandOnly(28); - } + commandOnlyCond(28, 218); if (!(_mouseButton & 1) || _oldButton == 1) return; // nodu @@ -193,10 +187,7 @@ void DreamWebEngine::nextDest() { } void DreamWebEngine::lastDest() { - if (_commandType != 219) { - _commandType = 219; - commandOnly(29); - } + commandOnlyCond(29, 219); if (!(_mouseButton & 1) || _oldButton == 1) return; // nodd @@ -222,10 +213,7 @@ void DreamWebEngine::lastDest() { } void DreamWebEngine::destSelect() { - if (_commandType != 222) { - _commandType = 222; - commandOnly(30); - } + commandOnlyCond(30, 222); if (!(_mouseButton & 1) || _oldButton == 1) return; // notrav diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 249c275a3f..443366561a 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -30,7 +30,7 @@ void DreamWebEngine::showRyanPage() { } void DreamWebEngine::findAllRyan() { - memset(_ryanInvList, 0xff, 60); + memset(_ryanInvList, 0xff, sizeof(_ryanInvList)); for (size_t i = 0; i < kNumexobjects; ++i) { const DynObject *extra = getExAd(i); if (extra->mapad[0] != kExObjectType) @@ -218,10 +218,7 @@ void DreamWebEngine::inventory() { return; } - if (_commandType != 239) { - _commandType = 239; - commandOnly(32); - } + commandOnlyCond(32, 239); if (_mouseButton == _oldButton) return; @@ -686,12 +683,12 @@ void DreamWebEngine::dropObject() { return; } - if (compare(_itemFrame, 4, "GUNA") || compare(_itemFrame, 4, "SHLD")) { + if (compare(_itemFrame, kExObjectType, "GUNA") || compare(_itemFrame, kExObjectType, "SHLD")) { cantDrop(); return; } - _objectType = 4; + _objectType = kExObjectType; DynObject *object = getExAd(_itemFrame); object->mapad[0] = 0; object->mapad[1] = ((_ryanX + 4) >> 4) + _mapX; diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 98f36a90cc..0f51adde17 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -343,7 +343,7 @@ void DreamWebEngine::madmansTelly(ReelRoutine &routine) { void DreamWebEngine::smokeBloke(ReelRoutine &routine) { if (_vars._rockstarDead == 0) { if (routine.b7 & 128) - DreamWebEngine::setLocation(5); + setLocation(5); } if (checkSpeed(routine)) { if (routine.reelPointer() == 100) { @@ -939,7 +939,7 @@ void DreamWebEngine::mugger(ReelRoutine &routine) { _objectType = kExObjectType; removeObFromInv(); makeMainScreen(); - DreamWebEngine::setupTimedUse(48, 70, 10, 68 - 32, 54 + 64); + setupTimedUse(48, 70, 10, 68 - 32, 54 + 64); _vars._beenMugged = 1; } } @@ -950,7 +950,7 @@ void DreamWebEngine::businessMan(ReelRoutine &routine) { _pointerMode = 0; _vars._watchingTime = 2; if (routine.reelPointer() == 2) - DreamWebEngine::setupTimedUse(49, 30, 1, 68, 174); // First + setupTimedUse(49, 30, 1, 68, 174); // First if (routine.reelPointer() == 95) { // Businessman combat won - end diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index a293aa74f9..24e0183a07 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -269,7 +269,7 @@ void DreamWebEngine::rollEndCreditsGameWon() { uint16 y = 10 - j; const uint8 *tmp_str = string; for (int k = 0; k < 18; ++k) { - DreamWebEngine::printDirect(&tmp_str, 75, &y, 160 + 1, true); + printDirect(&tmp_str, 75, &y, 160 + 1, true); y += linespacing; } @@ -308,7 +308,7 @@ void DreamWebEngine::rollEndCreditsGameLost() { uint16 y = 10 - j; const uint8 *tmp_str = string; for (int k = 0; k < 18; ++k) { - DreamWebEngine::printDirect(&tmp_str, 25, &y, 160 + 1, true); + printDirect(&tmp_str, 25, &y, 160 + 1, true); y += linespacing; } diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 29f1b916a4..386319db34 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -107,10 +107,7 @@ void syncGameVars(Common::Serializer &s, GameVars &vars) { } void DreamWebEngine::loadGame() { - if (_commandType != 246) { - _commandType = 246; - commandOnly(41); - } + commandOnlyCond(41, 246); if (_mouseButton == _oldButton) return; // "noload" if (_mouseButton == 1) @@ -204,10 +201,7 @@ void DreamWebEngine::saveGame() { return; } - if (_commandType != 247) { - _commandType = 247; - commandOnly(44); - } + commandOnlyCond(44, 247); if (_mouseButton != 1) return; @@ -304,10 +298,7 @@ void DreamWebEngine::saveLoad() { blank(); return; } - if (_commandType != 253) { - _commandType = 253; - commandOnly(43); - } + commandOnlyCond(43, 253); if ((_mouseButton != _oldButton) && (_mouseButton & 1)) doSaveLoad(); } @@ -384,10 +375,7 @@ void DreamWebEngine::getBackFromOps() { } void DreamWebEngine::getBackToOps() { - if (_commandType != 201) { - _commandType = 201; - commandOnly(42); - } + commandOnlyCond(42, 201); if (_mouseButton != _oldButton) { if (_mouseButton & 1) { @@ -411,10 +399,7 @@ void DreamWebEngine::showDiscOps() { } void DreamWebEngine::discOps() { - if (_commandType != 249) { - _commandType = 249; - commandOnly(43); - } + commandOnlyCond(43, 249); if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; @@ -450,10 +435,7 @@ void DreamWebEngine::discOps() { } void DreamWebEngine::actualSave() { - if (_commandType != 222) { - _commandType = 222; - commandOnly(44); - } + commandOnlyCond(44, 222); if (!(_mouseButton & 1)) return; @@ -477,10 +459,7 @@ void DreamWebEngine::actualSave() { } void DreamWebEngine::actualLoad() { - if (_commandType != 221) { - _commandType = 221; - commandOnly(41); - } + commandOnlyCond(41, 221); if (_mouseButton == _oldButton || _mouseButton != 1) return; @@ -702,10 +681,7 @@ uint DreamWebEngine::scanForNames() { } void DreamWebEngine::loadOld() { - if (_commandType != 252) { - _commandType = 252; - commandOnly(48); - } + commandOnlyCond(48, 252); if (!(_mouseButton & 1)) return; @@ -793,10 +769,7 @@ void DreamWebEngine::checkInput() { } void DreamWebEngine::selectSlot() { - if (_commandType != 244) { - _commandType = 244; - commandOnly(45); - } + commandOnlyCond(45, 244); if (_mouseButton != 1 || _mouseButton == _oldButton) return; // noselslot diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index ef10aad0dc..3602558b8b 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -979,10 +979,7 @@ void DreamWebEngine::getTime() { } void DreamWebEngine::DOSReturn() { - if (_commandType != 250) { - _commandType = 250; - commandOnly(46); - } + commandOnlyCond(46, 250); if (_mouseButton & 1) { _mouseButton = 0; @@ -1120,6 +1117,13 @@ void DreamWebEngine::delTextLine() { multiPut(_textUnder, _textAddressX, _textAddressY, kUnderTextSizeX, kUnderTextSizeY); } +void DreamWebEngine::commandOnlyCond(uint8 command, uint8 commandType) { + if (_commandType != commandType) { + _commandType = commandType; + commandOnly(command); + } +} + void DreamWebEngine::commandOnly(uint8 command) { delTextLine(); const uint8 *string = (const uint8 *)_commandText.getString(command); @@ -1181,16 +1185,16 @@ bool DreamWebEngine::checkIfEx(uint8 x, uint8 y) { } const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) { - if (type == 5) { - uint16 i = 64 * (index & 127); - return (const uint8 *)_personText.getString(i); - } else if (type == 4) { + switch (type) { + case 5: + return (const uint8 *)_personText.getString(64 * (index & 127)); + case kExObjectType: return (const uint8 *)_exText.getString(index); - } else if (type == 2) { + case kFreeObjectType: return (const uint8 *)_freeDesc.getString(index); - } else if (type == 1) { + case kSetObjectType1: return (const uint8 *)_setDesc.getString(index); - } else { + default: return (const uint8 *)_blockDesc.getString(index); } } @@ -1768,10 +1772,7 @@ void DreamWebEngine::zoomOnOff() { return; } - if (_commandType != 222) { - _commandType = 222; - commandOnly(39); - } + commandOnlyCond(39, 222); if (!(_mouseButton & 1) || (_mouseButton == _oldButton)) return; @@ -1965,10 +1966,7 @@ void DreamWebEngine::look() { blank(); return; } - if (_commandType != 241) { - _commandType = 241; - commandOnly(25); - } + commandOnlyCond(25, 241); if ((_mouseButton == 1) && (_mouseButton != _oldButton)) doLook(); } @@ -2300,10 +2298,7 @@ void DreamWebEngine::readKey() { } void DreamWebEngine::newGame() { - if (_commandType != 251) { - _commandType = 251; - commandOnly(47); - } + commandOnlyCond(47, 251); if (_mouseButton == 1) _getBack = 3; @@ -2377,10 +2372,7 @@ void DreamWebEngine::redrawMainScrn() { } void DreamWebEngine::blank() { - if (_commandType != 199) { - _commandType = 199; - commandOnly(0); - } + commandOnlyCond(0, 199); } void DreamWebEngine::allPointer() { @@ -2537,10 +2529,7 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) { } void DreamWebEngine::examineInventory() { - if (_commandType != 249) { - _commandType = 249; - commandOnly(32); - } + commandOnlyCond(32, 249); if (!(_mouseButton & 1)) return; @@ -2663,10 +2652,7 @@ void DreamWebEngine::madmanRun() { return; } - if (_commandType != 211) { - _commandType = 211; - commandOnly(52); - } + commandOnlyCond(52, 211); if (_mouseButton == 1 && _mouseButton != _oldButton) @@ -2789,10 +2775,7 @@ void DreamWebEngine::getBack1() { } - if (_commandType != 202) { - _commandType = 202; - commandOnly(26); - } + commandOnlyCond(26, 202); if (_mouseButton == _oldButton) return; @@ -2994,7 +2977,7 @@ void DreamWebEngine::clearBuffers() { } void DreamWebEngine::clearChanges() { - memset(_listOfChanges, 0xFF, 4*kNumChanges); + memset(_listOfChanges, 0xFF, sizeof(_listOfChanges)); setupInitialReelRoutines(); @@ -3005,13 +2988,14 @@ void DreamWebEngine::clearChanges() { memset(_exFrames._frames, 0xFF, kFrameBlocksize); memset(_exFrames._data, 0xFF, kExframeslen); - memset(_exData, 0xFF, sizeof(DynObject) * kNumexobjects); + memset(_exData, 0xFF, sizeof(_exData)); memset(_exText._offsetsLE, 0xFF, 2*(kNumexobjects+2)); memset(_exText._text, 0xFF, kExtextlen); - const uint8 initialRoomsCanGo[] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + const uint8 initialRoomsCanGo[16] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - memcpy(_roomsCanGo, initialRoomsCanGo, 16); + assert(sizeof(_roomsCanGo) == sizeof(initialRoomsCanGo)); + memcpy(_roomsCanGo, initialRoomsCanGo, sizeof(initialRoomsCanGo)); } void DreamWebEngine::setupInitialVars() { @@ -3105,10 +3089,7 @@ void DreamWebEngine::edensFlatReminders() { } void DreamWebEngine::incRyanPage() { - if (_commandType != 222) { - _commandType = 222; - commandOnly(31); - } + commandOnlyCond(31, 222); if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index 9a94f0f68d..0f59cad895 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -119,10 +119,7 @@ void DreamWebEngine::moreTalk() { return; } - if (_commandType != 215) { - _commandType = 215; - commandOnly(49); - } + commandOnlyCond(49, 215); if (_mouseButton == _oldButton) return; // nomore @@ -245,10 +242,7 @@ void DreamWebEngine::redes() { return; } - if (_commandType != 217) { - _commandType = 217; - commandOnly(50); - } + commandOnlyCond(50, 217); if (!(_mouseButton & 1)) return; diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 58210c1d85..fc0398c7b9 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1450,7 +1450,7 @@ void DreamWebEngine::useAltar() { _vars._endWatchReel = 174; _vars._watchSpeed = 1; _vars._speedCount = 1; - DreamWebEngine::setupTimedUse(47, 32, 98, 52, 76); + setupTimedUse(47, 32, 98, 52, 76); _getBack = 1; } else { showPuzText(23, 300); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index d30d585c09..2869b3b60e 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -387,6 +387,8 @@ void Ringworld2Globals::reset() { _v565AE = 0; for (int i = 0; i < 14; i++) _v56605[i] = 0; + _v56A99 = 0; + _v56A9E = 0; _v56AA0 = 0; _v56AA1 = 0; _v56AAB = 0; @@ -424,6 +426,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { s.syncAsSint16LE(_v5657C); s.syncAsSint16LE(_v565F5); + s.syncAsSint16LE(_v56A9E); s.syncAsSint16LE(_v56AAB); s.syncAsSint16LE(_v57C2C); s.syncAsSint16LE(_v58CE2); @@ -438,7 +441,7 @@ void Ringworld2Globals::synchronize(Serializer &s) { for (i = 0; i < 14; ++i) s.syncAsByte(_v56605[i]); - + s.syncAsByte(_v56A99); for (i = 0; i < 12; ++i) s.syncAsByte(_stripManager_lookupList[i]); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 498659d3ae..f50cb70773 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -253,6 +253,8 @@ public: int _v5657C; byte _v565AE; byte _v56605[14]; + byte _v56A99; + int _v56A9E; byte _v56AA0; byte _v56AA1; int _v56AAB; diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 1b6c375b80..0e387083a5 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -217,6 +217,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) { // Cutscene - Ship landing return new Scene3350(); case 3375: + return new Scene3375(); case 3385: case 3395: error("Missing scene %d from group 3", sceneNumber); diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index a42bbcb08c..7261d6438f 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -1699,6 +1699,416 @@ void Scene3350::signal() { } /*-------------------------------------------------------------------------- + * Scene 3375 - + * + *--------------------------------------------------------------------------*/ +Scene3375::Scene3375() { + _field1488 = _field1492 = 0; + for (int i = 0; i < 4; ++i) + _field148A[i] = 0; +} + +void Scene3375::synchronize(Serializer &s) { + SceneExt::synchronize(s); + + s.syncAsSint16LE(_field1488); + s.syncAsSint16LE(_field1492); + for (int i = 0; i < 4; ++i) + s.syncAsSint16LE(_field148A[i]); +} + +bool Scene3375::Actor1::startAction(CursorType action, Event &event) { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + if (R2_GLOBALS._player._characterIndex == 2) + scene->_stripManager.start(3302, scene); + else + scene->_stripManager.start(3304, scene); + + return true; +} + +bool Scene3375::Actor2::startAction(CursorType action, Event &event) { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + if (R2_GLOBALS._player._characterIndex == 3) + scene->_stripManager.start(3302, scene); + else + scene->_stripManager.start(3301, scene); + + return true; +} + +bool Scene3375::Actor3::startAction(CursorType action, Event &event) { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_TALK) + return SceneActor::startAction(action, event); + + scene->_sceneMode = 9999; + scene->_stripManager.start(3303, scene); + + return true; +} + +bool Scene3375::Actor4::startAction(CursorType action, Event &event) { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + if (action != CURSOR_USE) + return SceneActor::startAction(action, event); + + if (R2_GLOBALS._v56A9E != 0) { + R2_GLOBALS._walkRegions.disableRegion(2); + R2_GLOBALS._walkRegions.disableRegion(3); + } else { + R2_GLOBALS._walkRegions.disableRegion(1); + R2_GLOBALS._walkRegions.disableRegion(3); + R2_GLOBALS._walkRegions.disableRegion(4); + } + R2_GLOBALS._walkRegions.disableRegion(6); + R2_GLOBALS._walkRegions.disableRegion(7); + R2_GLOBALS._walkRegions.disableRegion(8); + + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + + scene->_sceneMode = 3375; + scene->setAction(&scene->_sequenceManager, scene, 3375, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, &scene->_actor4, NULL); + + return true; +} + +void Scene3375::Exit1::changeScene() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + _moving = false; + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + scene->_sceneMode = 3376; + if (R2_GLOBALS._v56A9E != 0) { + R2_GLOBALS._walkRegions.disableRegion(2); + R2_GLOBALS._walkRegions.disableRegion(3); + } else { + R2_GLOBALS._walkRegions.disableRegion(1); + R2_GLOBALS._walkRegions.disableRegion(3); + R2_GLOBALS._walkRegions.disableRegion(4); + } + if (scene->_actor1._position.y != 163) { + R2_GLOBALS._player.setStrip(-1); + scene->_actor1.setStrip2(-1); + scene->_actor2.setStrip2(-1); + scene->_actor3.setStrip2(-1); + scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, NULL); + } else { + R2_GLOBALS._player.setStrip2(2); + scene->_actor1.setStrip2(2); + scene->_actor2.setStrip2(2); + scene->_actor3.setStrip2(2); + R2_GLOBALS._sound2.play(314); + + Common::Point pt(50, 150); + NpcMover *mover = new NpcMover(); + R2_GLOBALS._player.addMover(mover, &pt, scene); + } +} + +void Scene3375::Exit2::changeScene() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + _moving = false; + R2_GLOBALS._player._effect = 6; + R2_GLOBALS._player._shade = 4; + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + + scene->_sceneMode = 3377; + scene->_field1488 = 3381; + + if (R2_GLOBALS._v56A9E != 0) { + R2_GLOBALS._walkRegions.disableRegion(2); + R2_GLOBALS._walkRegions.disableRegion(3); + } else { + R2_GLOBALS._walkRegions.disableRegion(1); + R2_GLOBALS._walkRegions.disableRegion(3); + R2_GLOBALS._walkRegions.disableRegion(4); + } + scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, NULL); +} + +void Scene3375::Exit3::changeScene() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + _moving = false; + R2_GLOBALS._player._effect = 6; + R2_GLOBALS._player._shade = 4; + R2_GLOBALS._player.disableControl(CURSOR_ARROW); + + scene->_sceneMode = 3378; + scene->_field1488 = 3380; + + if (R2_GLOBALS._v56A9E != 0) { + R2_GLOBALS._walkRegions.disableRegion(2); + R2_GLOBALS._walkRegions.disableRegion(3); + } else { + R2_GLOBALS._walkRegions.disableRegion(1); + R2_GLOBALS._walkRegions.disableRegion(3); + R2_GLOBALS._walkRegions.disableRegion(4); + } + scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, &scene->_actor1, &scene->_actor2, &scene->_actor3, NULL); +} + +void Scene3375::postInit(SceneObjectList *OwnerList) { + _field148A[0] = 3376; + _field148A[1] = 3377; + _field148A[2] = 3375; + _field148A[3] = 3378; + + loadScene(_field148A[R2_GLOBALS._v56A9E]); + SceneExt::postInit(); + + R2_GLOBALS._sound1.play(313); + + _stripManager.setColors(60, 255); + _stripManager.setFontNumber(3); + _stripManager.addSpeaker(&_quinnSpeaker); + _stripManager.addSpeaker(&_seekerSpeaker); + _stripManager.addSpeaker(&_mirandaSpeaker); + _stripManager.addSpeaker(&_webbsterSpeaker); + + R2_GLOBALS._player._characterScene[1] = 3375; + R2_GLOBALS._player._characterScene[2] = 3375; + R2_GLOBALS._player._characterScene[3] = 3375; + + setZoomPercents(55, 126, 167, 200); + R2_GLOBALS._player.postInit(); + + if (R2_GLOBALS._player._characterIndex == 2) { + R2_GLOBALS._player._moveDiff = Common::Point(5, 3); + } else { + R2_GLOBALS._player._moveDiff = Common::Point(3, 2); + } + R2_GLOBALS._player.changeZoom(-1); + + switch (R2_GLOBALS._player._characterIndex) { + case 2: + if (R2_GLOBALS._sceneManager._previousScene == 3385) + R2_GLOBALS._player.setup(20, 1, 1); + else + R2_GLOBALS._player.setup(20, 3, 1); + break; + case 3: + if (R2_GLOBALS._sceneManager._previousScene == 3385) + R2_GLOBALS._player.setup(30, 1, 1); + else + R2_GLOBALS._player.setup(30, 3, 1); + break; + default: + if (R2_GLOBALS._sceneManager._previousScene == 3385) + R2_GLOBALS._player.setup(10, 1, 1); + else + R2_GLOBALS._player.setup(10, 3, 1); + break; + } + + R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); + R2_GLOBALS._player.disableControl(); + + _actor1.postInit(); + if (R2_GLOBALS._player._characterIndex == 2) { + _actor1._moveRate = 10; + _actor1._moveDiff = Common::Point(3, 2); + } else { + _actor1._moveRate = 7; + _actor1._moveDiff = Common::Point(5, 3); + } + _actor1.changeZoom(-1); + _actor1._effect = 1; + + int tmpStrip, tmpVisage; + if (R2_GLOBALS._sceneManager._previousScene == 3385) + tmpStrip = 1; + else + tmpStrip = 4; + + if (R2_GLOBALS._player._characterIndex == 2) + tmpVisage = 10; + else + tmpVisage = 20; + + _actor1.setup(tmpVisage, tmpStrip, 1); + _actor1.animate(ANIM_MODE_1, NULL); + + _actor2.postInit(); + _actor2._moveDiff = Common::Point(3, 2); + _actor2.changeZoom(-1); + _actor2._effect = 1; + if (R2_GLOBALS._sceneManager._previousScene == 3385) + tmpStrip = 1; + else + tmpStrip = 8; + + if (R2_GLOBALS._player._characterIndex == 3) + tmpVisage = 10; + else + tmpVisage = 30; + + _actor2.setup(tmpVisage, tmpStrip, 1); + _actor2.animate(ANIM_MODE_1, NULL); + + _actor3.postInit(); + _actor3._moveRate = 7; + _actor3._moveDiff = Common::Point(5, 3); + _actor3.changeZoom(-1); + _actor3._effect = 1; + if (R2_GLOBALS._sceneManager._previousScene == 3385) + tmpStrip = 1; + else + tmpStrip = 4; + + _actor3.setup(40, tmpStrip, 1); + _actor3.animate(ANIM_MODE_1, NULL); + + _actor2.setDetails(3375, -1, -1, -1, 1, NULL); + _actor3.setDetails(3375, 21, -1, -1, 1, NULL); + _actor1.setDetails(3375, -1, -1, -1, 1, NULL); + + _actor4.postInit(); + _actor4.setup(3375, 1, 1); + _actor4.setPosition(Common::Point(254, 166)); + _actor4.fixPriority(140); + _actor4.hide(); + + _exit1.setDetails(Rect(0, 84, 24, 167), EXITCURSOR_W, 3375); + _exit1.setDest(Common::Point(65, 155)); + _exit2.setDetails(Rect(103, 152, 183, 170), SHADECURSOR_DOWN, 3375); + _exit2.setDest(Common::Point(158, 151)); + _exit3.setDetails(Rect(180, 75, 213, 132), EXITCURSOR_E, 3375); + _exit3.setDest(Common::Point(201, 131)); + + for (int i = 0; i <= 12; ++i) + _itemArray[i].setDetails(i, 3375, 3, -1, -1); + + _item1.setDetails(Rect(0, 0, 320, 200), 3375, 0, -1, 1, 1, NULL); + + if (R2_GLOBALS._sceneManager._previousScene == 3385) + _sceneMode = 3379; + else + _sceneMode = 0; + + warning("sub_FC696(_sceneMode)"); +} + +void Scene3375::remove() { + R2_GLOBALS._sound1.fadeOut2(NULL); + SceneExt::remove(); +} + +void Scene3375::signalCase3379() { + switch (R2_GLOBALS._v56A9E) { + case 0: + _exit1._enabled = true; + if (R2_GLOBALS._sceneManager._previousScene == 3385) + R2_GLOBALS._walkRegions.enableRegion(1); + else { + R2_GLOBALS._walkRegions.enableRegion(3); + R2_GLOBALS._walkRegions.enableRegion(4); + } + R2_GLOBALS._walkRegions.enableRegion(6); + R2_GLOBALS._walkRegions.enableRegion(7); + case 2: + _exit1._enabled = false; + R2_GLOBALS._walkRegions.enableRegion(2); + R2_GLOBALS._walkRegions.enableRegion(3); + R2_GLOBALS._walkRegions.enableRegion(5); + R2_GLOBALS._walkRegions.enableRegion(6); + R2_GLOBALS._walkRegions.enableRegion(7); + R2_GLOBALS._walkRegions.enableRegion(8); + R2_GLOBALS._walkRegions.enableRegion(9); + default: + _exit1._enabled = false; + R2_GLOBALS._walkRegions.enableRegion(2); + R2_GLOBALS._walkRegions.enableRegion(3); + R2_GLOBALS._walkRegions.enableRegion(5); + R2_GLOBALS._walkRegions.enableRegion(6); + break; + } + R2_GLOBALS._sceneManager._previousScene = 3375; + R2_GLOBALS._player._effect = 1; + _actor1._effect = 1; + _actor2._effect = 1; + _actor3._effect = 1; + R2_GLOBALS._player.enableControl(CURSOR_ARROW); +} + +void Scene3375::signal() { + switch (_sceneMode) { + case 3375: + R2_GLOBALS._sceneManager.changeScene(3400); + break; + case 3376: + R2_GLOBALS._sceneManager.changeScene(3385); + break; + case 3377: + // No break on purpose + case 3378: + _sceneMode = _field1488; + _field1488 = 0; + _actor1._effect = 6; + _actor1._shade = 4; + _actor2._effect = 6; + _actor2._shade = 4; + _actor3._effect = 6; + _actor3._shade = 4; + warning("sub_FC696(_sceneMode)"); + break; + case 3379: + signalCase3379(); + break; + case 9999: + if (_actor1._position.y == 163) + R2_GLOBALS._player.setStrip(1); + else + R2_GLOBALS._player.setStrip(3); + R2_GLOBALS._player.enableControl(CURSOR_TALK); + default: + _actor1.setPriority(130); + _actor2.setPriority(132); + _actor3.setPriority(134); + signalCase3379(); + break; + } +} + +void Scene3375::dispatch() { + if ((R2_GLOBALS._player._position.y >= 168) && (R2_GLOBALS._player._effect == 1)) + R2_GLOBALS._player._effect = 6; + else if ((R2_GLOBALS._player._position.y < 168) && (R2_GLOBALS._player._effect == 6)) + R2_GLOBALS._player._effect = 1; + + if ((_actor1._position.y >= 168) && (_actor1._effect == 1)) + _actor1._effect = 6; + else if ((_actor1._position.y < 168) && (_actor1._effect == 6)) + _actor1._effect = 1; + + if ((_actor2._position.y >= 168) && (_actor2._effect == 1)) + _actor2._effect = 6; + else if ((_actor2._position.y < 168) && (_actor2._effect == 6)) + _actor2._effect = 1; + + if ((_actor3._position.y >= 168) && (_actor3._effect == 1)) + _actor3._effect = 6; + else if ((_actor3._position.y < 168) && (_actor3._effect == 6)) + _actor3._effect = 1; + + Scene::dispatch(); +} + +/*-------------------------------------------------------------------------- * Scene 3400 - * *--------------------------------------------------------------------------*/ @@ -1997,6 +2407,7 @@ void Scene3700::signal() { // No break on purpose case 3329: warning("STUB: sub_1D227()"); + _sceneMode = 3701; setAction(&_sequenceManager, this, 3701, &_actor2, &_actor3, &_actor4, NULL); break; case 3700: diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h index f83417e772..36e4ae83fc 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -400,6 +400,61 @@ public: virtual void signal(); }; +class Scene3375 : public SceneExt { + class Actor1 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor2 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor3 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + class Actor4 : public SceneActor { + virtual bool startAction(CursorType action, Event &event); + }; + + class Exit1 : public SceneExit { + public: + virtual void changeScene(); + }; + class Exit2 : public SceneExit { + public: + virtual void changeScene(); + }; + class Exit3 : public SceneExit { + public: + virtual void changeScene(); + }; + + void signalCase3379(); +public: + SpeakerQuinn3375 _quinnSpeaker; + SpeakerSeeker3375 _seekerSpeaker; + SpeakerMiranda3375 _mirandaSpeaker; + SpeakerWebbster3375 _webbsterSpeaker; + NamedHotspot _item1; + NamedHotspot _itemArray[13]; + Actor1 _actor1; + Actor2 _actor2; + Actor3 _actor3; + Actor4 _actor4; + Exit1 _exit1; + Exit2 _exit2; + Exit3 _exit3; + SequenceManager _sequenceManager; + int _field1488; + int _field148A[4]; + int _field1492; + + Scene3375(); + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); + virtual void signal(); + virtual void dispatch(); + virtual void synchronize(Serializer &s); +}; + class Scene3400 : public SceneExt { public: SpeakerQuinn3400 _quinnSpeaker; diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp index 25ad156cd3..a07b689645 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.cpp +++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp @@ -1602,6 +1602,249 @@ void SpeakerMiranda3255::proc15() { } } +SpeakerQuinn3375::SpeakerQuinn3375() { + _speakerName = "QUINN"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerQuinn3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 1) + _object2 = &R2_GLOBALS._player; + else if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &scene->_actor1; + else + _object2 = &scene->_actor2; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4010, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + +SpeakerSeeker3375::SpeakerSeeker3375() { + _speakerName = "SEEKER"; + _color1 = 35; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerSeeker3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 2) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor1; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(CURSOR_TALK); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4031, 1, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + +SpeakerMiranda3375::SpeakerMiranda3375() { + _speakerName = "MIRANDA"; + _color1 = 154; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerMiranda3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + if (R2_GLOBALS._player._characterIndex == 3) + _object2 = &R2_GLOBALS._player; + else + _object2 = &scene->_actor2; + + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + R2_GLOBALS._player.disableControl(); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4051, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + +SpeakerWebbster3375::SpeakerWebbster3375() { + _speakerName = "WEBBSTER"; + _color1 = 60; + _color2 = 0; + _fieldF6 = 0; + _textWidth = 300; + _hideObjects = false; + _object2 = NULL; + _displayMode = 1; + _numFrames = 0; +} + +void SpeakerWebbster3375::proc15() { + Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene; + + int v = _fieldF6; + + if (!_object2) { + _object2 = &scene->_actor3; + _object2->hide(); + _object1.postInit(); + _object1.setPosition(_object2->_position); + _object1._numFrames = 7; + _object1._effect = 1; + _object1.changeZoom(-1); + + if (scene->_actor1._position.y != 163) + R2_GLOBALS._player.setStrip(8); + else + R2_GLOBALS._player.setStrip(2); + + if (R2_GLOBALS._player._mover) + R2_GLOBALS._player.addMover(NULL); + + R2_GLOBALS._player.disableControl(); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + + if (_object2->_mover) + _object2->addMover(NULL); + } + + + switch (v) { + case 0: + _object1.animate(ANIM_MODE_2, NULL); + break; + case 1: + ((SceneItem *)_action)->_sceneRegionId = 0; + _object1.setup(4110, 5, 1); + _object1.animate(ANIM_MODE_5, NULL); + break; + default: + signal(); + break; + } +} + SpeakerQuinn3400::SpeakerQuinn3400() { _speakerName = "QUINN"; _color1 = 60; diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h index e4ea036938..2f289175e8 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -389,6 +389,38 @@ public: virtual void proc15(); }; +class SpeakerQuinn3375 : public VisualSpeaker { +public: + SpeakerQuinn3375(); + + virtual Common::String getClassName() { return "SpeakerQuinn3375"; } + virtual void proc15(); +}; + +class SpeakerSeeker3375 : public VisualSpeaker { +public: + SpeakerSeeker3375(); + + virtual Common::String getClassName() { return "SpeakerSeeker3375"; } + virtual void proc15(); +}; + +class SpeakerMiranda3375 : public VisualSpeaker { +public: + SpeakerMiranda3375(); + + virtual Common::String getClassName() { return "SpeakerMiranda3375"; } + virtual void proc15(); +}; + +class SpeakerWebbster3375 : public VisualSpeaker { +public: + SpeakerWebbster3375(); + + virtual Common::String getClassName() { return "SpeakerWebbster3375"; } + virtual void proc15(); +}; + class SpeakerQuinn3400 : public VisualSpeaker { public: SpeakerQuinn3400(); |