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_hof.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_hof.cpp')
-rw-r--r-- | engines/kyra/script_hof.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 2a55dfa484..0327516b2e 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -1482,6 +1482,7 @@ typedef Common::Functor2Mem<const TIM*, const uint16*, int, KyraEngine_HoF> TIMO void KyraEngine_HoF::setupOpcodeTable() { Common::Array<const Opcode*> *table = 0; + _opcodes.reserve(176); SetOpcodeTable(_opcodes); // 0x00 Opcode(o2_setCharacterFacingRefresh); @@ -1705,6 +1706,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_demoFinale); Opcode(o2_dummy); + _opcodesAnimation.reserve(6); SetOpcodeTable(_opcodesAnimation); // 0x00 @@ -1718,6 +1720,7 @@ void KyraEngine_HoF::setupOpcodeTable() { // ---- TIM opcodes + _timOpcodes.reserve(4); // 0x00 OpcodeTim(t2_initChat); OpcodeTim(t2_updateSceneAnim); |