diff options
author | Max Horn | 2003-08-03 18:23:54 +0000 |
---|---|---|
committer | Max Horn | 2003-08-03 18:23:54 +0000 |
commit | ffa32a2eca7f2af68bc89cdd9027f3ee6d75b6c4 (patch) | |
tree | 9ebd397b354632cee6e37212ee9f1c3bf5ebf1b2 /scumm | |
parent | ac2c77f60146b2fa781e4df681cf7d2201a85000 (diff) | |
download | scummvm-rg350-ffa32a2eca7f2af68bc89cdd9027f3ee6d75b6c4.tar.gz scummvm-rg350-ffa32a2eca7f2af68bc89cdd9027f3ee6d75b6c4.tar.bz2 scummvm-rg350-ffa32a2eca7f2af68bc89cdd9027f3ee6d75b6c4.zip |
o5_getStringWidth was missing getResultPos() (thanks to _Q for pointing this out)
svn-id: r9441
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v5.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index a7dad1f64a..635dd71296 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -834,12 +834,15 @@ void Scumm_v5::o5_drawObject() { void Scumm_v5::o5_getStringWidth() { // TODO - not sure if this is correct... needs testing - int a = getVarOrDirectByte(0x80); - byte *ptr = getResourceAddress(rtString, a); - int width = 0; + int string, width = 0; + byte *ptr; - if (ptr) - width = _charset->getStringWidth(0, ptr); + getResultPos(); + string = getVarOrDirectByte(0x80); + ptr = getResourceAddress(rtString, string); + assert(ptr); + + width = _charset->getStringWidth(0, ptr); setResult(width); warning("o5_getStringWidth, result %d", width); |