Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Terraria.GameContent.Liquid.LiquidRenderer Class Reference

Classes

struct  LiquidCache
 
struct  LiquidDrawCache
 
struct  SpecialLiquidDrawCache
 

Public Member Functions

unsafe void DrawNormalLiquids (SpriteBatch spriteBatch, Vector2 drawOffset, int waterStyle, float globalAlpha, bool isBackgroundDraw)
 
unsafe void DrawShimmer (SpriteBatch spriteBatch, Vector2 drawOffset, bool isBackgroundDraw)
 
int GetShimmerFrame (bool top, float worldPositionX, float worldPositionY)
 
bool HasFullWater (int x, int y)
 
float GetVisibleLiquid (int x, int y)
 
void Update (GameTime gameTime)
 
void PrepareDraw (Rectangle drawArea)
 
void SetWaveMaskData (ref Texture2D texture)
 
Rectangle GetCachedDrawArea ()
 

Static Public Member Functions

static void LoadContent ()
 
static VertexColors SetShimmerVertexColors_Sparkle (ref VertexColors colors, float opacity, int x, int y, bool top)
 
static void SetShimmerVertexColors (ref VertexColors colors, float opacity, int x, int y)
 
static float GetShimmerWave (ref float worldPositionX, ref float worldPositionY)
 
static Color GetShimmerGlitterColor (bool top, float worldPositionX, float worldPositionY)
 
static float GetShimmerGlitterOpacity (bool top, float worldPositionX, float worldPositionY)
 
static Vector4 GetShimmerBaseColor (float worldPositionX, float worldPositionY)
 

Static Public Attributes

const float MIN_LIQUID_SIZE = 0.25f
 
static LiquidRenderer Instance
 

Properties

static Tile[,] Tiles [get]
 

Events

Action< Color[], RectangleWaveFilters
 

Private Member Functions

void PrepareAssets ()
 
unsafe void InternalPrepareDraw (Rectangle drawArea)
 

Static Private Member Functions

static uint SimpleWhiteNoise (uint x, uint y)
 

Private Attributes

readonly Asset< Texture2D >[] _liquidTextures = new Asset<Texture2D>[15]
 
LiquidCache[] _cache = new LiquidCache[1]
 
LiquidDrawCache[] _drawCache = new LiquidDrawCache[1]
 
SpecialLiquidDrawCache[] _drawCacheForShimmer = new SpecialLiquidDrawCache[1]
 
int _animationFrame
 
Rectangle _drawArea = new Rectangle(0, 0, 1, 1)
 
readonly UnifiedRandom _random = new UnifiedRandom()
 
Color[] _waveMask = new Color[1]
 
float _frameState
 

Static Private Attributes

const int ANIMATION_FRAME_COUNT = 16
 
const int CACHE_PADDING = 2
 
const int CACHE_PADDING_2 = 4
 
static readonly int[] WATERFALL_LENGTH = new int[4] { 10, 3, 2, 10 }
 
static readonly float[] DEFAULT_OPACITY = new float[4] { 0.6f, 0.95f, 0.95f, 0.75f }
 
static readonly byte[] WAVE_MASK_STRENGTH = new byte[5]
 
static readonly byte[] VISCOSITY_MASK = new byte[5] { 0, 200, 240, 0, 0 }
 

Detailed Description

Definition at line 11 of file LiquidRenderer.cs.


The documentation for this class was generated from the following file: