diff options
Diffstat (limited to 'engines/sci/engine/segment.h')
-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; |