aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-25 17:16:07 -0400
committerPaul Gilbert2016-07-15 19:24:58 -0400
commit243a3e6a7dbedf5960a20b7028263310fb5ab27a (patch)
treee635739f5c8f8e62426bfeadfbd38ad115c06887
parent4ed93ca8f175d7a43c6a0de72ad02b42827938b7 (diff)
downloadscummvm-rg350-243a3e6a7dbedf5960a20b7028263310fb5ab27a.tar.gz
scummvm-rg350-243a3e6a7dbedf5960a20b7028263310fb5ab27a.tar.bz2
scummvm-rg350-243a3e6a7dbedf5960a20b7028263310fb5ab27a.zip
TITANIC: Rename CPlaceHolder to CPlaceHolderItem to match original
-rw-r--r--engines/titanic/core/saveable_object.cpp12
-rw-r--r--engines/titanic/core/tree_item.cpp5
-rw-r--r--engines/titanic/core/tree_item.h5
-rw-r--r--engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp4
-rw-r--r--engines/titanic/game/placeholder/bar_shelf_vis_centre.h6
-rw-r--r--engines/titanic/game/placeholder/lemon_on_bar.cpp4
-rw-r--r--engines/titanic/game/placeholder/lemon_on_bar.h4
-rw-r--r--engines/titanic/game/placeholder/place_holder_item.cpp (renamed from engines/titanic/game/placeholder/place_holder.cpp)6
-rw-r--r--engines/titanic/game/placeholder/place_holder_item.h (renamed from engines/titanic/game/placeholder/place_holder.h)2
-rw-r--r--engines/titanic/game/placeholder/tv_on_bar.cpp4
-rw-r--r--engines/titanic/game/placeholder/tv_on_bar.h4
-rw-r--r--engines/titanic/module.mk2
12 files changed, 34 insertions, 24 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index f6c83b2e74..300d9718bd 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -251,7 +251,7 @@
#include "titanic/game/pickup/pick_up_vis_centre.h"
#include "titanic/game/placeholder/bar_shelf_vis_centre.h"
#include "titanic/game/placeholder/lemon_on_bar.h"
-#include "titanic/game/placeholder/place_holder.h"
+#include "titanic/game/placeholder/place_holder_item.h"
#include "titanic/game/placeholder/tv_on_bar.h"
#include "titanic/game/sgt/armchair.h"
#include "titanic/game/sgt/basin.h"
@@ -665,7 +665,7 @@ DEFFN(CPickUpSpeechCentre)
DEFFN(CPickUpVisCentre)
DEFFN(CBarShelfVisCentre)
DEFFN(CLemonOnBar)
-DEFFN(CPlaceHolder)
+DEFFN(CPlaceHolderItem)
DEFFN(CTVOnBar)
DEFFN(CArmchair)
DEFFN(CBasin)
@@ -1245,10 +1245,10 @@ void CSaveableObject::initClassList() {
ADDFN(CPickUpLemon, CPickUp);
ADDFN(CPickUpSpeechCentre, CPickUp);
ADDFN(CPickUpVisCentre, CPickUp);
- ADDFN(CBarShelfVisCentre, CPlaceHolder);
- ADDFN(CLemonOnBar, CPlaceHolder);
- ADDFN(CPlaceHolder, CGameObject);
- ADDFN(CTVOnBar, CPlaceHolder);
+ ADDFN(CBarShelfVisCentre, CPlaceHolderItem);
+ ADDFN(CLemonOnBar, CPlaceHolderItem);
+ ADDFN(CPlaceHolderItem, CGameObject);
+ ADDFN(CTVOnBar, CPlaceHolderItem);
ADDFN(CArmchair, CSGTStateRoom);
ADDFN(CBasin, CSGTStateRoom);
ADDFN(CBedfoot, CSGTStateRoom);
diff --git a/engines/titanic/core/tree_item.cpp b/engines/titanic/core/tree_item.cpp
index 9b5097040c..190dc997e7 100644
--- a/engines/titanic/core/tree_item.cpp
+++ b/engines/titanic/core/tree_item.cpp
@@ -34,6 +34,7 @@
#include "titanic/core/room_item.h"
#include "titanic/pet_control/pet_control.h"
#include "titanic/game_manager.h"
+#include "titanic/game/placeholder/place_holder_item.h"
namespace Titanic {
@@ -95,6 +96,10 @@ bool CTreeItem::isLinkItem() const {
return isInstanceOf(CLinkItem::_type);
}
+bool CTreeItem::isPlaceHolderItem() const {
+ return isInstanceOf(CPlaceHolderItem::_type);
+}
+
bool CTreeItem::isNamedItem() const {
return isInstanceOf(CNamedItem::_type);
}
diff --git a/engines/titanic/core/tree_item.h b/engines/titanic/core/tree_item.h
index c0d37d14d0..2ea7b4249e 100644
--- a/engines/titanic/core/tree_item.h
+++ b/engines/titanic/core/tree_item.h
@@ -99,6 +99,11 @@ public:
virtual bool isLinkItem() const;
/**
+ * Returns true if the item is a placeholder item
+ */
+ virtual bool isPlaceHolderItem() const;
+
+ /**
* Returns true if the item is a named item
*/
virtual bool isNamedItem() const;
diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp b/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp
index 3d3a05692f..f3eda053f1 100644
--- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp
+++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.cpp
@@ -27,13 +27,13 @@ namespace Titanic {
void CBarShelfVisCentre::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_value, indent);
- CPlaceHolder::save(file, indent);
+ CPlaceHolderItem::save(file, indent);
}
void CBarShelfVisCentre::load(SimpleFile *file) {
file->readNumber();
_value = file->readNumber();
- CPlaceHolder::load(file);
+ CPlaceHolderItem::load(file);
}
} // End of namespace Titanic
diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h
index a2d39c3ea7..a5acff6a47 100644
--- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h
+++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h
@@ -23,16 +23,16 @@
#ifndef TITANIC_BAR_SHELF_VIS_CENTRE_H
#define TITANIC_BAR_SHELF_VIS_CENTRE_H
-#include "titanic/game/placeholder/place_holder.h"
+#include "titanic/game/placeholder/place_holder_item.h"
namespace Titanic {
-class CBarShelfVisCentre : public CPlaceHolder {
+class CBarShelfVisCentre : public CPlaceHolderItem {
private:
int _value;
public:
CLASSDEF
- CBarShelfVisCentre() : CPlaceHolder(), _value(0) {}
+ CBarShelfVisCentre() : CPlaceHolderItem(), _value(0) {}
/**
* Save the data for the class to file
diff --git a/engines/titanic/game/placeholder/lemon_on_bar.cpp b/engines/titanic/game/placeholder/lemon_on_bar.cpp
index 336933a8df..d51f4b8758 100644
--- a/engines/titanic/game/placeholder/lemon_on_bar.cpp
+++ b/engines/titanic/game/placeholder/lemon_on_bar.cpp
@@ -27,13 +27,13 @@ namespace Titanic {
void CLemonOnBar::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writePoint(_pos1, indent);
- CPlaceHolder::save(file, indent);
+ CPlaceHolderItem::save(file, indent);
}
void CLemonOnBar::load(SimpleFile *file) {
file->readNumber();
_pos1 = file->readPoint();
- CPlaceHolder::load(file);
+ CPlaceHolderItem::load(file);
}
} // End of namespace Titanic
diff --git a/engines/titanic/game/placeholder/lemon_on_bar.h b/engines/titanic/game/placeholder/lemon_on_bar.h
index 18559b0350..d1654bfeb9 100644
--- a/engines/titanic/game/placeholder/lemon_on_bar.h
+++ b/engines/titanic/game/placeholder/lemon_on_bar.h
@@ -23,11 +23,11 @@
#ifndef TITANIC_LEMON_ON_BAR_H
#define TITANIC_LEMON_ON_BAR_H
-#include "titanic/game/placeholder/place_holder.h"
+#include "titanic/game/placeholder/place_holder_item.h"
namespace Titanic {
-class CLemonOnBar : public CPlaceHolder {
+class CLemonOnBar : public CPlaceHolderItem {
private:
Point _pos1;
public:
diff --git a/engines/titanic/game/placeholder/place_holder.cpp b/engines/titanic/game/placeholder/place_holder_item.cpp
index d96f551ee4..a3c26c8b7f 100644
--- a/engines/titanic/game/placeholder/place_holder.cpp
+++ b/engines/titanic/game/placeholder/place_holder_item.cpp
@@ -20,16 +20,16 @@
*
*/
-#include "titanic/game/placeholder/place_holder.h"
+#include "titanic/game/placeholder/place_holder_item.h"
namespace Titanic {
-void CPlaceHolder::save(SimpleFile *file, int indent) const {
+void CPlaceHolderItem::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
-void CPlaceHolder::load(SimpleFile *file) {
+void CPlaceHolderItem::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
diff --git a/engines/titanic/game/placeholder/place_holder.h b/engines/titanic/game/placeholder/place_holder_item.h
index 4d01cd6c39..c665e0f626 100644
--- a/engines/titanic/game/placeholder/place_holder.h
+++ b/engines/titanic/game/placeholder/place_holder_item.h
@@ -27,7 +27,7 @@
namespace Titanic {
-class CPlaceHolder : public CGameObject {
+class CPlaceHolderItem : public CGameObject {
public:
CLASSDEF
diff --git a/engines/titanic/game/placeholder/tv_on_bar.cpp b/engines/titanic/game/placeholder/tv_on_bar.cpp
index 5b22069a93..3b97658a86 100644
--- a/engines/titanic/game/placeholder/tv_on_bar.cpp
+++ b/engines/titanic/game/placeholder/tv_on_bar.cpp
@@ -27,13 +27,13 @@ namespace Titanic {
void CTVOnBar::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writePoint(_pos1, indent);
- CPlaceHolder::save(file, indent);
+ CPlaceHolderItem::save(file, indent);
}
void CTVOnBar::load(SimpleFile *file) {
file->readNumber();
_pos1 = file->readPoint();
- CPlaceHolder::load(file);
+ CPlaceHolderItem::load(file);
}
} // End of namespace Titanic
diff --git a/engines/titanic/game/placeholder/tv_on_bar.h b/engines/titanic/game/placeholder/tv_on_bar.h
index 3af59deb5b..2cc5494464 100644
--- a/engines/titanic/game/placeholder/tv_on_bar.h
+++ b/engines/titanic/game/placeholder/tv_on_bar.h
@@ -23,11 +23,11 @@
#ifndef TITANIC_TV_ON_BAR_H
#define TITANIC_TV_ON_BAR_H
-#include "titanic/game/placeholder/place_holder.h"
+#include "titanic/game/placeholder/place_holder_item.h"
namespace Titanic {
-class CTVOnBar : public CPlaceHolder {
+class CTVOnBar : public CPlaceHolderItem {
private:
Point _pos1;
public:
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index b1b35fc3f3..a204c7cc5a 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -245,7 +245,7 @@ MODULE_OBJS := \
game/pickup/pick_up_speech_centre.o \
game/pickup/pick_up_vis_centre.o \
game/placeholder/bar_shelf_vis_centre.o \
- game/placeholder/place_holder.o \
+ game/placeholder/place_holder_item.o \
game/placeholder/lemon_on_bar.o \
game/placeholder/tv_on_bar.o \
game/transport/gondolier.o \