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/cursor.cpp | 3 ++- engines/sci/graphics/menu.cpp | 48 ++++++++++++++++++++++-------------- engines/sci/graphics/paint16.cpp | 42 +++++++++++++++++++------------ engines/sci/graphics/screen.cpp | 14 ++++++----- engines/sci/graphics/text16.cpp | 37 ++++++++++++++++----------- engines/sci/graphics/transitions.cpp | 48 ++++++++++++++++++++++-------------- 6 files changed, 116 insertions(+), 76 deletions(-) diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp index 20472d14c4..23c41c4c87 100644 --- a/engines/sci/graphics/cursor.cpp +++ b/engines/sci/graphics/cursor.cpp @@ -174,7 +174,8 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co // Compute hotspot from xoffset/yoffset cursorHotspot = new Common::Point((celInfo->width >> 1) - celInfo->displaceX, celInfo->height - celInfo->displaceY - 1); - // Eco Quest 1 uses a 1x1 transparent cursor to hide the cursor from the user. Some scalers don't seem to support this + // Eco Quest 1 uses a 1x1 transparent cursor to hide the cursor from the + // user. Some scalers don't seem to support this if (width < 2 || height < 2) { kernelHide(); delete cursorHotspot; diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 323539573b..d85d4456fc 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -63,8 +63,9 @@ void GfxMenu::reset() { _itemList.clear(); _listCount = 0; - // We actually set active item in here and remember last selection of the user - // sierra sci always defaulted to first item every time menu was called via ESC, we dont follow that logic + // We actually set active item in here and remember last selection of the + // user. Sierra SCI always defaulted to first item every time menu was + // called via ESC, we don't follow that logic. _curMenuId = 1; _curItemId = 1; } @@ -92,15 +93,16 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t beginPos = curPos; - // Now go through the content till we find end-marker and collect data about it - // ':' is an end-marker for each item + // Now go through the content till we find end-marker and collect data about it. + // ':' is an end-marker for each item. tagPos = 0; rightAlignedPos = 0; controlPos = 0; altPos = 0; functionPos = 0; while ((curPos < contentSize) && (content[curPos] != ':')) { switch (content[curPos]) { case '=': // Set tag - // Special case for normal animation speed - they use right aligned "=" for that one, so we ignore it - // as being recognized as tag marker + // Special case for normal animation speed - they use right + // aligned "=" for that one, so we ignore it as being recognized + // as tag marker. if (rightAlignedPos == curPos - 1) break; if (tagPos) @@ -199,8 +201,9 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t if (separatorCount == tempPos - beginPos) { itemEntry->separatorLine = true; } else { - // we don't strSplit here, because multilingual SCI01 support language switching on the fly, so we have to do - // this everytime the menu is called + // We don't strSplit here, because multilingual SCI01 support + // language switching on the fly, so we have to do this everytime + // the menu is called. itemEntry->text = Common::String(content.c_str() + beginPos, tempPos - beginPos); // LSL6 uses "Ctrl-" prefix string instead of ^ like all the other games do @@ -222,10 +225,12 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t if (tagPos && tagPos >= rightAlignedPos) tempPos = tagPos; itemEntry->textRightAligned = Common::String(content.c_str() + rightAlignedPos, tempPos - rightAlignedPos); - // Remove ending space, if there is one. Strangely sometimes there are lone spaces at the end in some games + // Remove ending space, if there is one. Strangely sometimes there + // are lone spaces at the end in some games if (itemEntry->textRightAligned.hasSuffix(" ")) itemEntry->textRightAligned.deleteLastChar(); - // - and + are used sometimes for volume control/animation speed, = sometimes for animation speed + // - and + are used sometimes for volume control/animation speed, + // = sometimes for animation speed if (itemEntry->textRightAligned == "-") { itemEntry->keyPress = '-'; } else if (itemEntry->textRightAligned == "+") { @@ -392,7 +397,8 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject) { case SCI_EVENT_KEYBOARD: keyPress = readSelectorValue(_segMan, eventObject, SELECTOR(message)); keyModifier = readSelectorValue(_segMan, eventObject, SELECTOR(modifiers)); - // If tab got pressed, handle it here as if it was Ctrl-I - at least sci0 also did it that way + // If tab got pressed, handle it here as if it was Ctrl-I - at least + // sci0 also did it that way if (keyPress == SCI_KEY_TAB) { keyModifier = SCI_KEYMOD_CTRL; keyPress = 'i'; @@ -562,7 +568,8 @@ void GfxMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) { if (!maxTextRightAlignedWidth) _menuRect.right -= 5; - // if part of menu window is outside the screen, move it into the screen (this happens in multilingual sq3 and lsl3) + // If part of menu window is outside the screen, move it into the screen + // (this happens in multilingual sq3 and lsl3). if (_menuRect.right > _screen->getWidth()) { _menuRect.translate(-(_menuRect.right - _screen->getWidth()), 0); } @@ -689,8 +696,9 @@ GuiMenuItemEntry *GfxMenu::interactiveWithKeyboard() { GuiMenuItemEntry *newItemEntry = curItemEntry; Common::Point mousePosition; - // We don't 100% follow sierra here: we select last item instead of selecting first item of first menu everytime - // Also sierra sci didnt allow mouse interaction, when menu was activated via keyboard + // We don't 100% follow Sierra here: we select last item instead of + // selecting first item of first menu every time. Also sierra sci didn't + // allow mouse interaction, when menu was activated via keyboard. calculateMenuAndItemWidth(); _oldPort = _ports->setPort(_ports->_menuPort); @@ -710,8 +718,9 @@ GuiMenuItemEntry *GfxMenu::interactiveWithKeyboard() { switch (curEvent.type) { case SCI_EVENT_KEYBOARD: - // We don't 100% follow sierra here: - sierra didn't wrap around when changing item id - // - sierra allowed item id to be 0, which didnt make any sense + // We don't 100% follow sierra here: + // - sierra didn't wrap around when changing item id + // - sierra allowed item id to be 0, which didn't make any sense do { switch (curEvent.data) { case SCI_KEY_ESC: @@ -802,9 +811,10 @@ GuiMenuItemEntry *GfxMenu::interactiveWithKeyboard() { } } -// Mouse button is currently pressed - we are now interpreting mouse coordinates till mouse button is released -// The menu item that is selected at that time is chosen. If no menu item is selected we cancel -// No keyboard interaction is allowed, cause that wouldnt make any sense at all +// Mouse button is currently pressed - we are now interpreting mouse coordinates +// till mouse button is released. The menu item that is selected at that time is +// chosen. If no menu item is selected we cancel. No keyboard interaction is +// allowed, cause that wouldnt make any sense at all. GuiMenuItemEntry *GfxMenu::interactiveWithMouse() { SciEvent curEvent; uint16 newMenuId = 0, newItemId = 0; diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index 9f286b1fda..48967c6888 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -127,8 +127,8 @@ void GfxPaint16::drawCel(GfxView *view, int16 loopNo, int16 celNo, const Common: } } -// This is used as replacement for drawCelAndShow() when hires-cels are drawn to screen -// Hires-cels are available only SCI 1.1+ +// This is used as replacement for drawCelAndShow() when hires-cels are drawn to +// screen. Hires-cels are available only SCI 1.1+. void GfxPaint16::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, reg_t upscaledHiresHandle, uint16 scaleX, uint16 scaleY) { GfxView *view = _cache->getView(viewId); Common::Rect celRect, curPortRect, clipRect, clipRectTranslated; @@ -137,9 +137,10 @@ void GfxPaint16::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 c if (view) { if ((leftPos == 0) && (topPos == 0)) { - // HACK: in kq6, we get leftPos&topPos == 0 SOMETIMES, that's why we need to get coordinates from upscaledHiresHandle - // I'm not sure if this is what we are supposed to do or if there is some other bug that actually makes - // coordinates to be 0 in the first place + // HACK: in kq6, we get leftPos&topPos == 0 SOMETIMES, that's why we + // need to get coordinates from upscaledHiresHandle. I'm not sure if + // this is what we are supposed to do or if there is some other bug + // that actually makes coordinates to be 0 in the first place. byte *memoryPtr = NULL; memoryPtr = _segMan->getHunkPointer(upscaledHiresHandle); if (memoryPtr) { @@ -381,7 +382,8 @@ void GfxPaint16::kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, b } void GfxPaint16::kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle) { - // some calls are hiresMode even under kq6 DOS, that's why we check for upscaled hires here + // some calls are hiresMode even under kq6 DOS, that's why we check for + // upscaled hires here if ((!hiresMode) || (!_screen->getUpscaledHires())) { drawCelAndShow(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo); } else { @@ -426,7 +428,8 @@ void GfxPaint16::kernelGraphRestoreBox(reg_t handle) { } void GfxPaint16::kernelGraphUpdateBox(const Common::Rect &rect, bool hiresMode) { - // some calls are hiresMode even under kq6 DOS, that's why we check for upscaled hires here + // some calls are hiresMode even under kq6 DOS, that's why we check for + // upscaled hires here if ((!hiresMode) || (!_screen->getUpscaledHires())) bitsShow(rect); else @@ -466,7 +469,8 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { Common::Rect rect; reg_t result = NULL_REG; - // Make a "backup" of the port settings (required for some SCI0LATE and SCI01+ only) + // Make a "backup" of the port settings (required for some SCI0LATE and + // SCI01+ only) Port oldPort = *_ports->getPort(); // setting defaults @@ -565,14 +569,20 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { uint16 tTop = currport->curTop; uint16 tLeft = currport->curLeft; if (!g_sci->_features->usesOldGfxFunctions()) { - // Restore port settings for some SCI0LATE and SCI01+ only - // the change actually happened inbetween .530 (hoyle1) and .566 (heros quest). We don't have any detection for - // that currently, so we are using oldGfxFunctions (.502). The only games that could get regressions because of - // this are hoyle1, kq4 and funseeker. If there are regressions, we should use interpreter version (which would - // require exe version detection) - // If we restore the port for whole SCI0LATE, at least sq3old will get an issue - font 0 will get used when - // scanning for planets instead of font 600 - a setfont parameter is missing in one of the kDisplay calls in - // script 19. I assume this is a script bug, because it was added in sq3new. + // Restore port settings for some SCI0LATE and SCI01+ only. + // + // The change actually happened inbetween .530 (hoyle1) and .566 (heros + // quest). We don't have any detection for that currently, so we are + // using oldGfxFunctions (.502). The only games that could get + // regressions because of this are hoyle1, kq4 and funseeker. If there + // are regressions, we should use interpreter version (which would + // require exe version detection). + // + // If we restore the port for whole SCI0LATE, at least sq3old will get + // an issue - font 0 will get used when scanning for planets instead of + // font 600 - a setfont parameter is missing in one of the kDisplay + // calls in script 19. I assume this is a script bug, because it was + // added in sq3new. *currport = oldPort; } currport->curTop = tTop; diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index eee6898a23..053372bdac 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -40,9 +40,10 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { // Scale the screen, if needed _upscaledHires = GFX_SCREEN_UPSCALED_DISABLED; - // King's Quest 6 and Gabriel Knight 1 have hires content, gk1/cd was able to provide that under DOS as well, but as - // gk1/floppy does support upscaled hires scriptswise, but doesn't actually have the hires content we need to limit - // it to platform windows. + // King's Quest 6 and Gabriel Knight 1 have hires content, gk1/cd was able + // to provide that under DOS as well, but as gk1/floppy does support + // upscaled hires scriptswise, but doesn't actually have the hires content + // we need to limit it to platform windows. if (g_sci->getPlatform() == Common::kPlatformWindows) { if (g_sci->getGameId() == GID_KQ6) _upscaledHires = GFX_SCREEN_UPSCALED_640x440; @@ -60,7 +61,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _height = 200; } - // Japanese versions of games use hi-res font on upscaled version of the game + // Japanese versions of games use hi-res font on upscaled version of the game. if ((g_sci->getLanguage() == Common::JA_JPN) && (getSciVersion() <= SCI_VERSION_1_1)) _upscaledHires = GFX_SCREEN_UPSCALED_640x400; @@ -106,8 +107,9 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _unditherState = true; if (_resMan->isVGA() || (_resMan->isAmiga32color())) { - // It is not 100% accurate to set white to be 255 for Amiga 32-color games. - // But 255 is defined as white in our SCI at all times, so it doesn't matter. + // It is not 100% accurate to set white to be 255 for Amiga 32-color + // games. But 255 is defined as white in our SCI at all times, so it + // doesn't matter. _colorWhite = 255; if (getSciVersion() >= SCI_VERSION_1_1) _colorDefaultVectorData = 255; diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index e9adac9572..4aa2346aed 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -84,10 +84,10 @@ void GfxText16::ClearChar(int16 chr) { _paint16->eraseRect(rect); } -// This internal function gets called as soon as a '|' is found in a text -// It will process the encountered code and set new font/set color -// We only support one-digit codes currently, don't know if multi-digit codes are possible -// Returns textcode character count +// This internal function gets called as soon as a '|' is found in a text. It +// will process the encountered code and set new font/set color. We only support +// one-digit codes currently, don't know if multi-digit codes are possible. +// Returns textcode character count. int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor) { const char *textCode = text; int16 textCodeSize = 0; @@ -133,9 +133,11 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1 static const uint16 text16_punctuationSjis[] = { 0x9F82, 0xA182, 0xA382, 0xA582, 0xA782, 0xC182, 0xA782, 0xC182, 0xE182, 0xE382, 0xE582, 0xEC82, 0x4083, 0x4283, 0x4483, 0x4683, 0x4883, 0x6283, 0x8383, 0x8583, 0x8783, 0x8E83, 0x9583, 0x9683, - 0x5B81, 0x4181, 0x4281, 0x7681, 0x7881, 0x4981, 0x4881, 0 }; + 0x5B81, 0x4181, 0x4281, 0x7681, 0x7881, 0x4981, 0x4881, 0 +}; -// return max # of chars to fit maxwidth with full words, does not include breaking space +// return max # of chars to fit maxwidth with full words, does not include +// breaking space int16 GfxText16::GetLongest(const char *text, int16 maxWidth, GuiResourceId orgFontId) { uint16 curChar = 0; int16 maxChars = 0, curCharCount = 0; @@ -195,9 +197,10 @@ int16 GfxText16::GetLongest(const char *text, int16 maxWidth, GuiResourceId orgF uint16 nextChar; - // we remove the last char only, if maxWidth was actually equal width before adding the last char - // otherwise we won't get the same cutting as in sierra pc98 sci - // note: changing the while() instead will NOT WORK. it would break all sorts of regular sci games + // We remove the last char only, if maxWidth was actually equal width + // before adding the last char. Otherwise we won't get the same cutting + // as in sierra pc98 sci. Note: changing the while() instead will NOT + // WORK. it would break all sorts of regular sci games. if (maxWidth == (width - _font->getCharWidth(curChar))) { maxChars--; if (curChar > 0xFF) @@ -431,11 +434,14 @@ void GfxText16::Box(const char *text, int16 bshow, const Common::Rect &rect, Tex _ports->penColor(orgPenColor); if (doubleByteMode) { - // kanji is written by pc98 rom to screen directly. Because of GetLongest() behaviour (not cutting off the last - // char, that causes a new line), results in the script thinking that the text would need less space. The coordinate - // adjustment in fontsjis.cpp handles the incorrect centering because of that and this code actually shows all of - // the chars - if we don't do this, the scripts will only show most of the chars, but the last few pixels won't get - // shown most of the time. + // Kanji is written by pc98 rom to screen directly. Because of + // GetLongest() behaviour (not cutting off the last char, that causes a + // new line), results in the script thinking that the text would need + // less space. The coordinate adjustment in fontsjis.cpp handles the + // incorrect centering because of that and this code actually shows all + // of the chars - if we don't do this, the scripts will only show most + // of the chars, but the last few pixels won't get shown most of the + // time. Common::Rect kanjiRect = rect; _ports->offsetRect(kanjiRect); kanjiRect.left &= 0xFFC; @@ -456,7 +462,8 @@ void GfxText16::Draw_String(const char *text) { _ports->penColor(orgPenColor); } -// Sierra did this in their PC98 interpreter only, they identify a text as being sjis and then switch to font 900 +// Sierra did this in their PC98 interpreter only, they identify a text as being +// sjis and then switch to font 900 bool GfxText16::SwitchToFont900OnSjis(const char *text) { byte firstChar = (*(const byte *)text++); if (((firstChar >= 0x81) && (firstChar <= 0x9F)) || ((firstChar >= 0xE0) && (firstChar <= 0xEF))) { 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