mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 23:31:57 +00:00
TITANIC: Handle -1 frameNumber in AVISurface::addEvent like original
This commit is contained in:
parent
7ede6d585d
commit
63c3df22f0
@ -642,8 +642,9 @@ bool CParrot::FrameMsg(CFrameMsg *msg) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action < 280266) {
|
if (action != 280266) {
|
||||||
if (pt.x < 75) {
|
if (pt.x < 75) {
|
||||||
|
warning("***********************");
|
||||||
_npcFlags |= NPCFLAG_1000000;
|
_npcFlags |= NPCFLAG_1000000;
|
||||||
playClip("Walk Left Intro", MOVIE_STOP_PREVIOUS);
|
playClip("Walk Left Intro", MOVIE_STOP_PREVIOUS);
|
||||||
playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
|
playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
|
||||||
@ -684,7 +685,7 @@ bool CParrot::MovieFrameMsg(CMovieFrameMsg *msg) {
|
|||||||
|
|
||||||
_npcFlags &= ~NPCFLAG_800000;
|
_npcFlags &= ~NPCFLAG_800000;
|
||||||
}
|
}
|
||||||
|
warning("%d", msg->_frameNumber);//***DEBUG***
|
||||||
switch (msg->_frameNumber) {
|
switch (msg->_frameNumber) {
|
||||||
case 244:
|
case 244:
|
||||||
setPosition(Point(_bounds.left + 45, _bounds.top));
|
setPosition(Point(_bounds.left + 45, _bounds.top));
|
||||||
|
@ -406,21 +406,22 @@ bool AVISurface::renderFrame() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AVISurface::addEvent(int frameNumber, CGameObject *obj) {
|
bool AVISurface::addEvent(int *frameNumber, CGameObject *obj) {
|
||||||
if (!_movieRangeInfo.empty()) {
|
if (!_movieRangeInfo.empty()) {
|
||||||
CMovieRangeInfo *tail = _movieRangeInfo.back();
|
CMovieRangeInfo *tail = _movieRangeInfo.back();
|
||||||
if (frameNumber == -1)
|
assert(frameNumber);
|
||||||
frameNumber = tail->_startFrame;
|
if (*frameNumber == -1)
|
||||||
|
*frameNumber = tail->_startFrame;
|
||||||
|
|
||||||
CMovieEvent *me = new CMovieEvent();
|
CMovieEvent *me = new CMovieEvent();
|
||||||
me->_type = MET_FRAME;
|
me->_type = MET_FRAME;
|
||||||
me->_startFrame = 0;
|
me->_startFrame = 0;
|
||||||
me->_endFrame = 0;
|
me->_endFrame = 0;
|
||||||
me->_initialFrame = frameNumber;
|
me->_initialFrame = *frameNumber;
|
||||||
me->_gameObject = obj;
|
me->_gameObject = obj;
|
||||||
tail->addEvent(me);
|
tail->addEvent(me);
|
||||||
|
|
||||||
return _movieRangeInfo.size() == 1 && frameNumber == getFrame();
|
return _movieRangeInfo.size() == 1 && *frameNumber == getFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -181,7 +181,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Add a movie event
|
* Add a movie event
|
||||||
*/
|
*/
|
||||||
bool addEvent(int frameNumber, CGameObject *obj);
|
bool addEvent(int *frameNumber, CGameObject *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the frame rate
|
* Set the frame rate
|
||||||
|
@ -140,7 +140,7 @@ void OSMovie::stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OSMovie::addEvent(int frameNumber, CGameObject *obj) {
|
void OSMovie::addEvent(int frameNumber, CGameObject *obj) {
|
||||||
if (_aviSurface.addEvent(frameNumber, obj)) {
|
if (_aviSurface.addEvent(&frameNumber, obj)) {
|
||||||
CMovieFrameMsg frameMsg(frameNumber, 0);
|
CMovieFrameMsg frameMsg(frameNumber, 0);
|
||||||
frameMsg.execute(obj);
|
frameMsg.execute(obj);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user