diff options
author | whiterandrek | 2018-03-28 11:47:09 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 675f83256a01528cdaadd40d46bcbdc717633dd9 (patch) | |
tree | cb4237794ee0cf32887995c8c5466f28663c5517 | |
parent | 43a5e46ce2156527ddec41be06fe09c26214ddbb (diff) | |
download | scummvm-rg350-675f83256a01528cdaadd40d46bcbdc717633dd9.tar.gz scummvm-rg350-675f83256a01528cdaadd40d46bcbdc717633dd9.tar.bz2 scummvm-rg350-675f83256a01528cdaadd40d46bcbdc717633dd9.zip |
PINK: added button to toggle Drawing of Bounding Rectangles
-rw-r--r-- | engines/pink/director.cpp | 4 | ||||
-rw-r--r-- | engines/pink/director.h | 5 | ||||
-rw-r--r-- | engines/pink/objects/actors/lead_actor.cpp | 5 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequencer.cpp | 8 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequencer.h | 2 | ||||
-rw-r--r-- | engines/pink/pink.cpp | 5 |
6 files changed, 20 insertions, 9 deletions
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp index 18b1d38949..3d218cb682 100644 --- a/engines/pink/director.cpp +++ b/engines/pink/director.cpp @@ -29,7 +29,7 @@ namespace Pink { Director::Director(OSystem *system) - : _system(system) {} + : _system(system), showBounds(0) {} void Director::draw() { for (int i = 0; i < _sprites.size(); ++i) { @@ -48,7 +48,7 @@ void Director::drawSprite(CelDecoder *decoder) { uint16 colourIndex = decoder->getTransparentColourIndex(); - if (colourIndex != 0) { + if (!showBounds && colourIndex != 0) { Graphics::Surface *screen = _system->lockScreen(); for (int y = 0; y < decoder->getHeight(); ++y) { for (int x = 0; x < decoder->getWidth(); ++x) { diff --git a/engines/pink/director.h b/engines/pink/director.h index ce7d96f874..63c622752b 100644 --- a/engines/pink/director.h +++ b/engines/pink/director.h @@ -48,10 +48,11 @@ public: void removeSound(ActionSound* sound); void clear(); -private: - void drawSprite(CelDecoder *decoder); + bool showBounds; +private: + void drawSprite(CelDecoder *decoder); OSystem *_system; Common::Array<ActionCEL*> _sprites; Common::Array<ActionSound*> _sounds; diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp index b406dc75a8..1b38c862b2 100644 --- a/engines/pink/objects/actors/lead_actor.cpp +++ b/engines/pink/objects/actors/lead_actor.cpp @@ -101,10 +101,10 @@ void LeadActor::OnKeyboardButtonClick(Common::KeyCode code) { _sequencer->skipSubSequence(); break; case Common::KEYCODE_ESCAPE: - //End sequence + _sequencer->skipToLastSubSequence(); break; case Common::KEYCODE_LEFT: - //return to start of sequence + _sequencer->startSequenceAgain(); break; default: break; @@ -113,7 +113,6 @@ void LeadActor::OnKeyboardButtonClick(Common::KeyCode code) { default: break; } - } void ParlSqPink::toConsole() { diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp index 6175140d46..69396c2e52 100644 --- a/engines/pink/objects/sequences/sequencer.cpp +++ b/engines/pink/objects/sequences/sequencer.cpp @@ -86,4 +86,12 @@ void Sequencer::skipSubSequence() { _context->getSequence()->start(0); } +void Sequencer::startSequenceAgain() { + +} + +void Sequencer::skipToLastSubSequence() { + +} + } // End of namespace Pink
\ No newline at end of file diff --git a/engines/pink/objects/sequences/sequencer.h b/engines/pink/objects/sequences/sequencer.h index 182862f651..8099f2d9a5 100644 --- a/engines/pink/objects/sequences/sequencer.h +++ b/engines/pink/objects/sequences/sequencer.h @@ -50,6 +50,8 @@ public: void update(); void skipSubSequence(); + void startSequenceAgain(); + void skipToLastSubSequence(); public: SequenceContext *_context; diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index 45130155f6..ac1060e748 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -96,7 +96,6 @@ Common::Error Pink::PinkEngine::run() { switch (event.type){ case Common::EVENT_QUIT: case Common::EVENT_RTL: - debug("Quit Event"); return Common::kNoError; case Common::EVENT_MOUSEMOVE: @@ -105,7 +104,9 @@ Common::Error Pink::PinkEngine::run() { break; case Common::EVENT_KEYDOWN: - _actor->OnKeyboardButtonClick(event.kbd.keycode); + if (event.kbd.keycode == Common::KEYCODE_d) + _director.showBounds = !_director.showBounds; + else _actor->OnKeyboardButtonClick(event.kbd.keycode); break; // don't know why it is used in original |