Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

View 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/game/pet/pet.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPET, CGameObject)
ON_MESSAGE(ShowTextMsg)
END_MESSAGE_MAP()
CPET::CPET() : CGameObject(), _fieldBC(0), _fieldC0(3),
_fieldC4(0), _fieldC8(0), _fieldD8(0), _fieldDC(0) {
}
void CPET::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldBC, indent);
file->writeNumberLine(_fieldC0, indent);
file->writeNumberLine(_fieldC4, indent);
file->writeNumberLine(_fieldC8, indent);
file->writeQuotedLine(_string1, indent);
file->writeNumberLine(_fieldD8, indent);
file->writeNumberLine(_fieldDC, indent);
CGameObject::save(file, indent);
}
void CPET::load(SimpleFile *file) {
file->readNumber();
_fieldBC = file->readNumber();
_fieldC0 = file->readNumber();
_fieldC4 = file->readNumber();
_fieldC8 = file->readNumber();
_string1 = file->readString();
_fieldD8 = file->readNumber();
_fieldDC = file->readNumber();
CGameObject::load(file);
}
bool CPET::ShowTextMsg(CShowTextMsg *msg) {
CPetControl *pet = getPetControl();
if (pet)
pet->petDisplayMessage(1, msg->_message);
return true;
}
} // End of namespace Titanic

View 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_PET_H
#define TITANIC_PET_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPET : public CGameObject {
DECLARE_MESSAGE_MAP;
bool ShowTextMsg(CShowTextMsg *msg);
public:
int _fieldBC;
int _fieldC0;
int _fieldC4;
int _fieldC8;
CString _string1;
int _fieldD8;
int _fieldDC;
public:
CLASSDEF;
CPET();
/**
* 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_PET_H */

View File

@@ -0,0 +1,38 @@
/* 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/game/pet/pet_class1.h"
namespace Titanic {
EMPTY_MESSAGE_MAP(CPETClass1, CGameObject);
void CPETClass1::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETClass1::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@@ -0,0 +1,47 @@
/* 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_PET_CLASS1_H
#define TITANIC_PET_CLASS1_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPETClass1 : public CGameObject {
DECLARE_MESSAGE_MAP;
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_PET_CLASS1_H */

View File

@@ -0,0 +1,38 @@
/* 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/game/pet/pet_class2.h"
namespace Titanic {
EMPTY_MESSAGE_MAP(CPETClass2, CGameObject);
void CPETClass2::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETClass2::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@@ -0,0 +1,47 @@
/* 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_PET_CLASS2_H
#define TITANIC_PET_CLASS2_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPETClass2 : public CGameObject {
DECLARE_MESSAGE_MAP;
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_PET_CLASS2_H */

View File

@@ -0,0 +1,38 @@
/* 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/game/pet/pet_class3.h"
namespace Titanic {
EMPTY_MESSAGE_MAP(CPETClass3, CGameObject);
void CPETClass3::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETClass3::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@@ -0,0 +1,47 @@
/* 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_PET_CLASS3_H
#define TITANIC_PET_CLASS3_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPETClass3 : public CGameObject {
DECLARE_MESSAGE_MAP;
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_PET_CLASS3_H */

View File

@@ -0,0 +1,73 @@
/* 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/game/pet/pet_lift.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETLift, CPETTransport)
ON_MESSAGE(TransportMsg)
END_MESSAGE_MAP()
void CPETLift::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPETTransport::save(file, indent);
}
void CPETLift::load(SimpleFile *file) {
file->readNumber();
CPETTransport::load(file);
}
bool CPETLift::TransportMsg(CTransportMsg *msg) {
CPetControl *pet = getPetControl();
if (msg->_value1 != 1)
return false;
int floorNum = -1;
if (msg->_roomName == "TopOfWell") {
floorNum = 1;
} else if (msg->_roomName == "BottomOfWell") {
floorNum = 39;
} else if (msg->_roomName == "PlayersRoom" && pet) {
floorNum = pet->getAssignedFloorNum();
if (floorNum < 1 || floorNum > 39) {
pet->petDisplayMessage(NO_ROOM_ASSIGNED);
floorNum = -1;
}
}
if (floorNum != -1) {
int elevatorNum = pet ? pet->getRoomsElevatorNum() : 0;
if ((elevatorNum == 2 || elevatorNum == 4) && floorNum > 27) {
petDisplayMessage(ELEVATOR_NOT_BELOW_27);
} else {
CTrueTalkTriggerActionMsg triggerMsg(2, floorNum, 0);
triggerMsg.execute("Liftbot");
}
}
return true;
}
} // End of namespace Titanic

View 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_PET_LIFT_H
#define TITANIC_PET_LIFT_H
#include "titanic/game/pet/pet_transport.h"
namespace Titanic {
class CPETLift : public CPETTransport {
DECLARE_MESSAGE_MAP;
bool TransportMsg(CTransportMsg *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_PET_LIFT_H */

