Initial commit
This commit is contained in:
105
engines/titanic/moves/call_pellerator.cpp
Normal file
105
engines/titanic/moves/call_pellerator.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/call_pellerator.h"
|
||||
#include "titanic/pet_control/pet_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CCallPellerator, CGameObject)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(LeaveViewMsg)
|
||||
ON_MESSAGE(PETActivateMsg)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(TimerMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CCallPellerator::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CCallPellerator::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CCallPellerator::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
CString viewName = msg->_newView->getFullViewName();
|
||||
if (viewName == "MusicRoomLobby.Node 1.N") {
|
||||
// WORKAROUND: In original, the Remote tab icons don't get loaded
|
||||
// until after the EnterViewMsg call is made when entering a new
|
||||
// room. So in the special case of the Music Room Lobby, since
|
||||
// you're immediately at the Pellerator when you enter, set up a
|
||||
// quick timer to not select the Call glyph until the remote is loaded
|
||||
addTimer(10);
|
||||
} else {
|
||||
showCallPellerator();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCallPellerator::LeaveViewMsg(CLeaveViewMsg *msg) {
|
||||
petClear();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCallPellerator::PETActivateMsg(CPETActivateMsg *msg) {
|
||||
CString name = getFullViewName();
|
||||
|
||||
if (msg->_name == "Pellerator") {
|
||||
if (petDoorOrBellbotPresent()) {
|
||||
petDisplayMessage(BOT_BLOCKING_PELLERATOR);
|
||||
} else if (name == "FrozenArboretum.Node 4.E") {
|
||||
petDisplayMessage(FROZEN_PELLERATOR);
|
||||
} else if (name == "Bar.Node 1.S") {
|
||||
changeView("Pellerator.Node 1.S");
|
||||
} else {
|
||||
changeView("Pellerator.Node 1.N");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCallPellerator::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCallPellerator::TimerMsg(CTimerMsg *msg) {
|
||||
showCallPellerator();
|
||||
return true;
|
||||
}
|
||||
|
||||
void CCallPellerator::showCallPellerator() {
|
||||
petSetArea(PET_REMOTE);
|
||||
petHighlightGlyph(1);
|
||||
CString name = getFullViewName();
|
||||
|
||||
if (name == "TopOfWell.Node 6.S") {
|
||||
petDisplayMessage(2, STANDING_OUTSIDE_PELLERATOR);
|
||||
}
|
||||
|
||||
petSetRemoteTarget();
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
59
engines/titanic/moves/call_pellerator.h
Normal file
59
engines/titanic/moves/call_pellerator.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CALL_PELLERATOR_H
|
||||
#define TITANIC_CALL_PELLERATOR_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
#include "titanic/messages/pet_messages.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CCallPellerator : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool LeaveViewMsg(CLeaveViewMsg *msg);
|
||||
bool PETActivateMsg(CPETActivateMsg *msg);
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool TimerMsg(CTimerMsg *msg);
|
||||
private:
|
||||
/**
|
||||
* Switches to the PET Remote tab, and selects the 'Call Pellerator'
|
||||
* glyph by default
|
||||
*/
|
||||
void showCallPellerator();
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CALL_PELLERATOR_H */
|
||||
49
engines/titanic/moves/enter_bomb_room.cpp
Normal file
49
engines/titanic/moves/enter_bomb_room.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_bomb_room.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterBombRoom, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CEnterBombRoom::CEnterBombRoom() : CMovePlayerTo(), _fieldC8(0) {
|
||||
}
|
||||
|
||||
void CEnterBombRoom::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterBombRoom::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CEnterBombRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
changeView("Titania.Node 2.SE");
|
||||
changeView(_destination);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/enter_bomb_room.h
Normal file
51
engines/titanic/moves/enter_bomb_room.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_BOMB_ROOM_H
|
||||
#define TITANIC_ENTER_BOMB_ROOM_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterBombRoom : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
protected:
|
||||
int _fieldC8;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterBombRoom();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_BOMB_ROOM_H */
|
||||
54
engines/titanic/moves/enter_bridge.cpp
Normal file
54
engines/titanic/moves/enter_bridge.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_bridge.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterBridge, CGameObject)
|
||||
ON_MESSAGE(EnterRoomMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CEnterBridge::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_flag, indent);
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterBridge::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_flag = file->readNumber();
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEnterBridge::EnterRoomMsg(CEnterRoomMsg *msg) {
|
||||
if (_flag) {
|
||||
CActMsg actMsg("Disable");
|
||||
actMsg.execute("ShipAnnouncements");
|
||||
|
||||
stateSetSoundMakerAllowed(false);
|
||||
_flag = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/moves/enter_bridge.h
Normal file
52
engines/titanic/moves/enter_bridge.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_BRIDGE_H
|
||||
#define TITANIC_ENTER_BRIDGE_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
#include "titanic/messages/messages.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterBridge : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool EnterRoomMsg(CEnterRoomMsg *msg);
|
||||
private:
|
||||
bool _flag;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterBridge() : CGameObject(), _flag(true) {}
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_BRIDGE_H */
|
||||
68
engines/titanic/moves/enter_exit_first_class_state.cpp
Normal file
68
engines/titanic/moves/enter_exit_first_class_state.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_exit_first_class_state.h"
|
||||
#include "titanic/titanic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterExitFirstClassState, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CEnterExitFirstClassState::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(g_vm->_stateRoomExitView, indent);
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterExitFirstClassState::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
g_vm->_stateRoomExitView = file->readString();
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEnterExitFirstClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
switch (getPassengerClass()) {
|
||||
case 1:
|
||||
if (compareRoomNameTo("1stClassLobby")) {
|
||||
// Entering room, so save where you were and change to stateroom
|
||||
g_vm->_stateRoomExitView = getRoomNodeName() + ".E";
|
||||
changeView("1stClassState.Node 1.S");
|
||||
} else if (compareRoomNameTo("1stClassState")) {
|
||||
// Return to where you entered room from
|
||||
changeView(g_vm->_stateRoomExitView);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
petDisplayMessage(1, ROOM_RESERVED_FOR_FIRST_CLASS);
|
||||
break;
|
||||
|
||||
default:
|
||||
petDisplayMessage(NO_LOSERS);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/moves/enter_exit_first_class_state.h
Normal file
48
engines/titanic/moves/enter_exit_first_class_state.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_EXIT_FIRST_CLASS_STATE_H
|
||||
#define TITANIC_ENTER_EXIT_FIRST_CLASS_STATE_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterExitFirstClassState : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_EXIT_FIRST_CLASS_STATE_H */
|
||||
72
engines/titanic/moves/enter_exit_mini_lift.cpp
Normal file
72
engines/titanic/moves/enter_exit_mini_lift.cpp
Normal file
@@ -0,0 +1,72 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_exit_mini_lift.h"
|
||||
#include "titanic/pet_control/pet_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterExitMiniLift, CSGTNavigation)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CEnterExitMiniLift::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_fieldBC, indent);
|
||||
file->writeNumberLine(_destRoomNum, indent);
|
||||
|
||||
CSGTNavigation::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterExitMiniLift::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldBC = file->readNumber();
|
||||
_destRoomNum = file->readNumber();
|
||||
|
||||
CSGTNavigation::load(file);
|
||||
}
|
||||
|
||||
bool CEnterExitMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (compareRoomNameTo("SgtLobby")) {
|
||||
_statics->_destView = getRoomNodeName() + ".S";
|
||||
_statics->_destRoom = "SgtLobby";
|
||||
changeView("SGTLittleLift.Node 1.E");
|
||||
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet)
|
||||
pet->setRoomsRoomNum(_destRoomNum);
|
||||
} else if (compareRoomNameTo("SGTLittleLift")) {
|
||||
if (_statics->_miniLiftFloor == 1) {
|
||||
changeView(_statics->_destView);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterExitMiniLift::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
// Only show exit cursor when minilift is on the ground level
|
||||
_cursorId = _statics->_miniLiftFloor == 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
53
engines/titanic/moves/enter_exit_mini_lift.h
Normal file
53
engines/titanic/moves/enter_exit_mini_lift.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_EXIT_MINI_LIFT_H
|
||||
#define TITANIC_ENTER_EXIT_MINI_LIFT_H
|
||||
|
||||
#include "titanic/game/sgt/sgt_navigation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterExitMiniLift : public CSGTNavigation {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
private:
|
||||
int _fieldBC;
|
||||
int _destRoomNum;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterExitMiniLift() : CSGTNavigation(), _fieldBC(0), _destRoomNum(1) {}
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_EXIT_MINI_LIFT_H */
|
||||
93
engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp
Normal file
93
engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_exit_sec_class_mini_lift.h"
|
||||
#include "titanic/pet_control/pet_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterExitSecClassMiniLift, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(StatusChangeMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CEnterExitSecClassMiniLiftStatics *CEnterExitSecClassMiniLift::_statics;
|
||||
|
||||
void CEnterExitSecClassMiniLift::init() {
|
||||
_statics = new CEnterExitSecClassMiniLiftStatics();
|
||||
}
|
||||
|
||||
void CEnterExitSecClassMiniLift::deinit() {
|
||||
delete _statics;
|
||||
}
|
||||
|
||||
void CEnterExitSecClassMiniLift::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_statics->_viewName, indent);
|
||||
file->writeNumberLine(_statics->_state, indent);
|
||||
file->writeNumberLine(_roomNum, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterExitSecClassMiniLift::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_statics->_viewName = file->readString();
|
||||
_statics->_state = file->readNumber();
|
||||
_roomNum = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEnterExitSecClassMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (compareRoomNameTo("2ndClassLobby")) {
|
||||
_statics->_viewName = getRoomNodeName() + ".W";
|
||||
changeView("SecClassLittleLift.Node 1.E");
|
||||
_statics->_state = 1;
|
||||
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet) {
|
||||
pet->setRoomsRoomNum(_roomNum);
|
||||
pet->setRoomsSublevel(1);
|
||||
}
|
||||
} else if (compareRoomNameTo("SecClassLittleLift")) {
|
||||
if (_statics->_state == 1) {
|
||||
changeView(_statics->_viewName);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterExitSecClassMiniLift::StatusChangeMsg(CStatusChangeMsg *msg) {
|
||||
_statics->_state = msg->_newStatus;
|
||||
if (msg->_newStatus == 3)
|
||||
_statics->_state = 2;
|
||||
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet)
|
||||
pet->setRoomsSublevel(_statics->_state);
|
||||
|
||||
_cursorId = _statics->_state == 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
62
engines/titanic/moves/enter_exit_sec_class_mini_lift.h
Normal file
62
engines/titanic/moves/enter_exit_sec_class_mini_lift.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_EXIT_SEC_CLASS_MINI_LIFT_H
|
||||
#define TITANIC_ENTER_EXIT_SEC_CLASS_MINI_LIFT_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
struct CEnterExitSecClassMiniLiftStatics {
|
||||
CString _viewName;
|
||||
int _state;
|
||||
|
||||
CEnterExitSecClassMiniLiftStatics() : _state(1) {}
|
||||
};
|
||||
|
||||
class CEnterExitSecClassMiniLift : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool StatusChangeMsg(CStatusChangeMsg *msg);
|
||||
private:
|
||||
static CEnterExitSecClassMiniLiftStatics *_statics;
|
||||
int _roomNum;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterExitSecClassMiniLift() : CGameObject(), _roomNum(0) {}
|
||||
static void init();
|
||||
static void deinit();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_EXIT_SEC_CLASS_MINI_LIFT_H */
|
||||
77
engines/titanic/moves/enter_exit_view.cpp
Normal file
77
engines/titanic/moves/enter_exit_view.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_exit_view.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterExitView, CGameObject)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(LeaveViewMsg)
|
||||
ON_MESSAGE(MovieEndMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CEnterExitView::CEnterExitView() : CGameObject(), _leaveEndFrame(0),
|
||||
_leaveStartFrame(0), _enterEndFrame(0), _enterStartFrame(0),
|
||||
_visibleAfterMovie(true) {
|
||||
}
|
||||
|
||||
void CEnterExitView::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_leaveEndFrame, indent);
|
||||
file->writeNumberLine(_leaveStartFrame, indent);
|
||||
file->writeNumberLine(_enterEndFrame, indent);
|
||||
file->writeNumberLine(_enterStartFrame, indent);
|
||||
file->writeNumberLine(_visibleAfterMovie, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterExitView::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_leaveEndFrame = file->readNumber();
|
||||
_leaveStartFrame = file->readNumber();
|
||||
_enterEndFrame = file->readNumber();
|
||||
_enterStartFrame = file->readNumber();
|
||||
_visibleAfterMovie = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEnterExitView::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
setVisible(true);
|
||||
playMovie(_enterStartFrame, _enterEndFrame, MOVIE_NOTIFY_OBJECT);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterExitView::LeaveViewMsg(CLeaveViewMsg *msg) {
|
||||
setVisible(true);
|
||||
playMovie(_leaveStartFrame, _leaveEndFrame, MOVIE_WAIT_FOR_FINISH);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterExitView::MovieEndMsg(CMovieEndMsg *msg) {
|
||||
if (!_visibleAfterMovie)
|
||||
setVisible(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
57
engines/titanic/moves/enter_exit_view.h
Normal file
57
engines/titanic/moves/enter_exit_view.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_EXIT_VIEW_H
|
||||
#define TITANIC_ENTER_EXIT_VIEW_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterExitView : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool LeaveViewMsg(CLeaveViewMsg *msg);
|
||||
bool MovieEndMsg(CMovieEndMsg *msg);
|
||||
public:
|
||||
int _leaveEndFrame;
|
||||
int _leaveStartFrame;
|
||||
int _enterEndFrame;
|
||||
int _enterStartFrame;
|
||||
bool _visibleAfterMovie;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterExitView();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_EXIT_VIEW_H */
|
||||
108
engines/titanic/moves/enter_sec_class_state.cpp
Normal file
108
engines/titanic/moves/enter_sec_class_state.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/enter_sec_class_state.h"
|
||||
#include "titanic/pet_control/pet_control.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEnterSecClassState, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(StatusChangeMsg)
|
||||
ON_MESSAGE(MovieEndMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CEnterSecClassState::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_mode, indent);
|
||||
file->writeNumberLine(_soundHandle, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEnterSecClassState::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_mode = file->readNumber();
|
||||
_soundHandle = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEnterSecClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (getPassengerClass() > 2) {
|
||||
playSound(TRANSLATE("b#105.wav", "b#84.wav"));
|
||||
petDisplayMessage(1, CLASS_NOT_PERMITTED_IN_AREA);
|
||||
} else if (!compareRoomNameTo("SecClassLittleLift") || _mode == 2) {
|
||||
CActMsg actMsg(getFullViewName().deleteRight(2) + ".S");
|
||||
actMsg.execute("SecClassRoomLeaver");
|
||||
changeView("secClassState.Node 01.N");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterSecClassState::StatusChangeMsg(CStatusChangeMsg *msg) {
|
||||
stopSound(_soundHandle);
|
||||
|
||||
if (msg->_newStatus == _mode || (_mode == 2 && msg->_newStatus == 3)) {
|
||||
if (_mode == 2) {
|
||||
_soundHandle = queueSound(TRANSLATE("b#36.wav", "b#15.wav"), _soundHandle);
|
||||
} else {
|
||||
_soundHandle = queueSound(TRANSLATE("b#31.wav", "b#10.wav"), _soundHandle);
|
||||
}
|
||||
if (msg->_newStatus == 3)
|
||||
msg->_newStatus = 2;
|
||||
} else {
|
||||
changeView("SecClassLittleLift.Node 1.N");
|
||||
if (msg->_newStatus == 1) {
|
||||
_soundHandle = queueSound(TRANSLATE("b#32.wav", "b#11.wav"), _soundHandle);
|
||||
} else if (msg->_newStatus == 2) {
|
||||
_soundHandle = queueSound(TRANSLATE("b#25.wav", "b#4.wav"), _soundHandle);
|
||||
} else if (msg->_newStatus == 3) {
|
||||
_soundHandle = queueSound(TRANSLATE("b#33.wav", "b#12.wav"), _soundHandle);
|
||||
msg->_newStatus = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (msg->_newStatus != 3) {
|
||||
if (msg->_newStatus == 2 && _mode == 1)
|
||||
playMovie(0, 10, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
|
||||
else if (msg->_newStatus == 1)
|
||||
playMovie(11, 21, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH);
|
||||
}
|
||||
|
||||
_cursorId = msg->_newStatus == 2 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
|
||||
_mode = msg->_newStatus;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEnterSecClassState::MovieEndMsg(CMovieEndMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet) {
|
||||
pet->setRoomsSublevel(_mode);
|
||||
pet->resetRoomsHighlight();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
53
engines/titanic/moves/enter_sec_class_state.h
Normal file
53
engines/titanic/moves/enter_sec_class_state.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ENTER_SEC_CLASS_STATE_H
|
||||
#define TITANIC_ENTER_SEC_CLASS_STATE_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEnterSecClassState : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool StatusChangeMsg(CStatusChangeMsg *msg);
|
||||
bool MovieEndMsg(CMovieEndMsg *msg);
|
||||
public:
|
||||
int _mode, _soundHandle;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEnterSecClassState() : CGameObject(), _mode(1), _soundHandle(0) {}
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ENTER_SEC_CLASS_STATE_H */
|
||||
104
engines/titanic/moves/exit_arboretum.cpp
Normal file
104
engines/titanic/moves/exit_arboretum.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_arboretum.h"
|
||||
#include "titanic/game/seasonal_adjustment.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitArboretum, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(ChangeSeasonMsg)
|
||||
ON_MESSAGE(TurnOn)
|
||||
ON_MESSAGE(TurnOff)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitArboretum::CExitArboretum() : CMovePlayerTo(),
|
||||
_seasonNum(SEASON_SUMMER), _exitDirection(0), _enabled(true) {
|
||||
}
|
||||
|
||||
void CExitArboretum::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_seasonNum, indent);
|
||||
file->writeNumberLine(_exitDirection, indent);
|
||||
file->writeNumberLine(_enabled, indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitArboretum::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_seasonNum = (Season)file->readNumber();
|
||||
_exitDirection = file->readNumber();
|
||||
_enabled = file->readNumber();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CExitArboretum::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (_enabled) {
|
||||
CActMsg actMsg;
|
||||
if (_seasonNum == SEASON_WINTER) {
|
||||
switch (_exitDirection) {
|
||||
case 0:
|
||||
actMsg._action = "ExitLFrozen";
|
||||
break;
|
||||
case 1:
|
||||
actMsg._action = "ExitRFrozen";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (_exitDirection) {
|
||||
case 0:
|
||||
actMsg._action = "ExitLNormal";
|
||||
break;
|
||||
case 1:
|
||||
actMsg._action = "ExitRNormal";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
actMsg.execute("ArbGate");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CExitArboretum::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
|
||||
_seasonNum = (Season)(((int)_seasonNum + 1) % 4);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CExitArboretum::TurnOn(CTurnOn *msg) {
|
||||
_enabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CExitArboretum::TurnOff(CTurnOff *msg) {
|
||||
_enabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
56
engines/titanic/moves/exit_arboretum.h
Normal file
56
engines/titanic/moves/exit_arboretum.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_ARBORETUM_H
|
||||
#define TITANIC_EXIT_ARBORETUM_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CExitArboretum : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool ChangeSeasonMsg(CChangeSeasonMsg *msg);
|
||||
bool TurnOn(CTurnOn *msg);
|
||||
bool TurnOff(CTurnOff *msg);
|
||||
protected:
|
||||
Season _seasonNum;
|
||||
int _exitDirection;
|
||||
bool _enabled;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CExitArboretum();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_BACKGROUND_H */
|
||||
58
engines/titanic/moves/exit_bridge.cpp
Normal file
58
engines/titanic/moves/exit_bridge.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_bridge.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitBridge, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitBridge::CExitBridge() : CMovePlayerTo(), _viewName("Titania.Node 1.S") {
|
||||
}
|
||||
|
||||
void CExitBridge::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_viewName, indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitBridge::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_viewName = file->readString();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CExitBridge::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (getGameManager()) {
|
||||
changeView(_destination);
|
||||
playSound(TRANSLATE("a#53.wav", "a#46.wav"));
|
||||
changeView(_viewName);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/exit_bridge.h
Normal file
51
engines/titanic/moves/exit_bridge.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_BRIDGE_H
|
||||
#define TITANIC_EXIT_BRIDGE_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CExitBridge : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
private:
|
||||
CString _viewName;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CExitBridge();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EXIT_BRIDGE_H */
|
||||
120
engines/titanic/moves/exit_lift.cpp
Normal file
120
engines/titanic/moves/exit_lift.cpp
Normal file
@@ -0,0 +1,120 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_lift.h"
|
||||
#include "titanic/pet_control/pet_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitLift, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitLift::CExitLift() : CGameObject(), _viewName("NULL") {
|
||||
}
|
||||
|
||||
void CExitLift::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_viewName, indent);
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitLift::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_viewName = file->readString();
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CExitLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
int floorNum = pet->getRoomsFloorNum();
|
||||
int elevNum = pet->getRoomsElevatorNum();
|
||||
|
||||
if (floorNum == 39) {
|
||||
switch (elevNum) {
|
||||
case 1:
|
||||
_viewName = "BottomOfWell.Node 5.SE";
|
||||
break;
|
||||
case 3:
|
||||
_viewName = "BottomOfWell.Node 1.NW";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (floorNum > 27) {
|
||||
switch (elevNum) {
|
||||
case 1:
|
||||
case 3:
|
||||
_viewName = "SgtLobby.Node 1.N";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (floorNum > 19) {
|
||||
switch (elevNum) {
|
||||
case 1:
|
||||
case 3:
|
||||
_viewName = "2ndClassLobby.Node 8.N";
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
_viewName = "2ndClassLobby.Node 1.N";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (floorNum > 1) {
|
||||
switch (elevNum) {
|
||||
case 1:
|
||||
case 3:
|
||||
_viewName = "1stClassLobby.Node 1.W";
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
_viewName = "1stClassLobby.Node 1.E";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (elevNum) {
|
||||
case 1:
|
||||
_viewName = "TopOfWell.Node 6.E";
|
||||
break;
|
||||
case 2:
|
||||
_viewName = "TopOfWell.Node 6.W";
|
||||
break;
|
||||
case 3:
|
||||
_viewName = "TopOfWell.Node 10.W";
|
||||
break;
|
||||
case 4:
|
||||
_viewName = "TopOfWell.Node 10.E";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
changeView(_viewName);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/exit_lift.h
Normal file
51
engines/titanic/moves/exit_lift.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_LIFT_H
|
||||
#define TITANIC_EXIT_LIFT_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CExitLift : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CString _viewName;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CExitLift();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EXIT_LIFT_H */
|
||||
137
engines/titanic/moves/exit_pellerator.cpp
Normal file
137
engines/titanic/moves/exit_pellerator.cpp
Normal file
@@ -0,0 +1,137 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_pellerator.h"
|
||||
#include "titanic/game/transport/pellerator.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitPellerator, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(StatusChangeMsg)
|
||||
ON_MESSAGE(ChangeSeasonMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitPelleratorStatics *CExitPellerator::_statics;
|
||||
|
||||
void CExitPellerator::init() {
|
||||
_statics = new CExitPelleratorStatics();
|
||||
}
|
||||
|
||||
void CExitPellerator::deinit() {
|
||||
delete _statics;
|
||||
}
|
||||
|
||||
void CExitPellerator::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_statics->_v1, indent);
|
||||
file->writeNumberLine(_statics->_v2, indent);
|
||||
file->writeNumberLine(_statics->_isWinter, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitPellerator::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_statics->_v1 = file->readString();
|
||||
_statics->_v2 = file->readNumber();
|
||||
_statics->_isWinter = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CExitPellerator::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CString name = getName();
|
||||
|
||||
if (name == "ExitPellerator") {
|
||||
if (_statics->_v2 != 2) {
|
||||
switch (getRandomNumber(2)) {
|
||||
case 0:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#457.wav", "z#194.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
case 1:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#458.wav", "z#195.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
default:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#464.wav", "z#201.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (_statics->_v2) {
|
||||
case 0:
|
||||
changeView("PromenadeDeck.Node 1.W");
|
||||
break;
|
||||
case 1:
|
||||
changeView("MusicRoomLobby.Node 1.S");
|
||||
break;
|
||||
case 4:
|
||||
changeView("TopOfWell.Node 6.N");
|
||||
break;
|
||||
case 5:
|
||||
changeView("1stClassRestaurant.Lobby Node.E");
|
||||
break;
|
||||
case 6:
|
||||
changeView(_statics->_isWinter ? "FrozenArboretum.Node 4.S" : "Arboretum.Node 4.W");
|
||||
break;
|
||||
default:
|
||||
petDisplayMessage(2, EXIT_FROM_OTHER_SIDE);
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#438.wav", "z#183.wav"), CPellerator::_soundHandle);
|
||||
|
||||
}
|
||||
} else if (name == "ExitPellerator2") {
|
||||
if (_statics->_v2 == 2) {
|
||||
switch (getRandomNumber(2)) {
|
||||
case 0:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#457.wav", "z#194.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
case 1:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#458.wav", "z#195.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
default:
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#464.wav", "z#201.wav"), CPellerator::_soundHandle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_statics->_v2 == 2) {
|
||||
changeView("Bar.Node 1.N");
|
||||
} else {
|
||||
petDisplayMessage(2, EXIT_FROM_OTHER_SIDE);
|
||||
CPellerator::_soundHandle = queueSound(TRANSLATE("z#438.wav", "z#183.wav"), CPellerator::_soundHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CExitPellerator::StatusChangeMsg(CStatusChangeMsg *msg) {
|
||||
_statics->_v2 = msg->_newStatus;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CExitPellerator::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
|
||||
_statics->_isWinter = msg->_season == "Winter";
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
60
engines/titanic/moves/exit_pellerator.h
Normal file
60
engines/titanic/moves/exit_pellerator.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_PELLERATOR_H
|
||||
#define TITANIC_EXIT_PELLERATOR_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
struct CExitPelleratorStatics {
|
||||
CString _v1;
|
||||
int _v2;
|
||||
bool _isWinter;
|
||||
};
|
||||
|
||||
class CExitPellerator : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool StatusChangeMsg(CStatusChangeMsg *msg);
|
||||
bool ChangeSeasonMsg(CChangeSeasonMsg *msg);
|
||||
private:
|
||||
static CExitPelleratorStatics *_statics;
|
||||
public:
|
||||
CLASSDEF;
|
||||
static void init();
|
||||
static void deinit();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EXIT_PELLERATOR_H */
|
||||
48
engines/titanic/moves/exit_state_room.cpp
Normal file
48
engines/titanic/moves/exit_state_room.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_state_room.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitStateRoom, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitStateRoom::CExitStateRoom() : CMovePlayerTo() {
|
||||
}
|
||||
|
||||
void CExitStateRoom::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitStateRoom::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CExitStateRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
changeView(_destination);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
49
engines/titanic/moves/exit_state_room.h
Normal file
49
engines/titanic/moves/exit_state_room.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_STATE_ROOM_H
|
||||
#define TITANIC_EXIT_STATE_ROOM_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CExitStateRoom : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CExitStateRoom();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EXIT_STATE_ROOM_H */
|
||||
71
engines/titanic/moves/exit_tiania.cpp
Normal file
71
engines/titanic/moves/exit_tiania.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/exit_tiania.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CExitTiania, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CExitTiania::CExitTiania() : CMovePlayerTo(), _fieldC8(0) {
|
||||
_viewNames[0] = _viewNames[1] = _viewNames[2] = "NULL";
|
||||
}
|
||||
|
||||
void CExitTiania::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_fieldC8, indent);
|
||||
file->writeQuotedLine(_viewNames[0], indent);
|
||||
file->writeQuotedLine(_viewNames[1], indent);
|
||||
file->writeQuotedLine(_viewNames[2], indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CExitTiania::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldC8 = file->readNumber();
|
||||
_viewNames[0] = file->readString();
|
||||
_viewNames[1] = file->readString();
|
||||
_viewNames[2] = file->readString();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CExitTiania::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (getPassengerClass() == 4) {
|
||||
petDisplayMessage(1, TRANSPORT_OUT_OF_ORDER);
|
||||
} else {
|
||||
lockMouse();
|
||||
for (int idx = 0; idx < 3; ++idx)
|
||||
changeView(_viewNames[idx]);
|
||||
changeView("Titania.Node 16.N");
|
||||
changeView("Dome.Node 4.N");
|
||||
changeView("Dome.Node 3.N");
|
||||
changeView("Dome.Node 3.S");
|
||||
unlockMouse();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/moves/exit_tiania.h
Normal file
52
engines/titanic/moves/exit_tiania.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EXIT_TIANIA_H
|
||||
#define TITANIC_EXIT_TIANIA_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CExitTiania : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
private:
|
||||
int _fieldC8;
|
||||
CString _viewNames[3];
|
||||
public:
|
||||
CLASSDEF;
|
||||
CExitTiania();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EXIT_TIANIA_H */
|
||||
67
engines/titanic/moves/move_player_in_parrot_room.cpp
Normal file
67
engines/titanic/moves/move_player_in_parrot_room.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/move_player_in_parrot_room.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMovePlayerInParrotRoom, CMovePlayerTo)
|
||||
ON_MESSAGE(ActMsg)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(MovementMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMovePlayerInParrotRoom::CMovePlayerInParrotRoom() : CMovePlayerTo() {
|
||||
}
|
||||
|
||||
void CMovePlayerInParrotRoom::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CMovePlayerInParrotRoom::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CMovePlayerInParrotRoom::ActMsg(CActMsg *msg) {
|
||||
if (msg->_action == "PanAwayFromParrot") {
|
||||
unlockMouse();
|
||||
changeView(_destination);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMovePlayerInParrotRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
lockMouse();
|
||||
CPanningAwayFromParrotMsg awayMsg(this);
|
||||
awayMsg.execute("PerchedParrot");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMovePlayerInParrotRoom::MovementMsg(CMovementMsg *msg) {
|
||||
if (msg->_movement == TURN_RIGHT)
|
||||
msg->_posToUse = Point(600, 180);
|
||||
return false;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/move_player_in_parrot_room.h
Normal file
51
engines/titanic/moves/move_player_in_parrot_room.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MOVE_PLAYER_IN_PARROT_ROOM_H
|
||||
#define TITANIC_MOVE_PLAYER_IN_PARROT_ROOM_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMovePlayerInParrotRoom : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool ActMsg(CActMsg *msg);
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool MovementMsg(CMovementMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMovePlayerInParrotRoom();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MOVE_PLAYER_IN_PARROT_ROOM_H */
|
||||
62
engines/titanic/moves/move_player_to.cpp
Normal file
62
engines/titanic/moves/move_player_to.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
#include "titanic/game_manager.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMovePlayerTo, CGameObject)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(ActMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMovePlayerTo::CMovePlayerTo() : CGameObject() {
|
||||
}
|
||||
|
||||
void CMovePlayerTo::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_destination, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CMovePlayerTo::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_destination = file->readString();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CMovePlayerTo::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CGameManager *gameManager = getGameManager();
|
||||
if (gameManager)
|
||||
changeView(_destination);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMovePlayerTo::ActMsg(CActMsg *msg) {
|
||||
_destination = msg->_action;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/moves/move_player_to.h
Normal file
52
engines/titanic/moves/move_player_to.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MOVE_PLAYER_TO_H
|
||||
#define TITANIC_MOVE_PLAYER_TO_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMovePlayerTo : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool ActMsg(CActMsg *msg);
|
||||
protected:
|
||||
CString _destination;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMovePlayerTo();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MOVE_PLAYER_TO_H */
|
||||
62
engines/titanic/moves/move_player_to_from.cpp
Normal file
62
engines/titanic/moves/move_player_to_from.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/move_player_to_from.h"
|
||||
#include "titanic/core/view_item.h"
|
||||
#include "titanic/core/link_item.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMovePlayerToFrom, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMovePlayerToFrom::CMovePlayerToFrom() : CMovePlayerTo() {
|
||||
}
|
||||
|
||||
void CMovePlayerToFrom::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeQuotedLine(_string2, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CMovePlayerToFrom::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_string2 = file->readString();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CMovePlayerToFrom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (_string2.empty()) {
|
||||
changeView(_destination);
|
||||
} else {
|
||||
CViewItem *view = parseView(_string2);
|
||||
CViewItem *destView = parseView(_destination);
|
||||
CLinkItem *link = view->findLink(destView);
|
||||
changeView(_destination, link->getName());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/move_player_to_from.h
Normal file
51
engines/titanic/moves/move_player_to_from.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MOVE_PLAYER_TO_FROM_H
|
||||
#define TITANIC_MOVE_PLAYER_TO_FROM_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMovePlayerToFrom : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
private:
|
||||
CString _string2;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMovePlayerToFrom();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MOVE_PLAYER_TO_FROM_H */
|
||||
59
engines/titanic/moves/multi_move.cpp
Normal file
59
engines/titanic/moves/multi_move.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/multi_move.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMultiMove, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMultiMove::CMultiMove() : CMovePlayerTo() {
|
||||
}
|
||||
|
||||
void CMultiMove::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
for (int idx = 0; idx < 5; ++idx)
|
||||
file->writeQuotedLine(_viewNames[idx], indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CMultiMove::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
for (int idx = 0; idx < 5; ++idx)
|
||||
_viewNames[idx] = file->readString();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CMultiMove::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
lockMouse();
|
||||
|
||||
for (int idx = 0; idx < 5 && _viewNames[idx] != "NULL"; ++idx)
|
||||
changeView(_viewNames[idx]);
|
||||
|
||||
unlockMouse();
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
51
engines/titanic/moves/multi_move.h
Normal file
51
engines/titanic/moves/multi_move.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MULTI_MOVE_H
|
||||
#define TITANIC_MULTI_MOVE_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMultiMove : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
private:
|
||||
CString _viewNames[5];
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMultiMove();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MULTI_MOVE_H */
|
||||
55
engines/titanic/moves/pan_from_pel.cpp
Normal file
55
engines/titanic/moves/pan_from_pel.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/pan_from_pel.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPanFromPel, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CPanFromPel::CPanFromPel() : CMovePlayerTo(), _closeLeft(false) {
|
||||
}
|
||||
|
||||
void CPanFromPel::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_closeLeft, indent);
|
||||
file->writeQuotedLine(_target, indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CPanFromPel::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_closeLeft = file->readNumber();
|
||||
_target = file->readString();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CPanFromPel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CActMsg actMsg(_closeLeft ? "CloseLeft" : "CloseRight");
|
||||
actMsg.execute(_target);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/moves/pan_from_pel.h
Normal file
52
engines/titanic/moves/pan_from_pel.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_PAN_FROM_PEL_H
|
||||
#define TITANIC_PAN_FROM_PEL_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CPanFromPel : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
protected:
|
||||
bool _closeLeft;
|
||||
CString _target;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CPanFromPel();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_PAN_FROM_PEL_H */
|
||||
62
engines/titanic/moves/restaurant_pan_handler.cpp
Normal file
62
engines/titanic/moves/restaurant_pan_handler.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/restaurant_pan_handler.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CRestaurantPanHandler, CMovePlayerTo)
|
||||
ON_MESSAGE(ArmPickedUpFromTableMsg)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
bool CRestaurantPanHandler::_armPickedUp;
|
||||
|
||||
void CRestaurantPanHandler::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_armPickedUp, indent);
|
||||
file->writeQuotedLine(_armlessDestination, indent);
|
||||
file->writeQuotedLine(_armDestination, indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CRestaurantPanHandler::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_armPickedUp = file->readNumber();
|
||||
_armlessDestination = file->readString();
|
||||
_armDestination = file->readString();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CRestaurantPanHandler::ArmPickedUpFromTableMsg(CArmPickedUpFromTableMsg *msg) {
|
||||
_armPickedUp = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CRestaurantPanHandler::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CString clipName = _armPickedUp ? _armDestination : _armlessDestination;
|
||||
changeView(_destination, clipName);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
54
engines/titanic/moves/restaurant_pan_handler.h
Normal file
54
engines/titanic/moves/restaurant_pan_handler.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_RESTAURANT_PAN_HANDLER_H
|
||||
#define TITANIC_RESTAURANT_PAN_HANDLER_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CRestaurantPanHandler : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool ArmPickedUpFromTableMsg(CArmPickedUpFromTableMsg *msg);
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
protected:
|
||||
CString _armDestination;
|
||||
CString _armlessDestination;
|
||||
public:
|
||||
static bool _armPickedUp;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_RESTAURANT_PAN_HANDLER_H */
|
||||
84
engines/titanic/moves/restricted_move.cpp
Normal file
84
engines/titanic/moves/restricted_move.cpp
Normal file
@@ -0,0 +1,84 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/restricted_move.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CRestrictedMove, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CRestrictedMove::CRestrictedMove() : CMovePlayerTo(), _classNum(0) {
|
||||
}
|
||||
|
||||
void CRestrictedMove::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_classNum, indent);
|
||||
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CRestrictedMove::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_classNum = file->readNumber();
|
||||
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CRestrictedMove::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
int classNum = getPassengerClass();
|
||||
if (classNum <= _classNum) {
|
||||
// Okay to change to the given destination
|
||||
changeView(_destination);
|
||||
} else if (classNum != UNCHECKED) {
|
||||
petDisplayMessage(1, CLASS_NOT_ALLOWED_AT_DEST);
|
||||
} else if (compareRoomNameTo("EmbLobby")) {
|
||||
if (g_language != Common::DE_DEU)
|
||||
playSound("a#17.wav");
|
||||
petDisplayMessage(1, CHECK_IN_AT_RECEPTION);
|
||||
} else if (compareViewNameTo("Titania.Node 1.S")) {
|
||||
CProximity prox(Audio::Mixer::kSpeechSoundType);
|
||||
playSound(TRANSLATE("z#226.wav", "z#132.wav"), prox);
|
||||
changeView(_destination);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CRestrictedMove::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
int classNum = getPassengerClass();
|
||||
bool flag = classNum <= _classNum;
|
||||
|
||||
if (classNum == UNCHECKED) {
|
||||
if (compareRoomNameTo("EmbLobby"))
|
||||
flag = false;
|
||||
else if (compareViewNameTo("Titania.Node 1.S"))
|
||||
flag = true;
|
||||
}
|
||||
|
||||
_cursorId = flag ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/moves/restricted_move.h
Normal file
52
engines/titanic/moves/restricted_move.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_RESTRICTED_MOVE_H
|
||||
#define TITANIC_RESTRICTED_MOVE_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CRestrictedMove : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
protected:
|
||||
int _classNum;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CRestrictedMove();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_RESTRICTED_MOVE_H */
|
||||
87
engines/titanic/moves/scraliontis_table.cpp
Normal file
87
engines/titanic/moves/scraliontis_table.cpp
Normal file
@@ -0,0 +1,87 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/scraliontis_table.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CScraliontisTable, CRestaurantPanHandler)
|
||||
ON_MESSAGE(MouseMoveMsg)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(MaitreDDefeatedMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CScraliontisTable::CScraliontisTable() : CRestaurantPanHandler(),
|
||||
_fieldE0(false), _counter(0), _ticks(0), _fieldEC(false) {
|
||||
}
|
||||
|
||||
void CScraliontisTable::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_fieldE0, indent);
|
||||
file->writeNumberLine(_counter, indent);
|
||||
file->writeNumberLine(_ticks, indent);
|
||||
file->writeNumberLine(_fieldEC, indent);
|
||||
|
||||
CRestaurantPanHandler::save(file, indent);
|
||||
}
|
||||
|
||||
void CScraliontisTable::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldE0 = file->readNumber();
|
||||
_counter = file->readNumber();
|
||||
_ticks = file->readNumber();
|
||||
_fieldEC = file->readNumber();
|
||||
|
||||
CRestaurantPanHandler::load(file);
|
||||
}
|
||||
|
||||
bool CScraliontisTable::MouseMoveMsg(CMouseMoveMsg *msg) {
|
||||
if (!_fieldEC && !_fieldE0) {
|
||||
if (++_counter > 20) {
|
||||
CTriggerNPCEvent triggerMsg;
|
||||
triggerMsg.execute("MaitreD");
|
||||
_fieldE0 = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CScraliontisTable::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (_fieldEC) {
|
||||
changeView(_destination, _armPickedUp ? _armDestination : _armlessDestination);
|
||||
}
|
||||
else if (!_ticks || (getTicksCount() - _ticks) >= 5000) {
|
||||
CTriggerNPCEvent triggerMsg(119);
|
||||
triggerMsg.execute("MaitreD");
|
||||
_ticks = getTicksCount();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CScraliontisTable::MaitreDDefeatedMsg(CMaitreDDefeatedMsg *msg) {
|
||||
_cursorId = CURSOR_MOVE_FORWARD;
|
||||
_fieldEC = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
56
engines/titanic/moves/scraliontis_table.h
Normal file
56
engines/titanic/moves/scraliontis_table.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SCRALIONTIS_TABLE_H
|
||||
#define TITANIC_SCRALIONTIS_TABLE_H
|
||||
|
||||
#include "titanic/moves/restaurant_pan_handler.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CScraliontisTable : public CRestaurantPanHandler {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseMoveMsg(CMouseMoveMsg *msg);
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool MaitreDDefeatedMsg(CMaitreDDefeatedMsg *msg);
|
||||
private:
|
||||
bool _fieldE0;
|
||||
int _counter;
|
||||
uint _ticks;
|
||||
bool _fieldEC;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CScraliontisTable();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SCRALIONTIS_TABLE_H */
|
||||
53
engines/titanic/moves/trip_down_canal.cpp
Normal file
53
engines/titanic/moves/trip_down_canal.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/moves/trip_down_canal.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTripDownCanal, CMovePlayerTo)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CTripDownCanal::CTripDownCanal() : CMovePlayerTo() {
|
||||
}
|
||||
|
||||
void CTripDownCanal::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMovePlayerTo::save(file, indent);
|
||||
}
|
||||
|
||||
void CTripDownCanal::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMovePlayerTo::load(file);
|
||||
}
|
||||
|
||||
bool CTripDownCanal::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
if (stateGetSeason() == SEASON_WINTER) {
|
||||
petDisplayMessage(CANAL_CLOSED_FOR_WINTER);
|
||||
} else if (getGameManager()) {
|
||||
changeView(_destination);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
49
engines/titanic/moves/trip_down_canal.h
Normal file
49
engines/titanic/moves/trip_down_canal.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TRIP_DOWN_CANAL_H
|
||||
#define TITANIC_TRIP_DOWN_CANAL_H
|
||||
|
||||
#include "titanic/moves/move_player_to.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CTripDownCanal : public CMovePlayerTo {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CTripDownCanal();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TRIP_DOWN_CANAL_H */
|
||||
Reference in New Issue
Block a user