Ticket #8788: zanthiaTalk_V2.patch
File zanthiaTalk_V2.patch, 3.1 KB (added by , 16 years ago) |
---|
-
kyra_v2.cpp
1880 1880 Opcode(o2_dummy), 1881 1881 OpcodeUnImpl(), 1882 1882 // 0x80 1883 Opcode(o2_objectChat), 1883 1884 OpcodeUnImpl(), 1884 1885 OpcodeUnImpl(), 1885 1886 OpcodeUnImpl(), 1886 OpcodeUnImpl(),1887 1887 // 0x84 1888 1888 OpcodeUnImpl(), 1889 1889 OpcodeUnImpl(), -
kyra_v2.h
632 632 int chatGetType(const char *text); 633 633 int chatCalcDuration(const char *text); 634 634 635 void objectChat(const char *text, int object, int vocHigh , int vocLow);636 void objectChatInit(const char *text, int object, int vocHigh , int vocLow);635 void objectChat(const char *text, int object, int vocHigh = -1, int vocLow = -1); 636 void objectChatInit(const char *text, int object, int vocHigh = -1, int vocLow = -1); 637 637 void objectChatPrintText(const char *text, int object); 638 638 void objectChatProcess(const char *script); 639 639 void objectChatWaitToFinish(); … … 795 795 int o2_defineSceneAnim(ScriptState *script); 796 796 int o2_updateSceneAnim(ScriptState *script); 797 797 int o2_defineRoom(ScriptState *script); 798 int o2_objectChat(ScriptState *script); 798 799 int o2_countItemInstances(ScriptState *script); 799 800 int o2_initObject(ScriptState *script); 800 801 int o2_deinitObject(ScriptState *script); -
script_v2.cpp
644 644 return 0; 645 645 } 646 646 647 int KyraEngine_v2::o2_objectChat(ScriptState *script) { 648 debugC(3, kDebugLevelScriptFuncs, "o2_objectChat(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); 649 if (_flags.isTalkie) 650 warning("Unexpected call: o2_objectChat(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); 651 else 652 objectChat(stackPosString(0), stackPos(1)); 653 return 0; 654 } 655 647 656 int KyraEngine_v2::o2_countItemInstances(ScriptState *script) { 648 657 debugC(3, kDebugLevelScriptFuncs, "o2_countItemInstances(%p) (%d)", (const void *)script, stackPos(0)); 649 658 uint16 item = stackPos(0); … … 823 832 824 833 int KyraEngine_v2::o2t_setShapeFlag(ScriptState *script) { 825 834 debugC(3, kDebugLevelScriptFuncs, "o2t_setShapeFlag(%p) (%d)", (const void *)script, stackPos(0)); 826 _newShapeFlag = stackPos(0); 835 if (_flags.isTalkie) 836 _newShapeFlag = stackPos(0); 827 837 return 0; 828 838 } 829 839 -
text_v2.cpp
126 126 } 127 127 128 128 int KyraEngine_v2::chatCalcDuration(const char *str) { 129 return MAX<int>(strlen(str) << 3, 120); 129 // TODO: imlement this correctly 130 _configTextspeed = 50; 131 132 static const uint8 duration[] = { 16, 14, 12, 10, 8, 8, 7, 6, 5, 4 }; 133 int d = strlen(str); 134 d = _flags.isTalkie ? d << 3 : d * duration[(_configTextspeed / 10)]; 135 return MAX<int>(d, 120); 130 136 } 131 137 132 138 void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int vocLow) {