TINYGL: Reodered member variables and initialization in BlitImage.
This commit is contained in:
parent
a59c1de0ff
commit
0e4c062f3a
1 changed files with 6 additions and 11 deletions
|
@ -14,9 +14,7 @@ Common::Rect rotateRectangle(int x, int y, int width, int height, int rotation,
|
||||||
|
|
||||||
struct BlitImage {
|
struct BlitImage {
|
||||||
public:
|
public:
|
||||||
BlitImage() : _isDisposed(false), _version(0) { }
|
BlitImage() : _isDisposed(false), _version(0), _binaryTransparent(false) { }
|
||||||
|
|
||||||
bool _isDisposed;
|
|
||||||
|
|
||||||
void loadData(const Graphics::Surface &surface, uint32 colorKey, bool applyColorKey) {
|
void loadData(const Graphics::Surface &surface, uint32 colorKey, bool applyColorKey) {
|
||||||
Graphics::PixelFormat textureFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
|
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.
|
Graphics::PixelBuffer _buf; // This is needed for the conversion.
|
||||||
|
|
||||||
Line() { }
|
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) {
|
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;
|
_x(x), _y(y), _length(length) {
|
||||||
_y = y;
|
|
||||||
_length = length;
|
|
||||||
// Performing texture to screen conversion.
|
// Performing texture to screen conversion.
|
||||||
Graphics::PixelFormat textureFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
|
Graphics::PixelFormat textureFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
|
||||||
Graphics::PixelBuffer srcBuf(textureFormat, pixels);
|
Graphics::PixelBuffer srcBuf(textureFormat, pixels);
|
||||||
|
@ -94,10 +90,8 @@ public:
|
||||||
_pixels = _buf.getRawBuffer();
|
_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) {
|
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;
|
_x(other._x), _y(other._y), _length(other._length){
|
||||||
_y = other._y;
|
|
||||||
_length = other._length;
|
|
||||||
_buf.copyBuffer(0, 0, _length, other._buf);
|
_buf.copyBuffer(0, 0, _length, other._buf);
|
||||||
_pixels = _buf.getRawBuffer();
|
_pixels = _buf.getRawBuffer();
|
||||||
}
|
}
|
||||||
|
@ -215,6 +209,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _isDisposed;
|
||||||
bool _binaryTransparent;
|
bool _binaryTransparent;
|
||||||
Common::Array<Line> _lines;
|
Common::Array<Line> _lines;
|
||||||
Graphics::Surface _surface;
|
Graphics::Surface _surface;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue