diff options
Diffstat (limited to 'engines/titanic/game')
32 files changed, 56 insertions, 48 deletions
diff --git a/engines/titanic/game/bar_menu.cpp b/engines/titanic/game/bar_menu.cpp index 3812a8dab6..476e243fe9 100644 --- a/engines/titanic/game/bar_menu.cpp +++ b/engines/titanic/game/bar_menu.cpp @@ -40,7 +40,7 @@ void CBarMenu::save(SimpleFile *file, int indent) { file->writeNumberLine(_barFrameNumber, indent); file->writeNumberLine(_visibleFlag, indent); file->writeNumberLine(_numFrames, indent); - + CGameObject::save(file, indent); } @@ -67,7 +67,7 @@ bool CBarMenu::PETDownMsg(CPETDownMsg *msg) { if (_visibleFlag) { if (--_barFrameNumber < 0) _barFrameNumber = _numFrames - 1; - + loadFrame(_barFrameNumber); } diff --git a/engines/titanic/game/cdrom_computer.cpp b/engines/titanic/game/cdrom_computer.cpp index ceb0595188..5fd8e16350 100644 --- a/engines/titanic/game/cdrom_computer.cpp +++ b/engines/titanic/game/cdrom_computer.cpp @@ -29,7 +29,7 @@ BEGIN_MESSAGE_MAP(CCDROMComputer, CGameObject) ON_MESSAGE(MouseButtonDownMsg) END_MESSAGE_MAP() -CCDROMComputer::CCDROMComputer() : CGameObject(), +CCDROMComputer::CCDROMComputer() : CGameObject(), _clickRect(0, 3, 55, 32) { } @@ -58,7 +58,7 @@ bool CCDROMComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (tray) { CStatusChangeMsg statusMsg; statusMsg.execute(tray); - + if (!statusMsg._success) { // Check if the mouse is within the clickable area Rect tempRect = _clickRect; diff --git a/engines/titanic/game/cdrom_tray.cpp b/engines/titanic/game/cdrom_tray.cpp index 1e5b135d35..505bdad319 100644 --- a/engines/titanic/game/cdrom_tray.cpp +++ b/engines/titanic/game/cdrom_tray.cpp @@ -110,7 +110,7 @@ bool CCDROMTray::ActMsg(CActMsg *msg) { bool CCDROMTray::MovieEndMsg(CMovieEndMsg *msg) { CTreeItem *screen = getRoom()->findByName("newScreen"); - + if (screen) { CActMsg actMsg(_insertedCD); actMsg.execute(screen); diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp index 0acdf575f4..9381e1563a 100644 --- a/engines/titanic/game/chev_code.cpp +++ b/engines/titanic/game/chev_code.cpp @@ -69,7 +69,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { int section = (msg->_floorNum + 4) / 10; int index = (msg->_floorNum + 4) % 10; _chevCode &= ~0xFF00; - + int val = 0; switch (section) { case 0: @@ -87,7 +87,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { default: break; } - + _chevCode |= ((index + val) << 8); return true; } diff --git a/engines/titanic/game/chev_panel.cpp b/engines/titanic/game/chev_panel.cpp index ed730c9d61..5b58cbe594 100644 --- a/engines/titanic/game/chev_panel.cpp +++ b/engines/titanic/game/chev_panel.cpp @@ -41,7 +41,7 @@ void CChevPanel::save(SimpleFile *file, int indent) { file->writeNumberLine(_startPos.x, indent); file->writeNumberLine(_startPos.y, indent); file->writeNumberLine(_chevCode, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp index e1e07844e1..8e02a1ec5c 100644 --- a/engines/titanic/game/chicken_dispensor.cpp +++ b/engines/titanic/game/chicken_dispensor.cpp @@ -107,7 +107,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { _fieldE8 = 1; } break; - + default: break; } diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp index 71d59ff514..441fddec02 100644 --- a/engines/titanic/game/code_wheel.cpp +++ b/engines/titanic/game/code_wheel.cpp @@ -77,7 +77,7 @@ bool CodeWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _state = (_state + 1) % 15; playMovie(START_FRAMES[_state], END_FRAMES[_state], - MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); + MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); } else { if (_state == _field108) _field110 = true; @@ -112,7 +112,7 @@ bool CodeWheel::MovieEndMsg(CMovieEndMsg *msg) { changeMsg._newStatus = 1; changeMsg.execute("Bomb"); - return true; + return true; } } // End of namespace Titanic diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp index 9a7ac4b34e..98bef6eb63 100644 --- a/engines/titanic/game/computer_screen.cpp +++ b/engines/titanic/game/computer_screen.cpp @@ -99,7 +99,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(51, 150); playSound("a#31.wav"); playClip(151, 200); - + handle = playSound("a#27.wav"); playClip(200, 306); playSound("a#30.wav"); @@ -116,7 +116,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(392, 450); startTalking("Doorbot", 0x3611A); sleep(8000); - + playClip(450, 492); startTalking("Doorbot", 0x36121); playClip(492, 522); diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp index d9149f6dd2..e13a2ce6f4 100644 --- a/engines/titanic/game/credits.cpp +++ b/engines/titanic/game/credits.cpp @@ -36,7 +36,7 @@ void CCredits::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); file->writeNumberLine(_fieldC0, indent); - + CGameObject::save(file, indent); } @@ -60,7 +60,7 @@ bool CCredits::TimerMsg(CTimerMsg *msg) { setVisible(true); loadSound("a#16.wav"); loadSound("a#24.wav"); - + playCutscene(0, 18); playGlobalSound("a#16.wav", -1, false, false, 0); playCutscene(19, 642); diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp index ad3efc92fb..288fdb639f 100644 --- a/engines/titanic/game/fan_control.cpp +++ b/engines/titanic/game/fan_control.cpp @@ -128,7 +128,7 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) { } } break; - + default: break; } diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp index 9144f523f4..d285563de3 100644 --- a/engines/titanic/game/fan_noises.cpp +++ b/engines/titanic/game/fan_noises.cpp @@ -96,7 +96,7 @@ bool CFanNoises::LeaveRoomMsg(CLeaveRoomMsg *msg) { if (getParent() == msg->_oldRoom && _soundHandle != -1) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, _stopSeconds); - + _soundHandle = -1; _startFlag = false; } diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp index 26deda8bca..fc71ddd357 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.cpp +++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp @@ -73,7 +73,7 @@ bool CGondolierMixer::EnterRoomMsg(CEnterRoomMsg *msg) { CTurnOn onMsg; onMsg.execute(this); } - + return true; } diff --git a/engines/titanic/game/gondolier/gondolier_slider.cpp b/engines/titanic/game/gondolier/gondolier_slider.cpp index e7a46eb33d..e7ca61de9c 100644 --- a/engines/titanic/game/gondolier/gondolier_slider.cpp +++ b/engines/titanic/game/gondolier/gondolier_slider.cpp @@ -190,7 +190,7 @@ bool CGondolierSlider::FrameMsg(CFrameMsg *msg) { int yp = 0; if (_arrayIndex > 0) yp = ARRAY[_arrayIndex] - ARRAY[_arrayIndex - 1]; - + if (!_string2.empty()) { CTranslateObjectMsg transMsg; transMsg._delta = Point(0, yp); diff --git a/engines/titanic/game/head_slot.cpp b/engines/titanic/game/head_slot.cpp index f7df02d364..06c366abd6 100644 --- a/engines/titanic/game/head_slot.cpp +++ b/engines/titanic/game/head_slot.cpp @@ -87,9 +87,9 @@ bool CHeadSlot::AddHeadPieceMsg(CAddHeadPieceMsg *msg) { } bool CHeadSlot::SenseWorkingMsg(CSenseWorkingMsg *msg) { - if (_fieldEC) + if (_fieldEC) playMovie(_fieldE4, _fieldE8, 0); - + _string1 = msg->_value; _fieldEC = false; return true; diff --git a/engines/titanic/game/idle_summoner.cpp b/engines/titanic/game/idle_summoner.cpp index 5ca3209e28..0e3604a4a9 100644 --- a/engines/titanic/game/idle_summoner.cpp +++ b/engines/titanic/game/idle_summoner.cpp @@ -82,7 +82,7 @@ bool CIdleSummoner::TimerMsg(CTimerMsg *msg) { int region = talkGetDialRegion("BellBot", 1); uint delay = region == 1 ? 15000 : 12000; uint enterTicks = MIN(getNodeEnterTicks(), _ticks); - + CString name; uint ticks = getTicksCount() - enterTicks; if (ticks > delay) { diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 188691033a..6badf63b5b 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -40,7 +40,7 @@ END_MESSAGE_MAP() bool CLightSwitch::_flag; -CLightSwitch::CLightSwitch() : CBackground(), +CLightSwitch::CLightSwitch() : CBackground(), _fieldE0(0), _fieldE4(0), _fieldE8(0) { } diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index 6f47131716..8f7845bc3f 100644 --- a/engines/titanic/game/missiveomat.cpp +++ b/engines/titanic/game/missiveomat.cpp @@ -96,7 +96,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) { if (editMsg._param == 1000) { editMsg._mode = 3; editMsg.execute(loginControl); - + _string1 = editMsg._text; if (!_string1.empty()) { loadFrame(2); @@ -222,7 +222,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { CString *strP = &_messages[_personIndex * 19]; for (_totalMessages = 0; !strP->empty(); ++strP, ++_totalMessages) ; - + CMissiveOMatActionMsg actionMsg; actionMsg._action = REDRAW_MESSAGE; actionMsg.execute(this); @@ -237,7 +237,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { actionMsg.execute(this); } break; - + case PRIOR_MESSAGE: if (_messageNum > 0) { --_messageNum; diff --git a/engines/titanic/game/movie_tester.h b/engines/titanic/game/movie_tester.h index 17a7d489d8..60eacee7e9 100644 --- a/engines/titanic/game/movie_tester.h +++ b/engines/titanic/game/movie_tester.h @@ -45,6 +45,14 @@ public: * Load the data for the class from file */ virtual void load(SimpleFile *file); + + /** + * Loads a movie + */ + void loadMovie(const CString &name, bool pendingFlag = true) { + CGameObject::loadMovie(name, pendingFlag); + _surface->flipVertically(); + } }; } // End of namespace Titanic diff --git a/engines/titanic/game/music_console_button.cpp b/engines/titanic/game/music_console_button.cpp index dc86765476..40492aafe4 100644 --- a/engines/titanic/game/music_console_button.cpp +++ b/engines/titanic/game/music_console_button.cpp @@ -56,7 +56,7 @@ bool CMusicConsoleButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CMusicHasStartedMsg startedMsg; startedMsg.execute("Music Room Phonograph"); - + if (CMusicRoom::_musicHandler->checkSound(1) && CMusicRoom::_musicHandler->checkSound(2) && CMusicRoom::_musicHandler->checkSound(3)) { @@ -82,7 +82,7 @@ bool CMusicConsoleButton::LeaveViewMsg(CLeaveViewMsg *msg) { bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) { CMusicRoom *musicRoom = getMusicRoom(); CQueryMusicControlSettingMsg queryMsg; - + queryMsg.execute("Bells Mute Control"); musicRoom->setMuteControl(BELLS, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Bells Pitch Control"); diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp index 96411ad6b7..3e2a38486d 100644 --- a/engines/titanic/game/nav_helmet.cpp +++ b/engines/titanic/game/nav_helmet.cpp @@ -100,7 +100,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { playSound("a#48.wav"); playSound("a#47.wav"); } - + return true; } diff --git a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp index 2654042967..69fc629606 100644 --- a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp +++ b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp @@ -35,7 +35,7 @@ BEGIN_MESSAGE_MAP(CParrotNutBowlActor, CGameObject) ON_MESSAGE(NutPuzzleMsg) END_MESSAGE_MAP() -CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), +CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), _puzzleDone(0), _state(0) { } @@ -43,7 +43,7 @@ void CParrotNutBowlActor::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_puzzleDone, indent); file->writeNumberLine(_state, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/parrot/parrot_nut_eater.cpp b/engines/titanic/game/parrot/parrot_nut_eater.cpp index 751da931ac..49b8de509f 100644 --- a/engines/titanic/game/parrot/parrot_nut_eater.cpp +++ b/engines/titanic/game/parrot/parrot_nut_eater.cpp @@ -39,7 +39,7 @@ CParrotNutEater::CParrotNutEater() : CGameObject(), _fieldBC(0), void CParrotNutEater::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/place_holder_item.cpp b/engines/titanic/game/place_holder_item.cpp index ecd9c9a10b..108c25ced8 100644 --- a/engines/titanic/game/place_holder_item.cpp +++ b/engines/titanic/game/place_holder_item.cpp @@ -44,7 +44,7 @@ void CPlaceHolderItem::save(SimpleFile *file, int indent) { file->writePoint(_pos1, indent); file->writePoint(_pos2, indent); file->writeQuotedLine(_string1, indent); - + CNamedItem::save(file, indent); } @@ -89,7 +89,7 @@ void CPlaceHolderItem::load(SimpleFile *file) { default: break; } - + CNamedItem::load(file); } diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h index 8ad3dcb8d1..25613643ea 100644 --- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h +++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h @@ -37,7 +37,7 @@ private: public: CLASSDEF; CBarShelfVisCentre() : CPlaceHolder(), _flag(false) {} - + /** * Save the data for the class to file */ diff --git a/engines/titanic/game/restaurant_cylinder_holder.cpp b/engines/titanic/game/restaurant_cylinder_holder.cpp index 8726d1a925..adf029d8f7 100644 --- a/engines/titanic/game/restaurant_cylinder_holder.cpp +++ b/engines/titanic/game/restaurant_cylinder_holder.cpp @@ -121,7 +121,7 @@ bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) { bool CRestaurantCylinderHolder::QueryCylinderHolderMsg(CQueryCylinderHolderMsg *msg) { CNamedItem *cylinder = findByName("Phonograph Cylinder", true); - msg->_value1 = _field118; + msg->_value1 = _field118; if (cylinder) { msg->_value2 = 1; msg->_target = cylinder; diff --git a/engines/titanic/game/sauce_dispensor.cpp b/engines/titanic/game/sauce_dispensor.cpp index 410d4a3153..7010d00be1 100644 --- a/engines/titanic/game/sauce_dispensor.cpp +++ b/engines/titanic/game/sauce_dispensor.cpp @@ -67,7 +67,7 @@ void CSauceDispensor::load(SimpleFile *file) { bool CSauceDispensor::Use(CUse *msg) { CVisibleMsg visibleMsg(true); - + if (msg->_item->isEquals("Chicken")) { CChicken *chicken = static_cast<CChicken *>(msg->_item); _field104 = true; @@ -113,7 +113,7 @@ bool CSauceDispensor::Use(CUse *msg) { CActMsg actMsg(_string3); actMsg.execute("BeerGlass"); - } + } } return true; diff --git a/engines/titanic/game/service_elevator_window.cpp b/engines/titanic/game/service_elevator_window.cpp index b0cc53abb4..13db7a26f8 100644 --- a/engines/titanic/game/service_elevator_window.cpp +++ b/engines/titanic/game/service_elevator_window.cpp @@ -69,7 +69,7 @@ bool CServiceElevatorWindow::ServiceElevatorFloorChangeMsg(CServiceElevatorFloor int count = _endFrame - _startFrame; setMovieFrameRate(1.0 * count / val); - + int startFrame = clip->_startFrame + count * FACTORS[msg->_value1] / 100; int endFrame = clip->_startFrame + count * FACTORS[msg->_value2] / 100; @@ -107,7 +107,7 @@ bool CServiceElevatorWindow::EnterViewMsg(CEnterViewMsg *msg) { loadFrame(0); } } - + return true; } diff --git a/engines/titanic/game/sgt/chest_of_drawers.cpp b/engines/titanic/game/sgt/chest_of_drawers.cpp index d9c72d3021..2db26addf5 100644 --- a/engines/titanic/game/sgt/chest_of_drawers.cpp +++ b/engines/titanic/game/sgt/chest_of_drawers.cpp @@ -58,7 +58,7 @@ bool CChestOfDrawers::TurnOff(CTurnOff *msg) { visibleMsg.execute("Drawer"); _statics->_v6 = "Closed"; _fieldE0 = true; - + _startFrame = 14; _endFrame = 27; playMovie(14, 27, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index 780f92b5ad..571ebcd6fa 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -137,7 +137,7 @@ bool CTelevision::ChangeSeasonMsg(CChangeSeasonMsg *msg) { _v3 = 0; } - return true; + return true; } bool CTelevision::EnterViewMsg(CEnterViewMsg *msg) { @@ -219,7 +219,7 @@ bool CTelevision::PETActivateMsg(CPETActivateMsg *msg) { stopMovie(); if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); - + setVisible(false); } diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp index 10d62a0775..a642451fe0 100644 --- a/engines/titanic/game/transport/lift_indicator.cpp +++ b/engines/titanic/game/transport/lift_indicator.cpp @@ -150,7 +150,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) { petDisplayMessage(1, BOT_BLOCKING_ELEVATOR); } else { _endFrame = pet->getRoomsFloorNum(); - + if (petGetRoomsWellEntry() == 4 && !CLift::_v6 && pet->getRoomsFloorNum() != CLift::_elevator4Floor) { petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL); diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp index 1980825cb6..066a418dbb 100644 --- a/engines/titanic/game/transport/service_elevator.cpp +++ b/engines/titanic/game/transport/service_elevator.cpp @@ -24,7 +24,7 @@ #include "titanic/core/room_item.h" #include "titanic/npcs/doorbot.h" -namespace Titanic { +namespace Titanic { BEGIN_MESSAGE_MAP(CServiceElevator, CTransport) ON_MESSAGE(BodyInBilgeRoomMsg) @@ -182,7 +182,7 @@ bool CServiceElevator::TimerMsg(CTimerMsg *msg) { else if (_v3 == 1) actMsg._action = "DoorbotPlayerPressedMiddleButton"; - actMsg.execute(doorbot); + actMsg.execute(doorbot); } } } diff --git a/engines/titanic/game/variable_list.cpp b/engines/titanic/game/variable_list.cpp index 1ddf1bc957..2a4a7df961 100644 --- a/engines/titanic/game/variable_list.cpp +++ b/engines/titanic/game/variable_list.cpp @@ -33,7 +33,7 @@ void CVariableListItem::save(SimpleFile *file, int indent) { file->writeQuotedLine(_string2, indent); file->writeQuotedLine(_string3, indent); file->writeQuotedLine(_string4, indent); - + ListItem::save(file, indent); } @@ -66,7 +66,7 @@ void CVariableListItem::load(SimpleFile *file) { _field40 = field40; _field44 = field44; - + ListItem::load(file); } |