public static Color decideColor(EnemyGroup.EnemyEntry entry) { VisualSettings Settings = (Application.OpenForms[0] as Form1).Settings; byte rmask = 0, gmask = 0, bmask = 0; if (entry.KeepMiniturbo) { rmask += 0xEF; gmask += 0x95; } if (entry.EncourageMiniturbo) { bmask = 0xEF; } return(Color.FromArgb(Settings.EnemyColor.A, (Settings.EnemyColor.R + rmask), (Settings.EnemyColor.G + gmask), (Settings.EnemyColor.B + bmask))); }
public static void decideDrawLineMode(EnemyGroup.EnemyEntry entry) { VisualSettings Settings = (Application.OpenForms[0] as Form1).Settings; if (entry.DriftSettingsVal == 0) { Gl.glLineStipple(3, 0xAAAA); Gl.glEnable(Gl.GL_LINE_STIPPLE); } else if (entry.DriftSettingsVal == 1) { Gl.glLineStipple(3, 0xEEEE); Gl.glEnable(Gl.GL_LINE_STIPPLE); } Color newcolor = decideColor(entry); Gl.glColor4f(newcolor.R / 255f, newcolor.G / 255f, newcolor.B / 255f, newcolor.A / 255f); }