diff options
10 files changed, 65 insertions, 65 deletions
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index 38eebb067b..b3f5cb8385 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -235,7 +235,7 @@ const char* BaseSubFrame::getSurfaceFilename() { ////////////////////////////////////////////////////////////////////// bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, TSpriteBlendMode blendMode) { - + rotate = fmod(rotate, 360.0f); if (rotate < 0) { rotate += 360.0f; @@ -271,7 +271,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl TransformStruct transform = TransformStruct(zoomX, zoomY, (uint32)rotate, _hotspotX, _hotspotY, blendMode, alpha, _mirrorX, _mirrorY, 0, 0); Rect32 newRect = TransformTools::newRect (oldRect, transform, &newHotspot); newOrigin = origin - newHotspot; - res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform); + res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform); } else { if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) { res = _surface->displayTrans(x - _hotspotX, y - _hotspotY, getRect(), alpha, blendMode, _mirrorX, _mirrorY); diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp index f8eb40d42a..ae4f0a9e31 100644 --- a/engines/wintermute/base/font/base_font_truetype.cpp +++ b/engines/wintermute/base/font/base_font_truetype.cpp @@ -297,7 +297,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width, uint8 a, r, g, b; format.colorToRGB(*pixels, r, g, b); a = r; - *pixels++ = format.ARGBToColor(a, r, g, b); + *pixels++ = format.ARGBToColor(a, r, g, b); } } diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 35918b8e90..e25b9ab8d8 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -268,7 +268,7 @@ Graphics::PixelFormat BaseRenderOSystem::getPixelFormat() const { return _renderSurface->format; } -void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform) { +void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, TransformStruct &transform) { if (_disableDirtyRects) { RenderTicket *ticket = new RenderTicket(owner, surf, srcRect, dstRect, transform); diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index cbc32387e1..bcf2a7752f 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -341,7 +341,7 @@ bool BaseSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode ble ////////////////////////////////////////////////////////////////////////// bool BaseSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) { _rotation = 0; - return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY)); + return drawSprite(x, y, &rect, nullptr, TransformStruct(kDefaultZoomX, kDefaultZoomY, blendMode, alpha, mirrorX, mirrorY)); } ////////////////////////////////////////////////////////////////////////// @@ -441,7 +441,7 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, transform._alphaDisable = true; } - renderer->drawSurface(this, _surface, &srcRect, &position, transform); + renderer->drawSurface(this, _surface, &srcRect, &position, transform); return STATUS_OK; } diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp index 1cd35e3b04..3836cff02e 100644 --- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp +++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp @@ -86,9 +86,9 @@ RenderTicket::~RenderTicket() { bool RenderTicket::operator==(const RenderTicket &t) const { if ((t._owner != _owner) || - (t._transform != _transform) || + (t._transform != _transform) || (t._dstRect != _dstRect) || - (t._srcRect != _srcRect) + (t._srcRect != _srcRect) ) { return false; } diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h index e824c09fe7..f719465be4 100644 --- a/engines/wintermute/base/gfx/osystem/render_ticket.h +++ b/engines/wintermute/base/gfx/osystem/render_ticket.h @@ -41,17 +41,17 @@ class BaseSurfaceOSystem; * A render ticket is a collection of the data and draw specifications made * for a single draw-call in the OSystem-backend for WME. The ticket additionally * holds the order in which this call was made, so that it can be detected if - * the same call is done in the following frame. Thus allowing us to potentially - * skip drawing the same region again, unless anything has changed. Since a surface - * can have a potentially large amount of draw-calls made to it, at varying rotation, - * zoom, and crop-levels we also need to hold a copy of the necessary data. - * (Video-surfaces may even change their data). The promise that is made when a ticket - * is created is that what the state was of the surface at THAT point, is what will end + * the same call is done in the following frame. Thus allowing us to potentially + * skip drawing the same region again, unless anything has changed. Since a surface + * can have a potentially large amount of draw-calls made to it, at varying rotation, + * zoom, and crop-levels we also need to hold a copy of the necessary data. + * (Video-surfaces may even change their data). The promise that is made when a ticket + * is created is that what the state was of the surface at THAT point, is what will end * up on screen at flip() time. */ class RenderTicket { public: - RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, TransformStruct transform); + RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, TransformStruct transform); RenderTicket() : _isValid(true), _wantsDraw(false), _transform(TransformStruct()) {} ~RenderTicket(); const Graphics::Surface *getSurface() const { return _surface; } @@ -65,8 +65,8 @@ public: bool _isValid; bool _wantsDraw; - TransformStruct _transform; - + TransformStruct _transform; + BaseSurfaceOSystem *_owner; bool operator==(const RenderTicket &a) const; const Common::Rect *getSrcRect() const { return &_srcRect; } diff --git a/engines/wintermute/graphics/transform_struct.cpp b/engines/wintermute/graphics/transform_struct.cpp index 822c06f42f..aa440e55ac 100644 --- a/engines/wintermute/graphics/transform_struct.cpp +++ b/engines/wintermute/graphics/transform_struct.cpp @@ -40,47 +40,47 @@ void TransformStruct::init(Point32 zoom, uint32 angle, Point32 hotspot, bool alp } TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) { - init(Point32(zoomX, zoomY), - angle, - Point32(hotspotX, hotspotY), - false, - blendMode, - rgbaMod, - mirrorX, mirrorY, + init(Point32(zoomX, zoomY), + angle, + Point32(hotspotX, hotspotY), + false, + blendMode, + rgbaMod, + mirrorX, mirrorY, Point32(offsetX, offsetY)); } TransformStruct::TransformStruct(float zoomX, float zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) { - init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX), - (int32)(zoomY / 100.0 * kDefaultZoomY)), - angle, - Point32(hotspotX, hotspotY), - false, - blendMode, - rgbaMod, - mirrorX, mirrorY, + init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX), + (int32)(zoomY / 100.0 * kDefaultZoomY)), + angle, + Point32(hotspotX, hotspotY), + false, + blendMode, + rgbaMod, + mirrorX, mirrorY, Point32(offsetX, offsetY)); } TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY) { - init(Point32(zoomX, zoomY), - kDefaultAngle, - Point32(kDefaultHotspotX, kDefaultHotspotY), - false, - blendMode, - rgbaMod, - mirrorX, - mirrorY, + init(Point32(zoomX, zoomY), + kDefaultAngle, + Point32(kDefaultHotspotX, kDefaultHotspotY), + false, + blendMode, + rgbaMod, + mirrorX, + mirrorY, Point32(kDefaultOffsetX, kDefaultOffsetY)); } TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY) { - init(Point32(zoomX, zoomY), - angle, - Point32(hotspotX, hotspotY), - true, - BLEND_NORMAL, - kDefaultRgbaMod, + init(Point32(zoomX, zoomY), + angle, + Point32(hotspotX, hotspotY), + true, + BLEND_NORMAL, + kDefaultRgbaMod, false, false, Point32(kDefaultOffsetX, kDefaultOffsetY)); } @@ -99,13 +99,13 @@ TransformStruct::TransformStruct(int32 numTimesX, int32 numTimesY) { } TransformStruct::TransformStruct() { - init(Point32(kDefaultZoomX, kDefaultZoomY), - kDefaultAngle, - Point32(kDefaultHotspotX, kDefaultHotspotY), - true, - BLEND_NORMAL, - kDefaultRgbaMod, - false, false, + init(Point32(kDefaultZoomX, kDefaultZoomY), + kDefaultAngle, + Point32(kDefaultHotspotX, kDefaultHotspotY), + true, + BLEND_NORMAL, + kDefaultRgbaMod, + false, false, Point32(kDefaultOffsetX, kDefaultOffsetY)); } diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp index 79722439bd..e8628ef6a6 100644 --- a/engines/wintermute/graphics/transparent_surface.cpp +++ b/engines/wintermute/graphics/transparent_surface.cpp @@ -356,7 +356,7 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32 * @color colormod in 0xAARRGGBB format - 0xFFFFFFFF for no colormod */ -template<class Blender> +template<class Blender> void doBlit(byte *ino, byte *outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep, uint32 color) { Blender b; byte *in; @@ -769,7 +769,7 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight) assert(sax && say); /* - * Precalculate row increments + * Precalculate row increments */ int spixelw = (srcW - 1); int spixelh = (srcH - 1); @@ -789,8 +789,8 @@ TransparentSurface *TransparentSurface::scale(uint16 newWidth, uint16 newHeight) csx += sx; /* Guard from overflows */ - if (csx > ssx) { - csx = ssx; + if (csx > ssx) { + csx = ssx; } } diff --git a/engines/wintermute/graphics/transparent_surface.h b/engines/wintermute/graphics/transparent_surface.h index 1f3827d1a9..51a3dfe4cc 100644 --- a/engines/wintermute/graphics/transparent_surface.h +++ b/engines/wintermute/graphics/transparent_surface.h @@ -131,13 +131,13 @@ struct TransparentSurface : public Graphics::Surface { int width = -1, int height = -1, TSpriteBlendMode blend = BLEND_NORMAL); void applyColorKey(uint8 r, uint8 g, uint8 b, bool overwriteAlpha = false); - + /** * @brief Scale function; this returns a transformed version of this surface after rotation and * scaling. Please do not use this if angle != 0, use rotoscale. * * @param newWidth the resulting width. - * @param newHeight the resulting height. + * @param newHeight the resulting height. * @see TransformStruct */ TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const; @@ -147,7 +147,7 @@ struct TransparentSurface : public Graphics::Surface { * scaling. Please do not use this if angle == 0, use plain old scaling function. * * @param transform a TransformStruct wrapping the required info. @see TransformStruct - * + * */ TransparentSurface *rotoscale(const TransformStruct &transform) const; AlphaType getAlphaMode() const; diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk index 95f9ba2ffb..19fb3d6717 100644 --- a/engines/wintermute/module.mk +++ b/engines/wintermute/module.mk @@ -1,5 +1,5 @@ MODULE := engines/wintermute - + MODULE_OBJS := \ ad/ad_actor.o \ ad/ad_entity.o \ @@ -116,14 +116,14 @@ MODULE_OBJS := \ debugger.o \ wintermute.o \ persistent.o - + MODULE_DIRS += \ engines/wintermute - + # This module can be built as a plugin ifeq ($(ENABLE_WINTERMUTE), DYNAMIC_PLUGIN) PLUGIN := 1 endif - -# Include common rules + +# Include common rules include $(srcdir)/rules.mk |