diff options
author | Florian Kagerer | 2009-06-03 19:11:11 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-06-03 19:11:11 +0000 |
commit | 8c868054152d0ffb6866b1316219607c2fd0f028 (patch) | |
tree | 1ac3fb424baca37f8b537b19ae39faaee3c4b479 /engines/kyra | |
parent | 6e079f7ea83bb227a54e32079246fc4a0918b282 (diff) | |
download | scummvm-rg350-8c868054152d0ffb6866b1316219607c2fd0f028.tar.gz scummvm-rg350-8c868054152d0ffb6866b1316219607c2fd0f028.tar.bz2 scummvm-rg350-8c868054152d0ffb6866b1316219607c2fd0f028.zip |
LOL: implemented opcode required for catwalk caves
svn-id: r41147
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/lol.h | 1 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index ef749e607e..a07446d0f8 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -779,6 +779,7 @@ private: int olol_placeInventoryItemInHand(EMCState *script); int olol_castSpell(EMCState *script); int olol_pitDrop(EMCState *script); + int olol_increaseSkill(EMCState *script); int olol_paletteFlash(EMCState *script); int olol_disableControls(EMCState *script); int olol_enableControls(EMCState *script); diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 06158d3c98..75651a2a9a 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -2035,6 +2035,15 @@ int LoLEngine::olol_pitDrop(EMCState *script) { return 1; } +int LoLEngine::olol_increaseSkill(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_increaseSkill(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + LoLCharacter *c = &_characters[stackPos(0)]; + int s = stackPos(1); + int l = c->skillLevels[s]; + increaseExperience(stackPos(0), s, _expRequirements[l] - c->experiencePts[s]); + return c->skillLevels[s] - l; +} + int LoLEngine::olol_paletteFlash(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_paletteFlash(%p) (%d)", (const void *)script, stackPos(0)); uint8 *s = _screen->getPalette(1); @@ -2742,7 +2751,7 @@ void LoLEngine::setupOpcodeTable() { Opcode(olol_placeInventoryItemInHand); Opcode(olol_castSpell); Opcode(olol_pitDrop); - OpcodeUnImpl(); + Opcode(olol_increaseSkill); // 0xB0 Opcode(olol_paletteFlash); |