aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2009-05-14 23:39:16 +0000
committerMax Horn2009-05-14 23:39:16 +0000
commitd2dfa0ac11ec1c5318ecef901919d260a27da30e (patch)
tree3c3ea524842db56501f9fd7f204ea2767c12a28d /engines/sci
parent7f2a1465970a842a6345a790610aadb0cb75e0fe (diff)
downloadscummvm-rg350-d2dfa0ac11ec1c5318ecef901919d260a27da30e.tar.gz
scummvm-rg350-d2dfa0ac11ec1c5318ecef901919d260a27da30e.tar.bz2
scummvm-rg350-d2dfa0ac11ec1c5318ecef901919d260a27da30e.zip
SCI: cleanup
svn-id: r40581
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/savegame.cpp6
-rw-r--r--engines/sci/engine/seg_manager.h5
2 files changed, 4 insertions, 7 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index c916aa0b4e..8278730d61 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -555,16 +555,18 @@ static bool clone_entry_used(CloneTable *table, int n) {
static void load_script(EngineState *s, SegmentId seg) {
Resource *script, *heap = NULL;
Script *scr = (Script *)(s->seg_manager->_heap[seg]);
+ assert(scr);
scr->buf = (byte *)malloc(scr->buf_size);
+ assert(scr->buf);
script = s->resmgr->findResource(kResourceTypeScript, scr->nr, 0);
if (s->version >= SCI_VERSION(1,001,000))
heap = s->resmgr->findResource(kResourceTypeHeap, scr->nr, 0);
- s->seg_manager->mcpyInOut(0, script->data, script->size, seg, SEG_ID);
+ memcpy(scr->buf, script->data, script->size);
if (s->seg_manager->isSci1_1)
- s->seg_manager->mcpyInOut(scr->script_size, heap->data, heap->size, seg, SEG_ID);
+ memcpy(scr->buf + scr->script_size, heap->data, heap->size);
}
// FIXME: The following should likely become a SegManager method
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 4e7ae1d765..f68fa6a23a 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -249,11 +249,6 @@ public:
// Returns : (int16) The value read from the specified location
int16 getHeap(reg_t reg);
- // Writes a 16 bit value into a script's heap representation
- // Parameters: (reg_t) reg: The address to write to
- // (int16) value: The value to write
- //void putHeap(reg_t reg, int16 value);
-
// Copies a byte string into a script's heap representation
// Parameters: (int) dst: The script-relative offset of the destination area
// (const void *) src: Pointer to the data source location