diff options
author | Filippos Karapetis | 2010-05-26 22:05:51 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-26 22:05:51 +0000 |
commit | 2c2a1fa1ba9c4da4f955f341a8710b9cb40ede7e (patch) | |
tree | 65a6679155e30963c9abd34eb3d8c22c9232ce21 /engines/sci/engine/seg_manager.cpp | |
parent | d35121fc6144eb9fc9e06d60d5c8cf49f5c1b181 (diff) | |
download | scummvm-rg350-2c2a1fa1ba9c4da4f955f341a8710b9cb40ede7e.tar.gz scummvm-rg350-2c2a1fa1ba9c4da4f955f341a8710b9cb40ede7e.tar.bz2 scummvm-rg350-2c2a1fa1ba9c4da4f955f341a8710b9cb40ede7e.zip |
Made _k_new_node() a method of the segment manager, and fixed a bug with the rarely used SCI0 kernel function kSort in the process (_k_new_node was called with key, value instead of value, key inside kSort)
svn-id: r49251
Diffstat (limited to 'engines/sci/engine/seg_manager.cpp')
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index e0b6e75d70..a8f46213ec 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -523,6 +523,16 @@ Node *SegManager::allocateNode(reg_t *addr) { return &(table->_table[offset]); } +reg_t SegManager::newNode(reg_t value, reg_t key) { + reg_t nodebase; + Node *n = allocateNode(&nodebase); + n->pred = n->succ = NULL_REG; + n->key = key; + n->value = value; + + return nodebase; +} + List *SegManager::lookupList(reg_t addr) { if (getSegmentType(addr.segment) != SEG_TYPE_LISTS) { warning("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); |