2994 {
2999 if (tile == null)
3000 {
3003 }
3005 {
3008 }
3010 {
3013 }
3015 {
3018 }
3020 {
3021 return;
3022 }
3023 int num = 0;
3024 bool flag = false;
3031 int num3 = tileCache.slope();
3032 int num4 = tileCache.blockType();
3033 if (tileCache.type == 546 && tileCache.liquid > 0)
3034 {
3037 flag = true;
3039 switch (tileCache.liquidType())
3040 {
3041 case 0:
3043 break;
3044 case 1:
3046 break;
3047 case 2:
3049 break;
3050 case 3:
3052 break;
3053 }
3054 num = tileCache.liquid;
3055 }
3056 else
3057 {
3058 if (tileCache.liquid > 0 &&
num4 != 0 && (
num4 != 1 || tileCache.liquid > 160))
3059 {
3061 switch (tileCache.liquidType())
3062 {
3063 case 0:
3065 break;
3066 case 1:
3068 break;
3069 case 2:
3071 break;
3072 case 3:
3074 break;
3075 }
3076 if (tileCache.liquid > num)
3077 {
3078 num = tileCache.liquid;
3079 }
3080 }
3082 {
3083 flag = true;
3084 switch (
tile2.liquidType())
3085 {
3086 case 0:
3088 break;
3089 case 1:
3091 break;
3092 case 2:
3094 break;
3095 case 3:
3097 break;
3098 }
3099 if (
tile2.liquid > num)
3100 {
3102 }
3103 }
3104 if (tile.liquid > 0 &&
num3 != 2 &&
num3 != 4)
3105 {
3107 switch (tile.liquidType())
3108 {
3109 case 0:
3111 break;
3112 case 1:
3114 break;
3115 case 2:
3117 break;
3118 case 3:
3120 break;
3121 }
3122 if (tile.liquid > num)
3123 {
3124 num = tile.liquid;
3125 }
3126 }
3128 {
3130 switch (
tile3.liquidType())
3131 {
3132 case 0:
3134 break;
3135 case 1:
3137 break;
3138 case 2:
3140 break;
3141 case 3:
3143 break;
3144 }
3145 }
3147 {
3148 if (
tile4.liquid > 240)
3149 {
3151 }
3152 switch (
tile4.liquidType())
3153 {
3154 case 0:
3156 break;
3157 case 1:
3159 break;
3160 case 2:
3162 break;
3163 case 3:
3165 break;
3166 }
3167 }
3168 }
3170 {
3171 return;
3172 }
3174 {
3176 }
3178 {
3179 num2 = Main.waterStyle;
3180 }
3185 {
3186 flag = true;
3188 }
3189 if (tileCache.active() && (Main.tileSolidTop[tileCache.type] || !Main.tileSolid[tileCache.type]))
3190 {
3191 return;
3192 }
3194 {
3196 {
3198 if (tileCache.halfBrick() || tileCache.slope() != 0)
3199 {
3201 }
3202 }
3204 {
3207 }
3208 else
3209 {
3210 float num5 = (float)(256 - num) / 32f;
3211 int y = 4;
3213 {
3214 y = 0;
3215 }
3217 if (tileCache.slope() != 0)
3218 {
3221 }
3222 else if ((flag &&
flag2) || tileCache.halfBrick())
3223 {
3226 }
3227 else if (flag)
3228 {
3231 }
3232 else
3233 {
3236 }
3237 }
3238 }
3242 {
3243 case 1:
3245 break;
3246 case 11:
3248 break;
3249 }
3251 {
3253 if (tileCache.wall == 21)
3254 {
3256 }
3257 else if (tileCache.wall > 0)
3258 {
3260 }
3261 }
3262 if (tileCache.halfBrick() &&
tile3.liquid > 0 && tileCache.wall > 0)
3263 {
3265 }
3267 {
3269 }
3271 {
3273 }
3274 vertices.BottomLeftColor *=
num7;
3275 vertices.BottomRightColor *=
num7;
3276 vertices.TopLeftColor *=
num7;
3277 vertices.TopRightColor *=
num7;
3280 {
3281 for (
int i = 0;
i < 15;
i++)
3282 {
3283 if (Main.IsLiquidStyleWater(i) && Main.liquidAlpha[i] > 0f && i !=
num2)
3284 {
3287 break;
3288 }
3289 }
3290 }
3293 colors.BottomLeftColor *=
num8;
3294 colors.BottomRightColor *=
num8;
3295 colors.TopLeftColor *=
num8;
3296 colors.TopRightColor *=
num8;
3298 {
3300 }
3302 }
static byte Max(byte val1, byte val2)
void DrawPartialLiquid(bool behindBlocks, Tile tileCache, ref Vector2 position, ref Rectangle liquidSize, int liquidType, ref VertexColors colors)
static void SetShimmerVertexColors(ref VertexColors colors, float opacity, int x, int y)
static bool[] BlocksWaterDrawingBehindSelf