[Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.46,1.47 animation.h,1.24,1.25 saga.h,1.100,1.101 sfuncs.cpp,1.129,1.130
Andrew Kurushin
h00ligan at users.sourceforge.net
Sat Jun 25 08:56:06 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22872
Modified Files:
animation.cpp animation.h saga.h sfuncs.cpp
Log Message:
fix animation timings (now Shiala scene not stucks)
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- animation.cpp 20 Jun 2005 11:46:32 -0000 1.46
+++ animation.cpp 25 Jun 2005 15:55:43 -0000 1.47
@@ -133,7 +133,6 @@
anim = getAnimation(animId);
-
_vm->_render->getBufferInfo(&buf_info);
displayBuffer = buf_info.bg_buf;
@@ -171,7 +170,9 @@
}
anim->currentFrame++;
- anim->completed++;
+ if (anim->completed != 65535) {
+ anim->completed++;
+ }
if (anim->currentFrame > anim->maxFrame) {
anim->currentFrame = anim->loopFrame;
@@ -182,7 +183,7 @@
anim->cur_frame_len = anim->resourceLength - SAGA_FRAME_HEADER_LEN;
}
- if (anim->flags & ANIM_STOPPING || anim->currentFrame == (uint16)-1) {
+ if (anim->flags & ANIM_STOPPING || anim->currentFrame == -1) {
anim->state = ANIM_PAUSE;
}
}
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- animation.h 20 Jun 2005 11:46:34 -0000 1.24
+++ animation.h 25 Jun 2005 15:55:43 -0000 1.25
@@ -79,12 +79,12 @@
byte unknown06;
byte unknown07;
- uint16 maxFrame;
- uint16 loopFrame;
+ int16 maxFrame;
+ int16 loopFrame;
- uint16 start;
+ int16 start;
- uint16 currentFrame;
+ int16 currentFrame;
size_t *frameOffsets;
uint16 completed;
Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- saga.h 5 Jun 2005 16:53:53 -0000 1.100
+++ saga.h 25 Jun 2005 15:55:43 -0000 1.101
@@ -105,7 +105,7 @@
enum ScriptTimings {
kScriptTimeTicksPerSecond = (728L/10L),
- kRepeatSpeed = 40, // 25 frames/sec
+ kRepeatSpeedTicks = (728L/10L)/3,
kNormalFadeDuration = 320, // 64 steps, 5 msec each
kQuickFadeDuration = 64, // 64 steps, 1 msec each
kPuzzleHintTime = 30000000L // 30 secs. used in timer
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- sfuncs.cpp 20 Jun 2005 12:17:22 -0000 1.129
+++ sfuncs.cpp 25 Jun 2005 15:55:43 -0000 1.130
@@ -343,7 +343,8 @@
int16 cycles = thread->pop();
_vm->_anim->setCycles(animId, cycles);
- _vm->_anim->play(animId, kRepeatSpeed);
+ _vm->_anim->setFrameTime(animId, ticksToMSec(kRepeatSpeedTicks));
+ _vm->_anim->play(animId, 0);
debug(1, "sfStartBgdAnim(%d, %d)", animId, cycles);
}
@@ -656,7 +657,8 @@
int16 speed = thread->pop();
_vm->_anim->setCycles(animId, cycles);
- _vm->_anim->play(animId, ticksToMSec(speed));
+ _vm->_anim->setFrameTime(animId, ticksToMSec(speed));
+ _vm->_anim->play(animId, 0);
debug(1, "sfStartBgdAnimSpeed(%d, %d, %d)", animId, cycles, speed);
}
More information about the Scummvm-git-logs
mailing list