View File

@@ -0,0 +1,63 @@
/* 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/game/pet/pet_monitor.h"
#include "titanic/core/room_item.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETMonitor, CGameObject)
ON_MESSAGE(EnterRoomMsg)
END_MESSAGE_MAP()
void CPETMonitor::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETMonitor::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
bool CPETMonitor::EnterRoomMsg(CEnterRoomMsg *msg) {
bool flag = true;
if (msg->_newRoom && msg->_oldRoom) {
CString oldRoomName = msg->_oldRoom->getName();
CString newRoomName = msg->_newRoom->getName();
if (newRoomName == "SgtLobby" && oldRoomName == "SGTState")
flag = false;
}
if (flag) {
CPetControl *pet = getPetControl();
if (pet) {
pet->setRoomsRoomNum(0);
pet->resetRoomsHighlight();
}
}
return true;
}
} // End of namespace Titanic

View 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_PET_MONITOR_H
#define TITANIC_PET_MONITOR_H
#include "titanic/core/game_object.h"
#include "titanic/messages/messages.h"
namespace Titanic {
class CPETMonitor : public CGameObject {
DECLARE_MESSAGE_MAP;
bool EnterRoomMsg(CEnterRoomMsg *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_PET_MONITOR_H */

View 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/>.
*
*/
#include "titanic/game/pet/pet_pellerator.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETPellerator, CPETTransport)
ON_MESSAGE(PETActivateMsg)
END_MESSAGE_MAP()
void CPETPellerator::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPETTransport::save(file, indent);
}
void CPETPellerator::load(SimpleFile *file) {
file->readNumber();
CPETTransport::load(file);
}
bool CPETPellerator::PETActivateMsg(CPETActivateMsg *msg) {
CStatusChangeMsg statusMsg;
if (msg->_name == "PromenadeDeck")
statusMsg._newStatus = 0;
else if (msg->_name == "MusicRoom")
statusMsg._newStatus = 1;
else if (msg->_name == "Bar")
statusMsg._newStatus = 2;
else if (msg->_name == "TopOfWell")
statusMsg._newStatus = 4;
else if (msg->_name == "1stClassRestaurant")
statusMsg._newStatus = 5;
else if (msg->_name == "Arboretum")
statusMsg._newStatus = 6;
statusMsg.execute("PelleratorObject");
return true;
}
} // End of namespace Titanic

