aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/pet_control/pet_control.cpp4
-rw-r--r--engines/titanic/pet_control/pet_control.h5
-rw-r--r--engines/titanic/pet_control/pet_control_sub10.cpp4
-rw-r--r--engines/titanic/pet_control/pet_control_sub10.h6
-rw-r--r--engines/titanic/pet_control/pet_control_sub12.cpp4
-rw-r--r--engines/titanic/pet_control/pet_control_sub12.h7
-rw-r--r--engines/titanic/pet_control/pet_frame.cpp6
-rw-r--r--engines/titanic/pet_control/pet_frame.h5
-rw-r--r--engines/titanic/pet_control/pet_inventory.cpp37
-rw-r--r--engines/titanic/pet_control/pet_inventory.h10
10 files changed, 75 insertions, 13 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index 1ea9977e9a..fbb9efc0f1 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -334,4 +334,8 @@ bool CPetControl::handleMessage(CTimerMsg &msg) {
return true;
}
+void CPetControl::drawIndent(CScreenManager *screenManager, int indent) {
+ _frame.drawIndent(screenManager, indent);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h
index 40c6b31044..6f5b7948e3 100644
--- a/engines/titanic/pet_control/pet_control.h
+++ b/engines/titanic/pet_control/pet_control.h
@@ -185,6 +185,11 @@ public:
* Returns a reference to the special hidden room container
*/
CRoomItem *getHiddenRoom();
+
+ /**
+ * Draws the indent
+ */
+ void drawIndent(CScreenManager *screenManager, int indent);
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control_sub10.cpp b/engines/titanic/pet_control/pet_control_sub10.cpp
index 59b9648fc1..a50ad115c4 100644
--- a/engines/titanic/pet_control/pet_control_sub10.cpp
+++ b/engines/titanic/pet_control/pet_control_sub10.cpp
@@ -45,4 +45,8 @@ void CPetControlSub10::proc11() {
error("TODO");
}
+void CPetControlSub10::draw(CScreenManager *screenManager) {
+ warning("TODO: CPetControlSub10::draw");
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control_sub10.h b/engines/titanic/pet_control/pet_control_sub10.h
index 625100a25f..aabb59638e 100644
--- a/engines/titanic/pet_control/pet_control_sub10.h
+++ b/engines/titanic/pet_control/pet_control_sub10.h
@@ -26,6 +26,7 @@
#include "titanic/core/list.h"
#include "titanic/pet_control/pet_control_sub10.h"
#include "titanic/pet_control/pet_control_list_item.h"
+#include "titanic/screen_manager.h"
namespace Titanic {
@@ -54,6 +55,11 @@ public:
virtual void proc11();
void set20(int val) { _field20 = val; }
+
+ /**
+ * Draw the control
+ */
+ void draw(CScreenManager *screenManager);
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control_sub12.cpp b/engines/titanic/pet_control/pet_control_sub12.cpp
index 2bba6747b9..44335f3b5a 100644
--- a/engines/titanic/pet_control/pet_control_sub12.cpp
+++ b/engines/titanic/pet_control/pet_control_sub12.cpp
@@ -105,4 +105,8 @@ void CPetControlSub12::load(SimpleFile *file, int param) {
}
}
+void CPetControlSub12::draw(CScreenManager *screenManager) {
+ warning("TODO: CPetControlSub12::draw");
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_control_sub12.h b/engines/titanic/pet_control/pet_control_sub12.h
index b5ff1b0663..a189bc2159 100644
--- a/engines/titanic/pet_control/pet_control_sub12.h
+++ b/engines/titanic/pet_control/pet_control_sub12.h
@@ -24,6 +24,7 @@
#define TITANIC_PET_CONTROL_SUB12_H
#include "titanic/simple_file.h"
+#include "titanic/screen_manager.h"
namespace Titanic {
@@ -83,6 +84,12 @@ public:
void setBounds(const Rect &bounds) { _bounds = bounds; }
void set70(int val) { _field70 = val; }
+
+ /**
+ * Draw the control
+ */
+ void draw(CScreenManager *screenManager);
+
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp
index 3e464a0647..6e3ff4f62c 100644
--- a/engines/titanic/pet_control/pet_frame.cpp
+++ b/engines/titanic/pet_control/pet_frame.cpp
@@ -143,4 +143,10 @@ void CPetFrame::drawFrame(CScreenManager *screenManager) {
_titles[_petControl->_currentArea].draw(screenManager);
}
+void CPetFrame::drawIndent(CScreenManager *screenManager, int indent) {
+ indent = CLIP(indent, 0, 7);
+ for (int idx = 0; idx < indent; ++indent)
+ _indent[idx].draw(screenManager);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_frame.h b/engines/titanic/pet_control/pet_frame.h
index f14e6eaddf..f26a2bf48e 100644
--- a/engines/titanic/pet_control/pet_frame.h
+++ b/engines/titanic/pet_control/pet_frame.h
@@ -89,6 +89,11 @@ public:
* Draws the PET frame
*/
void drawFrame(CScreenManager *screenManager);
+
+ /**
+ * Draws the indent
+ */
+ void drawIndent(CScreenManager *screenManager, int indent);
};
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp
index 0417092ea4..6e0bb22dc5 100644
--- a/engines/titanic/pet_control/pet_inventory.cpp
+++ b/engines/titanic/pet_control/pet_inventory.cpp
@@ -45,6 +45,30 @@ bool CPetInventory::setup() {
return true;
}
+void CPetInventory::draw(CScreenManager *screenManager) {
+ _petControl->drawIndent(screenManager, 7);
+ _sub10.draw(screenManager);
+ _sub12.draw(screenManager);
+}
+
+Rect CPetInventory::getBounds() {
+ // TODO
+ return Rect();
+}
+
+void CPetInventory::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(_field298, indent);
+}
+
+void CPetInventory::load(SimpleFile *file, int param) {
+ _field298 = file->readNumber();
+}
+
+bool CPetInventory::isValid(CPetControl *petControl) {
+ // TODO
+ return true;
+}
+
bool CPetInventory::setPetControl(CPetControl *petControl) {
if (!petControl)
return false;
@@ -69,20 +93,7 @@ bool CPetInventory::setPetControl(CPetControl *petControl) {
tempRect.translate(32, 445);
_sub12.setBounds(tempRect);
_sub12.set70(0);
-
- return true;
-}
-void CPetInventory::save(SimpleFile *file, int indent) const {
- file->writeNumberLine(_field298, indent);
-}
-
-void CPetInventory::load(SimpleFile *file, int param) {
- _field298 = file->readNumber();
-}
-
-bool CPetInventory::isValid(CPetControl *petControl) {
- // TODO
return true;
}
diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h
index 6f3fd62c78..3f1d26d796 100644
--- a/engines/titanic/pet_control/pet_inventory.h
+++ b/engines/titanic/pet_control/pet_inventory.h
@@ -62,6 +62,16 @@ public:
virtual bool setup();
/**
+ * Draw the section
+ */
+ virtual void draw(CScreenManager *screenManager);
+
+ /**
+ * Get the bounds for the section
+ */
+ virtual Rect getBounds();
+
+ /**
* Save the data for the class to file
*/
virtual void save(SimpleFile *file, int indent) const;