diff options
author | Filippos Karapetis | 2010-05-18 13:05:09 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-18 13:05:09 +0000 |
commit | f3892a506b2f935bae0be6319394c503c786d368 (patch) | |
tree | 2edf8570fa4076c0af6aec863999dbf6cc3daddd /engines/sci/engine/kscripts.cpp | |
parent | e3297ef2cad4b0efc4b262d73b1be4630497dd4a (diff) | |
download | scummvm-rg350-f3892a506b2f935bae0be6319394c503c786d368.tar.gz scummvm-rg350-f3892a506b2f935bae0be6319394c503c786d368.tar.bz2 scummvm-rg350-f3892a506b2f935bae0be6319394c503c786d368.zip |
- Removed the wrapper kalloc, kmem and kfree functions. Now, the associated Segment manager functions allocateHunkEntry, getHunkPointer and freeHunkEntry are used directly (which are more descriptive, anyway)
- Replaced the GET_SEGMENT macro by a method of the segment manager
- Removed the unused reference to the created hunk in allocateHunkEntry(), only the reg_t reference to it is returned now
svn-id: r49078
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 9fa819e779..99cfe2c01f 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -39,7 +39,7 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) { // Request to dynamically allocate hunk memory for later use if (restype == kResourceTypeMemory) - return kalloc(s->_segMan, "kLoad()", resnr); + return s->_segMan->allocateHunkEntry("kLoad()", resnr); return make_reg(0, ((restype << 11) | resnr)); // Return the resource identifier as handle } @@ -78,7 +78,7 @@ reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) { reg_t resnr = argv[1]; if (restype == kResourceTypeMemory) - kfree(s->_segMan, resnr); + s->_segMan->freeHunkEntry(resnr); if (argc > 2) warning("kUnload called with more than 2 parameters (%d)", argc); |