private void FileBrowser_Load(object sender, EventArgs e) { if (!DesignMode) { images = new ImageList(); images.ColorDepth = ColorDepth.Depth32Bit; images.ImageSize = new System.Drawing.Size(32, 32); var g = EveryFileExplorerUtil.GetFileCategories(); foreach (String s in g) { listView1.Groups.Add(s, s); } var g2 = EveryFileExplorerUtil.GetFileIcons(); foreach (var q in g2.Keys) { images.Images.Add(q, g2[q]); } images.Images.Add("Folder", Resource.folder); listView1.LargeImageList = images; images2 = new ImageList(); images2.ColorDepth = ColorDepth.Depth32Bit; images2.ImageSize = new System.Drawing.Size(16, 16); images2.Images.Add(Resource.folder_open); treeView1.ImageList = images2; treeView1.ImageIndex = 0; } }
public void FileOpened(ViewableFile File) { if (!(File.FileFormat is NSBTX)) { return; } ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(NSBTX)); menuItem1.MenuItems.Clear(); bool curavab = false; foreach (var vv in v) { var m = menuItem1.MenuItems.Add(vv.File.Name); if (vv.FileFormat == tex) { curavab = true; m.Checked = true; } } if (!curavab && v.Length != 0) { menuItem1.MenuItems[0].Checked = true; tex = v[0].FileFormat; } LoadTex(); if (ModViewer != null) { ModViewer.Render(); ModViewer.Render(); } }
void Dialog_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.MdiFormClosing) { EveryFileExplorerUtil.DisableFileDependencyDialog(); } if (DialogClosing != null) { e.Cancel = !DialogClosing.Invoke(this); } }
public override void Save() { File.Data = GetDataForSave(); if (Parent != null) { ViewableFile v = EveryFileExplorerUtil.GetViewableFileFromFile(Parent); if (v.Dialog is IChildReactive) { ((IChildReactive)v.Dialog).OnChildSave(EveryFileExplorerUtil.GetViewableFileFromFile(this)); } } }
public ListViewItem[] GetContent() { ListViewItem[] Items = new ListViewItem[SubDirectories.Count + Files.Count]; for (int i = 0; i < SubDirectories.Count; i++) { Items[i] = new ListViewItem(SubDirectories[i].DirectoryName, "Folder") { Tag = "Folders" }; } Parallel.For(0, Files.Count, index => { Items[SubDirectories.Count + index] = EveryFileExplorerUtil.GetFileItem(new EFESFSFile(Files[index])); }); return(Items); }
public ListViewItem[] GetContent() { List <ListViewItem> Items = new List <ListViewItem>(); foreach (var v in SubDirectories) { Items.Add(new ListViewItem(v.DirectoryName, "Folder") { Tag = "Folders" }); } foreach (var v in Files) { Items.Add(EveryFileExplorerUtil.GetFileItem(new EFESFSFile(v))); } return(Items.ToArray()); }
public void FileClosed(ViewableFile File) { if (File.FileFormat is MKDS.KCL && File.FileFormat == KCL) { KCL = null; } ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(MKDS.KCL)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } Render(); Render(); }
public void FileOpened(ViewableFile File) { ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(MKDS.KCL)); menuItem1.MenuItems.Clear(); bool curavab = false; foreach (var vv in v) { var m = menuItem1.MenuItems.Add(vv.File.Name); if (vv.FileFormat == KCL) { curavab = true; m.Checked = true; } } if (!curavab && v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } Render(); Render(); }
public void FileClosed(ViewableFile File) { if (File.FileFormat is NSBTX && File.FileFormat == tex) { tex = null; } ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(NSBTX)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; tex = v[0].FileFormat; } LoadTex(); if (ModViewer != null) { ModViewer.Render(); ModViewer.Render(); } }
private void fileBrowser1_OnFileActivated(string Path) { var s = Root.GetFileByPath(Path); EveryFileExplorerUtil.OpenFile(new EFESFSFile(s), ((ViewableFile)Tag).File); }
private void NKMDViewer_Load(object sender, EventArgs e) { Gl.glEnable(Gl.GL_COLOR_MATERIAL); Gl.glEnable(Gl.GL_DEPTH_TEST); Gl.glDepthFunc(Gl.GL_ALWAYS); Gl.glEnable(Gl.GL_LOGIC_OP); Gl.glDisable(Gl.GL_CULL_FACE); Gl.glEnable(Gl.GL_TEXTURE_2D); Gl.glEnable(Gl.GL_LINE_SMOOTH); Gl.glEnable(Gl.GL_BLEND); Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(KCL)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } if (NKMD.ObjectInformation != null) { AddTab <MKDS.NKM.OBJI.OBJIEntry>("OBJI", NKMD.ObjectInformation); } if (NKMD.Path != null) { AddTab <PATH.PATHEntry>("PATH", NKMD.Path); } if (NKMD.Point != null) { AddTab <POIT.POITEntry>("POIT", NKMD.Point); } if (NKMD.KartPointStart != null) { AddTab <KTPS.KTPSEntry>("KTPS", NKMD.KartPointStart); } if (NKMD.KartPointJugem != null) { AddTab <KTPJ.KTPJEntry>("KTPJ", NKMD.KartPointJugem); } if (NKMD.KartPointSecond != null) { AddTab <KTP2.KTP2Entry>("KTP2", NKMD.KartPointSecond); } if (NKMD.KartPointCannon != null) { AddTab <KTPC.KTPCEntry>("KTPC", NKMD.KartPointCannon); } if (NKMD.KartPointMission != null) { AddTab <KTPM.KTPMEntry>("KTPM", NKMD.KartPointMission); } if (NKMD.CheckPoint != null) { AddTab <CPOI.CPOIEntry>("CPOI", NKMD.CheckPoint); } if (NKMD.CheckPointPath != null) { AddTab <CPAT.CPATEntry>("CPAT", NKMD.CheckPointPath); } if (NKMD.ItemPoint != null) { AddTab <IPOI.IPOIEntry>("IPOI", NKMD.ItemPoint); } if (NKMD.ItemPath != null) { AddTab <IPAT.IPATEntry>("IPAT", NKMD.ItemPath); } if (NKMD.EnemyPoint != null) { AddTab <EPOI.EPOIEntry>("EPOI", NKMD.EnemyPoint); } if (NKMD.EnemyPath != null) { AddTab <EPAT.EPATEntry>("EPAT", NKMD.EnemyPath); } if (NKMD.MiniGameEnemyPoint != null) { AddTab <MEPO.MEPOEntry>("MEPO", NKMD.MiniGameEnemyPoint); } if (NKMD.MiniGameEnemyPath != null) { AddTab <MEPA.MEPAEntry>("MEPA", NKMD.MiniGameEnemyPath); } if (NKMD.Area != null) { AddTab <AREA.AREAEntry>("AREA", NKMD.Area); } if (NKMD.Camera != null) { AddTab <CAME.CAMEEntry>("CAME", NKMD.Camera); } Bitmap b3 = OBJI.OBJ_2D01; System.Resources.ResourceSet s = OBJI.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, false, false); foreach (Object b in s) { Bitmap b2 = ((Bitmap)((System.Collections.DictionaryEntry)b).Value); BitmapData bd = b2.LockBits(new Rectangle(0, 0, b2.Width, b2.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_MODULATE); if ((String)((System.Collections.DictionaryEntry)b).Key != "start") { Gl.glBindTexture(Gl.GL_TEXTURE_2D, BitConverter.ToUInt16(BitConverter.GetBytes(ushort.Parse(((String)((System.Collections.DictionaryEntry)b).Key).Split('_')[1], System.Globalization.NumberStyles.HexNumber)).Reverse().ToArray(), 0)); } else { Gl.glBindTexture(Gl.GL_TEXTURE_2D, -1); } Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, b2.Width, b2.Height, 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, bd.Scan0); b2.UnlockBits(bd); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_S, Gl.GL_CLAMP); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_T, Gl.GL_CLAMP); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_NEAREST); Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_NEAREST); } init = true; Render(); Render(); }
private void NKMDViewer_Load(object sender, EventArgs e) { ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(KCL)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } if (NKMD.ObjectInformation != null) { AddTab <MKDS.NKM.OBJI.OBJIEntry>("OBJI", NKMD.ObjectInformation); } if (NKMD.Path != null) { AddTab <PATH.PATHEntry>("PATH", NKMD.Path); } if (NKMD.Point != null) { AddTab <POIT.POITEntry>("POIT", NKMD.Point); } if (NKMD.Path != null && NKMD.Point != null) { TabPage p = new TabPage("Routes"); var vv = new MKDSRouteViewer(NKMD.Path, NKMD.Point) { Dock = DockStyle.Fill }; vv.OnSelected += new SelectedEventHandler(GameDataSectionViewer_OnSelected); SectionViewers.Add(vv); p.Controls.Add(vv); tabControl1.TabPages.Add(p); } if (NKMD.KartPointStart != null) { AddTab <KTPS.KTPSEntry>("KTPS", NKMD.KartPointStart); } if (NKMD.KartPointJugem != null) { AddTab <KTPJ.KTPJEntry>("KTPJ", NKMD.KartPointJugem); } if (NKMD.KartPointSecond != null) { AddTab <KTP2.KTP2Entry>("KTP2", NKMD.KartPointSecond); } if (NKMD.KartPointCannon != null) { AddTab <KTPC.KTPCEntry>("KTPC", NKMD.KartPointCannon); } if (NKMD.KartPointMission != null) { AddTab <KTPM.KTPMEntry>("KTPM", NKMD.KartPointMission); } if (NKMD.CheckPoint != null) { AddTab <CPOI.CPOIEntry>("CPOI", NKMD.CheckPoint); } if (NKMD.CheckPointPath != null) { AddTab <CPAT.CPATEntry>("CPAT", NKMD.CheckPointPath); } if (NKMD.ItemPoint != null) { AddTab <IPOI.IPOIEntry>("IPOI", NKMD.ItemPoint); } if (NKMD.ItemPath != null) { AddTab <IPAT.IPATEntry>("IPAT", NKMD.ItemPath); } if (NKMD.EnemyPoint != null) { AddTab <EPOI.EPOIEntry>("EPOI", NKMD.EnemyPoint); } if (NKMD.EnemyPath != null) { AddTab <EPAT.EPATEntry>("EPAT", NKMD.EnemyPath); } if (NKMD.MiniGameEnemyPoint != null) { AddTab <MEPO.MEPOEntry>("MEPO", NKMD.MiniGameEnemyPoint); } if (NKMD.MiniGameEnemyPath != null) { AddTab <MEPA.MEPAEntry>("MEPA", NKMD.MiniGameEnemyPath); } if (NKMD.Area != null) { AddTab <AREA.AREAEntry>("AREA", NKMD.Area); } if (NKMD.Camera != null) { AddTab <CAME.CAMEEntry>("CAME", NKMD.Camera); } if (NKMD.Area != null) { mapViewer1.Groups.Add(new MKDSAreaRenderGroup(NKMD.Area, Color.FromArgb(64, Color.CornflowerBlue))); } if (NKMD.Point != null && NKMD.Path != null) { mapViewer1.Groups.Add(new MKDSRouteLineRenderGroup(NKMD.Path, NKMD.Point, Color.FromArgb(0, 0, 128))); } if (NKMD.Point != null) { mapViewer1.Groups.Add(new PointRenderGroup <POIT.POITEntry>(Color.FromArgb(0, 0, 128), NKMD.Point, typeof(POIT.POITEntry).GetProperty("Position"))); } if (NKMD.CheckPoint != null && NKMD.CheckPointPath != null) { mapViewer1.Groups.Add(new MKDSCheckPointLineRenderGroup(NKMD.CheckPoint, NKMD.CheckPointPath, Color.FromArgb(0, 170, 0), Color.FromArgb(170, 0, 0))); } if (NKMD.CheckPoint != null) { mapViewer1.Groups.Add(new MKDSCheckPointPoint1RenderGroup(NKMD.CheckPoint, Color.FromArgb(0, 170, 0))); } if (NKMD.CheckPoint != null) { mapViewer1.Groups.Add(new MKDSCheckPointPoint2RenderGroup(NKMD.CheckPoint, Color.FromArgb(170, 0, 0))); } if (NKMD.ItemPoint != null && NKMD.ItemPath != null) { mapViewer1.Groups.Add(new MKDSItemPointLineRenderGroup(NKMD.ItemPoint, NKMD.ItemPath, Color.FromArgb(/*255, 230*/ 204, 153, 0))); } if (NKMD.ItemPoint != null) { mapViewer1.Groups.Add(new PointRenderGroup <IPOI.IPOIEntry>(Color.FromArgb(/*255, 230*/ 204, 153, 0), NKMD.ItemPoint, typeof(IPOI.IPOIEntry).GetProperty("Position"))); } if (NKMD.EnemyPoint != null && NKMD.EnemyPath != null) { mapViewer1.Groups.Add(new MKDSEnemyPointLineRenderGroup(NKMD.EnemyPoint, NKMD.EnemyPath, Color.FromArgb(0, 204, 0))); } if (NKMD.EnemyPoint != null) { mapViewer1.Groups.Add(new PointRenderGroup <EPOI.EPOIEntry>(Color.FromArgb(0, 204, 0), NKMD.EnemyPoint, typeof(EPOI.EPOIEntry).GetProperty("Position"))); } if (NKMD.MiniGameEnemyPoint != null && NKMD.MiniGameEnemyPath != null) { mapViewer1.Groups.Add(new MKDSMiniGameEnemyPointLineRenderGroup(NKMD.MiniGameEnemyPoint, NKMD.MiniGameEnemyPath, Color.FromArgb(0, 204, 0))); } if (NKMD.MiniGameEnemyPoint != null) { mapViewer1.Groups.Add(new PointRenderGroup <MEPO.MEPOEntry>(Color.FromArgb(0, 204, 0), NKMD.MiniGameEnemyPoint, typeof(MEPO.MEPOEntry).GetProperty("Position"))); } if (NKMD.ObjectInformation != null) { mapViewer1.Groups.Add(new MKDSObjectRenderGroup(NKMD.ObjectInformation, Color.Red)); } if (NKMD.KartPointStart != null) { mapViewer1.Groups.Add(new PointRenderGroup <KTPS.KTPSEntry>(Color.Black, NKMD.KartPointStart, typeof(KTPS.KTPSEntry).GetProperty("Position"))); } if (NKMD.KartPointJugem != null) { mapViewer1.Groups.Add(new PointRenderGroup <KTPJ.KTPJEntry>(Color.Orange, NKMD.KartPointJugem, typeof(KTPJ.KTPJEntry).GetProperty("Position"))); } if (NKMD.KartPointSecond != null) { mapViewer1.Groups.Add(new PointRenderGroup <KTP2.KTP2Entry>(Color.FromArgb(0, 230, 255), NKMD.KartPointSecond, typeof(KTP2.KTP2Entry).GetProperty("Position"))); } if (NKMD.KartPointCannon != null) { mapViewer1.Groups.Add(new PointRenderGroup <KTPC.KTPCEntry>(Color.FromArgb(255, 0, 128), NKMD.KartPointCannon, typeof(KTPC.KTPCEntry).GetProperty("Position"))); } if (NKMD.KartPointMission != null) { mapViewer1.Groups.Add(new PointRenderGroup <KTPM.KTPMEntry>(Color.MediumPurple, NKMD.KartPointMission, typeof(KTPM.KTPMEntry).GetProperty("Position"))); } if (NKMD.Area != null) { mapViewer1.Groups.Add(new PointRenderGroup <AREA.AREAEntry>(Color.CornflowerBlue, NKMD.Area, typeof(AREA.AREAEntry).GetProperty("Position"))); } if (NKMD.Camera != null) { mapViewer1.Groups.Add(new PointRenderGroup <CAME.CAMEEntry>(Color.BurlyWood, NKMD.Camera, typeof(CAME.CAMEEntry).GetProperty("Position"))); } }
private void NKMDViewer_Load(object sender, EventArgs e) { GL.Enable(EnableCap.ColorMaterial); GL.Enable(EnableCap.DepthTest); GL.DepthFunc(DepthFunction.Always); GL.Enable(EnableCap.IndexLogicOp); GL.Disable(EnableCap.CullFace); GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.LineSmooth); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha); ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(KCL)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } if (MapData.KartPoint != null) { AddTab <KTPT.KTPTEntry>("KTPT", MapData.KartPoint); } if (MapData.EnemyPoint != null) { AddTab <ENPT.ENPTEntry>("ENPT", MapData.EnemyPoint); } if (MapData.EnemyPointPath != null) { AddTab <ENPH.ENPHEntry>("ENPH", MapData.EnemyPointPath); } if (MapData.ItemPoint != null) { AddTab <ITPT.ITPTEntry>("ITPT", MapData.ItemPoint); } if (MapData.ItemPointPath != null) { AddTab <ITPH.ITPHEntry>("ITPH", MapData.ItemPointPath); } if (MapData.CheckPoint != null) { AddTab <CKPT.CKPTEntry>("CKPT", MapData.CheckPoint); } if (MapData.CheckPointPath != null) { AddTab <CKPH.CKPHEntry>("CKPH", MapData.CheckPointPath); } if (MapData.GlobalObject != null) { AddTab <GOBJ.GOBJEntry>("GOBJ", MapData.GlobalObject); } if (MapData.Area != null) { AddTab <AREA.AREAEntry>("AREA", MapData.Area); } if (MapData.Camera != null) { AddTab <CAME.CAMEEntry>("CAME", MapData.Camera); } if (MapData.JugemPoint != null) { AddTab <JGPT.JGPTEntry>("JGPT", MapData.JugemPoint); } if (MapData.GliderPoint != null) { AddTab <GLPT.GLPTEntry>("GLPT", MapData.GliderPoint); } if (MapData.GliderPointPath != null) { AddTab <GLPH.GLPHEntry>("GLPH", MapData.GliderPointPath); } /*Bitmap b3 = OBJI.OBJ_2D01; * System.Resources.ResourceSet s = OBJI.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, false, false); * foreach (Object b in s) * { * Bitmap b2 = ((Bitmap)((System.Collections.DictionaryEntry)b).Value); * BitmapData bd = b2.LockBits(new Rectangle(0, 0, b2.Width, b2.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); * GL.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE); * if ((String)((System.Collections.DictionaryEntry)b).Key != "start") * { * GL.glBindTexture(GL.GL_TEXTURE_2D, BitConverter.ToUInt16(BitConverter.GetBytes(ushort.Parse(((String)((System.Collections.DictionaryEntry)b).Key).Split('_')[1], System.Globalization.NumberStyles.HexNumber)).Reverse().ToArray(), 0)); * } * else * { * GL.glBindTexture(GL.GL_TEXTURE_2D, -1); * } * GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA8, b2.Width, b2.Height, 0, GL.GL_BGRA, GL.GL_UNSIGNED_BYTE, bd.Scan0); * b2.UnlockBits(bd); * GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP); * GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP); * GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST); * GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); * }*/ init = true; Render(); Render(); }
private void NKMDViewer_Load(object sender, EventArgs e) { Gl.glEnable(Gl.GL_COLOR_MATERIAL); Gl.glEnable(Gl.GL_DEPTH_TEST); Gl.glDepthFunc(Gl.GL_ALWAYS); Gl.glEnable(Gl.GL_LOGIC_OP); Gl.glDisable(Gl.GL_CULL_FACE); Gl.glEnable(Gl.GL_TEXTURE_2D); Gl.glEnable(Gl.GL_LINE_SMOOTH); Gl.glEnable(Gl.GL_BLEND); Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); ViewableFile[] v = EveryFileExplorerUtil.GetOpenFilesOfType(typeof(MK7.KCL)); menuItem1.MenuItems.Clear(); foreach (var vv in v) { menuItem1.MenuItems.Add(vv.File.Name); } if (v.Length != 0) { menuItem1.MenuItems[0].Checked = true; KCL = v[0].FileFormat; } if (CDMD.CheckPoints != null) { TabPage p = new TabPage("CKPT"); p.Controls.Add(new LibEveryFileExplorer.UI.GameDataSectionViewer <MK7.CDMD.CKPT.CKPTEntry>(CDMD.CheckPoints) { Dock = DockStyle.Fill }); tabControl1.TabPages.Add(p); } if (CDMD.CheckPaths != null) { TabPage p = new TabPage("CKPH"); p.Controls.Add(new LibEveryFileExplorer.UI.GameDataSectionViewer <MK7.CDMD.CKPH.CKPHEntry>(CDMD.CheckPaths) { Dock = DockStyle.Fill }); tabControl1.TabPages.Add(p); } if (CDMD.GlobalObjects != null) { TabPage p = new TabPage("GOBJ"); p.Controls.Add(new LibEveryFileExplorer.UI.GameDataSectionViewer <MK7.CDMD.GOBJ.GOBJEntry>(CDMD.GlobalObjects) { Dock = DockStyle.Fill }); tabControl1.TabPages.Add(p); } /*Bitmap b3 = OBJI.OBJ_2D01; * System.Resources.ResourceSet s = OBJI.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, false, false); * foreach (Object b in s) * { * Bitmap b2 = ((Bitmap)((System.Collections.DictionaryEntry)b).Value); * BitmapData bd = b2.LockBits(new Rectangle(0, 0, b2.Width, b2.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); * Gl.glTexEnvf(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_MODULATE); * if ((String)((System.Collections.DictionaryEntry)b).Key != "start") * { * Gl.glBindTexture(Gl.GL_TEXTURE_2D, BitConverter.ToUInt16(BitConverter.GetBytes(ushort.Parse(((String)((System.Collections.DictionaryEntry)b).Key).Split('_')[1], System.Globalization.NumberStyles.HexNumber)).Reverse().ToArray(), 0)); * } * else * { * Gl.glBindTexture(Gl.GL_TEXTURE_2D, -1); * } * Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, Gl.GL_RGBA8, b2.Width, b2.Height, 0, Gl.GL_BGRA, Gl.GL_UNSIGNED_BYTE, bd.Scan0); * b2.UnlockBits(bd); * Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_S, Gl.GL_CLAMP); * Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_WRAP_T, Gl.GL_CLAMP); * Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_NEAREST); * Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_NEAREST); * }*/ init = true; Render(); Render(); }