diff options
author | Travis Howell | 2006-09-18 12:01:18 +0000 |
---|---|---|
committer | Travis Howell | 2006-09-18 12:01:18 +0000 |
commit | 99016886ba0d31f9ccb310c3974b409f884c294d (patch) | |
tree | fd3f3b4fd6223e9f2f344497b1902025e28f0c6a /engines/simon/items.cpp | |
parent | ace4a021250da915444720ba2ee7eb92368f606f (diff) | |
download | scummvm-rg350-99016886ba0d31f9ccb310c3974b409f884c294d.tar.gz scummvm-rg350-99016886ba0d31f9ccb310c3974b409f884c294d.tar.bz2 scummvm-rg350-99016886ba0d31f9ccb310c3974b409f884c294d.zip |
Minor cleanup, to re-order functions
svn-id: r23928
Diffstat (limited to 'engines/simon/items.cpp')
-rw-r--r-- | engines/simon/items.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index 0334cbb79b..210b85dab1 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -1402,47 +1402,6 @@ void SimonEngine::o_unlockZones() { _vgaMemBase = _vgaFrozenBase; } -void SimonEngine::o1_screenTextPObj() { - // 177: inventory descriptions - uint vgaSpriteId = getVarOrByte(); - uint color = getVarOrByte(); - - SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2); - if (getFeatures() & GF_TALKIE) { - if (subObject != NULL && subObject->objectFlags & kOFVoice) { - uint offs = getOffsetOfChild2Param(subObject, kOFVoice); - playSpeech(subObject->objectFlagValue[offs], vgaSpriteId); - } else if (subObject != NULL && subObject->objectFlags & kOFNumber) { - uint offs = getOffsetOfChild2Param(subObject, kOFNumber); - playSpeech(subObject->objectFlagValue[offs] + 3550, vgaSpriteId); - } - } - - if (subObject != NULL && subObject->objectFlags & kOFText && _subtitles) { - const char *stringPtr = (const char *)getStringPtrByID(subObject->objectFlagValue[0]); - TextLocation *tl = getTextLocation(vgaSpriteId); - char buf[256]; - int j, k; - - if (subObject->objectFlags & kOFNumber) { - if (_language == Common::HB_ISR) { - j = subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)]; - k = (j % 10) * 10; - k += j / 10; - if (!(j % 10)) - sprintf(buf,"0%d%s", k, stringPtr); - else - sprintf(buf,"%d%s", k, stringPtr); - } else { - sprintf(buf,"%d%s", subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)], stringPtr); - } - stringPtr = buf; - } - if (stringPtr != NULL) - printScreenText(vgaSpriteId, color, stringPtr, tl->x, tl->y, tl->width); - } -} - void SimonEngine::o_getPathPosn() { // 178: path find uint x = getVarOrWord(); @@ -1588,6 +1547,47 @@ void SimonEngine::o1_playTune() { } } +void SimonEngine::o1_screenTextPObj() { + // 177: inventory descriptions + uint vgaSpriteId = getVarOrByte(); + uint color = getVarOrByte(); + + SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2); + if (getFeatures() & GF_TALKIE) { + if (subObject != NULL && subObject->objectFlags & kOFVoice) { + uint offs = getOffsetOfChild2Param(subObject, kOFVoice); + playSpeech(subObject->objectFlagValue[offs], vgaSpriteId); + } else if (subObject != NULL && subObject->objectFlags & kOFNumber) { + uint offs = getOffsetOfChild2Param(subObject, kOFNumber); + playSpeech(subObject->objectFlagValue[offs] + 3550, vgaSpriteId); + } + } + + if (subObject != NULL && subObject->objectFlags & kOFText && _subtitles) { + const char *stringPtr = (const char *)getStringPtrByID(subObject->objectFlagValue[0]); + TextLocation *tl = getTextLocation(vgaSpriteId); + char buf[256]; + int j, k; + + if (subObject->objectFlags & kOFNumber) { + if (_language == Common::HB_ISR) { + j = subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)]; + k = (j % 10) * 10; + k += j / 10; + if (!(j % 10)) + sprintf(buf,"0%d%s", k, stringPtr); + else + sprintf(buf,"%d%s", k, stringPtr); + } else { + sprintf(buf,"%d%s", subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)], stringPtr); + } + stringPtr = buf; + } + if (stringPtr != NULL) + printScreenText(vgaSpriteId, color, stringPtr, tl->x, tl->y, tl->width); + } +} + void SimonEngine::o1_mouseOff() { // 181: force mouseOff scriptMouseOff(); |