View 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_PET_PELLERATOR_H
#define TITANIC_PET_PELLERATOR_H
#include "titanic/game/pet/pet_transport.h"
#include "titanic/messages/pet_messages.h"
namespace Titanic {
class CPETPellerator : public CPETTransport {
DECLARE_MESSAGE_MAP;
bool PETActivateMsg(CPETActivateMsg *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_PET_PELLERATOR_H */

View File

@@ -0,0 +1,263 @@
/* 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/game/pet/pet_position.h"
#include "titanic/core/view_item.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETPosition, CGameObject)
ON_MESSAGE(EnterRoomMsg)
ON_MESSAGE(EnterViewMsg)
ON_MESSAGE(LeaveViewMsg)
END_MESSAGE_MAP()
void CPETPosition::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETPosition::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
bool CPETPosition::EnterRoomMsg(CEnterRoomMsg *msg) {
if (msg->_newRoom->getName() == "EmbLobby") {
CPetControl *pet = getPetControl();
if (pet)
pet->setRoomsFloorNum(1);
}
return true;
}
bool CPETPosition::EnterViewMsg(CEnterViewMsg *msg) {
CPetControl *pet = getPetControl();
CString viewStr = msg->_newView->getNodeViewName();
CString tempStr;
if (compareRoomNameTo("TopOfWell")) {
tempStr = msg->_newView->getNodeViewName();
int wellEntry = 0;
if (tempStr == "Node 25.N")
wellEntry = 1;
else if (tempStr == "Node 24.SE")
wellEntry = 2;
else if (tempStr == "Node 26.N")
wellEntry = 3;
else if (tempStr == "Node 27.N")
wellEntry = 4;
if (wellEntry != 0)
petSetRoomsWellEntry(wellEntry);
} else if (compareRoomNameTo("1stClassLobby")) {
int roomNum = 0;
if (viewStr == "Node 2.N")
roomNum = 1;
else if (viewStr == "Node 3.N")
roomNum = 2;
else if (viewStr == "Node 4.N")
roomNum = 3;
else if (viewStr == "Node 5.N")
roomNum = 1;
else if (viewStr == "Node 6.N")
roomNum = 2;
else if (viewStr == "Node 7.N")
roomNum = 3;
if (pet) {
pet->setRoomsRoomNum(roomNum);
pet->resetRoomsHighlight();
int elevatorNum = pet->getRoomsElevatorNum();
int wellEntry = 0;
if (viewStr == "Node 10.S")
wellEntry = (elevatorNum == 1 || elevatorNum == 2) ? 1 : 3;
else if (viewStr == "Node 9.S")
wellEntry = (elevatorNum == 1 || elevatorNum == 2) ? 2 : 4;
if (wellEntry)
petSetRoomsWellEntry(wellEntry);
}
} else if (compareRoomNameTo("2ndClassLobby")) {
int roomNum = 0;
if (viewStr == "Node 3.N")
roomNum = 1;
else if (viewStr == "Node 4.N")
roomNum = 2;
else if (viewStr == "Node 5.N")
roomNum = 3;
else if (viewStr == "Node 6.N")
roomNum = 4;
if (pet) {
pet->setRoomsRoomNum(roomNum);
pet->resetRoomsHighlight();
int elevatorNum = pet->getRoomsElevatorNum();
int wellEntry = 0;
if (viewStr == "Node 8.S")
wellEntry = (elevatorNum == 1 || elevatorNum == 2) ? 1 : 3;
else if (viewStr == "Node 1.S")
wellEntry = (elevatorNum == 1 || elevatorNum == 2) ? 2 : 4;
if (wellEntry)
petSetRoomsWellEntry(wellEntry);
}
} else if (compareRoomNameTo("SecClassLittleLift")) {
if (pet && viewStr == "Node 1.N")
pet->resetRoomsHighlight();
} else if (compareRoomNameTo("SGTLittleLift")) {
if (pet && viewStr == "Node 1.N")
pet->resetRoomsHighlight();
} else if (compareRoomNameTo("SgtLobby")) {
int roomNum = 0;
if (viewStr == "Node 4.N")
roomNum = 1;
else if (viewStr == "Node 5.N")
roomNum = 2;
else if (viewStr == "Node 6.N")
roomNum = 3;
else if (viewStr == "Node 7.N")
roomNum = 4;
else if (viewStr == "Node 8.N")
roomNum = 5;
else if (viewStr == "Node 9.N")
roomNum = 6;
if (pet) {
pet->setRoomsSublevel(1);
pet->setRoomsRoomNum(roomNum);
pet->resetRoomsHighlight();
if (viewStr == "Node 1.S")
pet->setRoomsWellEntry(pet->getRoomsElevatorNum());
}
} else if (compareRoomNameTo("BottomOfWell")) {
if (viewStr == "Node 10.E")
petSetRoomsWellEntry(3);
else if (viewStr == "Node 11.W")
petSetRoomsWellEntry(1);
}
return true;
}
bool CPETPosition::LeaveViewMsg(CLeaveViewMsg *msg) {
CPetControl *pet = getPetControl();
CString oldView = msg->_oldView->getFullViewName();
CString newView = msg->_newView->getFullViewName();
if (pet && newView == "Lift.Node 1.N") {
int elevatorNum = pet->getRoomsElevatorNum();
if (oldView == "TopOfWell.Node 25.N") {
pet->setRoomsFloorNum(1);
pet->setRoomsElevatorNum(1);
return true;
} else if (oldView == "TopOfWell.Node 24.SE") {
pet->setRoomsFloorNum(1);
pet->setRoomsElevatorNum(2);
return true;
} else if (oldView == "TopOfWell.Node 26.N") {
pet->setRoomsFloorNum(1);
pet->setRoomsElevatorNum(3);
return true;
} else if (oldView == "TopOfWell.Node 27.N") {
pet->setRoomsFloorNum(1);
pet->setRoomsElevatorNum(4);
return true;
} else if (oldView == "1stClassLobby.Node 10.S") {
switch (elevatorNum) {
case 1:
case 2:
pet->setRoomsElevatorNum(1);
break;
default:
pet->setRoomsElevatorNum(3);
break;
}
return true;
} else if (oldView == "1stClassLobby.Node 9.S") {
switch (elevatorNum) {
case 1:
case 2:
pet->setRoomsElevatorNum(2);
break;
default:
pet->setRoomsElevatorNum(4);
break;
}
return true;
} else if (oldView == "2ndClassLobby.Node 8.S") {
switch (elevatorNum) {
case 1:
case 2:
pet->setRoomsElevatorNum(1);
break;
default:
pet->setRoomsElevatorNum(3);
break;
}
return true;
} else if (oldView == "2ndClassLobby.Node 1.S") {
switch (elevatorNum) {
case 1:
case 2:
pet->setRoomsElevatorNum(2);
break;
default:
pet->setRoomsElevatorNum(4);
break;
}
return true;
} else if (oldView == "SgtLobby.Node 1.S") {
return true;
} else if (oldView == "BottomOfWell.Node 10.E") {
pet->setRoomsElevatorNum(3);
} else if (oldView == "BottomOfWell.Node 11.W") {
pet->setRoomsElevatorNum(1);
return true;
}
}
CRoomItem *newRoom = msg->_newView->findRoom();
if (newRoom) {
CString roomName = newRoom->getName();
if (roomName == "1stClassLobby" || roomName == "2ndClassLobby" || roomName == "SgtLobby") {
if (pet)
pet->resetRoomsHighlight();
}
}
return true;
}
} // End of namespace Titanic

View 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_PET_POSITION_H
#define TITANIC_PET_POSITION_H
#include "titanic/core/game_object.h"
#include "titanic/messages/messages.h"
namespace Titanic {
class CPETPosition : public CGameObject {
DECLARE_MESSAGE_MAP;
bool EnterRoomMsg(CEnterRoomMsg *msg);
bool EnterViewMsg(CEnterViewMsg *msg);
bool LeaveViewMsg(CLeaveViewMsg *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_PET_POSITION_H */

View File

@@ -0,0 +1,65 @@
/* 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/game/pet/pet_sentinal.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETSentinal, CGameObject)
ON_MESSAGE(EnterViewMsg)
END_MESSAGE_MAP()
CPETSentinal::CPETSentinal() : CGameObject(), _elevatorNum(0),
_wellEntry(0), _resetHighlight(false) {
}
void CPETSentinal::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_elevatorNum, indent);
file->writeNumberLine(_wellEntry, indent);
file->writeNumberLine(_resetHighlight, indent);
CGameObject::save(file, indent);
}
void CPETSentinal::load(SimpleFile *file) {
file->readNumber();
_elevatorNum = file->readNumber();
_wellEntry = file->readNumber();
_resetHighlight = file->readNumber();
CGameObject::load(file);
}
bool CPETSentinal::EnterViewMsg(CEnterViewMsg *msg) {
CPetControl *pet = getPetControl();
if (pet) {
if (_elevatorNum != -1)
pet->setRoomsElevatorNum(_elevatorNum);
if (_wellEntry)
pet->setRoomsWellEntry(_wellEntry);
if (_resetHighlight)
pet->resetRoomsHighlight();
}
return true;
}
} // End of namespace Titanic

View 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_PET_SENTINAL_H
#define TITANIC_PET_SENTINAL_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPETSentinal : public CGameObject {
DECLARE_MESSAGE_MAP;
bool EnterViewMsg(CEnterViewMsg *msg);
private:
int _elevatorNum;
int _wellEntry;
bool _resetHighlight;
public:
CLASSDEF;
CPETSentinal();
/**
* 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_PET_SENTINAL_H */

View File

@@ -0,0 +1,63 @@
/* 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/game/pet/pet_sounds.h"
#include "titanic/translation.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETSounds, CGameObject)
ON_MESSAGE(PETPlaySoundMsg)
ON_MESSAGE(LoadSuccessMsg)
END_MESSAGE_MAP()
void CPETSounds::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_ticks, indent);
CGameObject::save(file, indent);
}
void CPETSounds::load(SimpleFile *file) {
file->readNumber();
_ticks = file->readNumber();
CGameObject::load(file);
}
bool CPETSounds::PETPlaySoundMsg(CPETPlaySoundMsg *msg) {
if (msg->_soundNum == 1) {
playSound(TRANSLATE("z#65.wav", "z#596.wav"));
} else if (msg->_soundNum == 2 && stateGetParrotMet()) {
uint ticks = getTicksCount();
if (!_ticks || ticks > (_ticks + 12000)) {
playSound(TRANSLATE("z#36.wav", "z#568.wav"));
_ticks = ticks;
}
}
return true;
}
bool CPETSounds::LoadSuccessMsg(CLoadSuccessMsg *msg) {
_ticks = 0;
return true;
}
} // End of namespace Titanic

View 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_PET_SOUNDS_H
#define TITANIC_PET_SOUNDS_H
#include "titanic/core/game_object.h"
#include "titanic/messages/pet_messages.h"
namespace Titanic {
class CPETSounds : public CGameObject {
DECLARE_MESSAGE_MAP;
bool PETPlaySoundMsg(CPETPlaySoundMsg *msg);
bool LoadSuccessMsg(CLoadSuccessMsg *msg);
public:
uint _ticks;
public:
CLASSDEF;
CPETSounds() : CGameObject(), _ticks(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_PET_SOUNDS_H */

View 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/game/pet/pet_transition.h"
#include "titanic/pet_control/pet_control.h"
#include "titanic/core/view_item.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETTransition, CGameObject)
ON_MESSAGE(EnterViewMsg)
END_MESSAGE_MAP()
void CPETTransition::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETTransition::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
bool CPETTransition::EnterViewMsg(CEnterViewMsg *msg) {
CPetControl *pet = getPetControl();
if (compareRoomNameTo("1stClassLobby") && pet) {
int elevatorNum = pet->getRoomsElevatorNum();
CString nodeView = msg->_newView->getNodeViewName();
if (nodeView == "Node 1.E") {
pet->setRoomsElevatorNum((elevatorNum == 1 || elevatorNum == 2) ? 1 : 3);
} else if (nodeView == "Node 1.W") {
pet->setRoomsElevatorNum((elevatorNum == 1 || elevatorNum == 2) ? 2 : 4);
}
}
return true;
}
} // End of namespace Titanic

View 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_PET_TRANSITION_H
#define TITANIC_PET_TRANSITION_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPETTransition : public CGameObject {
DECLARE_MESSAGE_MAP;
bool EnterViewMsg(CEnterViewMsg *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_PET_TRANSITION_H */

View 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/>.
*
*/
#include "titanic/game/pet/pet_transport.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPETTransport, CGameObject)
ON_MESSAGE(EnterRoomMsg)
ON_MESSAGE(LeaveRoomMsg)
END_MESSAGE_MAP()
void CPETTransport::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CPETTransport::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
bool CPETTransport::EnterRoomMsg(CEnterRoomMsg *msg) {
petSetRemoteTarget();
return true;
}
bool CPETTransport::LeaveRoomMsg(CLeaveRoomMsg *msg) {
petClear();
return true;
}
} // End of namespace Titanic

View File

@@ -0,0 +1,50 @@
/* 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_PET_TRANSPORT_H
#define TITANIC_PET_TRANSPORT_H
#include "titanic/core/game_object.h"
#include "titanic/messages/messages.h"
namespace Titanic {
class CPETTransport : public CGameObject {
DECLARE_MESSAGE_MAP;
virtual bool EnterRoomMsg(CEnterRoomMsg *msg);
virtual bool LeaveRoomMsg(CLeaveRoomMsg *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_PET_TRANSPORT_H */

View File

@@ -0,0 +1,30 @@
/* 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/game/pet/pet_val_base.h"
namespace Titanic {
CPetValBase::CPetValBase() : _field4(0), _field8(0),
_fieldC(0), _field10(0), _field14(0) {
}
} // End of namespace Titanic

View 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_pet_element_H
#define TITANIC_pet_element_H
namespace Titanic {
class CPetElement {
protected:
int _field4;
int _field8;
int _fieldC;
int _field10;
int _field14;
public:
CPetElement();
virtual void proc1() {}
virtual void proc2() {}
virtual void proc3() {}
virtual void proc4() {}
virtual void proc5() {}
virtual void proc6() {}
virtual void proc7() {}
virtual void proc8() {}
virtual void proc9() {}
virtual void proc10() {}
virtual void proc11() {}
virtual void proc12() {}
virtual void proc13() {}
virtual void proc14() {}
virtual void proc15() {}
virtual void proc16() {}
virtual void proc17() {}
};
} // End of namespace Titanic
#endif /* TITANIC_pet_element_H */