Terraria ModLoader  0.11.5
A framework for Terraria mods
DrawInfo.cs
Go to the documentation of this file.
1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
3 
4 namespace Terraria.ModLoader
5 {
9  public struct PlayerDrawInfo
10  {
14  public Player drawPlayer;
18  public Vector2 position;
22  public float shadow;
26  public Vector2 itemLocation;
30  public bool drawHands;
34  public bool drawArms;
42  public bool drawHair;
46  public bool drawAltHair;
50  public int hairShader;
54  public int headArmorShader;
58  public int bodyArmorShader;
62  public int legArmorShader;
66  public int handOnShader;
70  public int handOffShader;
74  public int backShader;
78  public int frontShader;
82  public int shoeShader;
86  public int waistShader;
90  public int shieldShader;
94  public int neckShader;
98  public int faceShader;
102  public int balloonShader;
106  public int wingShader;
110  public int carpetShader;
114  public Color hairColor;
118  public Color eyeWhiteColor;
122  public Color eyeColor;
126  public Color faceColor;
130  public Color bodyColor;
134  public Color legColor;
138  public Color shirtColor;
142  public Color underShirtColor;
146  public Color pantsColor;
150  public Color shoeColor;
154  public Color upperArmorColor;
158  public Color middleArmorColor;
162  public Color mountColor;
166  public Color lowerArmorColor;
170  public int headGlowMask;
174  public int bodyGlowMask;
178  public int armGlowMask;
182  public int legGlowMask;
186  public Color headGlowMaskColor;
190  public Color bodyGlowMaskColor;
194  public Color armGlowMaskColor;
198  public Color legGlowMaskColor;
202  public SpriteEffects spriteEffects;
206  public Vector2 headOrigin;
210  public Vector2 bodyOrigin;
214  public Vector2 legOrigin;
215  }
216 
220  public struct PlayerHeadDrawInfo
221  {
225  public SpriteBatch spriteBatch;
229  public Player drawPlayer;
233  public float alpha;
237  public float scale;
241  public short hairShader;
245  public int armorShader;
249  public Color eyeWhiteColor;
253  public Color eyeColor;
257  public Color hairColor;
261  public Color skinColor;
265  public Color armorColor;
269  public SpriteEffects spriteEffects;
273  public Vector2 drawOrigin;
277  public bool drawHair;
281  public bool drawAltHair;
282  }
283 }
bool drawHeldProjInFrontOfHeldItemAndBody
Whether or not the held projectile is drawn in front of or behind the held item and arms...
Definition: DrawInfo.cs:38
A struct that contains information that may help with PlayerHeadLayer drawing.
Definition: DrawInfo.cs:220
Color skinColor
The color of the player's skin. Alpha has already been taken into account.
Definition: DrawInfo.cs:261
Vector2 headOrigin
The point around which the player's head texture rotates.
Definition: DrawInfo.cs:206
int frontShader
The ID of the shader (dye) on the player's front accessory.
Definition: DrawInfo.cs:78
int handOnShader
The ID of the shader (dye) on the player's hand on accessory.
Definition: DrawInfo.cs:66
int backShader
The ID of the shader (dye) on the player's back accessory.
Definition: DrawInfo.cs:74
int handOffShader
The ID of the shader (dye) on the player's hand off accessory.
Definition: DrawInfo.cs:70
int shieldShader
The ID of the shader (dye) on the player's shield accessory.
Definition: DrawInfo.cs:90
Vector2 drawOrigin
The point on the player's texture around which everything should be rotated.
Definition: DrawInfo.cs:273
bool drawHair
Whether the player's hair texture should be drawn.
Definition: DrawInfo.cs:277
Player drawPlayer
The player whose head is being drawn.
Definition: DrawInfo.cs:229
bool drawAltHair
Whether or not the player's alternate (hat) hair is drawn.
Definition: DrawInfo.cs:46
int armorShader
The ID of the shader (dye) on the player's head armor.
Definition: DrawInfo.cs:245
int waistShader
The ID of the shader (dye) on the player's waist accessory.
Definition: DrawInfo.cs:86
Color legGlowMaskColor
The color of the glow-mask on the player's legs.
Definition: DrawInfo.cs:198
A struct that contains information that may help with PlayerLayer drawing.
Definition: DrawInfo.cs:9
int neckShader
The ID of the shader (dye) on the player's neck accessory.
Definition: DrawInfo.cs:94
int bodyArmorShader
The ID of the shader (dye) on the player's body armor.
Definition: DrawInfo.cs:58
int carpetShader
The ID of the shader (dye) on the player's magic carpet.
Definition: DrawInfo.cs:110
Color eyeColor
The color of the player's eyes. Alpha has already been taken into account.
Definition: DrawInfo.cs:253
Color pantsColor
The color of the player's pants, with lighting and transparency taken into account.
Definition: DrawInfo.cs:146
SpriteBatch spriteBatch
The SpriteBatch object that should be used to do all the drawing. This is the same as Main...
Definition: DrawInfo.cs:225
Color eyeColor
The color of the player's eyes, with lighting and transparency taken into account.
Definition: DrawInfo.cs:122
float shadow
The transparency of the player, where 0f is fully opaque and 1f is fully transparent.
Definition: DrawInfo.cs:22
Color underShirtColor
The color of the player's under-shirt, with lighting and transparency taken into account.
Definition: DrawInfo.cs:142
float alpha
The transparency in which the player should be drawn. 0 means fully transparent, while 1 means fully ...
Definition: DrawInfo.cs:233
Color legColor
The color of the player's leg skin, with lighting and transparency taken into account.
Definition: DrawInfo.cs:134
int bodyGlowMask
The ID of the glow-mask on the player's body.
Definition: DrawInfo.cs:174
int hairShader
The ID of the shader (dye) on the player's hair.
Definition: DrawInfo.cs:50
Color faceColor
The color of the player's face, with lighting and transparency taken into account.
Definition: DrawInfo.cs:126
int legArmorShader
The ID of the shader (dye) on the player's leg armor.
Definition: DrawInfo.cs:62
Vector2 bodyOrigin
The point around which the player's body texture rotates.
Definition: DrawInfo.cs:210
Player drawPlayer
The player that is being drawn.
Definition: DrawInfo.cs:14
Vector2 itemLocation
Similar to Player.itemLocation, but takes PlayerDrawInfo.position into account.
Definition: DrawInfo.cs:26
Color shoeColor
The color of the player's shoes, with lighting and transparency taken into account.
Definition: DrawInfo.cs:150
int headArmorShader
The ID of the shader (dye) on the player's head armor.
Definition: DrawInfo.cs:54
bool drawHair
Whether or not the player's hair is drawn.
Definition: DrawInfo.cs:42
int shoeShader
The ID of the shader (dye) on the player's shoe accessory.
Definition: DrawInfo.cs:82
Vector2 position
The position the player should be drawn in. Use this; do not use drawPlayer.position.
Definition: DrawInfo.cs:18
Color hairColor
The color of the player's hair, with lighting and transparency taken into account.
Definition: DrawInfo.cs:114
Color upperArmorColor
The color of all armor and accessories on the upper third of the player, with lighting and transparen...
Definition: DrawInfo.cs:154
int armGlowMask
The ID of the glow-mask on the player's arms.
Definition: DrawInfo.cs:178
Color eyeWhiteColor
The color of the whites of the player's eyes, with lighting and transparency taken into account...
Definition: DrawInfo.cs:118
Color armorColor
The color the player's armor should be shaded in. Alpha has already been taken into account...
Definition: DrawInfo.cs:265
int balloonShader
The ID of the shader (dye) on the player's balloon accessory.
Definition: DrawInfo.cs:102
float scale
The scale on the size in which the player should be drawn.
Definition: DrawInfo.cs:237
Color middleArmorColor
The color of all armor and accessories on the middle third of the player, with lighting and transpare...
Definition: DrawInfo.cs:158
Color hairColor
The color of the player's hair. Alpha has already been taken into account.
Definition: DrawInfo.cs:257
Color armGlowMaskColor
The color of the glow-mask on the player's arms.
Definition: DrawInfo.cs:194
Color lowerArmorColor
The color of all armor and accessories on the lower third of the player, with lighting and transparen...
Definition: DrawInfo.cs:166
Color bodyGlowMaskColor
The color of the glow-mask on the player's body.
Definition: DrawInfo.cs:190
bool drawAltHair
Whether the player's alternate (hat) hair texture should be drawn.
Definition: DrawInfo.cs:281
SpriteEffects spriteEffects
The SpriteEffects that should be used to draw the player (how the sprite should be flipped)...
Definition: DrawInfo.cs:202
Color eyeWhiteColor
The color of the whites of the player's eyes. Alpha has already been taken into account.
Definition: DrawInfo.cs:249
Color mountColor
The color of the player's mount, with lighting and transparency taken into account.
Definition: DrawInfo.cs:162
SpriteEffects spriteEffects
The SpriteEffects that should be used to draw the player. (SpriteEffects.None or SpriteEffects.FlipHorizontal)
Definition: DrawInfo.cs:269
Color bodyColor
The color of the player's body skin, with lighting and transparency taken into account.
Definition: DrawInfo.cs:130
short hairShader
The ID of the shader (dye) on the player's hair.
Definition: DrawInfo.cs:241
Vector2 legOrigin
The point around which the player's leg texture rotates.
Definition: DrawInfo.cs:214
bool drawArms
Whether or not the player's arms underneath the armor should be drawn.
Definition: DrawInfo.cs:34
int headGlowMask
The ID of the glow-mask on the player's head.
Definition: DrawInfo.cs:170
int legGlowMask
The ID of the glow-mask on the player's legs.
Definition: DrawInfo.cs:182
int wingShader
The ID of the shader (dye) on the player's wings.
Definition: DrawInfo.cs:106
Color headGlowMaskColor
The color of the glow-mask on the player's head.
Definition: DrawInfo.cs:186
Color shirtColor
The color of the player's shirt, with lighting and transparency taken into account.
Definition: DrawInfo.cs:138
bool drawHands
Whether or not the player's hands underneath the armor should be drawn.
Definition: DrawInfo.cs:30
int faceShader
The ID of the shader (dye) on the player's face accessory.
Definition: DrawInfo.cs:98