diff options
author | Paul Gilbert | 2011-12-27 20:13:50 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-12-27 20:13:50 +1100 |
commit | 5c6e1f168ca9ce975cf1bd321d3dfcc75334751f (patch) | |
tree | eac00f91f66ab13826ed0806f827bb44a4133c91 /engines/tsage/blue_force | |
parent | 4c9a6006180c5fc8df1887b96cea2eacc321bc73 (diff) | |
download | scummvm-rg350-5c6e1f168ca9ce975cf1bd321d3dfcc75334751f.tar.gz scummvm-rg350-5c6e1f168ca9ce975cf1bd321d3dfcc75334751f.tar.bz2 scummvm-rg350-5c6e1f168ca9ce975cf1bd321d3dfcc75334751f.zip |
TSAGE: Centralised all the setDetails methods in the various games
This puts them all in the common SceneHotspot class, rather than each game having their own repeated implementations of them.
Diffstat (limited to 'engines/tsage/blue_force')
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 81 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.h | 6 |
2 files changed, 0 insertions, 87 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 91cba43e1d..eef48ad58e 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -553,35 +553,6 @@ bool NamedObject::startAction(CursorType action, Event &event) { return handled; } -void NamedObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) { - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - switch (mode) { - case 2: - g_globals->_sceneItems.push_front(this); - break; - case 4: - g_globals->_sceneItems.addBefore(item, this); - break; - case 5: - g_globals->_sceneItems.addAfter(item, this); - break; - default: - g_globals->_sceneItems.push_back(this); - break; - } -} - -void NamedObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum) { - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; -} - /*--------------------------------------------------------------------------*/ CountdownObject::CountdownObject(): NamedObject() { @@ -1397,58 +1368,6 @@ bool NamedHotspot::startAction(CursorType action, Event &event) { } } -void NamedHotspot::setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) { - setBounds(ys, xe, ye, xs); - _resNum = resnum; - _lookLineNum = lookLineNum; - _useLineNum = useLineNum; - _talkLineNum = -1; - g_globals->_sceneItems.addItems(this, NULL); -} - -void NamedHotspot::setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) { - setBounds(bounds); - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - switch (mode) { - case 2: - g_globals->_sceneItems.push_front(this); - break; - case 4: - g_globals->_sceneItems.addBefore(item, this); - break; - case 5: - g_globals->_sceneItems.addAfter(item, this); - break; - default: - g_globals->_sceneItems.push_back(this); - break; - } -} - -void NamedHotspot::setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode) { - _sceneRegionId = sceneRegionId; - _resNum = resNum; - _lookLineNum = lookLineNum; - _talkLineNum = talkLineNum; - _useLineNum = useLineNum; - - // Handle adding hotspot to scene items list as necessary - switch (mode) { - case 2: - GLOBALS._sceneItems.push_front(this); - break; - case 3: - break; - default: - GLOBALS._sceneItems.push_back(this); - break; - } -} - void NamedHotspot::synchronize(Serializer &s) { SceneHotspot::synchronize(s); s.syncAsSint16LE(_resNum); diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index 65cea8efae..04c6e9bdc2 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -126,9 +126,6 @@ public: virtual void synchronize(Serializer &s); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual bool startAction(CursorType action, Event &event); - - void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item); - void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum); }; class NamedObjectExt: public NamedObject { @@ -343,9 +340,6 @@ public: virtual bool startAction(CursorType action, Event &event); virtual Common::String getClassName() { return "NamedHotspot"; } virtual void synchronize(Serializer &s); - virtual void setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum); - virtual void setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item); - virtual void setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode); }; class NamedHotspotExt : public NamedHotspot { |