aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/animate.cpp8
-rw-r--r--engines/sci/graphics/controls.cpp2
-rw-r--r--engines/sci/graphics/cursor.cpp6
-rw-r--r--engines/sci/graphics/gfx.cpp6
-rw-r--r--engines/sci/graphics/gui.cpp10
-rw-r--r--engines/sci/graphics/portrait.cpp2
-rw-r--r--engines/sci/graphics/screen.cpp2
-rw-r--r--engines/sci/graphics/view.cpp2
-rw-r--r--engines/sci/graphics/windowmgr.cpp26
9 files changed, 32 insertions, 32 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 6c1e350e36..dc008314de 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -211,7 +211,7 @@ void SciGuiAnimate::fill(byte &old_picNotValid) {
// Get the corresponding view
view = _gfx->getView(listEntry->viewId);
-
+
// adjust loop and cel, if any of those is invalid
if (listEntry->loopNo >= view->getLoopCount()) {
listEntry->loopNo = 0;
@@ -240,7 +240,7 @@ void SciGuiAnimate::fill(byte &old_picNotValid) {
listEntry->priority = _gfx->CoordinateToPriority(listEntry->y);
PUT_SEL32V(_s->_segMan, curObject, priority, listEntry->priority);
}
-
+
if (signal & kSignalNoUpdate) {
if (signal & (kSignalForceUpdate | kSignalViewUpdated)
|| (signal & kSignalHidden && !(signal & kSignalRemoveView))
@@ -311,7 +311,7 @@ void SciGuiAnimate::update() {
signal &= 0xFFFF ^ (kSignalStopUpdate | kSignalViewUpdated | kSignalNoUpdate | kSignalForceUpdate);
if ((signal & kSignalIgnoreActor) == 0) {
rect = listEntry->celRect;
- rect.top = CLIP<int16>(_gfx->PriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
+ rect.top = CLIP<int16>(_gfx->PriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
_gfx->FillRect(rect, SCI_SCREEN_MASK_CONTROL, 0, 0, 15);
}
listEntry->signal = signal;
@@ -356,7 +356,7 @@ void SciGuiAnimate::update() {
if ((signal & kSignalIgnoreActor) == 0) {
rect = listEntry->celRect;
- rect.top = CLIP<int16>(_gfx->PriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
+ rect.top = CLIP<int16>(_gfx->PriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
_gfx->FillRect(rect, SCI_SCREEN_MASK_CONTROL, 0, 0, 15);
}
}
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index 7b930ba19f..a3c729d84d 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -192,7 +192,7 @@ void Controls::TexteditChange(reg_t controlObject, reg_t eventObject) {
if (eventKey > 31 && eventKey < 256 && textSize < maxChars) {
// insert pressed character
// we check, if there is space left for this character
-
+
text.insertChar(eventKey, cursorPos++);
textChanged = true;
}
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 785c235e42..e0e5a8893e 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -91,7 +91,7 @@ void Cursor::setShape(GuiResourceId resourceId) {
delete[] rawBitmap;
return;
}
-
+
// Load cursor resource...
resource = _resMan->findResource(ResourceId(kResourceTypeCursor, resourceId), false);
if (!resource)
@@ -112,7 +112,7 @@ void Cursor::setShape(GuiResourceId resourceId) {
colorMapping[1] = _screen->getColorWhite(); // White is also hardcoded
colorMapping[2] = SCI_CURSOR_SCI0_TRANSPARENCYCOLOR;
colorMapping[3] = _palette->matchColor(&_palette->_sysPalette, 170, 170, 170); // Grey
-
+
// Seek to actual data
resourceData += 4;
@@ -190,7 +190,7 @@ void Cursor::setPosition(Common::Point pos) {
Common::Point Cursor::getPosition() {
Common::Point mousePos = g_system->getEventManager()->getMousePos();
-
+
if (_upscaledHires) {
mousePos.x /= 2;
mousePos.y /= 2;
diff --git a/engines/sci/graphics/gfx.cpp b/engines/sci/graphics/gfx.cpp
index c230371b42..018ec1fad9 100644
--- a/engines/sci/graphics/gfx.cpp
+++ b/engines/sci/graphics/gfx.cpp
@@ -352,7 +352,7 @@ void Gfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredF
void Gfx::drawCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) {
View *view = getView(viewId);
Common::Rect celRect;
-
+
if (view) {
celRect.left = leftPos;
celRect.top = topPos;
@@ -400,7 +400,7 @@ void Gfx::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, u
Common::Rect celRect, curPortRect, clipRect, clipRectTranslated;
Common::Point curPortPos;
bool upscaledHiresHack = false;
-
+
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
@@ -542,7 +542,7 @@ void Gfx::PriorityBandsRecall() {
}
byte Gfx::CoordinateToPriority(int16 y) {
- if (y < _priorityTop)
+ if (y < _priorityTop)
return _priorityBands[_priorityTop];
if (y > _priorityBottom)
return _priorityBands[_priorityBottom];
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index 38e30ff150..2f8b278534 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -829,7 +829,7 @@ Common::Point SciGui::getCursorPos() {
void SciGui::moveCursor(Common::Point pos) {
pos.y += _windowMgr->_picWind->rect.top;
pos.x += _windowMgr->_picWind->rect.left;
-
+
pos.y = CLIP<int16>(pos.y, _windowMgr->_picWind->rect.top, _windowMgr->_picWind->rect.bottom - 1);
pos.x = CLIP<int16>(pos.x, _windowMgr->_picWind->rect.left, _windowMgr->_picWind->rect.right - 1);
@@ -963,7 +963,7 @@ void SciGui::frameOut() {
if (priority == -1)
continue;
-
+
// FIXME: This code doesn't currently work properly because of the way we set up the
// view port. We are starting at 10 pixels from the top automatically. The offset should
// be based on the plane's top in SCI32 instead. Here we would be adding 10 to 10 and
@@ -989,16 +989,16 @@ void SciGui::frameOut() {
//topPos += planeTop;
// Theoretically, leftPos and topPos should be sane
- // Apparently, sometimes they're not, therefore I'm adding some sanity checks here so that
+ // Apparently, sometimes they're not, therefore I'm adding some sanity checks here so that
// the hack underneath does not try and draw cels outside the screen coordinates
if (leftPos >= _screen->getWidth()) {
continue;
}
-
+
if (topPos >= _screen->getHeight()) {
continue;
}
-
+
if (viewId != 0xffff)
drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, 0);
}
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index 0d591c3fa1..81e4dfa15a 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -68,7 +68,7 @@ void Portrait::init() {
// height * width bitmap data
// another animation count times bitmap header and data
int32 fileSize = 0;
- Common::SeekableReadStream *file =
+ Common::SeekableReadStream *file =
SearchMan.createReadStreamForMember("actors/" + _resourceName + ".bin");
if (!file) {
file = SearchMan.createReadStreamForMember(_resourceName + ".bin");
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index c1cdf82139..07ee3c4639 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -33,7 +33,7 @@
namespace Sci {
-Screen::Screen(ResourceManager *resMan, int16 width, int16 height, bool upscaledHires) :
+Screen::Screen(ResourceManager *resMan, int16 width, int16 height, bool upscaledHires) :
_resMan(resMan), _width(width), _height(height), _upscaledHires(upscaledHires) {
_pixels = _width * _height;
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 7552b11e96..aab44df0d3 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -86,7 +86,7 @@ void View::initData(GuiResourceId resourceId) {
case kViewAmiga: // View-format Amiga (32 colors)
case kViewVga: // View-format SCI1
// LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD...
-
+
_loopCount = _resourceData[0];
// bit 0x8000 of _resourceData[1] means palette is set
if (_resourceData[1] & 0x40)
diff --git a/engines/sci/graphics/windowmgr.cpp b/engines/sci/graphics/windowmgr.cpp
index 08dfdffc39..374efb2b30 100644
--- a/engines/sci/graphics/windowmgr.cpp
+++ b/engines/sci/graphics/windowmgr.cpp
@@ -143,17 +143,17 @@ Window *WindowMgr::NewWindow(const Common::Rect &dims, const Common::Rect *resto
pwnd->rect = dims;
if (restoreRect)
pwnd->restoreRect = *restoreRect;
-
+
pwnd->wndStyle = style;
pwnd->hSaved1 = pwnd->hSaved2 = NULL_REG;
pwnd->bDrawn = false;
if ((style & SCI_WINDOWMGR_STYLE_TRANSPARENT) == 0)
pwnd->saveScreenMask = (priority == -1 ? SCI_SCREEN_MASK_VISUAL : SCI_SCREEN_MASK_VISUAL | SCI_SCREEN_MASK_PRIORITY);
-
+
if (title && (style & SCI_WINDOWMGR_STYLE_TITLE)) {
pwnd->title = title;
}
-
+
r = dims;
if ((style != SCI_WINDOWMGR_STYLE_USER) && !(style & SCI_WINDOWMGR_STYLE_NOFRAME)) {
r.grow(1);
@@ -165,23 +165,23 @@ Window *WindowMgr::NewWindow(const Common::Rect &dims, const Common::Rect *resto
// FIXME: it seems as if shadows may result in the window getting moved one upwards
// so that the shadow is visible (lsl5)
-
+
pwnd->dims = r;
const Common::Rect *wmprect = &_wmgrPort->rect;
int16 oldtop = pwnd->dims.top;
int16 oldleft = pwnd->dims.left;
if (wmprect->top > pwnd->dims.top)
pwnd->dims.moveTo(pwnd->dims.left, wmprect->top);
-
+
if (wmprect->bottom < pwnd->dims.bottom)
pwnd->dims.moveTo(pwnd->dims.left, wmprect->bottom - pwnd->dims.bottom + pwnd->dims.top);
-
+
if (wmprect->right < pwnd->dims.right)
pwnd->dims.moveTo(wmprect->right + pwnd->dims.left - pwnd->dims.right, pwnd->dims.top);
-
+
if (wmprect->left > pwnd->dims.left)
pwnd->dims.moveTo(wmprect->left, pwnd->dims.top);
-
+
pwnd->rect.moveTo(pwnd->rect.left + pwnd->dims.left - oldleft, pwnd->rect.top + pwnd->dims.top - oldtop);
if (restoreRect == 0)
pwnd->restoreRect = pwnd->dims;
@@ -192,7 +192,7 @@ Window *WindowMgr::NewWindow(const Common::Rect &dims, const Common::Rect *resto
pwnd->restoreRect.bottom++;
pwnd->restoreRect.right++;
}
-
+
if (draw)
DrawWindow(pwnd);
_gfx->SetPort((Port *)pwnd);
@@ -218,7 +218,7 @@ void WindowMgr::DrawWindow(Window *pWnd) {
_gfx->FillRect(pWnd->restoreRect, SCI_SCREEN_MASK_PRIORITY, 0, 15);
}
}
-
+
// drawing frame,shadow and title
if (!(wndStyle & SCI_WINDOWMGR_STYLE_USER)) {
r = pWnd->dims;
@@ -241,14 +241,14 @@ void WindowMgr::DrawWindow(Window *pWnd) {
_text->Box(pWnd->title.c_str(), 1, r, SCI_TEXT_ALIGNMENT_CENTER, 0);
_gfx->PenColor(oldcolor);
}
-
+
r = pWnd->dims;
r.top += 9;
}
-
+
r.grow(-1);
}
-
+
if (!(wndStyle & SCI_WINDOWMGR_STYLE_TRANSPARENT))
_gfx->FillRect(r, SCI_SCREEN_MASK_VISUAL, pWnd->backClr);