Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PrepareDrawnEntityDrawing()

void Terraria.Main.PrepareDrawnEntityDrawing ( Entity entity,
int intendedShader,
Matrix? overrideMatrix )
inline

Definition at line 34634 of file Main.cs.

34635 {
34636 CurrentDrawnEntity = entity;
34637 Matrix transformMatrix = Transform;
34638 if (overrideMatrix.HasValue)
34639 {
34640 transformMatrix = overrideMatrix.Value;
34641 }
34642 if (intendedShader != 0)
34643 {
34645 {
34646 spriteBatch.End();
34647 spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, DefaultSamplerState, DepthStencilState.None, base.GraphicsDevice.RasterizerState, null, transformMatrix);
34648 }
34649 }
34651 {
34652 spriteBatch.End();
34653 spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, DefaultSamplerState, DepthStencilState.None, base.GraphicsDevice.RasterizerState, null, transformMatrix);
34654 }
34656 }
static readonly BlendState AlphaBlend
Definition BlendState.cs:36
static SpriteBatch spriteBatch
Definition Main.cs:974
static Matrix Transform
Definition Main.cs:2771
static int CurrentDrawnEntityShader
Definition Main.cs:219
static Entity CurrentDrawnEntity
Definition Main.cs:221
static SamplerState DefaultSamplerState
Definition Main.cs:2814

References Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend, Terraria.Main.CurrentDrawnEntity, Terraria.Main.CurrentDrawnEntityShader, Terraria.Main.DefaultSamplerState, Microsoft.Xna.Framework.Graphics.DepthStencilState.None, Terraria.Main.spriteBatch, and Terraria.Main.Transform.

Referenced by Terraria.Main.PrepareDrawnProjectileDrawing().