diff options
author | Ľubomír Remák | 2018-08-19 17:31:45 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | 696b61c14626495fd01ffbacc309a2f8f5db4069 (patch) | |
tree | 7a3acd7724e576fb6b55a5ee94f78b90e79316b0 /engines | |
parent | cf878d87776f779f2a13669689361903fbe438cb (diff) | |
download | scummvm-rg350-696b61c14626495fd01ffbacc309a2f8f5db4069.tar.gz scummvm-rg350-696b61c14626495fd01ffbacc309a2f8f5db4069.tar.bz2 scummvm-rg350-696b61c14626495fd01ffbacc309a2f8f5db4069.zip |
MUTATIONOFJB: Move method comments to headers.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mutationofjb/mutationofjb.cpp | 8 | ||||
-rw-r--r-- | engines/mutationofjb/mutationofjb.h | 20 | ||||
-rw-r--r-- | engines/mutationofjb/tasks/objectanimationtask.cpp | 19 | ||||
-rw-r--r-- | engines/mutationofjb/tasks/objectanimationtask.h | 20 |
4 files changed, 40 insertions, 27 deletions
diff --git a/engines/mutationofjb/mutationofjb.cpp b/engines/mutationofjb/mutationofjb.cpp index 1d88269c48..8841a30fd0 100644 --- a/engines/mutationofjb/mutationofjb.cpp +++ b/engines/mutationofjb/mutationofjb.cpp @@ -156,14 +156,6 @@ void MutationOfJBEngine::handleNormalScene(const Common::Event &event) { _game->getGui().handleEvent(event); } -/* - Special handling for map scenes. - - Bitmaps define mouse clickable areas. - Statics are used to start actions. - Objects are used for showing labels. - -*/ void MutationOfJBEngine::handleMapScene(const Common::Event &event) { Scene *const scene = _game->getGameData().getCurrentScene(); diff --git a/engines/mutationofjb/mutationofjb.h b/engines/mutationofjb/mutationofjb.h index 21f8094bc2..380325487c 100644 --- a/engines/mutationofjb/mutationofjb.h +++ b/engines/mutationofjb/mutationofjb.h @@ -61,7 +61,27 @@ private: void setupCursor(); void updateCursorHitTest(int16 x, int16 y); void updateCursorPalette(); + + /** + * Handling for normal (non-map) scenes. + * + * Statics and doors define mouse clickable areas. + * Statics are used to start actions. + * Doors are used to transition between scenes. + * + * @param event ScummVM event. + */ void handleNormalScene(const Common::Event &event); + + /** + * Special handling for map scenes. + * + * Bitmaps define mouse clickable areas. + * Statics are used to start actions. + * Objects are used for showing labels. + * + * @param event ScummVM event. + */ void handleMapScene(const Common::Event &event); Console *_console; diff --git a/engines/mutationofjb/tasks/objectanimationtask.cpp b/engines/mutationofjb/tasks/objectanimationtask.cpp index 2b4bf80cd2..eab3d75d82 100644 --- a/engines/mutationofjb/tasks/objectanimationtask.cpp +++ b/engines/mutationofjb/tasks/objectanimationtask.cpp @@ -48,17 +48,6 @@ void ObjectAnimationTask::update() { } } -/** - * Advances every object animation in the current scene to the next frame. - * - * Normally the animation restarts after the last object frame. However, some animations have random - * elements to them. If _randomFrame is set, the animation restarts when _randomFrame is reached. - * Additionally, there is a chance with each frame until _randomFrame that the animation may jump - * straight to _randomFrame and continue until the last frame, then wrap around to the first frame. - * - * Randomness is used to introduce variety - e.g. in the starting scene a perched bird occasionally - * spreads its wings. - */ void ObjectAnimationTask::updateObjects() { Scene *const scene = getTaskManager()->getGame().getGameData().getCurrentScene(); if (!scene) { @@ -102,14 +91,6 @@ void ObjectAnimationTask::updateObjects() { } } -/** - * Nasty, hacky stuff the original game does to make some complex animations - * in the Carnival and Tavern Earthquake scenes possible. - * - * @param object Object to process. - * @return Whether to draw the object. It's important to respect this, otherwise - * some of the hardcoded animations would suffer from graphical glitches. - */ bool ObjectAnimationTask::handleHardcodedAnimation(Object *const object) { GameData &gameData = getTaskManager()->getGame().getGameData(); Scene *const scene = gameData.getCurrentScene(); diff --git a/engines/mutationofjb/tasks/objectanimationtask.h b/engines/mutationofjb/tasks/objectanimationtask.h index 320868fa83..9e09139a3c 100644 --- a/engines/mutationofjb/tasks/objectanimationtask.h +++ b/engines/mutationofjb/tasks/objectanimationtask.h @@ -38,7 +38,27 @@ public: virtual void start() override; virtual void update() override; + /** + * Advances every object animation in the current scene to the next frame. + * + * Normally the animation restarts after the last object frame. However, some animations have random + * elements to them. If _randomFrame is set, the animation restarts when _randomFrame is reached. + * Additionally, there is a chance with each frame until _randomFrame that the animation may jump + * straight to _randomFrame and continue until the last frame, then wrap around to the first frame. + * + * Randomness is used to introduce variety - e.g. in the starting scene a perched bird occasionally + * spreads its wings. + */ void updateObjects(); + + /** + * Nasty, hacky stuff the original game does to make some complex animations + * in the Carnival and Tavern Earthquake scenes possible. + * + * @param object Object to process. + * @return Whether to draw the object. It's important to respect this, otherwise + * some of the hardcoded animations would suffer from graphical glitches. + */ bool handleHardcodedAnimation(Object *const object); private: |