private void ReloadIcons() { if (miscdata80 == null) { return; } CHR0Node chr0 = miscdata80.FindChild("AnmChr(NW4R)/MenSelmapPos_TopN__" + (MyMusic ? "1" : "0"), false) as CHR0Node; if (chr0 == null) { return; } icons = new Tuple <Image, RectangleF> [_numIcons + 1]; CHR0EntryNode entry = chr0.FindChild("MenSelmapPos_TopN", false) as CHR0EntryNode; Vector3 offset = entry.GetAnimFrame(_numIcons + OFFSET).Translation; for (int i = 1; i <= _numIcons; i++) { entry = chr0.FindChild("pos" + i.ToString("D2"), false) as CHR0EntryNode; CHRAnimationFrame frame = entry.GetAnimFrame(_numIcons + OFFSET, true); float x = (BRAWLWIDTH / 2 + frame.Translation._x + offset._x) / BRAWLWIDTH; float y = (BRAWLHEIGHT / 2 - frame.Translation._y - offset._y) / BRAWLHEIGHT; float w = 6.4f * (frame.Scale._x) / BRAWLWIDTH; float h = 5.6f * (frame.Scale._y) / BRAWLHEIGHT; RectangleF r = new RectangleF(x, y, w, h); TextureContainer tc = new TextureContainer(miscdata80, IconOrder != null && i <= IconOrder.Length ? IconOrder[i - 1] : 100); if (tc.icon.tex0 == null) { continue; } Image image = tc.icon.tex0.GetImage(0); icons[i] = new Tuple <Image, RectangleF>(image, r); } var nexttex0 = miscdata80.FindChild("Textures(NW4R)/MenSelmapIcon_Change.1", false) as TEX0Node; if (nexttex0 != null) { float NEXTOFFSET = 10.8f; entry = chr0.FindChild("pos" + (_numIcons + 1).ToString("D2"), false) as CHR0EntryNode; CHRAnimationFrame frame2 = entry.GetAnimFrame(_numIcons + OFFSET, true); float x2 = (BRAWLWIDTH / 2 + frame2.Translation._x - NEXTOFFSET) / BRAWLWIDTH; float y2 = (BRAWLHEIGHT / 2 - frame2.Translation._y) / BRAWLHEIGHT; float w2 = 14.4f * (frame2.Scale._x) / BRAWLWIDTH; float h2 = 4.8f * (frame2.Scale._y) / BRAWLHEIGHT; RectangleF r2 = new RectangleF(x2, y2, w2, h2); Image image2 = nexttex0.GetImage(0); icons[0] = new Tuple <Image, RectangleF>(image2, r2); //pos00 is not used anyway, so let's overwrite it } this.Invalidate(); }