From 8db0f726c0253300faf8b9691607715fdaa45920 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 29 Jun 2010 14:55:32 +0000 Subject: SCI: Rewrap more comments svn-id: r50500 --- engines/sci/graphics/transitions.cpp | 48 ++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 19 deletions(-) (limited to 'engines/sci/graphics/transitions.cpp') diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index 27cda249d0..c1f626449f 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -158,7 +158,8 @@ void GfxTransitions::doit(Common::Rect picRect) { } if (_blackoutFlag) { - // We need to find out what transition we are supposed to use for blackout + // We need to find out what transition we are supposed to use for + // blackout translationEntry = translateNumber(_number, blackoutTransitionIDs); if (translationEntry) { doTransition(translationEntry->newId, true); @@ -174,7 +175,8 @@ void GfxTransitions::doit(Common::Rect picRect) { if (picRect.bottom != _screen->getHeight()) { // TODO: this is a workaround for lsl6 not showing menubar when playing - // There is some new code in the sierra sci in ShowPic that seems to do something similar to this + // There is some new code in the sierra sci in ShowPic that seems to do + // something similar to this _screen->copyToScreen(); g_system->updateScreen(); } @@ -182,8 +184,8 @@ void GfxTransitions::doit(Common::Rect picRect) { _screen->_picNotValid = 0; } -// This may get called twice, if blackoutFlag is set. It will get once called with blackoutFlag set and another time -// with no blackoutFlag. +// This may get called twice, if blackoutFlag is set. It will get once called +// with blackoutFlag set and another time with no blackoutFlag. void GfxTransitions::doTransition(int16 number, bool blackoutFlag) { if (number != SCI_TRANSITIONS_FADEPALETTE) { setNewPalette(blackoutFlag); @@ -278,7 +280,8 @@ void GfxTransitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag } } -// Note: dont do too many steps in here, otherwise cpu will crap out because of the load +// Note: don't do too many steps in here, otherwise cpu will crap out because of +// the load void GfxTransitions::fadeOut() { byte oldPalette[4 * 256], workPalette[4 * 256]; int16 stepNr, colorNr; @@ -296,7 +299,8 @@ void GfxTransitions::fadeOut() { } } -// Note: dont do too many steps in here, otherwise cpu will crap out because of the load +// Note: don't do too many steps in here, otherwise cpu will crap out because of +// the load void GfxTransitions::fadeIn() { int16 stepNr; @@ -306,9 +310,9 @@ void GfxTransitions::fadeIn() { } } -// pixelates the new picture over the old one - works against the whole screen +// Pixelates the new picture over the old one - works against the whole screen. // TODO: it seems this needs to get applied on _picRect only if possible -void GfxTransitions::pixelation (bool blackoutFlag) { +void GfxTransitions::pixelation(bool blackoutFlag) { uint16 mask = 0x40, stepNr = 0; Common::Rect pixelRect; @@ -328,7 +332,7 @@ void GfxTransitions::pixelation (bool blackoutFlag) { } while (mask != 0x40); } -// like pixelation but uses 8x8 blocks - works against the whole screen +// Like pixelation but uses 8x8 blocks - works against the whole screen. // TODO: it seems this needs to get applied on _picRect only if possible void GfxTransitions::blocks(bool blackoutFlag) { uint16 mask = 0x40, stepNr = 0; @@ -350,7 +354,8 @@ void GfxTransitions::blocks(bool blackoutFlag) { } while (mask != 0x40); } -// directly shows new screen starting up/down/left/right and going to the opposite direction - works on _picRect area only +// Directly shows new screen starting up/down/left/right and going to the +// opposite direction - works on _picRect area only void GfxTransitions::straight(int16 number, bool blackoutFlag) { int16 stepNr = 0; Common::Rect newScreenRect = _picRect; @@ -402,7 +407,8 @@ void GfxTransitions::straight(int16 number, bool blackoutFlag) { } } -// scroll old screen (up/down/left/right) and insert new screen that way - works on _picRect area only +// Scroll old screen (up/down/left/right) and insert new screen that way - works +// on _picRect area only. void GfxTransitions::scroll(int16 number) { int16 screenWidth, screenHeight; byte *oldScreenPtr; @@ -512,7 +518,8 @@ void GfxTransitions::scroll(int16 number) { } } -// vertically displays new screen starting from center - works on _picRect area only +// Vertically displays new screen starting from center - works on _picRect area +// only void GfxTransitions::verticalRollFromCenter(bool blackoutFlag) { Common::Rect leftRect = Common::Rect(_picRect.left + (_picRect.width() / 2) -1, _picRect.top, _picRect.left + (_picRect.width() / 2), _picRect.bottom); Common::Rect rightRect = Common::Rect(leftRect.right, _picRect.top, leftRect.right + 1, _picRect.bottom); @@ -528,7 +535,8 @@ void GfxTransitions::verticalRollFromCenter(bool blackoutFlag) { } } -// vertically displays new screen starting from edges - works on _picRect area only +// Vertically displays new screen starting from edges - works on _picRect area +// only void GfxTransitions::verticalRollToCenter(bool blackoutFlag) { Common::Rect leftRect = Common::Rect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom); Common::Rect rightRect = Common::Rect(leftRect.right - 1, _picRect.top, leftRect.right, _picRect.bottom); @@ -540,7 +548,8 @@ void GfxTransitions::verticalRollToCenter(bool blackoutFlag) { } } -// horizontally displays new screen starting from center - works on _picRect area only +// Horizontally displays new screen starting from center - works on _picRect +// area only void GfxTransitions::horizontalRollFromCenter(bool blackoutFlag) { Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top + (_picRect.height() / 2) - 1, _picRect.right, _picRect.top + (_picRect.height() / 2)); Common::Rect lowerRect = Common::Rect(upperRect.left, upperRect.bottom, upperRect.right, upperRect.bottom + 1); @@ -556,7 +565,8 @@ void GfxTransitions::horizontalRollFromCenter(bool blackoutFlag) { } } -// horizontally displays new screen starting from upper and lower edge - works on _picRect area only +// Horizontally displays new screen starting from upper and lower edge - works +// on _picRect area only void GfxTransitions::horizontalRollToCenter(bool blackoutFlag) { Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1); Common::Rect lowerRect = Common::Rect(upperRect.left, _picRect.bottom - 1, upperRect.right, _picRect.bottom); @@ -568,8 +578,8 @@ void GfxTransitions::horizontalRollToCenter(bool blackoutFlag) { } } -// diagonally displays new screen starting from center - works on _picRect area only -// assumes that height of rect is larger than width +// Diagonally displays new screen starting from center - works on _picRect area +// only. Assumes that height of rect is larger than width. void GfxTransitions::diagonalRollFromCenter(bool blackoutFlag) { int16 halfHeight = _picRect.height() / 2; Common::Rect upperRect(_picRect.left + halfHeight - 2, _picRect.top + halfHeight, _picRect.right - halfHeight + 1, _picRect.top + halfHeight + 1); @@ -598,8 +608,8 @@ void GfxTransitions::diagonalRollFromCenter(bool blackoutFlag) { } } -// diagonally displays new screen starting from edges - works on _picRect area only -// assumes that height of rect is larger than width +// Diagonally displays new screen starting from edges - works on _picRect area +// only. Assumes that height of rect is larger than width. void GfxTransitions::diagonalRollToCenter(bool blackoutFlag) { Common::Rect upperRect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1); Common::Rect lowerRect(_picRect.left, _picRect.bottom - 1, _picRect.right, _picRect.bottom); -- cgit v1.2.3