diff options
author | Colin Snover | 2016-12-18 21:18:23 -0600 |
---|---|---|
committer | Colin Snover | 2016-12-19 12:47:48 -0600 |
commit | 20c211192dcdff42189cc6c3fbe948beb65c1e8e (patch) | |
tree | f376653eed138305e6914ef2edff8d735f30475d /engines/sci/engine | |
parent | 8637cfc617d57bb9ea1e3f81f16c7b4f9f5b38ee (diff) | |
download | scummvm-rg350-20c211192dcdff42189cc6c3fbe948beb65c1e8e.tar.gz scummvm-rg350-20c211192dcdff42189cc6c3fbe948beb65c1e8e.tar.bz2 scummvm-rg350-20c211192dcdff42189cc6c3fbe948beb65c1e8e.zip |
SCI32: Add segment table debugging info for SCI32 arrays
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/segment.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 7c415f3bb3..dda0189a77 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -855,6 +855,29 @@ public: Common::strlcpy((char *)_data, string.c_str(), string.size() + 1); } + Common::String toDebugString() const { + const char *type; + switch(_type) { + case kArrayTypeID: + type = "reg_t"; + break; + case kArrayTypeByte: + type = "byte"; + break; + case kArrayTypeInt16: + type = "int16"; + break; + case kArrayTypeString: + type = "string"; + break; + case kArrayTypeInvalid: + type = "invalid"; + break; + } + + return Common::String::format("type %s; %u entries; %u bytes", type, size(), byteSize()); + } + protected: void *_data; SciArrayType _type; |