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/ringworld/ringworld_logic.cpp | |
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/ringworld/ringworld_logic.cpp')
-rw-r--r-- | engines/tsage/ringworld/ringworld_logic.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 2497327a01..2ee4f99267 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -626,58 +626,6 @@ void NamedHotspot::doAction(int action) { SceneHotspot::doAction(action); } -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); |