Skip to content

Commit

Permalink
MUTATIONOFJB: Move method comments to headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
LubomirR committed Aug 19, 2018
1 parent 440502a commit c098576
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 27 deletions.
8 changes: 0 additions & 8 deletions engines/mutationofjb/mutationofjb.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -156,14 +156,6 @@ void MutationOfJBEngine::handleNormalScene(const Common::Event &event) {
_game->getGui().handleEvent(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) { void MutationOfJBEngine::handleMapScene(const Common::Event &event) {
Scene *const scene = _game->getGameData().getCurrentScene(); Scene *const scene = _game->getGameData().getCurrentScene();


Expand Down
20 changes: 20 additions & 0 deletions engines/mutationofjb/mutationofjb.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -61,7 +61,27 @@ class MutationOfJBEngine : public Engine {
void setupCursor(); void setupCursor();
void updateCursorHitTest(int16 x, int16 y); void updateCursorHitTest(int16 x, int16 y);
void updateCursorPalette(); 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); 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); void handleMapScene(const Common::Event &event);


Console *_console; Console *_console;
Expand Down
19 changes: 0 additions & 19 deletions engines/mutationofjb/tasks/objectanimationtask.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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() { void ObjectAnimationTask::updateObjects() {
Scene *const scene = getTaskManager()->getGame().getGameData().getCurrentScene(); Scene *const scene = getTaskManager()->getGame().getGameData().getCurrentScene();
if (!scene) { if (!scene) {
Expand Down Expand Up @@ -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) { bool ObjectAnimationTask::handleHardcodedAnimation(Object *const object) {
GameData &gameData = getTaskManager()->getGame().getGameData(); GameData &gameData = getTaskManager()->getGame().getGameData();
Scene *const scene = gameData.getCurrentScene(); Scene *const scene = gameData.getCurrentScene();
Expand Down
20 changes: 20 additions & 0 deletions engines/mutationofjb/tasks/objectanimationtask.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,27 @@ class ObjectAnimationTask : public Task {
virtual void start() override; virtual void start() override;
virtual void update() 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(); 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); bool handleHardcodedAnimation(Object *const object);


private: private:
Expand Down

0 comments on commit c098576

Please sign in to comment.