PRINCE: FLC animations - update

This commit is contained in:
lukaslw
2014-07-30 23:44:45 +02:00
parent e81acaf68b
commit 1b5d3e00a3
2 changed files with 10 additions and 17 deletions
+2 -1
View File
@@ -737,7 +737,7 @@ void PrinceEngine::setVoice(uint16 slot, uint32 sampleSlot, uint16 flag) {
bool PrinceEngine::loadAnim(uint16 animNr, bool loop) {
Common::String streamName = Common::String::format("AN%02d", animNr);
Common::SeekableReadStream * flicStream = SearchMan.createReadStreamForMember(streamName);
Common::SeekableReadStream *flicStream = SearchMan.createReadStreamForMember(streamName);
if (!flicStream) {
error("Can't open %s", streamName.c_str());
@@ -2299,6 +2299,7 @@ void PrinceEngine::moveRunHero(int heroId, int x, int y, int dir, bool runHeroFl
}
void PrinceEngine::leftMouseButton() {
_flags->setFlagValue(Flags::LMOUSE, 1);
if (_mouseFlag) {
int option = 0;
int optionEvent = -1;
+8 -16
View File
@@ -1703,29 +1703,21 @@ void Interpreter::O_CHECKFLCFRAME() {
uint16 frameNr = readScriptFlagValue();
debugInterpreter("O_CHECKFLCFRAME frame number %d", frameNr);
if (_vm->_flicPlayer.getCurFrame() != frameNr) {
// Move instruction pointer before current instruction
// must do this check once again till it's false
_currentInstruction -= 2;
_currentInstruction -= 4;
_opcodeNF = 1;
}
}
void Interpreter::O_CHECKFLCEND() {
//debugInterpreter("O_CHECKFLCEND");
const Video::FlicDecoder &flicPlayer = _vm->_flicPlayer;
//debug("frameCount %d, currentFrame %d", flicPlayer.getFrameCount(), flicPlayer.getCurFrame());
debugInterpreter("O_CHECKFLCEND frameCount %d, currentFrame %d", flicPlayer.getFrameCount(), flicPlayer.getCurFrame());
if (flicPlayer.getFrameCount() - flicPlayer.getCurFrame() > 1) {
// Move instruction pointer before current instruciton
// must do this check once again till it's false
_currentInstruction -= 2;
_opcodeNF = 1;
}
}
// TODO
void Interpreter::O_FREEFLC() {
debugInterpreter("O_FREEFLC");
}
@@ -1828,14 +1820,14 @@ void Interpreter::O_SETVOICED() {
}
void Interpreter::O_VIEWFLCLOOP() {
uint16 value = readScriptFlagValue();
_vm->loadAnim(value, true);
debugInterpreter("O_VIEWFLCLOOP animId %d", value);
uint16 animId = readScriptFlagValue();
_vm->loadAnim(animId, true);
debugInterpreter("O_VIEWFLCLOOP animId %d", animId);
}
// Not used in script
void Interpreter::O_FLCSPEED() {
uint16 speed = readScriptFlagValue();
debugInterpreter("O_FLCSPEED speed %d", speed);
error("O_FLCSPEED speed %d");
}
void Interpreter::O_OPENINVENTORY() {