@@ -704,11 +704,11 @@ Phaser.TilemapLayerGL.prototype.renderRegion = function (scrollX, scrollY, left,
704704
705705 var index = tile . index ;
706706
707- if ( tile . alpha !== lastAlpha && ! this . debug )
708- {
709- //context.globalAlpha = tile.alpha;
710- lastAlpha = tile . alpha ;
711- }
707+ // if (tile.alpha !== lastAlpha && !this.debug)
708+ // {
709+ // //context.globalAlpha = tile.alpha;
710+ // lastAlpha = tile.alpha;
711+ // }
712712
713713 if ( tile . rotation || tile . flipped )
714714 {
@@ -721,12 +721,12 @@ Phaser.TilemapLayerGL.prototype.renderRegion = function (scrollX, scrollY, left,
721721 // context.scale(-1, 1);
722722 // }
723723
724- this . _mc . tileset . drawGl ( this . glBatch , - tile . centerX + offx , - tile . centerY + offy , index ) ;
724+ this . _mc . tileset . drawGl ( this . glBatch , - tile . centerX + offx , - tile . centerY + offy , index , tile . alpha ) ;
725725 //context.restore();
726726 }
727727 else
728728 {
729- this . _mc . tileset . drawGl ( this . glBatch , tx + offx , ty + offy , index ) ;
729+ this . _mc . tileset . drawGl ( this . glBatch , tx + offx , ty + offy , index , tile . alpha ) ;
730730 }
731731 // if (!this._mc.tileset && this.debugSettings.missingImageFill)
732732 // {
@@ -768,7 +768,7 @@ Phaser.TilemapLayerGL.prototype.renderFull = function () {
768768
769769 var left = Math . floor ( ( scrollX - ( cw - tw ) ) / tw ) ;
770770 var right = Math . floor ( ( renderW - 1 + scrollX ) / tw ) ;
771- var top = Math . floor ( scrollY - ( ch - th ) / th ) ;
771+ var top = Math . floor ( ( scrollY - ( ch - th ) ) / th ) ;
772772 var bottom = Math . floor ( ( renderH - 1 + scrollY ) / th ) ;
773773
774774 this . glBatch = [ ] ;
0 commit comments