aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/room_item.cpp12
-rw-r--r--engines/titanic/core/room_item.h7
-rw-r--r--engines/titanic/pet_control/pet_text.cpp8
3 files changed, 19 insertions, 8 deletions
diff --git a/engines/titanic/core/room_item.cpp b/engines/titanic/core/room_item.cpp
index b1c9aeeb10..6143849661 100644
--- a/engines/titanic/core/room_item.cpp
+++ b/engines/titanic/core/room_item.cpp
@@ -78,7 +78,7 @@ void CRoomItem::load(SimpleFile *file) {
file->readBuffer();
_clipList.load(file);
- loading();
+ postLoad();
// Deliberate fall-through
case 0:
@@ -99,8 +99,14 @@ void CRoomItem::load(SimpleFile *file) {
CNamedItem::load(file);
}
-void CRoomItem::loading() {
- warning("TODO: CRoomItem::loading");
+void CRoomItem::postLoad() {
+ if (!_exitMovieKey.exists().empty())
+ return;
+
+ CString name = _transitionMovieKey.exists();
+ if (name.right(7) == "nav.avi") {
+ _exitMovieKey = CResourceKey(name.left(name.size() - 7) + "exit.avi");
+ }
}
void CRoomItem::calcNodePosition(const Point &nodePos, double &xVal, double &yVal) const {
diff --git a/engines/titanic/core/room_item.h b/engines/titanic/core/room_item.h
index 519accd79c..e3ba71c0ae 100644
--- a/engines/titanic/core/room_item.h
+++ b/engines/titanic/core/room_item.h
@@ -32,6 +32,11 @@
namespace Titanic {
class CRoomItem : public CNamedItem {
+private:
+ /**
+ * Handles post-load processing
+ */
+ void postLoad();
public:
Rect _roomRect;
CMovieClipList _clipList;
@@ -39,8 +44,6 @@ public:
CResourceKey _transitionMovieKey;
CResourceKey _exitMovieKey;
double _roomDimensionX, _roomDimensionY;
-
- void loading();
public:
CLASSDEF
CRoomItem();
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index e6b90c127c..a8d9ba6eb5 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/pet_control/pet_text.cpp
@@ -80,8 +80,8 @@ void CPetText::setLineColor(uint lineNum, byte r, byte g, byte b) {
void CPetText::load(SimpleFile *file, int param) {
if (!param) {
- int var1 = file->readNumber();
- int var2 = file->readNumber();
+ uint numLines = file->readNumber();
+ uint charsPerLine = file->readNumber();
uint count = file->readNumber();
_bounds = file->readRect();
_field3C = file->readNumber();
@@ -96,7 +96,9 @@ void CPetText::load(SimpleFile *file, int param) {
_hasBorder = file->readNumber() != 0;
_scrollTop = file->readNumber();
- warning("TODO: CPetText::load %d,%d", var1, var2);
+ resize(numLines);
+ setMaxCharsPerLine(charsPerLine);
+
assert(_array.size() >= count);
for (uint idx = 0; idx < count; ++idx) {
_array[idx]._line = file->readString();