internal static bool Prefix(ref SpriteBatch __instance, Texture2D __state, ref Texture2D texture, ref Vector4 destination, ref bool scaleDestination, ref Rectangle?sourceRectangle, ref Color color, ref float rotation, ref Vector2 origin, ref SpriteEffects effects, ref float depth) { if (!VisualizeMod.active) { return(true); } if (texture.Format != SurfaceFormat.Color) { return(true); } __state = texture; if (!VisualizeMod.callDrawHandlers(ref __instance, ref texture, ref destination, ref scaleDestination, ref sourceRectangle, ref color, ref rotation, ref origin, ref effects, ref depth)) { return(false); } if (VisualizeMod._activeProfile.id == "Platonymous.Original" && VisualizeMod._config.saturation == 100 && VisualizeMod.palette.Count == 0) { return(true); } return(VisualizeMod._handler.Draw(ref __instance, ref texture, ref destination, ref scaleDestination, ref sourceRectangle, ref color, ref rotation, ref origin, ref effects, ref depth)); }
public static bool DrawStringFix(SpriteBatch __instance, SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation = 0f, Vector2?origin = null, float scale = 1f, SpriteEffects effects = SpriteEffects.None, float layerDepth = 0f) { if (!VisualizeMod.active) { return(true); } if ((VisualizeMod._activeProfile.id == "Platonymous.Original" || VisualizeMod._activeProfile.id == "auto") && VisualizeMod._config.saturation == 100 && VisualizeMod.palette.Count == 0) { return(true); } if (!VisualizeMod.callDrawHandlers(__instance, spriteFont, text, position, color, rotation, origin, scale, effects, layerDepth)) { return(false); } return(VisualizeMod._handler.Draw(__instance, spriteFont, text, position, color, rotation, origin, scale, effects, layerDepth)); }
public static bool DrawFix(SpriteBatch __instance, Texture2D texture, Rectangle destinationRectangle, Rectangle?sourceRectangle, Color color, Vector2 origin, float rotation, SpriteEffects effects, float layerDepth) { if (!VisualizeMod.active) { return(true); } if (texture.Format != SurfaceFormat.Color) { return(true); } if ((VisualizeMod._activeProfile.id == "Platonymous.Original" || VisualizeMod._activeProfile.id == "auto") && VisualizeMod._config.saturation == 100 && VisualizeMod.palette.Count == 0) { return(true); } if (!VisualizeMod.callDrawHandlers(__instance, texture, destinationRectangle, sourceRectangle, color, origin, rotation, effects, layerDepth)) { return(false); } return(VisualizeMod._handler.Draw(__instance, texture, destinationRectangle, sourceRectangle, color, origin, rotation, effects, layerDepth)); }