From 0e4c062f3a55dda7568dc76c37f40440070ef366 Mon Sep 17 00:00:00 2001 From: Stefano Musumeci Date: Sun, 10 Aug 2014 19:34:47 +0200 Subject: [PATCH] TINYGL: Reodered member variables and initialization in BlitImage. --- graphics/tinygl/zblit.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/graphics/tinygl/zblit.cpp b/graphics/tinygl/zblit.cpp index e4f32244f0b..a04ceac253f 100644 --- a/graphics/tinygl/zblit.cpp +++ b/graphics/tinygl/zblit.cpp @@ -14,9 +14,7 @@ Common::Rect rotateRectangle(int x, int y, int width, int height, int rotation, struct BlitImage { public: - BlitImage() : _isDisposed(false), _version(0) { } - - bool _isDisposed; + BlitImage() : _isDisposed(false), _version(0), _binaryTransparent(false) { } void loadData(const Graphics::Surface &surface, uint32 colorKey, bool applyColorKey) { Graphics::PixelFormat textureFormat(4, 8, 8, 8, 8, 0, 8, 16, 24); @@ -83,10 +81,8 @@ public: Graphics::PixelBuffer _buf; // This is needed for the conversion. Line() { } - Line(int x, int y, int length, byte *pixels) : _buf(TinyGL::gl_get_context()->fb->cmode, length * TinyGL::gl_get_context()->fb->cmode.bytesPerPixel, DisposeAfterUse::NO) { - _x = x; - _y = y; - _length = length; + Line(int x, int y, int length, byte *pixels) : _buf(TinyGL::gl_get_context()->fb->cmode, length * TinyGL::gl_get_context()->fb->cmode.bytesPerPixel, DisposeAfterUse::NO), + _x(x), _y(y), _length(length) { // Performing texture to screen conversion. Graphics::PixelFormat textureFormat(4, 8, 8, 8, 8, 0, 8, 16, 24); Graphics::PixelBuffer srcBuf(textureFormat, pixels); @@ -94,10 +90,8 @@ public: _pixels = _buf.getRawBuffer(); } - Line(const Line& other) : _buf(TinyGL::gl_get_context()->fb->cmode, other._length * TinyGL::gl_get_context()->fb->cmode.bytesPerPixel, DisposeAfterUse::NO) { - _x = other._x; - _y = other._y; - _length = other._length; + Line(const Line& other) : _buf(TinyGL::gl_get_context()->fb->cmode, other._length * TinyGL::gl_get_context()->fb->cmode.bytesPerPixel, DisposeAfterUse::NO), + _x(other._x), _y(other._y), _length(other._length){ _buf.copyBuffer(0, 0, _length, other._buf); _pixels = _buf.getRawBuffer(); } @@ -215,6 +209,7 @@ public: } } + bool _isDisposed; bool _binaryTransparent; Common::Array _lines; Graphics::Surface _surface;