[Scummvm-cvs-logs] SF.net SVN: scummvm:[35891] scummvm/trunk/engines/tucker
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Sun Jan 18 04:22:34 CET 2009
Revision: 35891
http://scummvm.svn.sourceforge.net/scummvm/?rev=35891&view=rev
Author: cyx
Date: 2009-01-18 03:22:33 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
cleanup
Modified Paths:
--------------
scummvm/trunk/engines/tucker/resource.cpp
scummvm/trunk/engines/tucker/sequences.cpp
scummvm/trunk/engines/tucker/tucker.h
Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp 2009-01-18 03:07:20 UTC (rev 35890)
+++ scummvm/trunk/engines/tucker/resource.cpp 2009-01-18 03:22:33 UTC (rev 35891)
@@ -269,14 +269,7 @@
}
if (type != 0) {
f.seek(-768, SEEK_END);
- for (int i = 0; i < 256; ++i) {
- if (type == 2) {
- isSpeechSoundPlaying();
- }
- for (int c = 0; c < 3; ++c) {
- _currentPalette[3 * i + c] = f.readByte();
- }
- }
+ f.read(_currentPalette, 768);
setBlackPalette();
}
}
@@ -487,7 +480,6 @@
handleNewPartSequence();
_currentPartNum = _partNum;
-
char filename[40];
sprintf(filename, "objtxt%d.c", _partNum);
free(_objTxtBuf);
Modified: scummvm/trunk/engines/tucker/sequences.cpp
===================================================================
--- scummvm/trunk/engines/tucker/sequences.cpp 2009-01-18 03:07:20 UTC (rev 35890)
+++ scummvm/trunk/engines/tucker/sequences.cpp 2009-01-18 03:22:33 UTC (rev 35891)
@@ -494,7 +494,7 @@
}
AnimationSequencePlayer::AnimationSequencePlayer(OSystem *system, Audio::Mixer *mixer, Common::EventManager *event, int num)
- : _system(system), _mixer(mixer), _event(event), _seqNum(num), _changeToNextSequence(false) {
+ : _system(system), _mixer(mixer), _event(event), _seqNum(num) {
memset(_animationPalette, 0, sizeof(_animationPalette));
memset(_paletteBuffer, 0, sizeof(_paletteBuffer));
_soundSeqDataOffset = 0;
@@ -509,9 +509,6 @@
_updateScreenWidth = 0;
_updateScreenPicture = 0;
_updateScreenOffset = 0;
- _frameCounter = 0;
- _frameTime = 1;
- _lastFrameTime = 0;
_picBufPtr = _pic2BufPtr = 0;
}
@@ -522,18 +519,18 @@
void AnimationSequencePlayer::mainLoop() {
static const SequenceUpdateFunc _demoSeqUpdateFuncs[] = {
- { 13, &AnimationSequencePlayer::loadIntroSeq13_14, &AnimationSequencePlayer::playIntroSeq13_14 },
- { 15, &AnimationSequencePlayer::loadIntroSeq15_16, &AnimationSequencePlayer::playIntroSeq15_16 },
- { 27, &AnimationSequencePlayer::loadIntroSeq27_28, &AnimationSequencePlayer::playIntroSeq27_28 },
- { 1, 0, 0 }
+ { 13, 2, &AnimationSequencePlayer::loadIntroSeq13_14, &AnimationSequencePlayer::playIntroSeq13_14 },
+ { 15, 2, &AnimationSequencePlayer::loadIntroSeq15_16, &AnimationSequencePlayer::playIntroSeq15_16 },
+ { 27, 2, &AnimationSequencePlayer::loadIntroSeq27_28, &AnimationSequencePlayer::playIntroSeq27_28 },
+ { 1, 0, 0, 0 }
};
static const SequenceUpdateFunc _gameSeqUpdateFuncs[] = {
- { 17, &AnimationSequencePlayer::loadIntroSeq17_18, &AnimationSequencePlayer::playIntroSeq17_18 },
- { 19, &AnimationSequencePlayer::loadIntroSeq19_20, &AnimationSequencePlayer::playIntroSeq19_20 },
- { 3, &AnimationSequencePlayer::loadIntroSeq3_4, &AnimationSequencePlayer::playIntroSeq3_4 },
- { 9, &AnimationSequencePlayer::loadIntroSeq9_10, &AnimationSequencePlayer::playIntroSeq9_10 },
- { 21, &AnimationSequencePlayer::loadIntroSeq21_22, &AnimationSequencePlayer::playIntroSeq21_22 },
- { 1, 0, 0 }
+ { 17, 1, &AnimationSequencePlayer::loadIntroSeq17_18, &AnimationSequencePlayer::playIntroSeq17_18 },
+ { 19, 1, &AnimationSequencePlayer::loadIntroSeq19_20, &AnimationSequencePlayer::playIntroSeq19_20 },
+ { 3, 2, &AnimationSequencePlayer::loadIntroSeq3_4, &AnimationSequencePlayer::playIntroSeq3_4 },
+ { 9, 2, &AnimationSequencePlayer::loadIntroSeq9_10, &AnimationSequencePlayer::playIntroSeq9_10 },
+ { 21, 2, &AnimationSequencePlayer::loadIntroSeq21_22, &AnimationSequencePlayer::playIntroSeq21_22 },
+ { 1, 0, 0, 0 }
};
switch (_seqNum) {
case kFirstAnimationSequenceDemo:
@@ -550,6 +547,7 @@
_changeToNextSequence = false;
_frameCounter = 0;
_lastFrameTime = _system->getMillis();
+ _frameTime = this->_updateFunc[_updateFuncIndex].frameTime;
(this->*(_updateFunc[_updateFuncIndex].load))();
if (_seqNum == 1) {
break;
@@ -924,7 +922,6 @@
void AnimationSequencePlayer::loadIntroSeq17_18() {
loadSounds(9, 0);
openAnimation(0, "graphics/merit.flc");
- _frameTime = 1;
}
void AnimationSequencePlayer::playIntroSeq17_18() {
@@ -940,7 +937,6 @@
loadSounds(10, 1);
openAnimation(0, "graphics/budttle2.flc");
openAnimation(1, "graphics/machine.flc");
- _frameTime = 1;
}
void AnimationSequencePlayer::playIntroSeq19_20() {
@@ -1008,7 +1004,6 @@
_system->copyRectToScreen(_offscreenBuffer, 320, 0, 0, kScreenWidth, kScreenHeight);
fadeInPalette();
_updateScreenPicture = false;
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq3_4() {
@@ -1071,7 +1066,6 @@
_picBufPtr = loadPicture("graphics/lab.pic");
openAnimation(0, "graphics/intro2.flc");
_updateScreenWidth = 0;
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq9_10() {
@@ -1098,7 +1092,6 @@
void AnimationSequencePlayer::loadIntroSeq21_22() {
loadSounds(1, 2);
openAnimation(0, "graphics/intro3.flc");
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq21_22() {
@@ -1112,7 +1105,6 @@
void AnimationSequencePlayer::loadIntroSeq13_14() {
loadSounds(3, 1);
openAnimation(0, "graphics/allseg02.flc");
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq13_14() {
@@ -1126,7 +1118,6 @@
void AnimationSequencePlayer::loadIntroSeq15_16() {
loadSounds(3, 2);
openAnimation(0, "graphics/allseg03.flc");
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq15_16() {
@@ -1140,7 +1131,6 @@
void AnimationSequencePlayer::loadIntroSeq27_28() {
loadSounds(3, 3);
openAnimation(0, "graphics/allseg04.flc");
- _frameTime = 2;
}
void AnimationSequencePlayer::playIntroSeq27_28() {
Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h 2009-01-18 03:07:20 UTC (rev 35890)
+++ scummvm/trunk/engines/tucker/tucker.h 2009-01-18 03:22:33 UTC (rev 35891)
@@ -857,6 +857,7 @@
struct SequenceUpdateFunc {
int num;
+ int frameTime;
void (AnimationSequencePlayer::*load)();
void (AnimationSequencePlayer::*play)();
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list