aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-21 00:49:54 +0000
committerFilippos Karapetis2010-11-21 00:49:54 +0000
commitffcd6783c7620a5e844916b0395f01f092e46347 (patch)
tree409de8623efdf60a606b3618979312610dc7d9b2 /engines
parentcd69472be91fc33637db8063bf0e025fa4dba5e4 (diff)
downloadscummvm-rg350-ffcd6783c7620a5e844916b0395f01f092e46347.tar.gz
scummvm-rg350-ffcd6783c7620a5e844916b0395f01f092e46347.tar.bz2
scummvm-rg350-ffcd6783c7620a5e844916b0395f01f092e46347.zip
SCI: Removed incorrect pointer arithmetic support for SCI2 strings
There was never pointer arithmetic support in SCI2 and newer games svn-id: r54400
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index ac1e279cf6..8398b7d8c2 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -640,31 +640,6 @@ static reg_t pointer_add(EngineState *s, reg_t base, int offset) {
case SEG_TYPE_DYNMEM:
base.offset += offset;
return base;
-#ifdef ENABLE_SCI32
- case SEG_TYPE_STRING: {
- // We need to copy over the string into a new one
- // Make sure that the offset is positive
- if (offset < 0)
- error("pointer_add: Attempt to reference a previous offset of a SCI string");
-
- // Get the source string...
- SciString *str = s->_segMan->lookupString(base);
- Common::String rawStr = str->toString();
-
- // ...and copy it to a new one
- reg_t newStringAddr;
- SciString *newStr = s->_segMan->allocateString(&newStringAddr);
- newStr->setSize(str->getSize() - offset);
-
- // Cut off characters till we reach the desired location
- for (int i = 0; i < offset; i++)
- rawStr.deleteChar(0);
-
- newStr->fromString(rawStr);
-
- return newStringAddr;
- }
-#endif
default:
// FIXME: Changed this to warning, because iceman does this during dancing with girl.
// Investigate why that is so and either fix the underlying issue or implement a more