[Scummvm-cvs-logs] SF.net SVN: scummvm:[40581] scummvm/trunk/engines/sci/engine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri May 15 01:39:16 CEST 2009
Revision: 40581
http://scummvm.svn.sourceforge.net/scummvm/?rev=40581&view=rev
Author: fingolfin
Date: 2009-05-14 23:39:16 +0000 (Thu, 14 May 2009)
Log Message:
-----------
SCI: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/seg_manager.h
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2009-05-14 23:10:22 UTC (rev 40580)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2009-05-14 23:39:16 UTC (rev 40581)
@@ -555,16 +555,18 @@
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
Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h 2009-05-14 23:10:22 UTC (rev 40580)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h 2009-05-14 23:39:16 UTC (rev 40581)
@@ -249,11 +249,6 @@
// 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list