aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sequences_lok.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2009-05-10 13:40:28 +0000
committerFlorian Kagerer2009-05-10 13:40:28 +0000
commitdd84aaf648b57220180b84a9aa0825d16bcea5bc (patch)
tree2be68b4e4892d1a4d19509a46ebe64206e83e3f4 /engines/kyra/sequences_lok.cpp
parent3592801a5707f42c71971321b26e2cc1da775c25 (diff)
downloadscummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.tar.gz
scummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.tar.bz2
scummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.zip
LOL: - added some spell casting (spark, heal, swarm)
- fixed several bugs (not the one in the fighting system though) - added several opcodes. there shouldn't be any real show stoppers in the draracle cave now. - simplified wsa code (which required 4 lines of code for displaying a frame) - added support for wsa animations that don't have a last frame (apparently kyra 2 and 3 don't have this type of wsa file) svn-id: r40420
Diffstat (limited to 'engines/kyra/sequences_lok.cpp')
-rw-r--r--engines/kyra/sequences_lok.cpp46
1 files changed, 10 insertions, 36 deletions
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 6f08fd71f2..643d8a1d05 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -984,8 +984,6 @@ int KyraEngine_LoK::seq_playEnd() {
_finalA = new WSAMovie_v1(this);
assert(_finalA);
_finalA->open("finald.wsa", 1, 0);
- _finalA->setX(8); _finalA->setY(8);
- _finalA->setDrawPage(0);
delayUntil(nextTime);
snd_playSoundEffect(0x40);
for (int i = 0; i < 22; ++i) {
@@ -995,7 +993,7 @@ int KyraEngine_LoK::seq_playEnd() {
else if (i == 20)
snd_playSoundEffect(0x0E);
nextTime = _system->getMillis() + 8 * _tickLength;
- _finalA->displayFrame(i);
+ _finalA->displayFrame(i, 0, 8, 8);
_screen->updateScreen();
}
delete _finalA;
@@ -1232,10 +1230,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 2:
if (_system->getMillis() >= timer2) {
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
++frame;
@@ -1250,10 +1245,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
if (_system->getMillis() < timer1) {
if (_system->getMillis() >= timer2) {
frame = _rnd.getRandomNumberRng(14, 17);
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
}
@@ -1265,10 +1257,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 4:
if (_system->getMillis() >= timer2) {
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
++frame;
@@ -1282,10 +1271,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 5:
if (_system->getMillis() >= timer2) {
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
++frame;
@@ -1299,10 +1285,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 6:
if (_unkEndSeqVar4) {
if (frame <= 33 && _system->getMillis() >= timer2) {
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
++frame;
@@ -1327,10 +1310,7 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 8:
if (_system->getMillis() >= timer2) {
- _finalA->setX(8);
- _finalA->setY(46);
- _finalA->setDrawPage(0);
- _finalA->displayFrame(frame);
+ _finalA->displayFrame(frame, 0, 8, 46);
_screen->updateScreen();
timer2 = _system->getMillis() + 8 * _tickLength;
++frame;
@@ -1345,12 +1325,9 @@ int KyraEngine_LoK::handleMalcolmFlag() {
case 9:
snd_playSoundEffect(12);
snd_playSoundEffect(12);
- _finalC->setX(16);
- _finalC->setY(50);
- _finalC->setDrawPage(0);
for (int i = 0; i < 18; ++i) {
timer2 = _system->getMillis() + 4 * _tickLength;
- _finalC->displayFrame(i);
+ _finalC->displayFrame(i, 0, 16, 50);
_screen->updateScreen();
delayUntil(timer2);
}
@@ -1554,19 +1531,16 @@ int KyraEngine_LoK::handleBeadState() {
if (beadState2.dstX == 290) {
_screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect);
uint32 nextRun = 0;
- _finalB->setX(224);
- _finalB->setY(8);
- _finalB->setDrawPage(0);
for (int i = 0; i < 8; ++i) {
nextRun = _system->getMillis() + _tickLength;
- _finalB->displayFrame(i);
+ _finalB->displayFrame(i, 0, 224, 8);
_screen->updateScreen();
delayUntil(nextRun);
}
snd_playSoundEffect(0x0D);
for (int i = 7; i >= 0; --i) {
nextRun = _system->getMillis() + _tickLength;
- _finalB->displayFrame(i);
+ _finalB->displayFrame(i, 0, 224, 8);
_screen->updateScreen();
delayUntil(nextRun);
}