Skip to content

Commit

Permalink
app: use official names for transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramen2X committed Mar 18, 2024
1 parent 1f1e7e8 commit b5ac7d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions lib/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,17 +750,17 @@ MxResult MxTransitionManager::InterceptStartTransition(TransitionType animationT
animationType = NO_ANIMATION;
} else if (animation_type == "Dissolve") {
animationType = DISSOLVE;
} else if (animation_type == "Pixelation") {
animationType = PIXELATION;
} else if (animation_type == "Vertical Wipe") {
animationType = VERTICAL_WIPE;
} else if (animation_type == "Mosaic") {
animationType = MOSAIC;
} else if (animation_type == "Wipe Down") {
animationType = WIPE_DOWN;
} else if (animation_type == "Window") {
animationType = WINDOW;
} else if (animation_type == "Random") {
animationType = (TransitionType)(rand() % 4 + 2);
// The Pixelation animation runs much faster by nature than the other animations,
// The Mosaic animation runs much faster by nature than the other animations,
// this magic is to make the speed inconsistency feel less jarring
if (animationType == PIXELATION && speed < 30) {
if (animationType == MOSAIC && speed < 30) {
speed += 25;
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ enum TransitionType
NOT_TRANSITIONING = 0,
NO_ANIMATION = 1,
DISSOLVE = 2,
PIXELATION = 3,
VERTICAL_WIPE = 4,
MOSAIC = 3,
WIPE_DOWN = 4,
WINDOW = 5,
BROKEN = 6
};
Expand Down
4 changes: 2 additions & 2 deletions src/patchgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ PatchGrid::PatchGrid()
vector<string> animationList;
animationList.push_back("No Animation");
animationList.push_back("Dissolve");
animationList.push_back("Pixelation");
animationList.push_back("Vertical Wipe");
animationList.push_back("Mosaic");
animationList.push_back("Wipe Down");
animationList.push_back("Window");
animationList.push_back("Random");
AddPatch("TransitionType",
Expand Down

0 comments on commit b5ac7d5

Please sign in to comment.