diff options
author | Max Horn | 2010-06-28 11:23:00 +0000 |
---|---|---|
committer | Max Horn | 2010-06-28 11:23:00 +0000 |
commit | 6c0205b104e30a60b2c5f9ff5c5e417fde497808 (patch) | |
tree | ecfb4e63858d906047ab8ed4afd1d3334581df1f /engines/sci/engine/segment.cpp | |
parent | 31b29027144e3a76ab6e8c71a0014ca6121218c0 (diff) | |
download | scummvm-rg350-6c0205b104e30a60b2c5f9ff5c5e417fde497808.tar.gz scummvm-rg350-6c0205b104e30a60b2c5f9ff5c5e417fde497808.tar.bz2 scummvm-rg350-6c0205b104e30a60b2c5f9ff5c5e417fde497808.zip |
SCI: Fix DEBUG_GC mode and permanently enable it
svn-id: r50430
Diffstat (limited to 'engines/sci/engine/segment.cpp')
-rw-r--r-- | engines/sci/engine/segment.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index f8a941fa7a..21ca1fe9b4 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -86,6 +86,50 @@ SegmentObj *SegmentObj::createSegmentObj(SegmentType type) { return mem; } +const char *SegmentObj::getSegmentTypeName(SegmentType type) { + switch (type) { + case SEG_TYPE_SCRIPT: + return "script"; + break; + case SEG_TYPE_CLONES: + return "clones"; + break; + case SEG_TYPE_LOCALS: + return "locals"; + break; + case SEG_TYPE_SYS_STRINGS: + return "strings"; + break; + case SEG_TYPE_STACK: + return "stack"; + break; + case SEG_TYPE_HUNK: + return "hunk"; + break; + case SEG_TYPE_LISTS: + return "lists"; + break; + case SEG_TYPE_NODES: + return "nodes"; + break; + case SEG_TYPE_DYNMEM: + return "dynmem"; + break; +#ifdef ENABLE_SCI32 + case SEG_TYPE_ARRAY: + return "array"; + break; + case SEG_TYPE_STRING: + return "string"; + break; +#endif + default: + error("Unknown SegmentObj type %d", type); + break; + } + return NULL; +} + // This helper function is used by Script::relocateLocal and Object::relocate // Duplicate in segment.cpp and script.cpp static bool relocateBlock(Common::Array<reg_t> &block, int block_location, SegmentId segment, int location, size_t scriptSize) { |