mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
Fixed issue with blitter batch incorrect instruction order and forced unsigned int result for color tint operation
This commit is contained in:
parent
40262eb0cb
commit
5ca2805dbc
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
var ub = ((b * 255.0)|0) & 0xFF;
|
var ub = ((b * 255.0)|0) & 0xFF;
|
||||||
var ua = ((a * 255.0)|0) & 0xFF;
|
var ua = ((a * 255.0)|0) & 0xFF;
|
||||||
|
|
||||||
return (ua << 24) | (ub << 16) | (ug << 8) | ur;
|
return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTintAppendFloatAlpha: function (rgb, a)
|
getTintAppendFloatAlpha: function (rgb, a)
|
||||||
|
@ -17,7 +17,7 @@ module.exports = {
|
||||||
var ub = (rgb|0) & 0xff;
|
var ub = (rgb|0) & 0xff;
|
||||||
var ua = ((a * 255.0)|0) & 0xFF;
|
var ua = ((a * 255.0)|0) & 0xFF;
|
||||||
|
|
||||||
return (ua << 24) | (ub << 16) | (ug << 8) | ur;
|
return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
|
@ -117,10 +117,10 @@ var BlitterBatch = new Class({
|
||||||
var uvs = frame.uvs;
|
var uvs = frame.uvs;
|
||||||
var flipX = bob.flipX;
|
var flipX = bob.flipX;
|
||||||
var flipY = bob.flipY;
|
var flipY = bob.flipY;
|
||||||
var x = bob.x + frame.x - cameraScrollX + (width * (flipX ? 1.0 : 0.0));
|
|
||||||
var y = bob.y + frame.y - cameraScrollY + (height * (flipY ? 1.0 : 0.0));
|
|
||||||
var width = frame.width * (flipX ? -1.0 : 1.0);
|
var width = frame.width * (flipX ? -1.0 : 1.0);
|
||||||
var height = frame.height * (flipY ? -1.0 : 1.0);
|
var height = frame.height * (flipY ? -1.0 : 1.0);
|
||||||
|
var x = bob.x + frame.x - cameraScrollX + (width * ((flipX) ? 1.0 : 0.0));
|
||||||
|
var y = bob.y + frame.y - cameraScrollY + (height * ((flipY) ? 1.0 : 0.0));
|
||||||
var xw = x + width;
|
var xw = x + width;
|
||||||
var yh = y + height;
|
var yh = y + height;
|
||||||
var tx = x * a + y * c + e;
|
var tx = x * a + y * c + e;
|
||||||
|
|
Loading…
Reference in a new issue