diff options
author | Walter van Niftrik | 2016-08-28 16:53:03 +0200 |
---|---|---|
committer | Walter van Niftrik | 2016-08-28 18:20:14 +0200 |
commit | 70cd57892abebba705c41ad995632dcd6fafd32c (patch) | |
tree | dc7ccfd4ebeb2787e5e17cc77eb1c8bd8a27f66e /engines | |
parent | 90d2dd3b4085a4864889e5eb2d005199c6769819 (diff) | |
download | scummvm-rg350-70cd57892abebba705c41ad995632dcd6fafd32c.tar.gz scummvm-rg350-70cd57892abebba705c41ad995632dcd6fafd32c.tar.bz2 scummvm-rg350-70cd57892abebba705c41ad995632dcd6fafd32c.zip |
ADL: Fix item description in debug output
Diffstat (limited to 'engines')
-rw-r--r-- | engines/adl/adl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index 19595606e1..8135d401b3 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -1263,16 +1263,17 @@ Common::String AdlEngine::toAscii(const Common::String &str) { } Common::String AdlEngine::itemStr(uint i) const { - byte desc = getItem(i).description; - byte noun = getItem(i).noun; + const Item &item(getItem(i)); + Common::String name = Common::String::format("%d", i); - if (noun > 0) { + if (item.noun > 0) { name += "/"; - name += _priNouns[noun - 1]; + name += _priNouns[item.noun - 1]; } - if (desc > 0) { + Common::String desc = getItemDescription(item); + if (!desc.empty()) { name += "/"; - name += toAscii(loadMessage(desc)); + name += toAscii(desc); } return name; } |