Permalink
Browse files

MUTATIONOFJB: Move method comments to headers.

  • Loading branch information...
LubomirR authored and sev- committed Aug 19, 2018
1 parent cf878d8 commit 696b61c14626495fd01ffbacc309a2f8f5db4069
@@ -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();

@@ -61,7 +61,27 @@ class MutationOfJBEngine : public Engine {
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;
@@ -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();
@@ -38,7 +38,27 @@ class ObjectAnimationTask : public Task {
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:

0 comments on commit 696b61c

Please sign in to comment.