protected void DrawGhost(Player drawPlayer)
{
SpriteEffects none = SpriteEffects.None;
if (drawPlayer.direction == 1)
{
none = SpriteEffects.None;
}
else
{
none = SpriteEffects.FlipHorizontally;
}
Color immuneAlpha = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, ((int)(drawPlayer.position.Y + (drawPlayer.height * 0.5))) / 0x10, new Color((mouseTextColor / 2) + 100, (mouseTextColor / 2) + 100, (mouseTextColor / 2) + 100, (mouseTextColor / 2) + 100)));
Rectangle rectangle = new Rectangle(0, (ghostTexture.Height / 4) * drawPlayer.ghostFrame, ghostTexture.Width, ghostTexture.Height / 4);
Vector2 origin = new Vector2(rectangle.Width * 0.5f, rectangle.Height * 0.5f);
this.spriteBatch.Draw(ghostTexture, new Vector2((float)(((int)(drawPlayer.position.X - screenPosition.X)) + (rectangle.Width / 2)), (float)(((int)(drawPlayer.position.Y - screenPosition.Y)) + (rectangle.Height / 2))), new Rectangle?(rectangle), immuneAlpha, 0f, origin, (float)1f, none, 0f);
}