Skip to content

Commit

Permalink
FULLPIPE: Implement lift_walkAndGo()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 1, 2014
1 parent d8367d6 commit 2696093
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions engines/fullpipe/fullpipe.h
Expand Up @@ -292,6 +292,7 @@ class FullpipeEngine : public ::Engine {
void lift_startExitQueue();
void lift_sub05(ExCommand *ex);
bool lift_checkButton(const char *varname);
void lift_openLift();

GameVar *_musicGameVar;
Audio::SoundHandle _sceneTrackHandle;
Expand Down
46 changes: 45 additions & 1 deletion engines/fullpipe/lift.cpp
Expand Up @@ -30,6 +30,7 @@
#include "fullpipe/statics.h"
#include "fullpipe/messages.h"
#include "fullpipe/gameloader.h"
#include "fullpipe/motion.h"

namespace Fullpipe {

Expand Down Expand Up @@ -315,7 +316,50 @@ void FullpipeEngine::lift_closedoorSeq() {
}

void FullpipeEngine::lift_walkAndGo() {
warning("STUB: FullpipeEngine::lift_walkAndGo()");
MessageQueue *mq;
ExCommand *ex;

if (abs(_liftX - _aniMan->_ox) > 1 || abs(_liftY - _aniMan->_oy) > 1 || _aniMan->_movement || _aniMan->_statics->_staticsId != ST_MAN_UP) {
mq = getCurrSceneSc2MotionController()->method34(_aniMan, _liftX, _liftY, 1, ST_MAN_UP);

if (mq) {
ex = new ExCommand(0, 17, MSG_LIFT_CLICKBUTTON, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;

mq->addExCommandToEnd(ex);
}
} else {
lift_openLift();

mq = new MessageQueue(_liftEnterMQ, 0, 0);

mq->setFlags(mq->getFlags() | 1);

ex = new ExCommand(_aniMan->_id, 2, 15, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_excFlags |= 2;
mq->addExCommand(ex);

ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_field_14 = _lift->_priority + 1;
ex->_x = -1;
ex->_y = -1;
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);

ex = new ExCommand(0, 17, MSG_LIFT_CLOSEDOOR, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);

mq->chain(0);

_aniMan->_flags |= 1;
}
}

void FullpipeEngine::lift_openLift() {
warning("STUB: FullpipeEngine::lift_openLift()");
}

void FullpipeEngine::lift_clickButton() {
Expand Down

0 comments on commit 2696093

Please sign in to comment.