Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
This commit is contained in:
committed by
RoosterDragon
parent
ff16690b86
commit
a6f5a21ed4
@@ -43,7 +43,7 @@ namespace OpenRA.Graphics
|
||||
public static void FastCopyIntoChannel(Sprite dest, byte[] src) { FastCopyIntoChannel(dest, 0, src); }
|
||||
public static void FastCopyIntoChannel(Sprite dest, int channelOffset, byte[] src)
|
||||
{
|
||||
var data = dest.sheet.Data;
|
||||
var data = dest.sheet.GetData();
|
||||
var srcStride = dest.bounds.Width;
|
||||
var destStride = dest.sheet.Size.Width * 4;
|
||||
var destOffset = destStride * dest.bounds.Top + dest.bounds.Left * 4 + channelMasks[(int)dest.channel + channelOffset];
|
||||
@@ -64,7 +64,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
public static void FastCopyIntoSprite(Sprite dest, Bitmap src)
|
||||
{
|
||||
var data = dest.sheet.Data;
|
||||
var data = dest.sheet.GetData();
|
||||
var dataStride = dest.sheet.Size.Width * 4;
|
||||
var x = dest.bounds.Left * 4;
|
||||
var width = dest.bounds.Width * 4;
|
||||
|
||||
Reference in New Issue
Block a user