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,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/game/pickup/pick_up.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUp, CGameObject)
ON_MESSAGE(StatusChangeMsg)
END_MESSAGE_MAP()
void CPickUp::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_enabled, indent);
CGameObject::save(file, indent);
}
void CPickUp::load(SimpleFile *file) {
file->readNumber();
_enabled = file->readNumber();
CGameObject::load(file);
}
bool CPickUp::StatusChangeMsg(CStatusChangeMsg *msg) {
_enabled = msg->_newStatus == 1;
setVisible(_enabled);
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_PICK_UP_H
#define TITANIC_PICK_UP_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CPickUp : public CGameObject {
DECLARE_MESSAGE_MAP;
bool StatusChangeMsg(CStatusChangeMsg *msg);
protected:
bool _enabled;
public:
CLASSDEF;
CPickUp() : CGameObject(), _enabled(false) {}
/**
* 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_ANNOY_BARBOT_H */

View 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/game/pickup/pick_up_bar_glass.h"
#include "titanic/core/project_item.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUpBarGlass, CPickUp)
ON_MESSAGE(StatusChangeMsg)
ON_MESSAGE(MouseDragStartMsg)
ON_MESSAGE(MouseButtonDownMsg)
END_MESSAGE_MAP()
void CPickUpBarGlass::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPickUp::save(file, indent);
}
void CPickUpBarGlass::load(SimpleFile *file) {
file->readNumber();
CPickUp::load(file);
}
bool CPickUpBarGlass::StatusChangeMsg(CStatusChangeMsg *msg) {
switch (msg->_newStatus) {
case 0:
setVisible(false);
_enabled = false;
break;
case 1:
setVisible(true);
_enabled = true;
break;
case 2:
setVisible(true);
_enabled = false;
break;
default:
break;
}
return true;
}
bool CPickUpBarGlass::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (checkStartDragging(msg) && _enabled) {
CTurnOn onMsg;
onMsg.execute("BeerGlass");
CVisibleMsg visibleMsg;
visibleMsg.execute("BeerGlass");
CPassOnDragStartMsg passMsg(msg->_mousePos, 1, 3);
passMsg.execute("BeerGlass");
msg->_dragItem = getRoot()->findByName("BeerGlass");
CActMsg actMsg("PlayerTakesGlass");
actMsg.execute("Barbot");
return true;
} else {
return false;
}
}
bool CPickUpBarGlass::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
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_PICK_UP_BAR_GLASS_H
#define TITANIC_PICK_UP_BAR_GLASS_H
#include "titanic/game/pickup/pick_up.h"
namespace Titanic {
class CPickUpBarGlass : public CPickUp {
DECLARE_MESSAGE_MAP;
bool StatusChangeMsg(CStatusChangeMsg *msg);
bool MouseDragStartMsg(CMouseDragStartMsg *msg);
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_PICK_UP_BAR_GLASS_H */

View File

@@ -0,0 +1,107 @@
/* 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/pickup/pick_up_hose.h"
#include "titanic/game/broken_pell_base.h"
#include "titanic/core/project_item.h"
#include "titanic/core/room_item.h"
#include "titanic/core/view_item.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUpHose, CPickUp)
ON_MESSAGE(MouseDragStartMsg)
ON_MESSAGE(StatusChangeMsg)
ON_MESSAGE(EnterViewMsg)
ON_MESSAGE(MouseButtonDownMsg)
END_MESSAGE_MAP()
bool CPickUpHose::_v1;
void CPickUpHose::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeQuotedLine(_target, indent);
file->writeNumberLine(_v1, indent);
CPickUp::save(file, indent);
}
void CPickUpHose::load(SimpleFile *file) {
file->readNumber();
_target = file->readString();
_v1 = file->readNumber();
CPickUp::load(file);
}
bool CPickUpHose::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (!checkStartDragging(msg))
return true;
if (_v1 || !_enabled)
return false;
CViewItem *view = getView();
if (view) {
_v1 = true;
CRoomItem *room = locateRoom("Arboretum");
CTreeItem *hose = room ? room->findByName("Hose") : nullptr;
if (!hose) {
room = locateRoom("FrozenArboretum");
if (room)
hose = room->findByName("Hose");
}
if (hose) {
CVisibleMsg visibleMsg;
visibleMsg.execute(hose);
hose->moveUnder(view);
CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
passMsg.execute("Hose");
msg->_dragItem = hose;
_cursorId = CURSOR_IGNORE;
CActMsg actMsg("PlayerGetsHose");
actMsg.execute(_target);
}
}
return true;
}
bool CPickUpHose::StatusChangeMsg(CStatusChangeMsg *msg) {
_cursorId = msg->_newStatus == 1 ? CURSOR_HAND : CURSOR_IGNORE;
return CPickUp::StatusChangeMsg(msg);
}
bool CPickUpHose::EnterViewMsg(CEnterViewMsg *msg) {
if (msg->_oldView)
_cursorId = CURSOR_IGNORE;
return true;
}
bool CPickUpHose::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return _enabled;
}
} // End of namespace Titanic

View 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/>.
*
*/
#ifndef TITANIC_PICK_UP_HOSE_H
#define TITANIC_PICK_UP_HOSE_H
#include "titanic/game/pickup/pick_up.h"
namespace Titanic {
class CPickUpHose : public CPickUp {
DECLARE_MESSAGE_MAP;
bool MouseDragStartMsg(CMouseDragStartMsg *msg);
bool StatusChangeMsg(CStatusChangeMsg *msg);
bool EnterViewMsg(CEnterViewMsg *msg);
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
private:
static bool _v1;
CString _target;
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_PICK_UP_HOSE_H */

View File

@@ -0,0 +1,61 @@
/* 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/pickup/pick_up_lemon.h"
#include "titanic/core/project_item.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUpLemon, CPickUp)
ON_MESSAGE(MouseButtonDownMsg)
ON_MESSAGE(MouseDragStartMsg)
END_MESSAGE_MAP()
void CPickUpLemon::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPickUp::save(file, indent);
}
void CPickUpLemon::load(SimpleFile *file) {
file->readNumber();
CPickUp::load(file);
}
bool CPickUpLemon::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return true;
}
bool CPickUpLemon::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (!checkStartDragging(msg))
return true;
if (!_enabled)
return false;
CVisibleMsg visibleMsg;
visibleMsg.execute("Lemon");
CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
passMsg.execute("Lemon");
msg->_dragItem = getRoot()->findByName("Lemon");
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_PICK_UP_LEMON_H
#define TITANIC_PICK_UP_LEMON_H
#include "titanic/game/pickup/pick_up.h"
namespace Titanic {
class CPickUpLemon : public CPickUp {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
bool MouseDragStartMsg(CMouseDragStartMsg *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_PICK_UP_LEMON_H */

View 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/game/pickup/pick_up_speech_centre.h"
#include "titanic/core/project_item.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUpSpeechCentre, CPickUp)
ON_MESSAGE(MouseButtonDownMsg)
ON_MESSAGE(StatusChangeMsg)
ON_MESSAGE(MouseDragStartMsg)
END_MESSAGE_MAP()
void CPickUpSpeechCentre::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPickUp::save(file, indent);
}
void CPickUpSpeechCentre::load(SimpleFile *file) {
file->readNumber();
CPickUp::load(file);
}
bool CPickUpSpeechCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return true;
}
bool CPickUpSpeechCentre::StatusChangeMsg(CStatusChangeMsg *msg) {
_enabled = msg->_newStatus == 1;
return true;
}
bool CPickUpSpeechCentre::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (checkStartDragging(msg)) {
if (_enabled) {
CVisibleMsg visibleMsg;
visibleMsg.execute("SpeechCentre");
CPassOnDragStartMsg passMsg(msg->_mousePos, 1);
passMsg.execute("SpeechCentre");
msg->_dragItem = getRoot()->findByName("SpeechCentre");
CActMsg actMsg("PlayerGetsSpeechCentre");
actMsg.execute("SeasonalAdjust");
} else {
petDisplayMessage(STUCK_TO_BRANCH);
}
}
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_PICK_UP_SPEECH_CENTRE_H
#define TITANIC_PICK_UP_SPEECH_CENTRE_H
#include "titanic/game/pickup/pick_up.h"
namespace Titanic {
class CPickUpSpeechCentre : public CPickUp {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
bool StatusChangeMsg(CStatusChangeMsg *msg);
bool MouseDragStartMsg(CMouseDragStartMsg *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_PICK_UP_SPEECH_CENTRE_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/pickup/pick_up_vis_centre.h"
namespace Titanic {
BEGIN_MESSAGE_MAP(CPickUpVisCentre, CPickUp)
ON_MESSAGE(MouseButtonDownMsg)
ON_MESSAGE(MouseDragStartMsg)
END_MESSAGE_MAP()
void CPickUpVisCentre::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CPickUp::save(file, indent);
}
void CPickUpVisCentre::load(SimpleFile *file) {
file->readNumber();
CPickUp::load(file);
// WORKAROUND: Show the hand cursor when highlighting to indicate
// that the vision center can be picked up
_cursorId = CURSOR_HAND;
}
bool CPickUpVisCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return true;
}
bool CPickUpVisCentre::MouseDragStartMsg(CMouseDragStartMsg *msg) {
if (!checkStartDragging(msg) || !_enabled)
return false;
setVisible(false);
CVisibleMsg visibleMsg;
visibleMsg.execute("VisionCentre");
msg->execute("VisionCentre");
CActMsg actMsg("PlayerTakesVisCentre");
actMsg.execute("Barbot");
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_PICK_UP_VIS_CENTRE_H
#define TITANIC_PICK_UP_VIS_CENTRE_H
#include "titanic/game/pickup/pick_up.h"
namespace Titanic {
class CPickUpVisCentre : public CPickUp {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
bool MouseDragStartMsg(CMouseDragStartMsg *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_PICK_UP_VIS_CENTRE_H */