PINK: added placeholders for remaining buttons

This commit is contained in:
whiterandrek 2018-03-28 11:06:42 +03:00 committed by Eugene Sandulenko
parent 7168242832
commit 43a5e46ce2
5 changed files with 40 additions and 15 deletions

View File

@ -81,11 +81,37 @@ void LeadActor::update() {
}
void LeadActor::OnKeyboardButtonClick(Common::KeyCode code) {
switch (code) {
case Common::KEYCODE_SPACE:
case Common::KEYCODE_RIGHT:
_sequencer->skipSequence();
switch(_state) {
case kMoving:
switch (code){
case Common::KEYCODE_ESCAPE:
// set unk variables
// Fall Through intended
case Common::KEYCODE_SPACE:
//skip walking animation
default:
break;
}
case kInDialog1:
case kInDialog2:
case kPlayingVideo:
switch (code) {
case Common::KEYCODE_SPACE:
case Common::KEYCODE_RIGHT:
_sequencer->skipSubSequence();
break;
case Common::KEYCODE_ESCAPE:
//End sequence
break;
case Common::KEYCODE_LEFT:
//return to start of sequence
break;
default:
break;
}
break;
default:
break;
}
}

View File

@ -36,13 +36,13 @@ class LeadActor : public Actor {
public:
enum State {
kReady = 0,
kMoving,
kInDialog1, //???
kInventory,
kPDA,
kInDialog2,//???
kPlayingVideo, // ???
kUnk_Loading // ????
kMoving = 1,
kInDialog1 = 2, //???
kInventory = 3,
kPDA = 4,
kInDialog2 = 5,//???
kPlayingVideo = 6, // ???
kUnk_Loading = 7// ????
};

View File

@ -81,7 +81,7 @@ void Sequencer::removeContext(SequenceContext *context) {
_context = 0;
}
void Sequencer::skipSequence() {
void Sequencer::skipSubSequence() {
if (_context && _context->getNextItemIndex() < _context->getSequence()->getItems().size())
_context->getSequence()->start(0);
}

View File

@ -49,7 +49,7 @@ public:
void update();
void skipSequence();
void skipSubSequence();
public:
SequenceContext *_context;

View File

@ -104,7 +104,6 @@ Common::Error Pink::PinkEngine::run() {
case Common::EVENT_LBUTTONDOWN:
break;
case Common::EVENT_KEYDOWN:
_actor->OnKeyboardButtonClick(event.kbd.keycode);
break;