diff options
author | Johannes Schickel | 2009-05-23 00:05:16 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-23 00:05:16 +0000 |
commit | c87f3199f82c5166a680f1ce9952777e8b4a6068 (patch) | |
tree | f24f0226bf6485c755af8a0470281273a3e7f76e /engines/kyra/script_mr.cpp | |
parent | 9e000c662b8645257f2fbd66c072ea54ee7786bb (diff) | |
download | scummvm-rg350-c87f3199f82c5166a680f1ce9952777e8b4a6068.tar.gz scummvm-rg350-c87f3199f82c5166a680f1ce9952777e8b4a6068.tar.bz2 scummvm-rg350-c87f3199f82c5166a680f1ce9952777e8b4a6068.zip |
Reserve opcode array entries beforehand, should save some reallocation and copying.
svn-id: r40798
Diffstat (limited to 'engines/kyra/script_mr.cpp')
-rw-r--r-- | engines/kyra/script_mr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 8eb703e38d..768a93b6ca 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -1149,6 +1149,7 @@ typedef Common::Functor1Mem<EMCState*, int, KyraEngine_MR> OpcodeV3; void KyraEngine_MR::setupOpcodeTable() { Common::Array<const Opcode*> *table = 0; + _opcodes.reserve(176); SetOpcodeTable(_opcodes); // 0x00 Opcode(o3_getMalcolmShapes); @@ -1371,18 +1372,20 @@ void KyraEngine_MR::setupOpcodeTable() { OpcodeUnImpl(); Opcode(o3_dummy); + _opcodesAnimation.reserve(8); SetOpcodeTable(_opcodesAnimation); // 0x00 Opcode(o2a_setAnimationShapes); Opcode(o3a_setCharacterFrame); Opcode(o3_playSoundEffect); Opcode(o3_dummy); - // 0x0a + // 0x04 Opcode(o2a_setResetFrame); Opcode(o1_getRand); Opcode(o3_getMalcolmShapes); Opcode(o3_dummy); + _opcodesDialog.reserve(5); SetOpcodeTable(_opcodesDialog); // 0x00 Opcode(o3d_updateAnim); |