Skip to content

Commit

Permalink
DIRECTOR: JANITORIAL: Remove redundant indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Mar 26, 2020
1 parent 0c0c21e commit 0e2c004
Showing 1 changed file with 89 additions and 109 deletions.
198 changes: 89 additions & 109 deletions engines/director/transitions.cpp
Expand Up @@ -160,169 +160,149 @@ void Frame::playTransition(Score *score) {


switch (_transType) { switch (_transType) {
case kTransCenterOutHorizontal: // 5 case kTransCenterOutHorizontal: // 5
{ for (uint16 i = 0; i < t.steps; i++) {
for (uint16 i = 0; i < t.steps; i++) { t.xpos += t.xStepSize;
t.xpos += t.xStepSize;


r.setWidth(t.xpos * 2); r.setWidth(t.xpos * 2);
r.moveTo(clipRect.width() / 2 - t.xpos, 0); r.moveTo(clipRect.width() / 2 - t.xpos, 0);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


score->_backSurface->copyRectToSurface(*score->_surface, 0, 0, r); score->_backSurface->copyRectToSurface(*score->_surface, 0, 0, r);


g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCenterOutVertical: // 7 case kTransCenterOutVertical: // 7
{ for (uint16 i = 0; i < t.steps; i++) {
for (uint16 i = 0; i < t.steps; i++) { t.ypos += t.yStepSize;
t.ypos += t.yStepSize;


r.setHeight(t.ypos * 2); r.setHeight(t.ypos * 2);
r.moveTo(0, clipRect.height() / 2 - t.ypos); r.moveTo(0, clipRect.height() / 2 - t.ypos);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


score->_backSurface->copyRectToSurface(*score->_surface, 0, 0, r); score->_backSurface->copyRectToSurface(*score->_surface, 0, 0, r);


g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverDown: // 29 case kTransCoverDown: // 29
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.clip(clipRect);
r.clip(clipRect);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverDownLeft: // 30 case kTransCoverDownLeft: // 30
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.moveTo(clipRect.width() - t.xStepSize * i, 0);
r.moveTo(clipRect.width() - t.xStepSize * i, 0); r.clip(clipRect);
r.clip(clipRect);

g_system->delayMillis(t.stepDuration);
g_system->delayMillis(t.stepDuration); processQuitEvent();
processQuitEvent();

g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->updateScreen();
g_system->updateScreen();
}
} }
break; break;


case kTransCoverDownRight: // 31 case kTransCoverDownRight: // 31
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.clip(clipRect);
r.clip(clipRect);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverLeft: // 32 case kTransCoverLeft: // 32
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.moveTo(clipRect.width() - t.xStepSize * i, 0);
r.moveTo(clipRect.width() - t.xStepSize * i, 0); r.clip(clipRect);
r.clip(clipRect);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverRight: // 33 case kTransCoverRight: // 33
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.clip(clipRect);
r.clip(clipRect);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverUp: // 34 case kTransCoverUp: // 34
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.moveTo(0, clipRect.height() - t.yStepSize * i);
r.moveTo(0, clipRect.height() - t.yStepSize * i); r.clip(clipRect);
r.clip(clipRect);


g_system->delayMillis(t.stepDuration); g_system->delayMillis(t.stepDuration);
processQuitEvent(); processQuitEvent();


g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->updateScreen(); g_system->updateScreen();
}
} }
break; break;


case kTransCoverUpLeft: // 35 case kTransCoverUpLeft: // 35
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.moveTo(clipRect.width() - t.xStepSize * i, clipRect.height() - t.yStepSize * i);
r.moveTo(clipRect.width() - t.xStepSize * i, clipRect.height() - t.yStepSize * i); r.clip(clipRect);
r.clip(clipRect);

g_system->delayMillis(t.stepDuration);
g_system->delayMillis(t.stepDuration); processQuitEvent();
processQuitEvent();

g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->updateScreen();
g_system->updateScreen();
}
} }
break; break;


case kTransCoverUpRight: // 36 case kTransCoverUpRight: // 36
{ for (uint16 i = 1; i < t.steps; i++) {
for (uint16 i = 1; i < t.steps; i++) { r.setWidth(t.xStepSize * i);
r.setWidth(t.xStepSize * i); r.setHeight(t.yStepSize * i);
r.setHeight(t.yStepSize * i); r.moveTo(0, clipRect.height() - t.yStepSize * i);
r.moveTo(0, clipRect.height() - t.yStepSize * i); r.clip(clipRect);
r.clip(clipRect);

g_system->delayMillis(t.stepDuration);
g_system->delayMillis(t.stepDuration); processQuitEvent();
processQuitEvent();

g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition
g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, r.left, r.top, r.width(), r.height()); // transition g_system->updateScreen();
g_system->updateScreen();
}
} }
break; break;


Expand Down

0 comments on commit 0e2c004

Please sign in to comment.